From: johnsd2@jec322.its.rpi.edu (Daniel Norman Johnson)
Newsgroups: comp.sys.mac.advocacy
Subject: Re: Trepidations of a stoned Mac user
Date: 30 Oct 92 03:42:44 GMT
Article-I.D.: rpi.+na1h-h
Reply-To: johnsd2@rpi.edu
Organization: Rensselaer Polytechnic Institute, Troy, NY.

In article <1992Oct29.063209.4884@umr.edu>, johns@mcs213i.cs.umr.edu (John Stone) writes:
|> In article <9m=1kcn@rpi.edu> johnsd2@rpi.edu writes:
|> >|> >I meant that extensions have got to muck with internal, system,
|> 
|> Hyper deleted section on everything :-)
|> 
|> >Device drivers dont, but extensions DO. thats what they
|> >are for. That's why we love 'em! :)
|> >
|> >|>  There is a standard way of registering a device
|> >|> driver, protocol driver, or system daemon with the kernel.
|> >
|> >But is there a standard way of replaces teh standard color-picker
|> >dialog? On the MAc there is; you patch GetColor to YOUR color picker
|> >routine. But this, of course, violates any protection between the app
|> >and teh extensions. The extension can then dump trash into the stack,
|> >and the apps quickdraw globals, crashing it. If it likes. Or if it has
|> >bugs.
|> 
|> Ok, this isn't what I expected, I was thinking that your extensions were
|> more device driver like...

They aren't. They are quite weird.

|> This type of thing is found in OS/2 DLL's  (Dynamic Link Libraries)
|> Depending upong the machien configuration and settings different
|> DLL's are loaded and they perform a fair part of the work in the WPS.

I know about htem- this is annother thing the Mac should have. Or
rather, should do better. It already ahs "packages" but there's
no way for anyone but Apple to make them, because of trap
# conflicts and such.

|> Because they are dynamically linked, they are extrememly easy to replace
|> or update.  The dialog boxes etc in the WPS are all DLL's.  If you 
|> replace the DLL this does the trick.  You can use ddinstal to perform
|> this if the DLL's are packaged right... (while the system is running)
|> But the changes don't take effect until after the system is restarted.
|> These DLL's won't crash the operating system, but they may be able to
|> hose the WPS if they are bad.  If the WPS crashes, it normally auto
|> restarts from the last "checkpoint".  By default it reloads all apps that
|> were running at the time the WPS process died, and they reopen on the
|> same files they were on and everything.  (If the WPS bites the dust
|> anything using SOM will probably choke too, although plain brown bag
|> PM apps will probably be fine.) (SOM = System Object Model)

A) What if you only want to change ONE routine in the DLL?
B) Extensions are far more flexible that this. There's one ("ThinkBack")
   which retrofits multitasking to Think Pascal+C, so you can switch
   out while they compile/link/etc. There's one which makes menus
   tear-off-able. (like Pin-Up menus in OpenLook, sorta)
C) Why can't a DLL pour garbage into into the app that calls it?

|> 
|> >|>  Device drivers don't ever interact with
|> >|> the user(s) directly, only to the kernel.
|> >
|> >But extensions OFTEN do. Sometimes that's their raison d'etre, as
|> >it were. Example: a pop up depth change menu.
|> >
|> >More often they just use control panels with embedded extensions
|> >for user interaction tho.
|> 
|> Thats what the DLLs in the system do...
|> For example, the rexx interpreter that comes with the system can load
|> external DLLs to provide additional functions etc...
|> Using RexxAddFunc.  This is exactly like what you are talking about, 
|> in fact there are now some PM dlls for use by rexx so that you can
|> write fully graphical stuff with the rexx interpreter. 

No, this isnt' what Im talking about. (contemplate) Here's an example:
That tear-off menu extensions I mentioned before is in a control
panel. With this, you can define the appearance of the tear
offs, and also what sort of hotkeys it knows. The control panel
is abnle to make your menubar pop up under your cursor (like the
way the NeXT does); it can do a number of other things too. The
control panel lets you specify your preferences.

Its like command-line options, sorta.

[deletia- making WPS all encompasing; System Object Model]

-- 
			- Dan Johnson
And God said "Jeeze, this is dull"... and it *WAS* dull. Genesis 0:0

These opinions have had all identifiying marks removed, and are untraceable.
You'll never know whose they are.