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 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:112)
[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:112)
[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:112)
[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:112)
OrbWorks Community Forum • View topic - multi form problem

multi form problem

A PocketC native palm library offering native forms and assorted utilities

multi form problem

Postby Henri on Fri Nov 30, 2007 12:58 pm

Hello,

Can somebody tell me why the appended code sample fails ?

Behaviour:
form 1 displays ok, I press button 1 to activate form 2
then
form 2 displays ok, I press button 2 to activate form 3
then
form 3 displays ok, I press button 3 to activate form 1)
then
form 3 diplays, this is wrong as form 1 should redisplay

I looks like redisplaying form1 fails for some reason. I cant find why.

I am using PocketC desktop & Pocket Toolbox V7.6.1 and am testing using a Palm Garmin iQue3600 running palmos v5.2.1r6.

Henri

-----------------------------------------------------------------

Code: Select all
@cid "HvBo";
@name "FormHvb";
@dbname    "FormHvb";
@category "Games";
@ver "1.0";
@licon1 "bmp/large1.bmp";
@sicon1 "bmp/small1.bmp";

library "PToolboxLib"
#include "header/Fctl.h"

#define FORM1    3000
#define BUTTON1 3001
#define FORM2    4000
#define BUTTON2 4001
#define FORM3    5000
#define BUTTON3 5001

int form1() {

  int
    e,
    next_page = 2;

  Fctl(DRAW,FORM1);
  while(1) {
    e=Fevent(1);
    if (e==BUTTON1) {
      break;
    }
  } 
  return(next_page);
}

int form2() {
  int
    e,
    next_page = 3;

  Fctl(DRAW,FORM2);
  while(1) {
    e=Fevent(1);
    if (e==BUTTON2) {
      break;
    }
  } 
  return(next_page);;
}

int form3() {
  int
    e,
    next_page = 1;

  Fctl(DRAW,FORM3);
  while(1) {
    e=Fevent(1);
    if (e==BUTTON3) {
      break;
    }
  } 
  return(next_page);
}

main() {

int
  iFormNr;

  Form(FORM1,"Form1");
  Button(BUTTON1,0,70,40,0,0,"To Form2");
 
  Form(FORM2,"Form2");
  Button(BUTTON2,0,70,60,0,0,"To Form3");

  Form(FORM3,"Form3");
  Button(BUTTON3,0,70,80,0,0,"To Form1");

  iFormNr = 1;

  while(1) {

    switch (iFormNr) {
      case 1: {
         iFormNr=form1();
            break;
         }
         case 2: {
            iFormNr=form2();
            break;
         }
         case 3: {
            iFormNr=form3();
            break;
         }
     }
  }
}
Henri
 
Posts: 1
Joined: Fri Nov 30, 2007 9:15 am

Return to Pocket Toolbox

Who is online

Users browsing this forum: No registered users and 2 guests

cron