X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 01 Jun 2007 10:59 PM by  anon
cw_pdmenu event function not found
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
01 Jun 2007 10:59 PM
    Hello I have a strange problem, when I supply a name of the function to the cw_pdmenu in the form flag\value\func_name, the func_name is not found when I know it exists and can be called directly. what could be a problem? Thanks LF

    Deleted User



    New Member


    Posts:
    New Member


    --
    01 Jun 2007 10:59 PM
    I wonder how you are supplying the name of the function to CW_PDMENU? For me CW_PDMENU throws an error at the beginning of run time, if I specify an EVENT_PRO or EVENT_FUNC keyword in the CW_PDMENU call. The place to specify a special event handler for CW_PDMENU is on its parent widget. Well, in the case of a CW_PDMENU that is defining a top-level base's menu bar, the parent widget is the top-level base. It is ***not*** the /MBAR-type button that is the 'Parent' argument to CW_PDMENU, as one might normally expect. Top-level WIDGET_BASEs also do not use the EVENT_FUNC or EVENT_PRO keywords; the top-level base event handler is defined in the XMANAGER call. Thus, if you want an event handler for your CW_PDMENU with a special name, then you should assign that name in the XMANAGER call of your widget program, e.g. xmanager, 'myidlapp', tlb, EVENT_HANDLER='pdmenu_handler' Of course, the 'pdmenu_handler' in this case will have to handle ALL events from all other widgets in your program unless those widgets have their own EVENT_PRO's or EVENT_FUNC's. James Jones
    You are not authorized to post a reply.