[mailto:[EMAIL PROTECTED]
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
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? Wh
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 A5
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 glo
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 b
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
m
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, FrmGetActiveFo
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 notifying
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 i
lto:[EMAIL PROTECTED]]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.
--- Lou
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
> news:72865@palm-dev
"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,
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
> -
>
>
--- 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 D
> 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
--- 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;
>
>
; [mailto:[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
> >whe
>(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 runnin
> 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 "
> 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
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. T
"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
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
> > 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
engineer
"Ben Combee" <[EMAIL PROTECTED]> on 03/15/2001 06:41:29 AM
Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent by: "Ben Combee" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:
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 limi
> 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 the
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
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
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
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 :
> > 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 ge
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 d
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 lon
> > 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 glo
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 t
Keith
I have this idea to generate my own A5 world (using NewPtr), when none
exists. This to be done in the StartUp code.
I have not tries it yet, but that would be very easy for me to
support. Then users would not have this problem, and the program can
be called with Find requestes and still be
> 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.
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
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
Sent by: "Mike Lyle" <[EMAIL 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 whe
bruary 09, 2001 6:02 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
Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject: Re: Global Variables
> 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
> 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
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 cas
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 Develope
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: non-ze
in
-- Palm OS Emulator 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" <
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
> 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
-
>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, Sa
51 matches
Mail list logo