Ricardo,

What exactly is the problem, what symptoms are you seeing?

Chris

p.s. this code is very ropey :-

 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);


-----Original Message-----
From: Ricardo Marques [mailto:[EMAIL PROTECTED]
Sent: 17 September 2003 14:57
To: Palm Developer Forum
Subject: Re: (newbie need help)My app doesn't return to the aplications
screen (Home).


Well, my problem only occurs with one of my secondary forms, in which i
select a device. I don't see what I'm doing wrong so here is the resource of
that form and the function which writes it :


//when going to the selection form...
case frmOpenEvent:
    form = FrmGetActiveForm();
    //MainFormInit(form);
    FrmDrawForm(form);
    for (coordY=TOPDEVLIST, currentDev=0;currentDev<MAXBDAVAILABLE &&
coordY<140;coordY += 13,currentDev++) //coordY<140 para 10
    {
 UpdateDevList(currentDev,coordY);
    }
    DeviceSelec = true;
    handled = true;
    break;

//writes the found devices on the selector triggers of the form
void UpdateDevList(UInt16 selectedDev, UInt16 coordY){


 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);
}

//the resources of the form
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)
  SELECTORTRIGGER "Device  5  -> " ID 5004 AT (2 PREVBOTTOM+1 60 AUTO)
  SELECTORTRIGGER " "   ID 5014 AT (PREVRIGHT+1 PREVTOP 90 AUTO)
  SELECTORTRIGGER "Device  6  -> " ID 5005 AT (2 PREVBOTTOM+1 60 AUTO)
  SELECTORTRIGGER " "   ID 5015 AT (PREVRIGHT+1 PREVTOP 90 AUTO)
  SELECTORTRIGGER "Device  7  -> " ID 5006 AT (2 PREVBOTTOM+1 60 AUTO)
  SELECTORTRIGGER " "   ID 5016 AT (PREVRIGHT+1 PREVTOP 90 AUTO)
  SELECTORTRIGGER "Device  8  -> " ID 5007 AT (2 PREVBOTTOM+1 60 AUTO)
  SELECTORTRIGGER " "   ID 5017 AT (PREVRIGHT+1 PREVTOP 90 AUTO)
  SELECTORTRIGGER "Device  9  -> " ID 5008 AT (2 PREVBOTTOM+1 60 AUTO)
  SELECTORTRIGGER " "   ID 5018 AT (PREVRIGHT+1 PREVTOP 90 AUTO)
  SELECTORTRIGGER "Device 10 -> " ID 5009 AT (2 PREVBOTTOM+1 60 AUTO)
  SELECTORTRIGGER " "   ID 5019 AT (PREVRIGHT+1 PREVTOP 90 AUTO)
  BUTTON "Done" ID MenuSelectDevFormDone AT (PREVRIGHT-90 PREVBOTTOM+4 AUTO
AUTO)
END



-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/

_____________________________________________________________________

This message has been checked for all known viruses on behalf of Vivista by
MessageLabs. 

http://www.messagelabs.com or Email: [EMAIL PROTECTED]

Vivista formerly Securicor Information Systems for further information
http://www.vivista.co.uk  



**********************************************************************
The information contained in this e-mail message is intended
only for the individuals named above.  If you are not the 
intended recipient, you should be aware that any 
dissemination, distribution, forwarding or other duplication 
of this communication is strictly prohibited.  The views 
expressed in this e-mail are those of the individual author 
and not necessarily those of Vivista Limited.  
Prior to taking any action based upon this e-mail message 
you should seek appropriate confirmation of its authenticity.
If you have received this e-mail in error, please immediately 
notify the sender by using the e-mail reply facility.
**********************************************************************


_____________________________________________________________________

This message has been checked for all known viruses on behalf of Vivista by 
MessageLabs. 

http://www.messagelabs.com or Email: [EMAIL PROTECTED]

Vivista formerly Securicor Information Systems for further information 
http://www.vivista.co.uk  


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to