That make good sense I may use it some day. It would allow more handlers in a common back script/library that did the same thing (anything) when called from different modules (stacks)
On 11/1/18 10:02 AM, Bob Sneidar via use-livecode wrote: > Well the big thing it deals with is ambiguity. I have a number of substacks > which are similar, like data entry forms for different tables in the > database, and these have many controls, properties and scripts in common, but > also some that are unique to that particular form. If only one of these > "form" stacks were allowed to be open at one time, there would be no > ambiguity, but I allow multiple "forms" to be opened at the same time, and > when I was using modal stacks, this presented a problem. So if at the > beginning of a handler I have: > > put getParentCard(the long id of me) into tParentCard -- returns the long id > of the parent card > put getParentStack(tParentCard) into tParentStack -- returns the long id of > the parent stack > > then I can make references like so: > > button "btnNew" of tParentCard > the databaseSettings of tParentStack > dispatch updateSettings to tParentStack with "true", "all" > > Even if another substack is open modally or happens to be the topstack, or if > I have an older version of the same application open in Livecode, there can > be no ambiguity because everything is resolving to long ids. I am no longer > relying on the fuzzy logic of the parser to figure out exactly which object, > card or stack I am referring to. > > Bob S -- Svasti Astu, Be Well! Brahmanathaswami Get the SivaSiva app, it's free: https://www.himalayanacademy.com/apps/sivasiva _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
