I don't think the problem is stuffing a string into the selector that might
draw off the end of the selector's viewable area.  The big problem is
stuffing more characters into the selector than you entered in constructor.
Set the length of the selector by typing some text until you reach the max #
or characters you plan to ever enter (add 1 for good measure).  When your
app copies a string into the selector, be sure to limit the size to the
number of text chars you already entered via constructor.  I never was able
to successfully resize a selector and not cause some sort of memory problems
down the road. (at least in OSs 3.0, 3.1 and 3.3)

-----Original Message-----
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
To: Palm Developer Forum <[EMAIL PROTECTED]>
Date: Thursday, March 16, 2000 10:16 AM
Subject: RE: More weirdness



I've actually managed to replicate the problem now :), but I'm still a bit
confused (no change there). The problem seems to occur when the program
tries to set the label of a selector resource to a string that is *too*
long.

But what is the definition of 'too long'? What I can't work out is whether
there is a built-in limit on the size of the selector label or whether it's
because the label is being written off the screen.

Any ideas and/or ideas on how I best truncate the label? Also, the error
message (Object not in form) would seem a bit misleading in this case.

Regards,

John.

-----Original Message-----
From: John Walls [mailto:[EMAIL PROTECTED]]
Sent: 16 March 2000 14:15
To: 'Palm Developer Forum (E-mail)'
Subject: FW: More weirdness



Is this the only scenario that causes this error?

I get this same error message intermittantly in my app. I've checked + I'm
referencing all form objects correctly.

Also, the message only seems to appear on my Palm III, i.e. I can't
replicate on Pose. It's driving me up the wall.

John.

[EMAIL PROTECTED] wrote on 15/3/00 15:45:

> hmmm... is this a bug in prc-tools/gcc ??
>
> I have a selector trigger that calls SelectDay() in a modal form, and when
i  run my program, i get  "Form.c,Line:1300, Object not in form"
>
> When i debug it (using gdb) there is no error :(
>
> I've tried using different optimizing modes -O3 -O2 -O1, but the "bug" is
still there :(..
>
> has anyone else seen this ?

  of course we have.. obviously, your object you are refering to is  NOT in
the form you are passing as an argument to FrmGetObjectPtr()
  :)

  check your code, and make sure you have a form reference to the  correct
form. :) it is a bug.. but it is yours :P not prc-tools :P  you can post the
snippet of code here and we will be able to fix  it up for you.

  be sure to post the .rcp and .c snippets.. we want to make sure  your
object you are referencing is actually being declared in the  form
structures in the .rcp file :P

  cheers.

az.
--
Aaron Ardiri
Java Certified Programmer      http://www.hig.se/~ardiri/ University-College
i G�vle     mailto:[EMAIL PROTECTED] SE 801 76 G�vle SWEDEN
Tel: +46 26 64 87 38           Fax: +46 26 64 87 88 Mob: +46 70 656 1143
A/H: +46 8 668 78 72

if you enjoy it, then it aint work :) - rule #106 of life


--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palm.com/devzone/mailinglists.html


--
"This message is brought to you by Reuters.net; Any views expressed are
those of the sender, except where the sender specifically states them to be
the views of Reuters Limited."


--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palm.com/devzone/mailinglists.html




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to