Article View: pilot.programmer.codewarrior
Article #51StrCopy is breaking my Popup Trigger
From: John Shehata
Date: Fri, 27 Jul 2001 01:22
Date: Fri, 27 Jul 2001 01:22
164 lines
7532 bytes
7532 bytes
This is a multi-part message in MIME format.
------=_NextPart_000_0063_01C11619.19F89700
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi all,
I have been having one heck of a time working with my popup triggers. I =
have a problem and i have narrowed it down to my StrCopy function to get =
the label. What it does is it seems to make my trigger inoperable. Once =
it is set, if you click on the trigger on my form, it doesn't popup. =
Nothing happens really, it just blinks.
My trigger works fine if i do not try to set a value for it when the =
form is being initialized. The code that is causing a problem is as =
follows...
// loading the data into my list
stringH =3D DmGetResource('tAIS', DueDtAppInfoStr);
duedt =3D (char *) MemHandleLock(stringH);
acnoholds =3D SysFormPointerArrayToString(duedt, 4);
listP =3D /*(ListPtr)*/ GetObjectPtr(frmPrefsDueDtListList);
LstSetListChoices(listP, (char **)MemHandelLock(acnoholds), 4);
ctlP =3D GetObjectPtr(frmPrefsDueDtTriggerPopTrigger);
//setting the item i want based on a preffernece that is contained
//within index (currently set to 1)
LstSetSelection(listP, index);
LabelP =3D (char *) CtlGetLabel(ctlP);
//here is the line that i know is causing the problem. I know this =
because if i do
//not copy the string this works fine, i just don't have this item =
displayed.
StrCopy(labelP, LstGetSelectionText(listP, LstGetSelection(listP)));
CtlSetLabel(ctlp, labelP);
I know that all of this code compiles and runs so if i made an error =
typing it in here just ignore it.
Any help on this would be greatly appreciated.
--=20
-John
AOL IM: tut00
ground-0-zero software engineering
http://www.ground-0-zero.com
------=_NextPart_000_0063_01C11619.19F89700
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 size=3D2>Hi =
all,</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 =
size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 size=3D2>I have been =
having one heck=20
of a time working with my popup triggers. I have a problem and i have =
narrowed=20
it down to my StrCopy function to get the label. What it does is it =
seems to=20
make my trigger inoperable. Once it is set, if you click on the trigger =
on my=20
form, it doesn't popup. Nothing happens really, it just =
blinks.</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 =
size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 size=3D2>My trigger =
works fine if i=20
do not try to set a value for it when the form is being initialized. The =
code=20
that is causing a problem is as follows...</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 =
size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 size=3D2>// loading =
the data into my=20
list</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 size=3D2>stringH =3D=20
DmGetResource('tAIS', DueDtAppInfoStr);</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 size=3D2>duedt =3D =
(char *)=20
MemHandleLock(stringH);</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 =
size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 size=3D2>acnoholds =3D =
SysFormPointerArrayToString(duedt, 4);</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 =
size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 size=3D2>listP =3D =
/*(ListPtr)*/=20
GetObjectPtr(frmPrefsDueDtListList);</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 =
size=3D2>LstSetListChoices(listP,=20
(char **)MemHandelLock(acnoholds), 4);</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 size=3D2>ctlP =3D=20
GetObjectPtr(frmPrefsDueDtTriggerPopTrigger);</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 =
size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 size=3D2>//setting the =
item i want=20
based on a preffernece that is contained</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 size=3D2>//within =
index (currently=20
set to 1)</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 =
size=3D2>LstSetSelection(listP,=20
index);</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 =
size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 size=3D2>LabelP =3D =
(char *)=20
CtlGetLabel(ctlP);</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 =
size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 size=3D2>//here is the =
line that i=20
know is causing the problem. I know this because if i do</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 size=3D2>//not copy =
the string this=20
works fine, i just don't have this item displayed.</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 =
size=3D2>StrCopy(labelP,=20
LstGetSelectionText(listP, LstGetSelection(listP)));</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 =
size=3D2>CtlSetLabel(ctlp,=20
labelP);</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 =
size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 =
size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 size=3D2>I know that =
all of this=20
code compiles and runs so if i made an error typing it in here just =
ignore=20
it.</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 =
size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 size=3D2>Any help on =
this would be=20
greatly appreciated.</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" color=3D#000080 size=3D2><BR>-- =
<BR>-John<BR>AOL IM:=20
tut00<BR>ground-0-zero software engineering<BR><A=20
href=3D"http://www.ground-0-zero.com">http://www.ground-0-zero.com</A></F=
ONT></DIV></BODY></HTML>
------=_NextPart_000_0063_01C11619.19F89700--
Technical Details
Message-ID:
<XfTJFrjFBHA.2432@server2.massena.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!130.133.1.3!fu-berlin.de!news.boerde.de!server2.massena.comShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10baa0,cb37c6ec4e8d9f23,start X-Google-Attributes: gid10baa0,public X-Google-Thread: 109d41,cb37c6ec4e8d9f23,start X-Google-Attributes: gid109d41,public X-Google-Thread: 10c638,cb37c6ec4e8d9f23,start X-Google-Attributes: gid10c638,public X-Google-ArrivalTime: 2001-07-26 18:35:23 PST From: "John Shehata" <jshehata@ground-0-zero.comNOJUNK> Subject: StrCopy is breaking my Popup Trigger Date: Thu, 26 Jul 2001 21:22:40 -0400 Lines: 165 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0063_01C11619.19F89700" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: <XfTJFrjFBHA.2432@server2.massena.com> Newsgroups: pilot.programmer.codewarrior,pilot.programmer,codewarrior.palm Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!130.133.1.3!fu-berlin.de!news.boerde.de!server2.massena.com NNTP-Posting-Host: 206.232.172.20