Re: Library Modules and Library Loaders
Re: Library Modules and Library Loaders
- Subject: Re: Library Modules and Library Loaders
- From: Philip Aker <email@hidden>
- Date: Fri, 3 Sep 2010 06:02:24 -0700
On 2010-09-02, at 09:12:48, Tetsuro KURITA wrote:
>> In the application and osax projects in ModuleManager.framework, I show that a library is assigned a unique id when it is created. It will be the same for scripts and other kinds of files registered with ModuleManager. It's 'import' command will know if it's already loaded a script with a particular unique id, and can make the choice whether or not to create a new instance.
> Script object returned form an OSAX command have independent instance each others.
> I have already tried it. Your plan will be impossible.
> Do you know a way to make OSAX command return a script object whose instance is same to the one of the loaded script.
Hi Tetsuro,
I'm having trouble with your phrasing because 'instance' is a big word in OSA technology. Are you talking about 'ComponentInstance' or the situation where script A imports script C and script B also imports script C?
What I'm talking about for an 'import' handler is that when it's supplied with a file to import, then it can know whether or not it is called to import that file a second time and have the choice about whether or not to load it again. That is, if I don't want to load script C a second time, I will return a valid but empty result.
What will be the net result? I think that only one instance of script C will have been loaded and it's handlers will be the ones that are called. Because an osax is a plugin to a component, then whenever a new instance of the component is created, then it necessarily loads a new instance of the osax.
Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@
Democracy: Two wolves and a sheep voting on lunch.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden