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

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: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 - Compiler bug?
Page 1 of 1

PostPosted: Thu Jan 12, 2006 6:08 pm
by Aqua32
Try compiling this (it works):

Code: Select all
void drawListList(int item, int x, int y, int w, int h, string text);

Draw draw;
string dummy[3] = {"Item 1", "Item 2", "Item 3"};
@app shoppeApp
{
   creator = "DBiC";
   name = "Shoppe";
   dbname = "shoppe-DB";
}

@form shoppeForm
{
   id = 1001
   text = "Shoppe"
   x=0,y=0,w=160,h=160
   vresize = 2,hresize = 2
   resizable = true
   
   list UIList list_list
   {
      id = 101
      x=5,y=1,w=1,h=1
   }
   
   button UIButton btn_new
   {
      id = 103
      text = "New List"
      x=5, y=1, w=50, h=20
   }
   
   button UIButton btn_view
   {
      id = 104
      text = "View Selected"
      x=60,y=1,w=60,h=20
   }
   
   button UIButton btn_next
   {
      id = 105
      text = "Next"
      x=125,y=1,w=30,h=20
   }
}

handler shoppeApp.onstart()
{
   shoppeForm.load();
}

handler shoppeForm.onopen()
{
   draw.attachForm(this);
   list_list.setdrawfunc(drawListList);
   list_list.x = 5;
   list_list.y = 20;
   list_list.w = shoppeForm.w-10;
   list_list.h = shoppeForm.h-50;
   list_list.setitems(3, dummy);
   
   list_list.visible = true;
   
   btn_new.y = list_list.y+list_list.h+5;
   btn_view.y = btn_new.y;//list_list.y+list_list.h+5;
   btn_next.y = btn_new.y;//list_list.y+list_list.h+5;
}

handler shoppeForm.onresize()
{
   //Stretch lists
   list_list.x = 5;
   list_list.y = 20;
   list_list.h = shoppeForm.h-list_list.y-30;
   list_list.w = shoppeForm.w-10;
   
   //Reposition buttons
   btn_new.y = list_list.y+list_list.h+5;
   btn_view.y = btn_new.y;//list_list.y+list_list.h+5;
   btn_next.y = btn_new.y;

   alert(shoppeForm.h);
//   string whtvr = "whatever";
//   alert(whtvr);
}

void drawListList(int item, int x, int y, int w, int h, string text)
{
   //How do we change the lists ITEM height?
   draw.begin();
      draw.fgRGB(255, 255, 255);
      draw.text(0,x,y,item+" "+text);
   draw.end();
}

handler btn_next.onselect()
{
   if(list_list.selitem < list_list.count-1)
   {
      list_list.selitem = list_list.selitem + 1;
   }
   else
   {
      list_list.selitem = 0;
   }
}


1st problem... When it is resized (graffiti is minimized) the alert pops up and shows my forms height (224)? My screen is 320x480. Shouldnt it be a *little* closer to 480? Perhaps Im still confused about the whole thing..

Anyways, back to the *bigger* problem..

Now UNComment the string declaration & alert in the shoppeForm.onresize event and compile... The error message is not very detailed so I can't understand why its happening.. I think its a bug?

PostPosted: Thu Jan 12, 2006 11:06 pm
by dewey
The form size you are getting is in standard coordinates (160x240).

OrbC does not allow declaring local variables except at the beginning of a method.

PostPosted: Fri Jan 13, 2006 12:05 am
by Aqua32
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">OrbC does not allow declaring local variables except at the beginning of a method.<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

I guess I can live with that. Makes things more organized anyways. These error messages seem uninformative to me though.

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"> The form size you are getting is in standard coordinates (160x240).<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

I guess Ill never get it lol.

Thanks for taking time.