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
Page 1 of 1

PostPosted: Mon Apr 10, 2006 7:51 pm
by zpodrasky
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.

PostPosted: Wed Apr 12, 2006 4:17 am
by dewey
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.

PostPosted: Wed Apr 12, 2006 7:04 am
by nmc
...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())

PostPosted: Wed Apr 12, 2006 3:27 pm
by zpodrasky
<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!

PostPosted: Wed Apr 12, 2006 3:39 pm
by zpodrasky
<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">
:)