Maybe I'm missing something, but it also looks like you never give any
values to x and y, yet you assign their values to penX and penY later. I'm
guessing you want to reverse those assignment statements, so you're
assigning the valuesof *penX and *penY to x and y, respectively. Also, when
you've done that, any line created with these two point is going to be VERY
short. :-)

Brian

> -----Original Message-----
> From: Viraj Chatterjee [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 11, 2001 4:55 AM
> To: Palm Developer Forum
> Subject: Re: Please fix my penX and penY code.
> 
> 
> Your problem doesn't seem to do much with Palm programming but with
> "programming".
> 
> You're passing an integer where a pointer is expected.
> 
> The Declaration for EvtGetPen is:
> void EvtGetPen (Int16 *pScreenX, Int16 *pScreenY, Boolean *pPenDown)
> 
> so your code should be ....
> 
> case penMoveEvent:
> int x,y;
> Int16          penX, penY;
> Boolean    penDown;
> EvtGetPen( &penX, &penY, &penDown);
>         penX=x;
>         penY=y;
>          WinDrawLine (penX,penY,x,y);
> 
>          break;
> 
> you won't get the error now, however, I'm not too clear about 
> what you want
> to do..., EvtGetPen shall give you certain values... and you'll be
> overwriting those with the assignments later on...
> 
> -vc
> 
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Monday, June 11, 2001 3:13 PM
> Subject: Re: Please fix my penX and penY code.
> 
> 
> > Oh, my error I keep getting says illegal implicit 
> conversion from int to
> short*
> >
> > case penMoveEvent:
> > int x,y;
> > int penX,penY;
> > Boolean             penDown;
> > /* Here is the error*/ EvtGetPen(penX, penY, penDown);
> >         penX=x;
> >         penY=y;
> >          WinDrawLine (penX,penY,x,y);
> >
> >         break;
> >
> >
> > --
> > For information on using the Palm Developer Forums, or to 
> unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/
> >
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to 
> unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
> 

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

Reply via email to