home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 12897 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  2.2 KB

  1. Path: sparky!uunet!sun-barr!apple!apple!mlanett
  2. From: mlanett@Apple.COM (Mark Lanett)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Creating a floating palette in MacApp
  5. Message-ID: <70364@apple.Apple.COM>
  6. Date: 23 Jul 92 04:37:50 GMT
  7. References: <poon.711840774@roo>
  8. Organization: Apple Computer Inc., Cupertino, CA
  9. Lines: 32
  10.  
  11. poon@parc.xerox.com (Alex Poon) writes:
  12.  
  13. >I want to create a floating palette in MacApp, much like Hypercard's tools
  14. >window.  I'd also like it to be resizable and scrollable.  I've created
  15. >a palette view in MacApp as a subview of TGridView, but the window that
  16. >it's installed in becomes hidden when another window is activated
  17. >on top of it.  I want the palette window to always be showing, and I don't
  18. >want any sense of it being activated or deactivated.
  19.  
  20. MacApp 3: trivial. Just create a window and hit the appropriate check boxes
  21. in ViewEdit. These will be: window type (WindoidWDEF), Floats, Doesn't Generate
  22. Actiavtes, Hides on Suspend. Create it like you would any other window and
  23. Ta-da! it'll float around. Like I said, trivial. Oh yes, you have to call
  24. InitUFloatWindow() in main().
  25.  
  26. MacApp 2: harder. 90% of it is done for you, it just that the last 10% is
  27. non-obvious. First off, there was an unsupported floating window package on
  28. ETO (there was a year ago when I used it, I can't get to an ETO now to check)
  29. that you'll need to incorporate. That's the 90% part. You need to specify the
  30. floating window resource template via Rez, not ViewEdit, because ViewEdit can't
  31. put out the refCon for the floating window. I had a Rez template with just
  32. the floater and put all my views in a separate view (created with ViewEdit). 
  33. Creating a window becomes a matter of floater=NewTemplateWindow(...);
  34. DoCreateViews(floater,...);
  35.  
  36. It's easier in 3.0, obviously. Also tabbing and other things are handled much
  37. better. Also there's a snippet doing floaters on the developer CD (also on
  38. ftp, I guess, but it's down right now), which is, alas, for MacApp 3.0b2.
  39. -- 
  40. /*      Well, you wanted a command line interface, you got one, and now you
  41. can't figure out how to use it without the manual.  What were you expecting?
  42. That's how command line interfaces work. - John Nagle */
  43.