Home Component Writing

RTTI problem with PaintBox

edited August 2002 in Component Writing
Hi again,
I tried to export the OnDrawPaintBox event through Rap and now I get an
error when I compile the Rap code. "TCanvas is not type identifier"

My question is, if I have to create Rap extensions for the TCanvas, do
I have to create extensions for its object properties (Font, Brush,
Pen...)?

Or is something already been done to export the TCanvas in RAP?

--
Daniel Lemire
Programmeur,
Conception Design Ware Inc.
Tél.: 819-868-8853
Fax : 819-868-8855

Comments

  • edited August 2002
    Yes, you need to surface the class TCanvas and the properties you want to
    use in RAP. The RAP tutorials show how to surface the TDatabase class.
    Essentially, you'll need to take the same approach and create
    TmyTCanvasRTTI = class (TraTComponentRTTI)


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited August 2002
    This also means that every property you want to surface has to have RAP RTTI
    built for it. Most of the properties in TCanvas also rely on enumerated
    types, which need to be supported. From the surface, it may not appear to
    be much, but it will require significant work to get it working correctly.


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.