RE: Global variables and special launch codes

2005-04-14 Thread Dr. Vesselin Bontchev
Thanks for the idea! 1) MemPtrNew() or MemHandleNew() a structure that contains all the info your code needs. Be sure to MemPtrSetOwner() to 0, so the memory is not automatically freed when your app exits, unless that's okay. If I do this, when should I free the allocated memory chunk? When

RE: Global variables and special launch codes

2005-04-14 Thread Jeffry Loucks
] Sent: Thursday, April 14, 2005 8:13 AM To: Palm Developer Forum Subject: RE: Global variables and special launch codes Thanks for the idea! 1) MemPtrNew() or MemHandleNew() a structure that contains all the info your code needs. Be sure to MemPtrSetOwner() to 0, so the memory

RE: Global variables and special launch codes

2005-04-13 Thread Jeffry Loucks
Globals (globals, statics, and multi-segment jump tables) are stored in a chunk of dynamic heap that is only allocated for the app when it is launched normally. This memory is available to the app via M68K register A5. The compiler knows this and generates code that accesses globals relative to

Re: Global Variables in a Library

2004-11-22 Thread Marcelo Alves
FtrGet / FtrSet não servem para você? Wendel wrote: Hi, I know, libraries isnt allowed to have global varibles, but i need it... What can i do? How can i simulate global variables? Anyone have any idea? In the last case, i can allocate the variables in application but i wanna have

Re: Global Variables [DISREGARD]

2004-11-16 Thread Tony Janke
PLEASE DISREGARD THIS AS I FIGURED OUT MY MISTAKE, THANKS! [EMAIL PROTECTED] 11/15/04 03:25PM I use a few key global variables in my application. One of which is Refresh. I use it at the beginning of each FormEventHandler to determine if there are fields and/or buttons that need to be

Re: Global Variables vs. Memory Chunks - How to do both?

2004-10-27 Thread Ralph Curtis
Just use globals for such a small amount of data. If you need persistance (so you can open the current form on launch and still return to the correct previous form) then use the preferences with a current and previous form ID variable/structure member. You can track your return field in a similar

Re: Global Variables vs. Memory Chunks - How to do both?

2004-10-26 Thread Tony Janke
I don't know if this works or not, haven't tried it myself but... Why don't you try overloading the function FrmGotoForm() such that you have the default version that accepts a form ID and another that will accept a form ID and the form ID that sent it there FrmGotoForm(NewFormID,

Re: Global variables again

2004-01-09 Thread Ben Combee
At 11:32 PM 1/8/2004, Al Gelders wrote: I'm writing an app using Palm Object Library (POL) and have several objects that define global variables. Their methods are only used when the app gets a normal launch, but of course the constructor is called every launch resulting in Debug errors

Re: Global variables problem in CW8 Demo ---- My Mistake !

2002-01-09 Thread Louis
Laurence Mee [EMAIL PROTECTED] wrote in message news:72983@palm-dev-forum... It may be that he is not reading the debugger window correctly. On that the contents of a char* variable are shown, not the actual value of the variable itself. You can check this in your AppStart by doing if

RE: Global variables problem in CW8 Demo

