Re: Parent Property And Facespan
Re: Parent Property And Facespan
- Subject: Re: Parent Property And Facespan
- From: cris <email@hidden>
- Date: Wed, 10 Jan 2001 03:37:50 +0100
on 09.01.2001 22:17 Uhr, Arthur J Knapp at email@hidden wrote:
>
> Date: Tue, 09 Jan 2001 15:42:20 +0100
>
> Subject: Parent Property And Facespan
>
> From: cris <email@hidden>
>
>
> I try to use a parent property in a FS project script. Parent properties
>
> normally work well when i use them but FS and FS-applications have obvious a
>
> problem to initialise the parent property on runtime. In the FS editor, the
>
> parent property works only after the project has compiled once.
>
>
> I get only errors when i try to change the parent at runtime, like:
>
>
>
> on run
>
> set parent to (load script "Mac HD:AS:MSA.Lib")
>
> end
>
>
I don't think that this can be done at runtime. I'm also not sure
>
that I understand why you wish to do this at runtime.
Because a Facespan-project does not initialise the parent via the normal
property-method when it's not compiled directly before the first run (bug).
Due to this, a FS-application behaves just as the property would not exists
in the script.
>
Loading a
>
compiled script at compile-time does the trick for me:
In any other Script Editor, yes.
(...)
Thanks for the explanations on the Language Guide, i think i got it.
>
I still don't think I understand.
Do you know now what i mean?
>
Here are some things that you can do at runtime:
>
>
>
script AParentObject
>
-- stuff
>
end script
>
>
-- OR --> property AParentObject : load script file "whatever"
>
>
on MakeScriptAtRuntime()
>
script
>
property parent : AParentObject
>
>
-- stuff
>
end
>
end
>
>
set Object1 to my MakeScriptAtRuntime()
>
set Object2 to my MakeScriptAtRuntime()
>
>
-- Object1 and Object2 are two child scripts that share the
>
-- same parent.
But then i have to refer to Object1/2 if i want to call handler. This is the
same result as when i assign variables to script objects via
set Object1 to (load script "Mac HD:AS:MSA.Lib")
Thanks & Greetings
cris :-)