How do you get your routine to be called instead of the original?

Jamie
"Simon Bennett" <[EMAIL PROTECTED]> wrote in message
news:52824@palm-dev-forum...
>
>     The problem appears to be with TblGetItemBounds and assumptions
> it makes with non text columns. The archives appear to concur.
>
>     So why not simply patch this routine? Call the original in your
patched
> version,
> but override the response for non text columns. It works like a charm for
> me.
>
> Regards,
>
>     Simon Bennett,
>     Senior technical analyst,
>     System Lynx Ltd/Total Control Systems (UK) Ltd/SafeTRACK.co.uk Ltd
>     E-mail: [EMAIL PROTECTED]
>     Tel:     +44 01922 622044
>     Fax:    +44 01922 621569
>     Net:     www.totalsupportline.com    (Support information, call
logging
> and progress for System Lynx Ltd, Total Control Systems (UK) Ltd and
> SafeTRACK.co.uk Ltd)
>                www.safetrack.co.uk           (SafeTRACK information and
> access)
>
> "Bradly J. Barton" <[EMAIL PROTECTED]> wrote in message
> news:52765@palm-dev-forum...
> >
> > > > My problem is not with the display, but with the selection.. For
some
> > > > reason, I can only click and get a table select event when I click
on
> > the
> > > > top half of a cell, but not the bottom half.
> >
> > For those who might need something like this....
> >
> > The archives led to the same conclusion.. that you had to do it
yourself..
> > my temporary (but not completely elegant yet because the highlight still
> > looks odd, I'm open to suggestions on solving that part) solution to
this
> is
> > this code in my event handler:
> >
> > *** Declared in the handler:
> >  static RectangleType tableBounds;
> >  static Boolean isDownInTable;
> >
> > *** tableBounds is set to the bounding rectangle of my table and
> > isDownInTable is set to false in the frmOpenEvent:
> >   TblGetBounds(table, &tableBounds);
> >   isDownInTable = false;
> >
> > *** I added these penDown and penUp Events..
> >
> >  case penDownEvent:
> >  {
> >   isDownInTable = RctPtInRectangle (event->screenX, event->screenY,
> > &tableBounds);
> >   break;
> >  }
> >  case penUpEvent:
> >  {
> >   if (isDownInTable && RctPtInRectangle (event->screenX, event->screenY,
> > &tableBounds))
> >   {
> >    int row;
> >    RectangleType cellBounds;
> >    cellBounds.topLeft.x = tableBounds.topLeft.x;
> >    cellBounds.topLeft.y = tableBounds.topLeft.y;
> >    cellBounds.extent.x = tableBounds.extent.x;
> >  // my table has 5 rows, but this could be replaced by a call to
> > TblGetNumberOfRows
> >    cellBounds.extent.y = tableBounds.extent.y / 5;
> >    row = 0;
> >    while (row < 5) // ditto note above about number of rows...
> >    {
> >     if (RctPtInRectangle(event->data.penUp.start.x,
> > event->data.penUp.start.y, &cellBounds) &&
> >         RctPtInRectangle(event->data.penUp.end.x,
event->data.penUp.end.y,
> > &cellBounds))
> >         break;
> >     cellBounds.topLeft.y += cellBounds.extent.y;
> >     idx++;
> >    }
> >    if (row < 5) // ditto again...
> >    {
> >     // the pen went down and up on the same row and "row" is the value
> >    }
> >   }
> >   isDownInTable = false;
> >   break;
> >  }
> >
> >
> >
> >
>
>
>
>



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