home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / next / programm / 8083 < prev    next >
Encoding:
Text File  |  1993-01-12  |  3.4 KB  |  78 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!usc!news.bbn.com!micro-heart-of-gold.mit.edu!news.media.mit.edu!news
  3. From: wave@waits.media.mit.edu (Michael B. Johnson)
  4. Subject: Re: Custom IB Palette object mushed together from boxed control objects
  5. Message-ID: <1993Jan12.123617.2738@news.media.mit.edu>
  6. Sender: news@news.media.mit.edu (USENET News System)
  7. Organization: MIT Media Laboratory
  8. References: <1993Jan11.194430.6405@lilliput.fdn.org>
  9. Date: Tue, 12 Jan 1993 12:36:17 GMT
  10. Lines: 66
  11.  
  12. Joseph Goldstone writes
  13. > Probably the error here is in my conception of how IB works, but...
  14. > I want to agglutinate several standard UI objects (four TextFields and a  
  15. > one-element Matrix of SliderCells) into a new UI object, and have that object  
  16. > on a palette.  The Textfields serve to label the slider, indicate the  
  17. slider's  
  18. > min and max values, and display the slider's current numeric value as text.
  19. > Because I plan on using an awful lot of these (for a 3DKit camera settings  
  20. > interpolation program) I wanted to
  21. >   1) for N labelled sliders have N outlets in my App's distributor object,  
  22. not  
  23. > 5*N
  24. >   2) have each labelled slider accept messages to set and get current values  
  25. > and to set and get the labelled slider's min and max values
  26. >   3) put these thangs on a palette so that I could re-use them in other  
  27. > programs (I've wanted this functionality before)
  28. > Straightforward enough to create a Palette project, and in the new Palette  
  29. > window align things as I liked and Group them into a Box object.  But IB only  
  30. > lets you drag things into windows that happen to be subclasses of View (even  
  31. > though they can have extra baggage on their shoulders, witness the  
  32. ProgressView  
  33. > in the Palettes tutorial being grouped within a box - the box gets dragged  
  34. into  
  35. > any new App's window along with the ProgressView itself).
  36. > But how to indicate that the group of objects comprising this box are part of  
  37. > the new class I'm defining?  I can whip up a class definition pretty readily  
  38. in  
  39. > Edit that contains id pointers to the five enclosed objects, and parse it;  
  40. but  
  41. > only a dragged-in custom view will let you replace its type (or rather,  
  42. specify  
  43. > with which type it will later be replaced) in IB's attributes inspector, so  
  44. > this newly-parsed class definition does me no good.
  45. > I suppose I'd be happy if I could figure out how to reparent the controls  
  46. that  
  47. > I'd grouped into the Box as subviews of my custom View, and to set the id  
  48. > pointers in the custom View's object to those controls.
  49. > Sure, I could assemble the controls inside the object programmatically, but  
  50. if  
  51. > this is the only way, then I'm appalled at IB.  I can't believe that the  
  52. > distance from simple object to compound is as great as the distance between  
  53. > interactive construction of user interfaces from UI object palettes, and  
  54. using  
  55. > Edit to create C code that manually instantiates UI objects.
  56. > Can someone point out my more obvious conceptual problems here, so I can move  
  57. > on from thinking about sliders to thinking about shaders?  :)
  58. > -- joseph
  59.  
  60. I just whipped up a little example that does this.  I've sent it off to Joseph,  
  61. but if anyone else wants it, let me know and I'll NeXTMail it to you.  
  62.  
  63.  
  64. --
  65.  
  66. -->  Michael B. Johnson
  67. -->  MIT Media Lab      --  Computer Graphics & Animation Group
  68. -->  (617) 253-0663     --  wave@media-lab.media.mit.edu
  69. -->  NeXT Mail accepted at  wave@nordine.media.mit.edu
  70.