🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #1190

Attaching Sensors in PullDown Menus

#1190
From: robinson
Date: Tue, 21 May 1991 18:42
30 lines
1402 bytes
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
Technical Details
Message-ID: <9105211842.AA12631@easynet.crl.dec.com>
Path: arc1-ca.pugleaf.net!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

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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