2002-01-08 Thread Laurence Mee
]]On Behalf Of Kim Hock NG Sent: 08 January 2002 01:28 To: Palm Developer Forum Subject: Re: Global variables problem in CW8 Demo You should NOT redeclare the variables in your .c but use the variable right away... Get rid of UInt32 and char* on the .c and it should work. --- Louis [EMAIL PROTECTED

Re: Global variables problem in CW8 Demo

2002-01-07 Thread Joe Programmer
--- Louis wrote: MyFile.h - #ifndef __MyFile_h__ #define __MyFile_h__ extern UInt32 MyIntVariable; extern char* MyCharPtr; #endif MyFile.c - #ifndef __MyFile_h__ #include MyFile.h #endif UInt32 MyIntVariable = 10; char* MyCharPtr = NULL; Both files are

Re: Global variables problem in CW8 Demo

2002-01-07 Thread Ben Combee
1. When you step through your program with the CW debugger, you must have all optimizations turned off. Otherwise, the values displayed may not be correct. Usually this doesn't affect globals, since they are never stored in a register. However, the code that accesses them could have been

Re: Global variables problem in CW8 Demo

2002-01-07 Thread Joe Programmer
--- I wrote: 2. Don't you have the extern in the wrong place? --- Ben Combee wrote: WRONG! ... (apologies) __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- For information on using the Palm

Re: Global variables problem in CW8 Demo

2002-01-07 Thread Kim Hock NG
You should NOT redeclare the variables in your .c but use the variable right away... Get rid of UInt32 and char* on the .c and it should work. --- Louis [EMAIL PROTECTED] wrote: I having a problem setting global variables in CW8 Demo. I have the following: MyFile.h - #ifndef

Re: Global variables problem in CW8 Demo

2002-01-07 Thread Ben Combee
Kim Hock NG [EMAIL PROTECTED] wrote in message news:72865@palm-dev-forum... You should NOT redeclare the variables in your .c but use the variable right away... Get rid of UInt32 and char* on the .c and it should work. You must have the variables defined in at least one source file, or

Re: Global variables problem in CW8 Demo

2002-01-07 Thread Kim Hock NG
The declaration is already done in the .h and the .c just use the variable right away. Unless there is another .c that does not include the .h the it will warrant the extern... :) --- Ben Combee [EMAIL PROTECTED] wrote: Kim Hock NG [EMAIL PROTECTED] wrote in message

RE: Global Variables and sysAppLaunchCmdSystemLock

2001-04-20 Thread Richard Burmeister
From: Phillip Streck Can you access global variables durring a sysAppLaunchCmdSystemLock? The PalmOS Companion says global vars are only available for SysAppLaunchCmdNormalLaunch, SysAppLaunchCmdGoTo, and (sometimes) SysAppLaunchCmdURLParams. You should read the

RE: Global Variables and sysAppLaunchCmdSystemLock

2001-04-20 Thread David Fedor
(aside: you can probably always access global vars if you can figure out where they are, but that is another matter entirely, and I'm sure any attempt to do so will break in future OS versions.) Not really - they aren't anywhere, so you wouldn't be able to find them. When your app isn't running

RE: Global Variables and sysAppLaunchCmdSystemLock

2001-04-20 Thread Richard Burmeister
:[EMAIL PROTECTED]]On Behalf Of David Fedor Sent: Friday, April 20, 2001 11:43 AM To: Palm Developer Forum Subject: RE: Global Variables and sysAppLaunchCmdSystemLock (aside: you can probably always access global vars if you can figure out where they are, but that is another matter entirely

Re: global variables

2001-03-20 Thread Aaron Ardiri
Wow. How interesting! Something that will definitly come in handy. =) also, something that has been repetitively mentions on this list. do a search for "global variables" in the archives. // az [EMAIL PROTECTED] http://www.ardiri.com/--- free games! -- For information on using the

Re: global variables

2001-03-16 Thread Ji Lee
Hi, Please execute my ignorance in C/C++ language. The only feature I can think of that would allow this is C++ static member functions and static member variables... Is this what you were referring to or are there some other feature that you can use for this ? Thanks! -Ji "Ben Combee" [EMAIL

Re: global variables

2001-03-16 Thread Ben Combee
"Ji Lee" [EMAIL PROTECTED] wrote in message news:42550@palm-dev-forum... Hi, Please execute my ignorance in C/C++ language. The only feature I can think of that would allow this is C++ static member functions and static member variables... Is this what you were referring to or are there

Re: global variables

2001-03-16 Thread Ji Lee
Wow. How interesting! Something that will definitly come in handy. =) -Ji "Ben Combee" [EMAIL PROTECTED] wrote in message news:42552@palm-dev-forum... "Ji Lee" [EMAIL PROTECTED] wrote in message news:42550@palm-dev-forum... Hi, Please execute my ignorance in C/C++ language. The only

Re: global variables

2001-03-15 Thread Ben Combee
I am having a hard time understanding the restrictions on access to global variables in the PalmOS environment. The various documents I have read state that global variables are not available for certain launch codes. Does this mean the variables themselves are not accessible, or have they

