[comp.sys.mac.programmer] Accessing other layers' windows; MF DA bug

chaffee@uvm-gen.UUCP (Alex D. Chaffee,231 Votey,,6581273) (07/21/89)

How can a DA, in the DA layer of MultiFinder, access the windows of
applications in other layers?  I know, "Disobeying the Computer is treason;"
still, it's a cute little DA in the tradition of Insects and I'd like it to
work under MultiFinder.

Also, (and this is a weird one) -- After opening the DA once in the current
application layer (option key down), it activates and stays resident.  If I
open it again -- WITH THE OPTION KEY DOWN -- MultiFinder switches to the DA
Layer and tries to open it again (successfully, but of course this DA
doesn't work right in the DA layer).  The DA has no window.  Have I found
another Tech Note, Tim?

The DA in question, btw, is called "Bouncing Dot."  It starts a 1-point dot
bouncing around in the white space of the window you click in.  You can have
lots of dots in lots of windows.  

Think I should post it?

				"The Computer is your friend.
				 The Computer wants you to be happy.
				 Disobeying the Computer is treason.
				 Are you unhappy, Citizen?"
____________________________	-- Just another game of Paranoia
Alex Chaffee
chaffee@emily.uvm.edu
____________________________

jdm@ut-emx.UUCP (Jim Meiss) (07/25/89)

>..... description of a problem with Multifinder and a Desk Accessory....

I had a problem like the one you described with a DA I wrote.
If I held down the option key to launch it in an applications layer,
then tried launching it again, through the menu, MF would get confused
and try to open the DA handler.  CRASH, etc!
        My problem turned out to be that I'd allocated a window record
as one of my Global variables (didn't pass NIL to GetNewWindow). If I
change that, MF nolonger had the problem.
        Since you claim you have no windows, this does not seem to be your
problem. 

	Jim Meiss
	jdm@emx.utexas.edu

chaffee@uvm-gen.UUCP (Alex D. Chaffee,,,6581273) (07/27/89)

From article <15705@ut-emx.UUCP>, by jdm@ut-emx.UUCP (Jim Meiss):
> 
>>..... description of a problem with Multifinder and a Desk Accessory....
> 
> ...
>         My problem turned out to be that I'd allocated a window record
> as one of my Global variables (didn't pass NIL to GetNewWindow). If I
> change that, MF nolonger had the problem.
>         Since you claim you have no windows, this does not seem to be your
> problem. 

No, but thanks for the tip.  I wrote this DA a while ago, before I
understood globals very well; it might be a similar faux pas.  I'll re-check
the code with a fine-toothed comb.

> 	Jim Meiss
> 	jdm@emx.utexas.edu

	        A Presentation Manager (PM) program explictly creates one or
		more windows to present functions to the user. A PM
		APPLICATION SHOULD INTERACT IN A COMPATIBLE WAY WITH OS/2,
		AND OTHER PM APPLICATIONS (INCLUDING THE USER SHELL). In
		particular, A PM APPLICATION SHOULD CATER TO THE NEEDS OF
		THE USER. Unlike CONVENTIONAL PC programs, these
		requirements directly affect how you design and write your
		applications, and mean that YOU MUST PUT CODE IN YOUR
		APPLICATIONS TO FULFILL THEM.

			OS/2 v1.1 Programmer's Toolkit Manual
			quoted by Mark Smith
Alex Chaffee
Before August 15:		After August 15:
chaffee@emily.uvm.edu		adc@reed[.bitnet]  adc%reed@tektronix.uucp
____________________________