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 - Ccontrols and Forms

Ccontrols and Forms

Postby juha2u on Tue Aug 20, 2002 12:15 am

I am having problems switching forms with Ccontrols. My program has a data entry screen that stores info to a database and then switches to a screen that shows totals. I use clearg() and the screen clears (after 2 or 3 clicks on the button) but the text boxes still activate when I click on the correct position on the blank screen. I have also tried using the dbclose function but that did not work either. I have seen postings for Ptoolbox but with over 800 lines of code written, I really don't want to change. Am I missing something simple or perhaps there is a workaround.

Thanks.
juha2u
 
Posts: 11
Joined: Tue Aug 13, 2002 7:45 pm

Postby Steven on Tue Aug 20, 2002 12:09 pm

In order to properly close a CControls form, you must use CDestroy to remove the controls (including the frame, if any) before clearing the screen. This also serves to remove the controls from memory. Alternatively, you could just use CErase on each control to clear the control from the screen without removing it from memory.
Steven
 
Posts: 25
Joined: Tue Apr 02, 2002 6:23 pm

Postby juha2u on Tue Aug 20, 2002 4:38 pm

Thanks for the quick response.

I tried using Cdestroy for each label and edit box. The screen clears nicely but I can still bring up an edit box and invoke some button functions if I search for them on the blank screen. Oddly enough, some of the edit boxes and buttons truly are gone??? I am using Ccontrols v. 1.O. I read somewhere on this board of a "memory leak" problem using Cdestroy. Any thoughts? Also, does anyone know if a later version ever was released?

Sample code on switching forms would be greatly appreciated!
juha2u
 
Posts: 11
Joined: Tue Aug 13, 2002 7:45 pm

Postby Steven on Tue Aug 20, 2002 5:11 pm

I forgot to add that you must change message loops to go back to the message loop of the new/previous form. The message loop that you are in determines which controls are activated by pen taps.
Steven
 
Posts: 25
Joined: Tue Apr 02, 2002 6:23 pm

Postby juha2u on Wed Aug 21, 2002 12:38 pm

I'm still very confused. Nothing I do seems to work. Perhaps I am using Cdestroy incorrectly or in the wrong place. Your comment on using separate message loops has me confused as well. Can someone possibly post or email me some sample code that demonstrates switching forms using Ccontrols. As I mentioned, I am still using Ccontrols 1.0 and perhaps the problem is with this rumored "memory leak". Is another version available? It's probably me, however, as I am only a few months into this programming stuff. The hours are mounting and my wife is suggesting I toss my PDA. Someone, please help!!!

Thanks juha2u@yahoo.com
juha2u
 
Posts: 11
Joined: Tue Aug 13, 2002 7:45 pm

Postby dcalp on Wed Aug 21, 2002 1:24 pm

Hi juha2u:
If you use Windows you can test my soft, is a desktop environment for visual design and PocketC code generation. You can get the code of 2 CControls forms that switch from one to other in seconds. Read the Quick Start section in the Help.
Also in my site is the CControls update 1.1.1 for download.



DC

Pocket VisualForms
Visual design for PocketC
http://pocketvf.port5.com
http://www.angelfire.com/rnb/pocketvf
Diego

Pocket VisualForms
Visual design for PocketC
http://www.diegocalp.com.ar
dcalp
 
Posts: 115
Joined: Thu Dec 06, 2001 9:53 am
Location: Argentina

Postby juha2u on Wed Aug 21, 2002 1:35 pm

DC

I'm off to your site now. Hopefully this will work.

Thanks so much.
juha2u
 
Posts: 11
Joined: Tue Aug 13, 2002 7:45 pm

Postby juha2u on Thu Aug 22, 2002 6:08 pm

Thanks to all. Cdestroy was not necessary at all. Creating two message loops did the trick. It took a little bit of time to get the code to work but switching forms works perfectly now.

DC, I checked out your site and the VisualForms product looks real easy to use. I will consider getting it. Thanks again.

J
juha2u
 
Posts: 11
Joined: Tue Aug 13, 2002 7:45 pm

Postby Steven on Thu Aug 22, 2002 6:34 pm

Cdestroy is still necessary to remove controls from memory after you have finished using them. This is especially important for listboxes, tables, etc., since the contents is still in memory until you execute Cdestroy (or exit the program).
Steven
 
Posts: 25
Joined: Tue Apr 02, 2002 6:23 pm


Return to PocketC for Palm OS KB

Who is online

Users browsing this forum: No registered users and 1 guest

cron