Re: global variables

2001-03-15 Thread DIAMOND JEFF
And just in case you're thinking about this, I'm one of the many people that have not succeeded in getting any C++ class structure to work when globals aren't available. So if you have C++ functions, don't even bother leveraging them when globals are absent. (Side note - how many of these

Re: global variables

2001-03-15 Thread Ben Combee
Can I initialize them? Since the event handling architecture in PalmOS does not allow for including call data in event handlers, it is pretty difficult to get around using global variables. I'm curious... Not being much of a Palm programmer, perhaps the answer is obvious, but which

RE: Global Variables

2001-02-13 Thread Richard Anderson
functions. Rik -Original Message- From: Richard M. Hartman [SMTP:[EMAIL PROTECTED]] Sent: 13 February 2001 01:00 To: Palm Developer Forum Subject: Re: Global Variables Despite everyone saying that globals are supported, I have to pop in here and say that using them is a Bad Thing

Re: Global Variables

2001-02-12 Thread Richard M. Hartman
Despite everyone saying that globals are supported, I have to pop in here and say that using them is a Bad Thing (tm). Find another way. For the Palm, there is always stuffing them in a database (Dm*), or store them as preferences (Pref*), or (probably the easiest) a feature (Ftr*). -- -Richard

Re: Global variables in static libraries

2001-02-12 Thread Nitin Nangia
Yes you can have global variables in a static library. Nitin --- jalaja Ramanadham [EMAIL PROTECTED] wrote: Hi, Can some body help please... Can I have global variables with in my static library(.lib) . Those variable which are not acceseble to outside world but to the library only. Any

Re: Global Variables

2001-02-10 Thread Aaron Ardiri
As a new palm developer coming from the Windows environment I find not having global variables a real problem. Does anyone have a work around for variables that are required by several procedures? ok.. i wont flame you :) i dont like the use of global variables - so i dont use them.

Re: Global Variables

2001-02-10 Thread John Marshall
Aaron Ardiri [EMAIL PROTECTED] wrote: its a great workaround to have global variables accessable in multiple segments in prc-tools :) to see how i do it, check out the sources to Cube3D/Burning/Toggle on my website I don't know what you're talking about. There are no restrictions to

Re: Global Variables

2001-02-10 Thread Aaron Ardiri
its a great workaround to have global variables accessable in multiple segments in prc-tools :) to see how i do it, check out the sources to Cube3D/Burning/Toggle on my website I don't know what you're talking about. There are no restrictions to the accessibility of global

Re: Global Variables

2001-02-10 Thread John Marshall
Aaron Ardiri [EMAIL PROTECTED] wrote: its a great workaround to have global variables accessable in multiple segments in prc-tools :) [...] there *were* some issues relating to it previously, but come to think of it, it was probably with prc-tools 0.5.0 and multilink.. so long

Re: Global Variables

2001-02-10 Thread John Marshall
Christen Fihl [EMAIL PROTECTED] wrote: I have this idea to generate my own A5 world (using NewPtr), when none exists. This to be done in the StartUp code. [...] Is there a reason this could not work? Even when the application's global variables are not present, the OS still stores other data

Re: Global Variables

2001-02-10 Thread Aaron Ardiri
there *were* some issues relating to it previously, but come to think of it, it was probably with prc-tools 0.5.0 and multilink.. so long ago.. argh.. who cares :) Multilink is not prc-tools. When you are throwing stones, please aim carefully. Otherwise onlookers may get

Re: Global Variables

2001-02-10 Thread Christen Fihl
We got so may An address registers. But you always wants more! I am reserving A4 for SELF (in objects) , A2/A3 for a few fast WITH (with MyRect do ), and A0/A1 for scratch. Maybe the API calles could then be wrapped, to switch between Api-A5 versus Appl-A5 world. I need more thinking I think

RE: Global Variables

