Path: utzoo!mnetor!uunet!nuchat!sugar!peter From: peter@sugar.UUCP (Peter da Silva) Newsgroups: comp.sys.amiga Subject: Re: Workbench and object-oriented programming (was Re: Iconification) Message-ID: <1355@sugar.UUCP> Date: 5 Jan 88 11:56:18 GMT References: <1076@sugar.UUCP> <2826@cbmvax.UUCP> <1103@sugar.UUCP> <4883@well.UUCP> Organization: Sugar Land UNIX - Houston, TX Lines: 54 In article <4883@well.UUCP>, shf@well.UUCP (Stuart H. Ferguson) writes: > |> What you really want to do is write a tool called "print" that looks up > |> "PRINTER" in the ToolTypes array and fires off the named program when > |> you shift-double-click it. Then we want to beat C= into implementing the > |> drop-an-icon-onto-a-tool method of firing off programs. > > Hmmm. The problem with the "ToolTypes" method is having a standard way of > doing "interprocess communication." Certainly every word processor has a > "Print"-like menu item or items, but how many have a way to receive a > "print" MESSAGE? You're getting a little complex, here. The basic object that the workbench operates on is NOT the message. The basic object is the file (executable or otherwise). PRINTER will have to do a GetDiskObject() of each of its WBArgs, look up the ToolTypes array for a PRINTER tool with FindToolType, and execute the command found there. You'd also have to write a couple more utilities. (1) a program that sets the PRINTER up in the ToolTypes array. (2) a couple of programs to do certain default sorts of printing. For example, DPAINT files are ILBMs. So you'd have a PRINTILBM program. Then you'd put this in the ToolTypes array: PRINTER=PrintILBM If this takes off, you can convince EA and cohorts to start providing a set of small programs with all their programs: PRINTER=Dpaint:Printer VIEWER=Dpaint:Viewer EDITOR=Dpaint:dPaint As an added bonus it's MUCH quicker to load a specialised tool than to load dPaint and send a PRINT;filename message. ALSO, my browser program (a version of Workbench for programmers who don't care much about icons) will allow you to set up a TOOLS menu item, based on a file called s:Browser.Tools that looks like: View ASCII;Workbench;sys:System/More View ILBM;CLI;c:uShow $* So when you select "View ASCII" from the TOOLS menu, it'll pass the files you selected to sys:System/More in its WBArgs. When you select "View ILBM", it'll pass them to uShow in its CLI command line. When you get your printer tool set up, you can then add: Print;Workbench;sys:PRINTER -- -- Peter da Silva `-_-' ...!hoptoad!academ!uhnix1!sugar!peter -- Disclaimer: These U aren't mere opinions... these are *values*.