Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - using the registry

using the registry

Discuss PocketC for CE (including Desktop Edition)

Postby bvinas on Tue Jun 26, 2001 1:12 am

Is there a secret to using the registry? I am trying to write and read an int, and it is not getting created.

I read some other posts, and other people were having problems.

-bobby
bvinas
 
Posts: 43
Joined: Mon Feb 12, 2001 8:15 pm
Location: USA

Postby Justinespinosa on Tue Jun 26, 2001 5:43 am

i never had any problem with the registry. except for binary values.
first i suggest you to find a registry editor.
Than make sure you write the key like this:
(i.e.)
#define HKEY_CURRENTUSER 1

string key = "Software\\key"; // no "\\" at the beginning or at the end.
string ValueName ="Default"
int myint = 2;

regwint(HKEY_CURRENTUSER,key,ValueName,myint);

J.Espinosa

OUTS Softwares

Edited by - justinespinosa on 06/26/2001 00:44:04
J.Espinosa

OUTS Softwares
Justinespinosa
 
Posts: 156
Joined: Wed Dec 06, 2000 2:30 pm
Location: Switzerland

Postby bvinas on Tue Jun 26, 2001 10:34 am

The reason it wasn't working for me is I put the code to write to thr registry in the application unload method. It looks like it wasn't getting called when I called quit().

So I put the code in my exit function (when user selects exit from menu) and it worked.

Unload doesn't get called during a quit()?

-bobby
bvinas
 
Posts: 43
Joined: Mon Feb 12, 2001 8:15 pm
Location: USA

Postby Justinespinosa on Tue Jun 26, 2001 4:18 pm

Which Unload. do you use PcForm ?

J.Espinosa

OUTS Softwares
J.Espinosa

OUTS Softwares
Justinespinosa
 
Posts: 156
Joined: Wed Dec 06, 2000 2:30 pm
Location: Switzerland

Postby bvinas on Tue Jun 26, 2001 6:00 pm

Yes, I use PCForm. And the app unload
bvinas
 
Posts: 43
Joined: Mon Feb 12, 2001 8:15 pm
Location: USA

Postby Justinespinosa on Wed Jun 27, 2001 4:17 am

When you call quit() with the V2 compiler this just end the program don't call the PcForm unload method. With the V* compiler, it's the same but you can call a last function. before the program ends.
just make your function:
unload(){

Confirm("Goodby !);
}
and use atexit() to define the last function.
main(){

atexit(unload);
quit();
}

J.Espinosa

OUTS Softwares
J.Espinosa

OUTS Softwares
Justinespinosa
 
Posts: 156
Joined: Wed Dec 06, 2000 2:30 pm
Location: Switzerland

Postby guy on Wed Jun 27, 2001 7:47 am

The correct way to exit from a PCForm application is to use the code:

Form_Load(-1) ;

This correctly closes down the application and calls the application unload events.

The atexit() function was added to the runtime after the development of PCForm V1.25 was finalised otherwise I would have ensured the the application exit function was called even when you use quit(). Watch this space.


Guy
Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum
guy
 
Posts: 879
Joined: Thu Dec 07, 2000 8:58 am
Location: United Kingdom

Postby bvinas on Wed Jun 27, 2001 10:22 am

Guy,

is that anywhere in the docs? I never knew about that.


-bobby
bvinas
 
Posts: 43
Joined: Mon Feb 12, 2001 8:15 pm
Location: USA

Postby guy on Wed Jun 27, 2001 11:02 am

Yes:

From the main top level menu in help choose the Application choice, and look under the Unload event in the table.

Or, from the top level help menu, choose the Forms choice and scroll down to the bit about changing forms.

Or, from the top level menu, go to the Reference Section, choose Events Reference, and then Unload.

Maybe I should improve the format of the help file. I have a number of updates planned for the next version.


Guy
Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum
guy
 
Posts: 879
Joined: Thu Dec 07, 2000 8:58 am
Location: United Kingdom

Postby bvinas on Wed Jun 27, 2001 2:34 pm

I should of just read the help better.

Great product though, thanks


bobby
bvinas
 
Posts: 43
Joined: Mon Feb 12, 2001 8:15 pm
Location: USA


Return to PocketC for CE

Who is online

Users browsing this forum: No registered users and 2 guests

cron