2001-02-09 Thread Yu, Ken [IT]
Globals variables are supported on Palm. However, they are only available in certain launch conditions. (e.g. you can't use them if your app is called because of a HotSync or if an alarm if fired). -Ken -- From: Mike Lyle[SMTP:[EMAIL PROTECTED]] Reply To: Palm Developer

Re: Global Variables

2001-02-09 Thread krollin
As a new palm developer coming from the Windows environment, do you realize that not having global variables is a condition that exists only a small fraction of the time? For normal application execution, you have full access to global variables. Or are you talking about one of those other

Re: Global Variables

2001-02-09 Thread Philip Sheard
As a new palm developer coming from the Windows environment, do you realize that not having global variables is a condition that exists only a small fraction of the time? For normal application execution, you have full access to global variables. Or are you talking about one of those other

Re: Global Variables

2001-02-09 Thread krollin
-- Palm OS Emulator engineer "Philip Sheard" [EMAIL PROTECTED] on 02/09/2001 03:54:56 PM Please respond to "Palm Developer Forum" [EMAIL PROTECTED] Sent by: "Philip Sheard" [EMAIL PROTECTED] To: "Palm Developer Forum" [EMAIL PROTECTED] cc: (Ke

Re: Global Variables

2001-02-09 Thread Mike Lyle
PM Subject: Re: Global Variables I always assumed that Palm deprecates the use of globals generally, because of the warnings generated by POSE. No. Poser only warns when an application appears to be attempting to access globals when they don't exist. It doesn't not warn during normal

Re: Global Variables

2001-02-09 Thread krollin
L PROTECTED] To: "Palm Developer Forum" [EMAIL PROTECTED] cc:(Keith Rollin/US/PALM) Subject: Re: Global Variables Keith, Thanks for the reply. I guess I'm accessing global variables at the wrong time. Is there a rule as to when and when not to access them? Thanks, Mike Lyle -

Re: Global Variables

2001-02-09 Thread Steve Mann
Keith: I have to say, you have more ways to say RTFM than I thought was possible. Regards, Steve Mann -- --- Creative Digital Publishing Inc. 1315 Palm Street, San Luis Obispo, CA 93401-3117 --- 805.784.9461

Re: Global Variables

2001-02-09 Thread Lorin Unger
LOL! - Original Message - From: "Steve Mann" [EMAIL PROTECTED] To: "Palm Developer Forum" [EMAIL PROTECTED] Sent: Friday, February 09, 2001 10:38 PM Subject: Re: Global Variables Keith: I have to say, you have more ways to say RTFM than I thought was possible.

Re: global variables?

2000-07-10 Thread Jon Baer
Utility method I had laying around: // Relaunches an application with globals enabled. //creatorID -- the creatorID of the application //cmd -- the launch code //cmdPBP-- the launch parameter block //ret -- holds the return value after the launch // Returns:

RE: global variables?

2000-07-09 Thread Schettino, John
I don't believe you free the cmdPBP block... that's done by the OS (since the system owns the memory...) - John Schettino Palm OS Programming for Dummies: http://schettino.tripod.com -Original Message- From: Bulent Gecer To: Palm Developer Forum Sent: 7/8/00 4:52 AM Subject: SV: global

RE: global variables?

2000-07-09 Thread krollin
r engineer "Schettino, John" [EMAIL PROTECTED] on 07/09/2000 12:48:03 PM Please respond to "Palm Developer Forum" [EMAIL PROTECTED] Sent by: "Schettino, John" [EMAIL PROTECTED] To: "Palm Developer Forum" [EMAIL PROTECTED] cc:(Keith Rollin/US/PALM) Subje

Re: global variables?

2000-07-07 Thread Steve Mann
When "MyApp" gets launched by another application with the call SysAppLaunch(...), I get the following message in POSE: Check page 58 of the Palm OS Programmer's Companion. Regards, Steve Mann -- --- Creative Digital Publishing Inc. 1315 Palm Street, San

Re: global variables?

2000-07-07 Thread krollin
If I can't use globals, then what should I do? You *should* be able to use globals under the conditions you've given. It's possible that Poser heuristic for determining what went wrong got confused by some similar action. Use a debugger to figure out what's really going on. -- Keith Rollin