Path: utzoo!attcan!uunet!mcvax!ukc!its63b!csrdi From: csrdi@its63b.ed.ac.uk (Janet: rick@uk.ac.ed) Newsgroups: comp.lang.smalltalk Subject: Apparent bug, help sought Message-ID: <1338@its63b.ed.ac.uk> Date: 15 May 88 16:20:00 GMT Reply-To: csrdi@itspna.ed.ac.uk (Rick Innis) Organization: University of Edinburgh Lines: 50 I'm implementing a simulation system with a graphics interface as part of my fourth year project. The simulation itself is built on the classes given in the blue book; I'm basing the interface on the browser code. The system is being implemented in Macintosh Smalltalk, which is based on a version I image, so there are a few discrepancies between the system and the book, especially in the interface code, but none of these are insurmountable. The structure of the system is this: the interface is a browser (SimulationBrowser) with three panes: one listing the simulations available, one listing the objects of the selected simulation, and one showing a graphic representation of the simulation. The two listing panes are based on the 'ListView' and 'ListController' classes, hence there are classes 'SimulationListView', 'SimulationListController', 'SimulationObjectListView' and 'SimulationObjectListController'. At the moment there are only three options in each of the associated menus; they are 'create', 'remove' and 'rename'. Selecting any of these causes the appropriate message to be sent to the controllers' model, which in this case is an instance of SimulationBrowser. With me so far? The browser itself accesses the simulations through an instance of SimulationOrganiser, which keeps track of the existing instances of Simulation and SimulationObject. The problem is this: Whenever the browser tries sending a message to its instance of SimulationOrganiser, it fails with the error: 'UndefinedObject>>doesNotUnderstand:' (whatever the message happened to be). Okay, so the instance of SimulationOrganiser is an UndefinedObject. But according to the debugger, it's 'a SimulationOrganiser'. Besides which, when the SimulationBrowser is created, it sends the message SimulationOrganiser new which doesn't cause an error and does return 'a SimulationOrganiser' in the appropriate instance variable of SimulationBrowser. Furthermore, if I select the text of the failing message in the debugger and DoIt, it does work. And SimulationOrganiser does respond to its own messages. I'm at a loss as to what is going on. Can any more experienced Smalltalkers offer some advice? -- Janet: rick@uk.ac.ed BITNET: rick%uk.ac.ed@UKACRL ARPA: rick@ed.ac.uk UUCP: rick%uk.ac.ed%ukc@mcvax "Life would be so much easier if everyone read the manual."