Re: ScriptLibraryServer
Re: ScriptLibraryServer
- Subject: Re: ScriptLibraryServer
- From: Tommy Bollman <email@hidden>
- Date: Sun, 8 Aug 2010 19:33:26 +0200
Hello.
There was one more issue in the init() handler of the script libinit, where I had forgotten the keyword my in front of theproperty _libType, and thereby effectively broke polymorphism during reloading of libraries after had been purged from the ScriptServersMemory earlier.
I must say that *everything* is thoroughly tested at this stage, and what remains are support for AppleMods and Tetsuro Kurita'sloader systems. If you only use hardcoded library paths, maybe inserted with my library loader, then this release is for you.
< http://macscripter.net/viewtopic.php?pid=131684#p131684 >
On 8 Aug 2010, at 19:08, Tommy Bollman wrote:
> Hello.
>
> I have had one more issue, that was beyond and far above -also with the idle handler, it turned out that some way or another, there were a spelling error of a variable in one of of the scripts that held the library object's properties.
>
> _textLIb were spelled _texLib in this line
> Open this Scriplet in your Editor:
>
> property _thisScript : a reference to my _textLib
> in script _textLib
> -Awfully sorry about that.
>
> On 8 Aug 2010, at 12:55, Tommy Bollman wrote:
>
>> Hello. I had to upgrade the idle handler to not kick in during startup of the ScriptLibraryServer. < http://macscripter.net/viewtopic.php?pid=131684#p131684 >
>>
>>
>> On 8 Aug 2010, at 00:16, Tommy Bollman wrote:
>>
>>> Hi!!!
>>>
>>> The LoaderMaker, which creates load statements are now finished and can be found together with script library server skeleton at < http://macscripter.net/viewtopic.php?pid=131684#p131684 >
>>>
>>>
>>> it creates code like this, which you past into the ScriptLibraryServer (*as it is! without any rearrangement!*)
>>> -simple library type
>>> (* SCRIPT LIBRARY newTextLib OF TYPE 1 ======================================================================*)
>>>
>>> property _1_newTextLib : (load script alias "Macintosh HD:Users:McUsr:Library:Scripts:Modules:TextLib.scpt") -- hardcode
>>> -- SIMPLE LIBRARY WHICH ONLY CONTAIN INDIVIDUAL HANDLERS (TYPE 1)
>>> script _newTextLib
>>> -- SIMPLE LIBRARY WHICH ONLY CONTAIN INDIVIDUAL HANDLERS (TYPE 1)
>>> property parent : libInit
>>> property _index : 0
>>> property _reload_on_update : false
>>> property _hfsFileName : "Macintosh HD:Users:McUsr:Library:Scripts:Modules:TextLib.scpt"
>>> property _libName : "newTextLib"
>>> property _scriptLIb : a reference to my _1_newTextLib
>>> property _thisScript : a reference to my _newTextLib
>>> property _libtype : 1
>>> property _libLoader : ""
>>> end script
>>>
>>> on newTextLib()
>>> if my _newTextLib's _index is 0 then
>>> my _newTextLib's init()
>>> else
>>> if my _newTextLib's _reload_on_update then my _newTextLib's checkAndUpdateLibrary(a reference to my _newTextLib)
>>>
>>> end if
>>>
>>> return my _1_newTextLib
>>> end newTextLib
>>>
>>> -- complex library type: reload_on_update set to true
>>>
>>> (* SCRIPT LIBRARY favColor OF TYPE 2 ====================================================================== *)
>>>
>>> property _1_favColor : objLib of (load script alias "Macintosh HD:Users:McUsr:Library:Scripts:Modules:favColorLib.scpt")
>>> -- COMPLEX LIBRARY WHICH NEED TO GET CONTENTS OF A LIBRARY THROUGH AN OBJECT BECAUSE OF INTERNAL REFERENCES. (TYPE 2)
>>>
>>> script _favColor
>>> -- COMPLEX LIBRARY WHICH NEED TO GET CONTENTS OF A LIBRARY THROUGH AN OBJECT BECAUSE OF INTERNAL REFERENCES. (TYPE 2)
>>> property parent : libInit
>>> property _index : 0
>>> property _reload_on_update : true
>>> property _hfsFileName : "Macintosh HD:Users:McUsr:Library:Scripts:Modules:favColorLib.scpt"
>>> property _libName : "favColor"
>>> property _scriptLIb : a reference to my _1_favColor
>>> property _thisScript : a reference to my _favColor
>>> property _libtype : 2 -- We must use an "object of" load script "the lib" in order to get our goodies type 2 in description
>>> property _libLoader : "objLib of (load script alias \"Macintosh HD:Users:McUsr:Library:Scripts:Modules:favColorLib.scpt\")"
>>> end script
>>>
>>> on favColor()
>>> if my _favColor's _index is 0 then
>>> my _favColor's init()
>>> else
>>> if my _favColor's _reload_on_update is true then my _favColor's checkAndUpdateLibrary(a reference to my _favColor)
>>> end if
>>> return my _1_favColor -- which your code will tell what to do.
>>> end favColor
>>>
>>> I am very happy with the way I managed to create this code, since it became so simple. just run a script and past the code straight in!
>>>
>>>
>>> On 7 Aug 2010, at 19:24, Tommy Bollman wrote:
>>>
>>>> You can find a script library server skeleton at < http://macscripter.net/viewtopic.php?pid=131684#p131684 >
>>>> It has a debug mode, which means that it will reload files when they are changed on disk. It comes with two examples, since there are really to types of libraries. That model will be supported by both the LibraryLoader and LibraryLister I am currently updating.
>>>>
>>>> The script which writes the code is still amiss, but it should be fairly easy to copy, paste and edit the code that is in there. -And the doc are not that rough, but it needs an update as well. It should be totally usable as it is.
>>>>
>>>> Best regards
>>>>
>>>>
>>>>
>>>> Tommy Bollman
>>>> --------------------------------------------------------------------------------------------------
>>>> Mollison's Bureaucracy Hypothesis:
>>>> If an idea can survive a bureaucratic review
>>>> and be implemented it wasn't worth doing.
>>>>
>>>
>>> Best regards
>>>
>>>
>>>
>>> Tommy Bollman
>>> --------------------------------------------------------------------------------------------------
>>> Mollison's Bureaucracy Hypothesis:
>>> If an idea can survive a bureaucratic review
>>> and be implemented it wasn't worth doing.
>>>
>>> _______________________________________________
>>> 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
>>
>> Best regards
>>
>>
>>
>> Tommy Bollman
>> --------------------------------------------------------------------------------------------------
>> Mollison's Bureaucracy Hypothesis:
>> If an idea can survive a bureaucratic review
>> and be implemented it wasn't worth doing.
>>
>
> Best regards
>
>
>
> Tommy Bollman
> --------------------------------------------------------------------------------------------------
> Mollison's Bureaucracy Hypothesis:
> If an idea can survive a bureaucratic review
> and be implemented it wasn't worth doing.
>
> _______________________________________________
> 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
>
Best regards
Tommy Bollman
--------------------------------------------------------------------------------------------------
Mollison's Bureaucracy Hypothesis:
If an idea can survive a bureaucratic review
and be implemented it wasn't worth doing.
_______________________________________________
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