[Klone-users] Global variable

Trung, Tran Minh trungtm at hpt.vn
Tue Mar 18 03:49:15 EDT 2008


Hi,

I have problem again with KLone !?

I hava a klapp to demo using global variable. My klapp has some file:

+ data.h:  declare a STRUCT global variable with name "data_struct"

+ data.c: has some functions: read_data, update_data from a file

+interface: has some .kl1 pages

            page1.kl1: when page loads, read data from file to data
struct and display some fields of it. And after modifying some fields,
click update button to update to data struct (on memory) and update to
db file.

            page2.kl1: have functions like page1.kl1 but display some
other fields of data struct.

            ...

I check all functions running well. But after updating (it is OK), when
I go to another page and return the previous page, the data will display
incorrectly (I check the db file, it is OK and read function is OK). And
I go to another page and return it again, it is OK. Sometimes it is OK,
sometimes it is wrong (it displays data I can not know where it is).
Ohh..., what is my problem!? I think because I use global variables !?

 

Thanks,

 

Tran Minh Trung

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://koanlogic.com/pipermail/klone-users/attachments/20080318/8a8c31a8/attachment.html


More information about the klone-users mailing list