Hi,

This is the code in which I am having problem with
accessing global 
variables. When user press a graphic button on my main
form, it first 
opens a form by method "FrmPopupForm(secondform)". On
this form u have got
a field for inserting text and then press "OK" button.
I have receiving the text 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. When I
show this text
through CustomFrmAlert, it gives error "Unallocated
Chunk of Memory".

Here is the code:
this is the global variable i have declared in my
header file:
"static char * connurl;"
In the second form Handle Event I am saving the text
into my global 
variable:
"connurl = FldGetTextPtr(field);"
This is the Return Form command:
"FrmReturnToForm(0);"
In the first Form Handle Event I want to access that
global variable:
"FrmCustomAlert(OutputAlert , connurl , NULL , NULL);"

This is the code.

I have also tried this thing by declaring struct
datatype but it also 
gives the same error.

If I place the FrmCustomAlert code into the second
Form Handle Event
immediately after getting the text from the field it
shows the text.

I hope now any of friend can assisst me the right way.

Waiting for the reply.
Fawaz



__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to