On 4/26/20 12:09 PM, Sannyasin Brahmanathaswami via use-livecode wrote:
"globals are evil"
But we use one array
Global gConfigA
and we stuff it with all manner of "things" including another arrays
it turns about to quite useful
Yes, I do what you and Jacque do as a workaround, of course. I recently
implemented a feature management infrastructure the same way, given the
lack of globally available constants.
on preOpenStack
global g<app>Features
put "feature1,feature2,feature3" into g<app>Features
end preOpenStack
...some other stack
global g<app>features
if "feature2" is among the items of g<app>features then
...
on closeStackRequest
delete variable g<app>Features
end closestackRequest
great for A/B testing, rolling out new features without messing with
existing code, being able to roll back unwanted or not-working features
after beta testing... and would be so much cleaner if we didn't have to
resort to global variables and remember to put a reference to them in
each place they're referenced...
--
Mark Wieder
ahsoftw...@gmail.com
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode