Re: Library Modules and Library Loaders
Re: Library Modules and Library Loaders
- Subject: Re: Library Modules and Library Loaders
- From: Tetsuro KURITA <email@hidden>
- Date: Fri, 03 Sep 2010 01:12:48 +0900
On 2010/09/02, at 20:39, Philip Aker wrote:
> On 2010-09-01, at 10:25:48, Tetsuro KURITA wrote:
>
>>>> Do you have any ideas for syntax to load modules and to describe its dependencies ?
>>>
>
>>> I think dependency problems are well studied and have very advanced solutions available these days.
>
>> I can't agree with you.
>> The solution ignoring dependency problems is not useful for me.
>
> Well yes, but solutions for dependency problems have been studied a lot because of things like race conditions in threads, multiple processors, and all kinds of test engineering where data is coming in asynchronously.
Don't forget I have already developed the solution.
It works well.
>>> Therefore, if A is imported and A imports C, then, when B imports C, I believe it is the user's choice as to whether or not they want separate instances of C. In either case, we can deal with their choice.
>
>
>> How do you keep single instance of C ? Known solutions are using AppleMods or ModuleLoader. Your 'import' command (simple osax command) can't help to keep single instance of C. I have already tried and gave up. I hope you can find the solution.
>
> 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.
=======================================================
Tetsuro KURITA
E-mail: email@hidden
http://homepage.mac.com/tkurita/scriptfactory/en/
=======================================================
_______________________________________________
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