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: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 - Strange behaviour from demo app, help!
Page 1 of 1

PostPosted: Sat Feb 03, 2007 3:57 pm
by jardini
Hello,
The following sample program comes from the Pocket Architect Language Reference documentation. If I build it on my Palm TX, it runs, but I can't enter any text in the field control. Also, after I click on the button, and then clear the alert box, the button text is replace with the "Hello, " from the alert box. I'm using the demo version of the tool and compiling directly on the handheld. Any help is appreciated. Has anyone tried this on a TX?

thanks!

@app myApp {
creator = "MyAp";
name = "App Name";
dbname = "AppName-MyAp";
}

@form myForm {
id = 1000
text = "My Form"
x = 0, y = 0, w = 160, h = 160

field nameField {
id = 1001
x = 10, y = 60, w = 140, h = 12
}

button alertButton {
id = 1002
x = 60, y = 80, w = 40, h = 12
text = "My Button"
}
}

// a global variable to hold the salutation.
string text;

// the handler for when the app is started
handler myApp.onstart() {
// load the main form
myForm.load();
}

// a function to build the text for the alert
string buildText(string name) {
return "Hello, " + name;
}

// the handler for the button, which displays the alert
handler alertButton.onselect() {
text = buildText(nameField.text);
alert(text);
}

PostPosted: Sun Feb 04, 2007 1:21 am
by FrankG
I pasted the code into a memo,synced it to my LifeDrive, added a //test.ocp line to the top and compiled it with PCA.

After a successful compile, PCA said it was going to write the application file and whammo, the LifeDrive resets. I downloaded the latest PCA (4.1.1) to make sure I had the most recent and the same problem occurred.

After the tediously long reset it displayed this information in the alert box saying Architect blew up:

DataMgr.c,Line:8898,
DmWrite:
DmWriteCheck Failed

Why would PCA cause a fatal alert writing the application PRC?

Frank

PostPosted: Sun Feb 04, 2007 5:35 pm
by FrankG
jardini,

Add this line to the nameField definintion:

maxchars = 30

It allocates space in the field object for the text data.

Jeremy:

Also -- the fatal alert I metioned in this thread happens when PCA writes a PRC file with the creator ID that an existing PRC file with a different name has. In plain speak: File A with ID "MyAp" exists. I compile file B with ID "MyAp" and PCA causes an OS reset.

Probably needs a code fix somewhere.

HTH,
Frank

PostPosted: Mon Feb 05, 2007 11:02 am
by jardini
That works - thanks a bunch!

Follow up question: what is the best source of documentation for the product? Is it the book, or, is the set of html docs that come with the demo download it?

thanks again

PostPosted: Mon Feb 05, 2007 12:26 pm
by FrankG
My favorite isthe help that comes with OrbForms Designer but the PCA HTML docs are quite thorough and organized for easy information retrieval.

Regards,
Frank

PostPosted: Mon Feb 05, 2007 1:26 pm
by jardini
btw, I noticed that though problem 1 is fixed (I can now enter text into the field), problem 2 is still there; when the alert box exits, the text in my button is still replaced with the alert box text?!

PostPosted: Mon Feb 05, 2007 6:55 pm
by FrankG
Oh yeah, forgot about that part. You could try making a handler routine for myForm.ondraw events and redraw the button with a line

alertButton.visible = true;

I don't see the problem you're experiencing with the screen repainting.

What's odd is that the button text gets updated with the "Hello, name" text. Where is that happening? I wondered...

Then I saw alertButton.onselect()
this line

text = buildText(nameField.text);

actually updates the button text. Duh - I hadn't considered that the variable text is really the member data of the button. I wonder if your problem goes away if you add the visible = true line to immdiately follow the text = buildText line and skip the ondraw handler for the form. Maybe that would make a difference.

Good luck,
Frank

PostPosted: Tue Feb 06, 2007 1:11 am
by jardini
Frank,
On your tip, I found that if I change the name of my global "text" to "txt" the problem goes away (no scope issues).

thanks,
John