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

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

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

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

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

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

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

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112
[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 - Having a problem with calling other screens (noob)

Having a problem with calling other screens (noob)

Postby ve6dav on Wed Mar 17, 2004 7:55 pm

I am working on a program using PocketC and PocketC Desktop Edition. Due to the nature of the project that we are developing, I am not at liberty to say too much about what we are doing :oops:, but, I am having a problem with calling one screen from another screen. I used Ceditor to build the screens and then transfered them over to my PocketCDE and can not for the life of me get the first button h1 to call the next screen.

<b>Here is the main() function:</b>

//mainPad

@cid "MaPa";
@ver "1.0.2";
@name "Main Pad";
@dbname "Main Pad";
@licon1 "../large1.bmp";
@sicon1 "../small1.bmp";

#include "mainPad controls.h"
#include "mainPad methods.h"


main(){
initcontrols();
initcontents();
inititems();
drawcontrols();
messageloop();
}

<b>and the h files:</b>

/$ mainPad controls

#include "Ccontrols.c"

Chandle h1, h2, h3, h4;

initcontrols(){
h1=Cbutton(10, 10, 70, 70, 1, 4);
h2=Cbutton(80, 10, 70, 70, 1, 4);
h3=Cbutton(10, 80, 70, 70, 1, 4);
h4=Cbutton(80, 80, 70, 70, 1, 4);
}

initcontents(){
Csetcontent(h1, "*****"); //use anything to call the next screen
Csetcontent(h2, "*******");
Csetcontent(h3, "****");
Csetcontent(h4, "*******");
}

inititems(){
}

drawcontrols(){
Cdraw(h1);
Cdraw(h2);
Cdraw(h3);
Cdraw(h4);
}

<b>and:</b>


/$ mainPad methods

on_h1(){
}
on_h2(){
}
on_h3(){
}
on_h4(){
}

messageloop(){
int e;
while(1){
e = event(1);
if (Cevent(h1, e))on_h1();
else if (Cevent(h2, e))on_h2();
else if (Cevent(h3, e))on_h3();
else if (Cevent(h4, e))on_h4();
}
}

<hr noshade size="1">

When I try to call in the next screen by pushing h1 it does not work and I can not seem to get them to work compiling the whole thing as one unit as I get back too many errors about undeclared functions in Ccontrols2. Note that h2, h3, and h4 will all call different screens.

<hr noshade size="1">

<b>Here is the next part that I am trying to call:</b> These are more h files built with Cedit.

/$ timerPad controls

#include "Ccontrols.c"

Chandle h5, h6, h7, h8;

initcontrols(){
h5=Cbutton(10, 10, 70, 70, 1, 4);
h6=Cbutton(80, 10, 70, 70, 1, 4);
h7=Cbutton(10, 80, 70, 70, 1, 4);
h8=Cbutton(80, 80, 70, 70, 1, 4);
}

initcontents(){
Csetcontent(h5, "15");
Csetcontent(h6, "30");
Csetcontent(h7, "45");
Csetcontent(h8, "60");
}

inititems(){
}

drawcontrols(){
Cdraw(h5);
Cdraw(h6);
Cdraw(h7);
Cdraw(h8);
}

<b>and:</b>

/$ timerPad methods

on_h5(){
}
on_h6(){
}
on_h7(){
}
on_h8(){
}

messageloop(){
int e;
while(1){
e = event(1);
if (Cevent(h5, e))on_h5();
else if (Cevent(h6, e))on_h6();
else if (Cevent(h7, e))on_h7();
else if (Cevent(h8, e))on_h8();
}
}

<hr noshade size="1">

I can't figure out how to call the timer screen to get to the timer buttons. It is probably something in the pendown event or key event. But, I am totally out of ideas. Any pointers or suggestions would be greatly appreciated...:D

Thanks

Dwayne VE6DAV
ve6dav
 
Posts: 4
Joined: Mon Jan 05, 2004 3:47 pm
Location: Canada

Postby ve6dav on Wed Mar 17, 2004 7:57 pm

Oh yeah, I am using the Palm Emulator in conjunction with an m100 and a Sony Clie if that helps any.

Dwayne VE6DAV
ve6dav
 
Posts: 4
Joined: Mon Jan 05, 2004 3:47 pm
Location: Canada

Postby Vilmos on Wed Mar 17, 2004 8:06 pm

You have to rename all of the Ceditor names so that they are unique for each screen. Then in for example the on_h1() function you need to clear the screen, disable or free the controls on the first screen (your choice, it depends on what the program needs for speed vs. memory) and then run all the functions for the next screen just like you do for the first one.

You have each screen set up as a separate program that's all, start renaming each set of automatic functions, then start switching.

Vilmos
http://www.pocketdimension.com
Vilmos
 
Posts: 174
Joined: Tue Dec 05, 2000 6:13 pm
Location: Canada

Postby dcalp on Wed Mar 17, 2004 9:58 pm

Hi Dwayne:
Take a look to my software, with the trial version you could learn how to work with multiple forms and CControls.

Kind regards


Diego

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 ve6dav on Wed Mar 17, 2004 11:58 pm

<b>Chandle h1, h2, h3, h4;</b>

Vilmos,

Is this what you mean:

Chandle log, loc, lon, lod;

Basically make sure that each Chandle is unique?

<b>You have each screen set up as a separate program that's all, start renaming each set of automatic functions, then start switching.</b>

This is what I am trying to do. Have each screen as a sub-program, then call clear the memory and call the screens as required.

I think that I will relook at this tomorrow when I haven't spent 9 hours programming and maybe I will see what I am missing here.

Thanks for the input Vilmos.


Diego,

I downloaded your program and will give it a try. I have 16 screens built--some are just alert functions though. Thanks for you help too.

Regards,

Dwayne VE6DAV
ve6dav
 
Posts: 4
Joined: Mon Jan 05, 2004 3:47 pm
Location: Canada

Postby Vilmos on Thu Mar 18, 2004 8:32 pm

The names that I am talking about refer to the functions. Each file is not a separate program. You need to integrate all of the files into one program so there can be no duplicate function names.

initcontrols for example will exist for each screen. You need to name each function after the screen.

For example: Welcome screen

InitWelcomeControls()
DrawWelcomeControls()

You probably are unable to compile the whole project because of these duplicate names.



Vilmos
http://www.pocketdimension.com
Vilmos
 
Posts: 174
Joined: Tue Dec 05, 2000 6:13 pm
Location: Canada

Postby ve6dav on Wed Mar 24, 2004 8:40 pm

Vilmos,

Thanks for the help with the function calls. That along with buying the Pocket Visual Forms solved that problem. I now have a new problem with the PToolboxLib file. I remember reading about the fix somewhere and will have to go re-read the forum or do a search to see what I come up with. The error that I am getting is:

When I compile the program with PocketC Desktop Edition and I use the PToolboxLib 7.6.1,

Emulator error:

ProgramXX 1.0.2 just read from memory location 0x00000000, which is low in memory.

m100 error:

Fatal Error StringMgr.c,Line:67,Null String passed. Then the reset button comes up.

When I use the PToolboxLib 7.5.3, it works fine.:)

<hr noshade size="1">


Diego,

Nice little program. :D Works great with PToolboxLib and CControls.

Cheers,

Dwayne VE6DAV
ve6dav
 
Posts: 4
Joined: Mon Jan 05, 2004 3:47 pm
Location: Canada


Return to PocketC for Palm OS KB

Who is online

Users browsing this forum: No registered users and 2 guests

cron