Page 1 of 1

Compile error dialog

Posted: Sun Sep 30, 2007 4:22 pm
by oshika55
I am trying to develop a script editor, ladden with a bunch of shortcuts I've always wished I had from ever since the days of HyperTalk. It all seems to work. Upon last step: "Set script of object theObject to theScript", I'm yet to find the easiest way to get the compiler to display compile errors if any. Probably very simple ...

Posted: Mon Oct 01, 2007 11:44 am
by Mark
Dear oshika55,

Check the result after setting the script.

Best,

Mark

Posted: Wed Oct 03, 2007 1:48 pm
by oshika55
Thanks Mark. It had to be that simple ! Now how do I get it to display the built-in compile error dialog instead of the series of numbers that require further translation ?

Thanks again for your reply.

Posted: Wed Oct 03, 2007 2:06 pm
by Mark
Hi,


Maybe you could use ErrorLib, which you can find here: http://economy-x-talk.com/developers.html

Otherwise, you'll have to look into Rev's scripts to find out how to do this. There is a list with all the errors somewhere in the revErrorDisplay stack, which is used to translate the numbers to something readable.

Best,

Mark

Posted: Wed Oct 03, 2007 2:28 pm
by oshika55
Thanks again Mark. Unless I'm wrong, errorLib doesn't deal with compile errors, but execution errors ... I guess I'll have to do the translation myself, based on the "revErrorDisplay" stack. Thank you for putting me in the right direction anyway.

Posted: Wed Oct 03, 2007 2:40 pm
by Mark
Hi,

ErrorLib contains everything to write your own error handling, including compile errors AFAIK.

Mark

Posted: Wed Oct 03, 2007 2:50 pm
by oshika55
Well, then I shall look into errorLib. On your web page, the description only mentions execution errors ...

Thanks

Posted: Wed Oct 03, 2007 3:45 pm
by FourthWorld
Small world: I've been working on a script editor also, primarily for the same reason, to include shortcuts (and a few other things).

The biggest challenge isn't the script editing itself. In its simplest form, that's just a matter of trapping the editScript message in a frontScript, providing a field to edit in, and setting the script when you're done.

The hard part is integrating it with the debugger, variable watcher, etc.

Ken Ray has produced what is probably the most complete variable watcher around, and we're using that with other components from the open source MetaCard IDE to create this editing/debugging tool.

When I get it to a stable form that works well in Rev (at the moment its tied to MetaCard), I'll be releasing it as ROSE: Rev Open Source Editor. Then we can all contribute mods to it within a stable framework that runs anywhere.

I'll post a note here when it's in a form worth working with. Should be another few weeks.