Hi Ricardo,
don't know if that's the problem, but you use sizeof() to get the length of a
string and that doesn't work. sizeof("text") returns the size of a pointer to
char, not the length of the string. Take StrLen() instead.
Am Montag, 15. September 2003 23:48 schrieb Ricardo Marques:
> I'll try that and see what I get, altough my problem seems to happen only
> after I go to the form where I select my BT devices.
> This form is defined as follows in my resources file.I've a total of 20
> selector triggers.(only put some so this wouldnt be very cumbersome, since
> they're all the same)
> FORM ID MenuSelectDevForm AT (0 0 160 160)
> USABLE
> HELPID MenuSelectDevFormHelp
> BEGIN
> TITLE "Select Device"
> SELECTORTRIGGER "Device 1 -> " ID 5000 AT (2 15 60 AUTO)
> SELECTORTRIGGER " " ID 5010 AT (PREVRIGHT+1 15 90 AUTO)
> SELECTORTRIGGER "Device 2 -> " ID 5001 AT (2 PREVBOTTOM+1 60 AUTO)
> SELECTORTRIGGER " " ID 5011 AT (PREVRIGHT+1 PREVTOP 90 AUTO)
> SELECTORTRIGGER "Device 3 -> " ID 5002 AT (2 PREVBOTTOM+1 60 AUTO)
> SELECTORTRIGGER " " ID 5012 AT (PREVRIGHT+1 PREVTOP 90 AUTO)
> SELECTORTRIGGER "Device 4 -> " ID 5003 AT (2 PREVBOTTOM+1 60 AUTO)
> SELECTORTRIGGER " " ID 5013 AT (PREVRIGHT+1 PREVTOP 90 AUTO)
> BUTTON "Done" ID MenuSelectDevFormDone AT (PREVRIGHT-90 PREVBOTTOM+4 AUTO
> AUTO)
> END
> I draw my info on these triggers with :
> void UpdateDevList(UInt16 selectedDev, UInt16 coordY){
>
> int j;
> Char *s;
> RectangleType a;
>
> FntSetFont (0);
> a.topLeft.x = 65;
> a.extent.x = 83;
> a.extent.y = 11;
>
>
> if (selectedDev < gDiscoveredBdAddr){
> s=(Char *)MemPtrNew(sizeof(BDevs[selectedDev].friendlyName));
> StrCopy(s,BDevs[selectedDev].friendlyName);
> }
> else {
> s=(Char *)MemPtrNew(sizeof(""));
> StrCopy(s,"");
> }
> a.topLeft.y = coordY;
> WinEraseRectangle (&a, 0);
> WinDrawChars (s, StrLen (s), 70, coordY);
> MemPtrFree(s);
> }
>
> Its only after going to this form that my problemm occurs. Nothing happens
> with the other forms
> Can't figure out why. Probably its a basic error but since I'm learnig as
> I'm writing it...
--
Mit freundlichen Gr��en
Helmut A. Bender
Helmut Bender GmbH
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/