>use the script of file "filename"
>use the script of <object_reference>
As Scott said, the problem is that in HyperTalk there usually isn't a
difference between at runtime or at compile-time. Imagine you had a script
like the following:
use script of cd btn 5
on mouseUp
delete cd btn 5
end mouseUp
What error do you get now? Logically, you'd suddenly get a compile-time
error. But it has already been compiled. We'd have to keep track of all
such "use" instructions in all our handlers and recompile a script as soon
as anything changes. This sounds easy, but in this particular case it'd
slow down the whole engine. Also, relative to what would we locate the cd
btn 5? Imagine you have this bit of script in a stack script that was
start-used; we would have to recompile the whole stack script every time
the card changes, or the users would have unpredictable results -- believe
me, it's not worth the trouble.
I don't mind if we add an include instruction to include text files to
OpenTalk, but the OpenTalk version in OpenCard as a HyperCard-clone
shouldn't have this. It should be only in OpenScript, to use your terms.
People can easily do this using a "insert script" command, where it'll be
clear when what will be included, as this command is going to be executed
at a certain time.
>These lines would be anywhere in the script outside of
>a messageHandler. This syntax solves the CGI
>programmers needs, as well as creates some semblence
>of Object Orientation during GUI development.
Michael,
include has nothing to do with OO, trust me. Include is an old remnant
from procedural programming way back when a compiler would only compile a
single source file. Include let you split your script into multiple files
so you could organize it better. OpenTalk can live w/o include. It has
"start using" and "insert script" which will be enough if our objects are
flexible enough.
>And rather than have it be textual include it becomes a
>backscript of this script.
Then why not just use "insert script of xy into back"? There's no use in
reinventing an existing command. For OpenScript this would only need to be
extended to work with files. Just write a few "insert script" instructions
into the first lines of your startUp handler and that's it.
>PS While I am happy about the new regex feature, is it
> worth the cost of the new library size? Like I said I
> have needed, but I have been able to make do without
> it and if it costs me significantly in some area, I might
> just prefer to do without it.
This new regex feature is currently only in MetaCard. It will *not* be in
our first OpenCard release, as that has been frozen to do what HyperCard
does just w/o the limits.
Cheers,
-- M. Uli Kusterer
------------------------------------------------------------
http://www.weblayout.com/witness
'The Witnesses of TeachText are everywhere...'
--- HELP SAVE HYPERCARD: ---
Details at: http://www.hyperactivesw.com/SaveHC.html
Sign: http://www.giguere.uqam.ca/petition/hcpetition.html