Re: AS Library Question
Re: AS Library Question
- Subject: Re: AS Library Question
- From: Chris Page <email@hidden>
- Date: Thu, 17 Dec 2015 06:46:41 -0800
> I've no idea why libraries were implemented that way, but you don't seem to countenance the possibility that there were pros as well as cons.
The only 'pro' would be in ASOC-based apps, as all of an ASOC app's scripts are related so should arguably share the same library instances as well, although even that doesn't require the use of OSAIDs.
The only reason I think they used OSAIDs for library script objects is because they already used OSAIDs to hold ASOC script objects, which (IIRC) creates a new OSAID for every ASOC class and instance. Which is why ASOC explodes as soon as you try to use a large number of script objects in it (unlike better designed bridges such as PyObjC). So the counter-argument would be that ASOC is designed badly and the library loader merely continues the trend.
has, be aware that you're mixing up separate concepts. Library loading and ASOC bridging are orthogonal and can be used independently.
You're probably also mixing up OSAIDs with the concept of copies of the objects they reference. OSAIDs are just external references to objects inside a component. You can have ten OSAIDs reference the same object and it only uses a few bytes per OSAID. They're just pointers, not objects.
-- Chris Page The other, other AppleScript Chris
|
_______________________________________________
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