[comp.sys.mac] Graphics from MPW

sho@tybalt.caltech.edu (Sho Kuwamoto) (03/15/88)

Can you open up a window from an MPW tool and do graphics in it?  I am
an MPW neophyte, but have had some experience in mac programming
before.  What I'd like to do is to have the user input text in the
worksheet window and have graphics pop out in the other window.  I
don't want to create an actual application because that would defeat
the whole purpose of using MPW....

						-Sho


 (sho@tybalt.caltech.edu, sho@caltech.bitnet, ...!cit-vax!tybalt!sho)

tomas@Apple.COM (Tom Taylor) (03/18/88)

In article <5790@cit-vax.Caltech.Edu> sho@tybalt.caltech.edu.UUCP (Sho Kuwamoto) writes:
>Can you open up a window from an MPW tool and do graphics in it?  I am
>an MPW neophyte, but have had some experience in mac programming
>before.  What I'd like to do is to have the user input text in the
>worksheet window and have graphics pop out in the other window.  I
>don't want to create an actual application because that would defeat
>the whole purpose of using MPW....
>
>						-Sho

Yep, you can open up windows from tools (Command & GetListItem do, for
example).  In order to open windows, you must call InitGraf.  Don't
call any of the other init routines because the shell already has.  The
reason you have to call InitGraf is that the shell sets up a separate
A5 world for tools. Be sure to close/dispose of your window(s) before
you quit your tool.

Tom Taylor / Development Systems Group