robinson@asds.enet.dec.com (05/22/91)
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