TodayPlus Boards v2

TodayPlus for the Pocket PC Forums => Help and Support => Topic started by: arbitrajeu on November 04, 2003, 06:54:27 PM

Title: Variables vs regions
Post by: arbitrajeu on November 04, 2003, 06:54:27 PM
Perhaps this is a philisophical point, but I was pondering the pro's and con's of variables and regions today.  I recently re-worked a part of my skin to use variables to control what is displayed, rather than using two pages of a region.  My primary motivation was that there are more variables available than regions (secondary motivation was that, having asked for 30 variables, I darned-well better use more than 20!).

So, my question is, am I right to re-architect my skin along these lines?  Without knowing the internal architecture of TodayPlus I can only guess what the relative merits are of each approach in terms of performance
and memory footprint, and any other relevant factors.

Any thoughts, srs?
Title: Variables vs regions
Post by: srs on November 04, 2003, 08:25:37 PM
funny that you mention this because yesterday I got rid of data loading regions, and replaced them with if statements in the default skin.

In terms of performance / memory footpring they will be similar, but to me using if statements seems a bit more elegant than a separate region.  Of course the if statements are new with the last couple of versions, so there wasn't a choice but to use regions before now.

I would think using if statements are better as I think it makes the skin easier to read and modify.
Title: Variables vs regions
Post by: fishboy on November 05, 2003, 09:02:56 AM
I too am working on replacing multiple regions with one region using if statements in my glauncher (using the if,var... condition which, by the way, doesn't work correctly  :( (see my bug posting)).  I won't need to update four regions every time I make a change (such as changing the icon file name, or repositioning elements).  It will also make it easier to update, cleaner looking, easier to debug, and reduce the skin file size.  

Now, if only todayplus supported calling procedures, we could really make the skin more modular and reuse code... :)