1) Frequently, I call a quick handler to save my data array as a file. This handler resides in the main stack. Should I include this, instead, on each card? (Alternately, I have preOpenCard handlers for many cards, which ofter call similar handlers (setting up a scroller, etc.) - should I move these to shared handlers in the stack instead?)
2) This one might be confusing: I have a group of buttons with the same basic function, but different values and some slightly different behavior. I have the handler in the group and control it with switch statements by target. I can separate the group and give each button its own code, but then should I put the entire function put into each button's handler, or just put the values in the button and have each button call a handler on the card?
3) Is there any benefit to storing some data as custom properties of the stack or of buttons rather than global variables/arrays? This would have to be set up upon loading, as users can edit this data, but it's doable.
4) I have a nasty undo button that determines its behavior by looking at the contents of a field for key words or phrases. This means I'm using a series of if/then/else if statements. How likely is it that switch statements would be better? (They don't seem to be, based on #2, but maybe I'm wrong.)
Anything else I should look at? I'm not using animation except for push transitions between cards and changing the colors of some buttons. I've also eliminated the size of the data array as a possible culprit, as its speed appears nearly identical when it's a virtually empty array or full array.
Whew! That's a lot. Thanks for any input, unless it's just, "Woah, you're screwed, dude."
