Board index » cppbuilder » Component events in the Object Inspector
Hugh W Stewart
CBuilder Developer |
Component events in the Object Inspector2004-08-14 06:00:39 AM cppbuilder51 Here are snippets from two components I created. Common to everyone: typedef void __fastcall (__closure *TTellDateTime)(Extended DateTime); In the header of the component creating the event: __published: __property TTellDateTime TellCal = {read=FTellCal, write=FTellCal}; In the code of the component creating the event: if (FTellCal) FTellCal (FDateTime); In the header of the component responding to the event: __private void __fastcall SetDateTime(Extended ADateTime); __published: __property Extended DateTime = {read=FDateTime, write=SetDateTime}; The event shows in the Object Inspector for the component creating the event, but it does not show the second component's function, so I can't connect them with the Object Inspector. I could, of course, connect them at run time. But I'd like this to work. Where am I going wrong? Many thanks. |