[net.micro.mac] TML Pascal and MacIsh Stuff

bill@hao.UUCP (Bill Roberts) (09/07/86)

I have a few questions pertaining to development of software on the Mac while
using TML Pascal (though these issues are not TML Pascal dependent).

	1) How can I perform i/o to a specified window?  For example, I want 
	   to have a particular window be an "interactive dialog window".  Or,
	   I want to display a text data file which I just read in.  I'd like to
	   do this using the writeln, write, etc functions provided by the
	   language.  Do I have to use the TE package for textual output to a
	   window?  No where in IM is this "basic" issue addressed (other than
	   loading a TErecord with the text, etc).

	2) How can I turn a MacPaint file into a PICT resource?  And then read
	   in this resource and display the picture in a grafport (i.e. window).

	3) How can I find out about the 3D QuickDraw functions/procedures?  
	   Where is this stuff documented?  If it's in software supplements from
	   Apple, does anyone have the proper address?

Sorry if these questions are way basic.  Any information would be greatly 
appreciated.  Thanks in advance.

							Bill Roberts
							NCAR/HAO
							Boulder, CO
							!hao!bill

DMB@PSUVMA.BITNET (09/12/86)

Hopefully these answers go with your questions:
     
1. -> Tml supports what they call "Plain Vanilla" Pascal, where you don't have
     
      to worry about all the MacStuff (sorry about the MacPun) envolved with
     
      the toolbox. Just start your program with Program <name> (input,output)
     
      and tml will do all the tough stuff for you. You can then use Pascal i/o.
     
      I'm not sure how, this works if you want plain vanilla and other windows,
     
2.    How to make a PICT resource out of a macpaint doc? The easiest way is
     
      to just clip out what you want in MacPaint and put it into the scrapbook.
     
      Then, go to resedit, and open a new file, and create a Pict resource,
     
      then paste from the scrapbook to the PICT resource. You can then (if
     
      you want to decompile it, and put the hex codes into a RMAKER file for
     
      permanent storage. (Off course this method limits your Pictures to the
     
      size of MacPaint window.)
     
      Accessing it from within a program is fairly simple. just call
     
      the function getpict and store your picture into a picthandle, then
     
      put it on the screen with drawpicture.
     
      eq...
     
      mypicthandle := getpict(thepictid);
     
      drawpicture(mypicthandle,theenclosingrect)