Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!quintus!pds From: pds@quintus.UUCP (Peter Schachte) Newsgroups: comp.sys.amiga Subject: Workbench and object-oriented programming (was Re: Iconification) Message-ID: <487@cresswell.quintus.UUCP> Date: 22 Dec 87 00:15:39 GMT References: <1076@sugar.UUCP> <2826@cbmvax.UUCP> <1103@sugar.UUCP> <867@rocky.STANFORD.EDU> Organization: Quintus Computer Systems, Mountain View, CA Lines: 61 Summary: It's no coincidence workbench looks like an object-oriented system. also, discussion (and questions) about workbench capibilities > Has anyone else noticed that the Workbench is a rudimentary Object-Oriented > system? > Anyone know if this curious parallel to Object-Orientedness was deliberate? > Is the Workbench modeled after some other, more complete O-O environment? Sure. The workbench, of course, is a rip-off of the Mac user interface. This was a rip-off of the Xerox Star (now called viewpoint) document processing system. Star, I believe, grew out of work done at Xerox PARC, and was impelmented in some sort of object-oriented language. Smalltalk also came out of Xerox PARC. I'm not sure how closely related the development of Smalltalk and Star were. > > There is a possible, kludgy way of expanding the capabilities of the existing > Workbench. Please tell me if I'm way off base, but wouldn't it be possible > to create a new device that looks for all the world like a disk, but does > something else? Disks automatically get icons on the Workbench and get > messages when other icons are "fed into" its icon or drawer. I was thinking > of using this fact to kludge-up a "printer" icon for the Workbench. It > would be a device that looks like a disk and so therefore gets an icon on > the 'Bench, but whenever it received "Write" i/o requests, it would forward > them to the printer device (or PAR or SER). That, in fact, is how you printed a document in the Star environment: you just dragged the document icon onto the printer icon. Worked great. The problem with what you suggest is that different word processors have different file format conventions, mostly not pure ascii. So just sending the contents of the file, byte by byte, to the printer device wouldn't be at all right. What you really want it to do is to "send a print message" to the file. This might mean firing up a printing program specific to that file that would do all the right things. So, my (first) question to the people who know what they're doing: would it be possible to put into an icon (I guess in the .info file) the name of a print program, and then have a simple, general way to "send a message" to the file, firing up that program? Given this, could you write some code that would put up an icon on the screen (like the disk icons, in that it wouldn't be in any drawer) that could tell when an icon had been dragged onto it, and have this "send" the right "message"? And is it possible to write a "tool" (I think that's the right word) that can tell when an icon is dragged onto it? I'm not worried about inheritance for now. A related issue: is it possible to have a different set of menus and menu items for different file icons? Then, as long as you could do the first thing I asked for above, you could at least have a "print" menu item appear in some menu when you had selected a printable file. This would give a great degree of user extendability to the workbench. I don't use the workbench, I usually use shell (thanks, guys, it's great), but I'd rather use a mouse-and-icons style of interaction if it were better supported. It would have to be pretty good to beat a good keyboard-based shell, but I think such a beast is possible. I wish I had one! I hope these aren't stupid questions. I haven't looked terribly closely at the workbench. -- -Peter Schachte pds@quintus.uucp ...!sun!quintus!pds