Justin,Thanks for the information, I will have to look into just what subclassing the Application means/is and also SharedPreferences.
That said, why avoid them like the plague? If you don't use global variables then just how do you get some kind of static value (which is really what I'm after) available to all aspects of your app code?
TreKing, will look into the public static values as this might be more of what I need.
------------------------------------------------------------------------ David Williams Check out our WebOS mobile phone app for the Palm Pre and Pixi:<http://www.dtw-consulting.com/GolfCaddie> Golf Caddie <http://www.dtw-consulting.com/GolfCaddie> | Golf Caddie Forum <http://www.dtw-consulting.com/GolfCaddie/forum> | Golf Caddie FAQ <http://www.dtw-consulting.com/GolfCaddie/faq.html> by DTW-Consulting, Inc.
On 3/9/2011 3:05 PM, Justin Anderson wrote:
The best way is to avoid them like the plague...If you can't then you can either subclass Application and make them available there or you can use SharedPreferences...Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyawareOn Wed, Mar 9, 2011 at 1:41 PM, David Williams <[email protected] <mailto:[email protected]>> wrote:All,What is the best way of going about setting up global variables? There will be like 5-6 global variables that I would like to setwhen my app is launched that are then available for any code anywhere in my app. I did something similar to this under Mojo on WebOS. I just set some global variables during the stage-assistant.js script that could then be used by any script. TIA.-- ------------------------------------------------------------------------David Williams Check out our WebOS mobile phone app for the Palm Pre and Pixi: <http://www.dtw-consulting.com/GolfCaddie> Golf Caddie <http://www.dtw-consulting.com/GolfCaddie> | Golf Caddie Forum <http://www.dtw-consulting.com/GolfCaddie/forum> | Golf Caddie FAQ <http://www.dtw-consulting.com/GolfCaddie/faq.html> by DTW-Consulting, Inc.-- You received this message because you are subscribed to the GoogleGroups "Android Developers" group. To post to this group, send email to [email protected] <mailto:[email protected]> To unsubscribe from this group, send email to [email protected] <mailto:android-developers%[email protected]> For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
<<inline: GClogo.png>>

