Where to put code (stack/card/object) ?
Posted: Mon Mar 04, 2013 6:56 pm
Just starting out with LiveCode.
It seems easier, at least at this point, to have some different cards for desktop/mobile to make things look best on each platform. If I had different cards for, say, mobile and desktop, would it make sense to put most of the code at the Stack level and leverage the message chain, having the stack examine the handler call to see where it came from and dispatch accordingly? This way as you add cards/etc for different layouts you wouldn't have to duplicate code everywhere.... Or is it more of a standard practice to put it all down at the object or card level, and duplicate it as you duplicate cards?
It seems easier, at least at this point, to have some different cards for desktop/mobile to make things look best on each platform. If I had different cards for, say, mobile and desktop, would it make sense to put most of the code at the Stack level and leverage the message chain, having the stack examine the handler call to see where it came from and dispatch accordingly? This way as you add cards/etc for different layouts you wouldn't have to duplicate code everywhere.... Or is it more of a standard practice to put it all down at the object or card level, and duplicate it as you duplicate cards?