Re: parents ScriptEditor and Smile
Re: parents ScriptEditor and Smile
- Subject: Re: parents ScriptEditor and Smile
- From: Emmanuel <email@hidden>
- Date: Sat, 17 Feb 2001 00:47:25 +0100
At 3:03 +0100 15/02/01, Patrick S. Page-McCaw wrote:
>
I'm having what I think is a problem understanding inheritance.
>
I am trying to use Serial Port OSAX and Dialog Director to create an
>
application
>
Smile compiles fine, but it cant run. It balks at the first handler in the
>
grandparent. "script does not understand the handler", is more or less the
>
error message.
As a matter of fact, the current public version of Smile is set not to
store the parent script of a script.
This is for three reasons:
- we found storing it useless, since its main use is including libraries,
and Smile has more powerful mechanisms (yet, pure AppleScript stuff) to
achieve this.
This is not a good reason for scripts which are not run under Smile.
- we found storing it potentially confusing, since beginners may believe
that the link to the "parent: load script ..." be dynamic, while it is not
(not always, to make it short).
This remains true.
- we found storing it potentially dangerous, since in some complex
circumstances a script would include an invisible parent, generating the
surprising swelling up of script files already reported by several users.
Those latter complex circumstances are no longer encountered by us.
So, we have chosen to set Smile 1.8.0 (not public yet) so that it does
store the parent script, like Script Editor.
We apologize for any undocumented trouble this may have caused. As a (poor)
workaround, the script must tell explicitely to the given "parent" script
what it expects from it:
-------------------- untested
tell (load script file "HD:Folder:Dad") to AskDad()
--------------------
Best regards,
Emmanuel