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: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 - I'm going crazy... form stops refreshing...

I'm going crazy... form stops refreshing...

Discuss OrbForms Designer and PocketC Architect

Postby Woofin on Thu Mar 22, 2007 4:11 pm

OK, I've got a mainForm that has a Gadget (displaying a rectangle) and a label. The mainForm has an onpenup() event handler that displays the pen coordinates in the label. I run it several times and it works as expected. So far so good.

Then I make some minor changes, say, in the gadget (e.g. changing the colour of the rectangle) and run it and the form no longer displays anything after loading. Anything that would change the appearance of the controls (gadgets, labels, etc) on the form have no effect. When I add an alert to the events I see that they're indeed being fired, but nothing refreshes on the form display.

I've been through this now several times - at least 5 to be exact. I create a project and start building it and everything works fine... then all of a sudden (at no particular point that I can discern) it'll stop updating the form display when running. It reacts to events and will display alerts, but it won't refresh/display/paint any controls.

I've recreated my project from scratch several times now, going carefully each time to be sure I'm not breaking anything. I can post code if it would help, but the problem seems to be something else... has anyone else ever encountered this or might be able to explain what the heck is happening? I'm going crazy trying to figure this out!

Ok, here's a sample from one of my mainForm's:
// mainform.oc

handler mainForm.onopen() {
}


handler btnA.onselect() {
gadSprite.animate;
}


handler gadMap.onpenup() {
lblStatus.text = "PenUp at " + event.x + "," + event.y;
gadSprite.gadget.visible = false;
gadSprite.gadget.x = event.x;
gadSprite.gadget.y = event.y;
gadSprite.gadget.visible = true;
}

This code may work if you try it - it did for me at first. Then it stopped working and I cannot make it work again. It just stops working, for no apparent reason. Any ideas/suggestions?
Woofin
 
Posts: 11
Joined: Thu Mar 15, 2007 2:35 pm
Location: USA

Postby Woofin on Thu Mar 22, 2007 6:04 pm

Here are the steps to recreate the problem (I think)... can someone please try it and let me know what happens?

1. Start the Palm Simulator
2. Run OrbForms
3. Create a new barebones project. I called mine "Test1".
4. Add a label to the form; call it "lblStatus"
5. Open mainForm.oc and code as follows:
// mainform.oc

handler mainForm.onopen() {
}

handler mainForm.onpenup() {
lblStatus.text = "Pen: " + event.x + "," + event.y;
}

6. Run the project. As you click on the running form you see the pentap location displayed. So far, so good.
7. Go back to OrbForms and insert a new gadget file called "gadTest1.oc".
8. Code the gadget as follows:
struct myGadget {
UIGadget gadget;

void onopen();
void ondraw();
void redraw();
Draw map;
};

void myGadget.onopen() {
map.attachGadget(gadget);
}

void myGadget.ondraw() {
redraw();
}

void myGadget.redraw() {
map.nbegin();
map.rect(0, 1, 1, map.nw, map.nh, 0);
map.end;
}

9. Add a gadget to the form in the Form Designer and from the Gadget Type dropdown, select "myGadget".
10. Run the project again. In the Palm Simulator, click anywhere you like, including on or off the gadget... the lblStatus is never updated with the pen position. But if you add an alert to the onpenup() event you'll see that it does indeed fire. It just doesn't update the text.
11. Go back to OrbForms and remove the gadget from the form and rerun it, it runs fine again.

So... why does having the gadget on the form make the form display not work? Is it because the gadget is drawing in hi-res mode? There are no events attached to the gadget, and it is sized reasonably small (60w x 60h). What is the conflict?
Woofin
 
Posts: 11
Joined: Thu Mar 15, 2007 2:35 pm
Location: USA

Postby dewey on Tue Apr 10, 2007 4:17 am

I think was is more likely is that the pen event is not getting to the form when the gadget is on screen. The gadget will eat the pen events if you click within it. If you click outside it, the form SHOULD be getting events.
dewey
Site Admin
 
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am


Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 2 guests

cron