LiveCode 4.6.1 message path and behaviors
Keith Clarke
keith.clarke at clarkeandclarke.co.uk
Mon May 23 09:46:53 EDT 2011
Thanks for clarifying the library and front/back script order - more 'LIFO-type' behaviour http://en.wikipedia.org/wiki/LIFO_(computing) than just random chunks of code in a bucket!
I think this thread has underpinned George Box's warning to “Remember that all models are wrong; the practical question is how wrong do they have to be to not be useful.”
Mapping this nascent MVC model has really helped me to force some recognisable structure onto LiveCode's flexibility, allowing me to map concepts from web-based technologies (HTML/CSS/Javascript/server API calls) onto LiveCode concepts and scriptable objects - and therefore decide how and where to put what logic for my Revlet-based web app. So, today, it's laying outside the 'very wrong/not very useful' model quadrant for me ... but which quadrant it will be in tomorrow? Who knows! :-)
Best,
Keith..
On 23 May 2011, at 13:12, Björnke von Gierke wrote:
> I agree with your assesment that the message path is so versatile and complex, that it doesn't lead to a single ruleset, but to a dozen different valid usage scenarios. But only if one chooses to use all these advanced capabilities. 90% of my works is within the 'default' path, not using libraries or behaviours, @ signs or backscripts. I do use send often tho, more out of habit to not create large stack or group scripts, then out of necessity.
>
> Just to make the use of several libraries clear:
> Librarystacks, front and backscripts can call each other at any time. But not if you call a handler that exists in several of them. For example, if you have two handlers in two librarystacks, one of the will fire and the other wont. The one that fires will be the one added last to 'the stacksInUse', and you can see the order in that property. So if you make scripts like the following example, and librarystack 1 was added last, you'll run into an recursion limit error. If library2 was added last, "two" will appear in the message box, and that's it.
>
> library1:
> on myHandler
> put "one" & space after msg
> myHandler
> end myHandler
>
> library2:
> on myHandler
> put "two" & space after msg
> end myHandler
>
> On 23 May 2011, at 10:12, Keith Clarke wrote:
>
>>
>> Interesting too, the lack of specific order within Library and Front/Back script 'containers'.
>> Best,
>> Keith..
More information about the use-livecode
mailing list