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
[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 - (0 ): Internal compiler error

(0 ): Internal compiler error

Discuss OrbForms Designer and PocketC Architect

Postby zpodrasky on Mon Apr 10, 2006 7:51 pm

What does it mean? I am not able to build application!
Where I have to start experiment to overcome?
I don' use any graphics, I have only added code for saving the app preferences.

Code is following:

// application code
string l[10] = { "10", "12", "14", "16", "18", "20", "22", "25", "28", "32" };
string* p;
string m[9] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
string* r;
int nox,noy,ntx,nty,Doh,Dtr;
float As;
int i;
// The saved state of your application is represented
// by the members of this structure
struct AppPrefs {
int noxi;
int noyi;
int ntxi;
int ntyi;
int Dohi;
int Dtri;
};

AppPrefs SHRpref;

handler app.onstart() {
Preferences prefs; {
// load the preferences
}
if (prefs.get(app.creator, false, &SHRpref, typeof(AppPrefs), 6) ) {
nox=SHRpref.noxi; noy=SHRpref.noyi; ntx=SHRpref.ntxi; nty=SHRpref.ntyi;
Doh=SHRpref.Dohi; Dtr=SHRpref.Dtri;
}
;

// load the main form
mainForm.load();
}

handler app.onstop() {
Preferences prefs;
// save the preferences
prefs.set(app.creator, false, &SHRpref, typeof(AppPrefs), 6);
}

and second file }Mainform.oc]:

After adding this code, previously working program fetches internal compiler error.

Please, help the beginner.
zpodrasky
 
Posts: 3
Joined: Mon Apr 10, 2006 5:48 pm
Location: Czech Republic

Postby dewey on Wed Apr 12, 2006 4:17 am

It seems to be having a problem with:
handler app.onstart() {
Preferences prefs; {
// load the preferences
}

The braces in the function body are unnecessary. Remove them, and it should compile.
dewey
Site Admin
 
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am

Postby nmc on Wed Apr 12, 2006 7:04 am

...and while you are there, get this fixed:

> prefs.get(app.creator, false, &SHRpref, typeof(AppPrefs), 6)

The '6' has to be a '1' because SHRpref isnt an array and the six members are already catched by the 'typeof(AppPrefs)'

(same in prefs.set())
nmc
 
Posts: 197
Joined: Tue May 27, 2003 8:42 pm
Location: Germany

Postby zpodrasky on Wed Apr 12, 2006 3:27 pm

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by dewey</i>
<br />It seems to be having a problem with:
handler app.onstart() {
Preferences prefs; {
// load the preferences
}

The braces in the function body are unnecessary. Remove them, and it should compile.
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

Heureka! Thanks for help!
zpodrasky
 
Posts: 3
Joined: Mon Apr 10, 2006 5:48 pm
Location: Czech Republic

Postby zpodrasky on Wed Apr 12, 2006 3:39 pm

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by nmc</i>
<br />...and while you are there, get this fixed:

> prefs.get(app.creator, false, &SHRpref, typeof(AppPrefs), 6)

The '6' has to be a '1' because SHRpref isnt an array and the six members are already catched by the 'typeof(AppPrefs)'

(same in prefs.set())
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

Very useful hint! And preferences now work OK! Thank you!

For completeness I list the final code:
<hr noshade size="1">
Code: Select all
   
int ev_nox, ev_noy, ev_ntx, ev_nty, ev_Doh, ev_Dtr;

// The saved state of your application is represented
// by the members of this structure
struct AppPrefs {
   int noxi;
   int noyi;
   int ntxi;
   int ntyi;
   int Dohi;
   int Dtri;
};

AppPrefs SHRpref;


handler app.onstart() {
   Preferences prefs;
   if (prefs.get(app.creator, false, &SHRpref, typeof(AppPrefs), 1) )
       {
         ev_nox=SHRpref.noxi;
         ev_noy=SHRpref.noyi;
         ev_ntx=SHRpref.ntxi;
         ev_nty=SHRpref.ntyi;
         ev_Doh=SHRpref.Dohi;
         ev_Dtr=SHRpref.Dtri;   
         }
         else {
         ev_nox=1; ev_noy=1;
         ev_ntx=2; ev_nty=2;
         ev_Doh=10; ev_Dtr=4;
         }  /* some default values */
   ;

   // load the main form
   mainForm.load();   
}

handler app.onstop() {
   Preferences prefs;
   {
   SHRpref.noxi=ev_nox;
   SHRpref.noyi=ev_noy;
        SHRpref.ntxi=ev_ntx;
   SHRpref.ntyi=ev_nty;
   SHRpref.Dohi=ev_Doh;    
        SHRpref.Dtri=ev_Dtr;
   }
   // save the preferences
   prefs.set(app.creator, false, &SHRpref, typeof(AppPrefs), 1);
}
<hr noshade size="1">
:)
zpodrasky
 
Posts: 3
Joined: Mon Apr 10, 2006 5:48 pm
Location: Czech Republic


Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 1 guest

cron