Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!sdd.hp.com!spool.mu.edu!agate!riacs!stanford.edu!asds.enet.dec.com!robinson From: robinson@asds.enet.dec.com Newsgroups: comp.windows.interviews Subject: Attaching Sensors in PullDown Menus Message-ID: <9105211842.AA12631@easynet.crl.dec.com> Date: 21 May 91 18:42:40 GMT Article-I.D.: easynet.9105211842.AA12631 Sender: news@shelby.stanford.edu (USENET News System) Organization: Internet-USENET Gateway at Stanford University Lines: 30 I have an novice quesiton about attaching Sensors to objects - specifically I have a PullDown menu and I want to branch to different methods depending on which MenuItem the UpKey event occured in - however when I create a Sensor in the PullDown menu object the Sensor does note seem to be 'listening' to the PDM - here is the PDM code (brief): PulldownMenu* SimulationWindow::FileMenu() { PulldownMenu* file_menu = new PulldownMenu("File"); MenuItem* save_item = new MenuItem(new Message("Save")); MenuItem* saveAs_item = new MenuItem(new Message("Save As...")); MenuItem* quit_item = new MenuItem(new Message("Quit")); file_menu->Include(save_item); file_menu->Include(saveAs_item); file_menu->Include(quit_item); input = new Sensor; input->Catch(UpEvent); return file_menu; } any comments would be appreciated. Will Robinson Digital - ASDS