Hi all,
I'm working on Treo 180 running Palm OS ver 3.5. I'm having trouble with one of
the global variables(it is a char array of size 60)which gets corrupted after
running the application for a while. I've declared the variable in
EXTRA_SECTION_TWO and the variable gets called from a function
Hi Sriram,
You are almost certainly overwriting an array. Check all the arrays which
are close to your char array and make sure you do proper bounds checking.
Regards,
On 19/02/07, V. Sriram [EMAIL PROTECTED] wrote:
Hi all,
I'm working on Treo 180 running Palm OS ver 3.5. I'm having trouble
any global
variable in the function in the second segment .
So how do i assign my global variable so it not creating any problem
during function call frm second segment.
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev
All,
Is it possible to create a global variable of size more than 64K in palm
os? I tryed to create more than 64K size of array but the linker is giving
error.Even i tryed using memptrNew also .Here also it gives the same error.
Is there a limitation for global variable size should
using MW 9.1 .
If u can help me in this regard kindly reply me.
Thanks and Regards,
Harsha
*/Ben Combee [EMAIL PROTECTED]/* wrote:
On 11/12/06, hvreddy wrote:
Hi All,
Is it possible to create a global variable of size more than 64K
in palm os? I tryed to create
Dear Ben,
Thanks for ur help.
I finally did it.
Thanks once again.
Regards,
Harsha
Ben Combee [EMAIL PROTECTED] wrote: On 11/12/06, hvreddy wrote:
Hi All,
Is it possible to create a global variable of size more than 64K in palm
os? I tryed to create more than 64K size
:
Hi All,
Is it possible to create a global variable of size more than 64K
in palm os? I tryed to create more than 64K size of array but the
linker is giving error.Even i tryed using memptrNew also .Here also
it gives the same error.
Is there a limitation for global
Hi All,
Is it possible to create a global variable of size more than 64K in palm os? I
tryed to create more than 64K size of array but the linker is giving error.Even
i tryed using memptrNew also .Here also it gives the same error.
Is there a limitation for global variable size should
hvreddy wrote:
Hi All,
Is it possible to create a global variable of size more than 64K in palm os? I
tryed to create more than 64K size of array but the linker is giving error.Even
i tryed using memptrNew also .Here also it gives the same error.
Is there a limitation for global variable size
On 11/12/06, hvreddy [EMAIL PROTECTED] wrote:
Hi All,
Is it possible to create a global variable of size more than 64K in palm os? I
tryed to create more than 64K size of array but the linker is giving error.Even
i tryed using memptrNew also .Here also it gives the same error
Hi folks,
I just fixed a bug in my app, but I don't really understand why it is a
bug. Perhaps someone could shed a little light on it. To demonstrate
the problem to myself, I created a little test function that does
nothing other than declare a character string. The function is called
in
Thanks for that clarity, Aaron, much appreciated. I never realized that
there was any real, practical difference between the 2 declarations. I
was really just trying keep the lines of code tight. Your explanation
makes a lot of sense, so it will become my new M.O. ;). Bob.
void
is that it has type
array of char. The other one that isn't obvious is that string literals have
a storage class of static. It is the static quality that causes it to be a
global variable. Generally, though, if your optimization settings are
aggressive, this won't end up being an issue. Obviously is has
PROTECTED]
Just after I declare the global variable that was losing it's value, I
had
declared another global variable - an array. When I moved the other
variable
to another location I dont get this problem. These two variables were
being
used in the same function that was creating the problem
The only thing I can think is that somewhere in your application, you
write to a piece of memory that you shouldn't write to and that happens
to be (contain) the address of your global variable. So, you could check
for out-of-boundary memory writes. Did you declare an array just before
Thanks for your reply. My problem is solved now.
Just after I declare the global variable that was losing it's value, I had
declared another global variable - an array. When I moved the other variable
to another location I dont get this problem. These two variables were being
used in the same
Any idea why this could be happening. As of now I have no clue.
As Caspar suggested before, most likely you're unintentionally
overwriting the memory location where your global variable that was
losing the value resided.
It doesn't look like you've solved the problem, just managed to hide
Just after I declare the global variable that was losing it's value, I had
declared another global variable - an array. When I moved the other variable
to another location I dont get this problem. These two variables were being
used in the same function that was creating the problem.
How
I am having trouble accessing a global variable in my palm OS application. I
am using Codewarrior. The value of the global variable keeps changing in the
application. I have seen this by diplaying the value of the global variable
as I move from form to form. The global variable is being accessed
app will be launched because that global
variable already think the initial app is the next app to launch. However, I still
have no idea about this global variable if it is existed, could you please give me
some ideas? Thanks you in advance
--
For information on using the Palm Developer Forums
application is returned, the initial app
will be launched because that global variable already think the initial
app is the next app to launch. However, I still have no idea about this
global variable if it is existed, could you please give me some ideas?
Thanks you in advance
Internally
Thank you for your answser. I wander is there is a way to get or set the global
variable to control next app to launch? If there is, what is the name for the global
variable?
Thanks a lot.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http
At 02:47 PM 6/25/2004, you wrote:
Thank you for your answser. I wander is there is a way to get or set the
global variable to control next app to launch? If there is, what is the
name for the global variable?
The only method to change this is to use SysUIAppSwitch. If you want, you
could call
instead of writing to a database, why not use an unused area of the
display controller? there are a few devices out there that are read/write
and have at least 40-50k free :)
It's surely useful to have some comedy with Aaron's quips, but watch this,
next question will be How do I do
Forget about the Heap option, you wouldn't be able to retrieve the pointer
to it, except if you store it in 'Guess what' (Feature Memory!).
And if you ask me, for those times that globals aren't possible, feature
memory was the best thing created!
well, back in the old pre 3.5 days - you only
Palm IIIc - 80kb of display memory available on the SED 1386 controller.
shoot me, it was SED 1375 controller - palm 505 had SED 1376 :)
---
Aaron Ardiri
PalmOS Certified Developer
[EMAIL PROTECTED]
http://www.mobilewizardry.com/members/aaron_ardiri.php
--
For information on using the Palm
I have a DmOpenRef variable. My app then notifies a routine that
performs a GPS function every second. This works well. I can't/dont
trust my DmOpenRef variable to be valid, and I think the strange
problems I've been having with resets is because the variable is no
longer global. So I thought
So I thought if my app opened the .pdb file and stored the DmOpenRef
in feature memory, then my callback function can simply look at it
and use it to process the .pdb file that is already opened. That
way, if another app gets launched, my callback will still run and
can use the .pdb file.
My
SLO Revo News wrote:
So I thought if my app opened the .pdb file and stored the DmOpenRef
in feature memory, then my callback function can simply look at it and
use it to process the .pdb file that is already opened. That way, if
another app gets launched, my callback will still run and can use
I suspect there are any number of things an
application could do to make that reference invalid.
One real simple action to make it invalid is for another application to close the open
database. If you can guarantee that no other app will mess with that particular
database, you are probably
I suspect there are any number of things an
application could do to make that reference invalid.
One real simple action to make it invalid is for another application to
close the open database. If you can guarantee that no other app will mess
with that particular database, you are
Steve, by that, do you mean that they could cause havoc with my .pdb
file if they know what it is I've written to the feature memory? Or
that an application could just arbitrarily go in and smash my
feature memory to pieces? Can applications therefore interrogate the
layout of feature memory
I suspect there are any number of things an
application could do to make that reference invalid.
One real simple action to make it invalid is for another application to
close the open database. If you can guarantee that no other app will mess
with that particular database, you
DmProtectDatabase()
If you mean DmDatabaseProtect(), I do not believe it will do what you are suggesting.
This routine can be used to prevent a database from being deleted...
Use this function if you want to keep a particular record or resource
in a database locked down but don't want
Aaron Ardiri [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
instead of writing to a database, why not use an unused area of the
display controller? there are a few devices out there that are read/write
and have at least 40-50k free :)
It's surely useful to have some comedy with
At 10:33 PM 6/14/2004, you wrote:
Aaron Ardiri [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
instead of writing to a database, why not use an unused area of the
display controller? there are a few devices out there that are read/write
and have at least 40-50k free :)
It's surely
What I would suggest would be to temporarily store all the data in feature
memory, and then every minute or so, open the database, and store it there.
Or else, for even quicker writing, reserve memory on the Heap, and set it's
owner to the system.
LionScribe
Peter Hamilton-Scott [EMAIL
Forget about the Heap option, you wouldn't be able to retrieve the pointer
to it, except if you store it in 'Guess what' (Feature Memory!).
And if you ask me, for those times that globals aren't possible, feature
memory was the best thing created!
LionScribe
LionScribe [EMAIL PROTECTED] wrote in
in message
news:[EMAIL PROTECTED]
At 12:45 PM 5/7/2004, you wrote:
Hi,
I'm creating a shared library (syslib-type) that in turn makes use of
MathLib. Those of you who've used MathLib know that you include MathLib.c
in your own project. MathLib.c defines a global variable to hold the
refnum when
Hi,
I'm creating a shared library (syslib-type) that in turn makes use of MathLib. Those
of you who've used MathLib know that you include MathLib.c in your own project.
MathLib.c defines a global variable to hold the refnum when the library is opened.
Global variables are not allowed in shared
At 12:45 PM 5/7/2004, you wrote:
Hi,
I'm creating a shared library (syslib-type) that in turn makes use of
MathLib. Those of you who've used MathLib know that you include MathLib.c
in your own project. MathLib.c defines a global variable to hold the
refnum when the library is opened. Global
Hi
How i can to create a global variable in my aplication ?
Thanks
=
Roberto Pedrozo Mendes
Arquiteto Sistemas
HST - CPqD - Campinas
[EMAIL PROTECTED]
__
Yahoo! GeoCities: a maneira mais fácil de criar seu web site
Roberto Pedrozo Mendes a écrit :
How i can to create a global variable in my aplication ?
In what language?
In C, just declaring a variable outside any function gives it global scope. To access
it in other modules (other .c or .cpp
files), use an extern reference to it. Standard C stuff.
Boa
Khurram [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I want to know how i can declare Global variable in Starter.c and then
access it from ULDatabase.sqc
Assuming ULDatabase.sqc is a C source file (). Just declare an
external reference to it in ULDatabase.sqc. (OR more
Hi,
I want to know how i can declare Global variable in Starter.c and then
access it from ULDatabase.sqc
Regards
Khuram Mir
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/
Hy all!
I need to write a string to a global variable tha will be accessed by 2 or
more forms, but i don't know where to put it and how to access is from a
form.
Can anybody give-me a example?
Thanks!!!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
Done and done... this is a three-file example:
--FILE 1: Globals.h--
extern Char *bob;
--FILE 2: Form1.c-- (variable defined here)
#include Globals.h
Char *bob = This is a global variable.;
// access bob as you would any normal variable - anywhere
--FILE 3: Form2.c-- (variable used here
Hi
I need to write a string to a global variable tha will be accessed by 2 or
more forms, but i don't know where to put it and how to access is from a
form.
Not only, that global variables are bad style (ok, there are some, few
reasons to use them), but most important: global variables won't
mensagem
news:109602@palm-dev-forum...
Done and done... this is a three-file example:
--FILE 1: Globals.h--
extern Char *bob;
--FILE 2: Form1.c-- (variable defined here)
#include Globals.h
Char *bob = This is a global variable.;
// access bob as you would any normal variable - anywhere
--FILE 3
Globals.h
Char *bob = This is a global variable.;
// access bob as you would any normal variable - anywhere
--FILE 3: Form2.c-- (variable used here)
#include Globals.h
// access bob as you would any normal variable - anywhere
--END--
Hope that helps. It's usually a good idea to keep
Mengtao: I created a header file called NewDeleteImpl.h and included new
and copied the inline forms of new/delete
posted as the second solution in your article to this header file. Then I
included NewDeleteImpl.h to a source file called CFieldInfo.cpp where I
use new and delete. All the old
At 14:27 2003-1-7 -0500, you wrote:
When I compile, I didn't get link errors complaining new and delete are
not defined. Instead I got other link errors as below which to me are still
due to the usage of new and delete. Could you give me any tips how I
can get rid of these link errors? Thanks
from the field in secondform
in
secondformHnadleEvent and storing it in global
variable
char* connurl. Then I call FrmReturnToForm(0) to
return
to the parent form i.e the first form.
In the firstformHandleEvent routine, I want to
access that vairable
containing the text entered into the field
Am Sam, 2002-07-06 um 09.10 schrieb fawaz bokhari:
Hi,
static char * connurl;
connurl = FldGetTextPtr(field);
FrmReturnToForm(0);
In the first Form Handle Event I want to access that
global variable:
FrmCustomAlert(OutputAlert , connurl , NULL , NULL);
connurl points to the text
--- fawaz bokhari [EMAIL PROTECTED] wrote:
When I use this variable some where else in the
application, then it says error:
Unallocated memory chunk. the appliation is accessing
a memory location that is not in the RAM...
By some where else in the application, do you mean in another
Try this : char name[] = fawazsaleem;
-Original Message-
From: fawaz bokhari [mailto:[EMAIL PROTECTED]]
Sent: Friday, 05 July, 2002 12:13
To: Palm Developer Forum
Subject: accessing global variable problem
Hi,
I am having problem with global variables. I have
declared a char
place and use an *external
declaration* to propagate this global variable to the other modules.
With kind regards / mit freundlichem Gruß
Holger Klawitter
--
[EMAIL PROTECTED]
http://www.klawitter.de/palm
--
For information on using the Palm
Ya.
Is it what you mean using the 'extern'?
I have done this kind of program previously. But what i have noticed that i
declared a lot of variables as global variable and make my program 'messy'.
So i have to declare it as a type in a header file and use it as global.
If i have this struct
Hi.
I am developing a program where it must make use of a lot of variables and
various forms will use those variables. Instead of creating those global
variables among each form, can i create those variables in a header file
(using typedef struct to define the data types), and those variables
Creating a global variable:
I tried to create a global variable and test to see the
scope of that variable
in a custom alert. So I created a variable called
gJay.
Char * gJay = Jay;
When I put this code in the main.c file (the file that
has the MainFormInit function in it)
below
In the other sources (not main.c):
extern Char *gJay;
On Thu, 18 Apr 2002 09:00:44 -0500, Palm Developer Forum
[EMAIL PROTECTED] said:
Creating a global variable:
I tried to create a global variable and test to see the
scope of that variable
in a custom alert. So I created a variable called
Thanks Brian,
Do you mean I declared it correctly and in addition I
need to put the code you suggested in each of the .c
files?
Jay
From Brian:
In the other sources (not main.c):
extern Char *gJay;
Creating a global variable:
I tried to create a global variable and test to see the
scope
you suggested in each of the .c
files?
Jay
From Brian:
In the other sources (not main.c):
extern Char *gJay;
Creating a global variable:
I tried to create a global variable and test to see the
scope of that variable
in a custom alert. So I created a variable called
gJay.
Char * gJay
, 2002 8:01 AM
To: Palm Developer Forum
Subject: How to create a global variable?
Creating a global variable:
I tried to create a global variable and test to see the
scope of that variable
in a custom alert. So I created a variable called
gJay.
Char * gJay = Jay;
When I put this code
it global or it would lose scope after the
function...but I don't see any examples of this being
declared globally so was lost on how to do it.
How did you guys know the extern keyword would do
this. You don't need it in C or C++ to create a global
variable.
Jay
Thanks Brian,
Do you mean I declared
it.
How did you guys know the extern keyword would do
this. You don't need it in C or C++ to create a global
variable.
Jay
Thanks Brian,
Do you mean I declared it correctly and in addition I
need to put the code you suggested in each of the .c
files?
Jay
From Brian:
In the other sources
all globals.
Paul
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jay
Francis
Sent: Thursday, April 18, 2002 12:26 PM
To: Palm Developer Forum
Subject: How to create a global variable?
Thanks to Brian and Paul.
I got it to work. However I am curious
with an extern
declaration in its .h file
If you want a global variable that can be accessed by all of your C Modules
then you need to have an extern declaration in your project .h file which
gets included in all of your project .c files.
Here is an example
Hello Hadrian,
What I can see: Your changing the global variable in the line
iPlaylistSelection = selection; This will happen everytime you select a
new item in the list (general knowledge).
Regards,
Lennie De Villiers
PocketStudio Professional
Pocket-Technologies.Inc
- www.pocket
Hello Max Bian,
Correct me if I'm wrong!
Isn't the line x = 0x1234; changing x to some hexidecimal/octal value ?
(not y variable). I don't know C much (only Java and alittle C#).
What?! How could that happen? From what I have learned from my C class,
only
the lower byte will be (and should
--- D De Villiers wrote:
Isn't the line x = 0x1234; changing x to some
hexidecimal/octal value ?
(not y variable). I don't know C much (only Java and
alittle C#).
Lennie -
When you write 0x1234 in C (or C++, and probably also
in Java), you are simply using hex notation to express
the
?
Any help would be appreciated
cheers
Hadrian
code:
//global variable
static UInt iPlaylistSelection = 0;
//section in MyFormHandleEvent where variable is changed
case lstSelectEvent:
{
Word listID = event-data.lstSelect.listID;
ListPtr listPtr = event-data.lstSelect.pList;
Word
--- Palm wrote:
I have a problem with a global UInt variable.
I want the variable to store the selection
number of a list. It works fine once and then
the second time it gets changed, different
data is stored.
Is that a problem? If the 2nd selection is not the
same as the 1st
What?! How could that happen? From what I have learned from my C class, only
the lower byte will be (and should be) assigned to x.
Max
--- Joe Programmer [EMAIL PROTECTED] wrote:
static UInt8 x, y, z;
x = 0x1234; // probably changes y, too
Sorry, I was being sloppy. I should have used
MemMove or something similar in my example.
This will actually overwrite something:
static UInt8 x = 0;
static UInt8 y = 0;
static UInt16 z = 0x1234;
MemMove(x, z, 2);
The point I was trying to make was that you can
over-write a variable if you
75 matches
Mail list logo