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

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!arakis.fdn.org!gamb.fdn.org!lilliput!joseph
  3. From: joseph@lilliput.fdn.org (Joseph Goldstone)
  4. Subject: Custom IB Palette object mushed together from boxed control objects
  5. Message-ID: <1993Jan11.194430.6405@lilliput.fdn.org>
  6. Keywords: IB Palette control
  7. Sender: joseph@lilliput.fdn.org
  8. Organization: Lilliputian Pictures - Paris, France.
  9. Date: Mon, 11 Jan 1993 19:44:30 GMT
  10. Lines: 45
  11.  
  12. Probably the error here is in my conception of how IB works, but...
  13.  
  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 slider's  
  17. min and max values, and display the slider's current numeric value as text.
  18.  
  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, not  
  22. 5*N
  23.   2) have each labelled slider accept messages to set and get current values  
  24. and to set and get the labelled slider's min and max values
  25.   3) put these thangs on a palette so that I could re-use them in other  
  26. programs (I've wanted this functionality before)
  27.  
  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 ProgressView  
  32. in the Palettes tutorial being grouped within a box - the box gets dragged into  
  33. any new App's window along with the ProgressView itself).
  34.  
  35. But how to indicate that the group of objects comprising this box are part of  
  36. the new class I'm defining?  I can whip up a class definition pretty readily in  
  37. Edit that contains id pointers to the five enclosed objects, and parse it; but  
  38. only a dragged-in custom view will let you replace its type (or rather, specify  
  39. with which type it will later be replaced) in IB's attributes inspector, so  
  40. this newly-parsed class definition does me no good.
  41.  
  42. I suppose I'd be happy if I could figure out how to reparent the controls that  
  43. I'd grouped into the Box as subviews of my custom View, and to set the id  
  44. pointers in the custom View's object to those controls.
  45.  
  46. Sure, I could assemble the controls inside the object programmatically, but if  
  47. this is the only way, then I'm appalled at IB.  I can't believe that the  
  48. distance from simple object to compound is as great as the distance between  
  49. interactive construction of user interfaces from UI object palettes, and using  
  50. Edit to create C code that manually instantiates UI objects.
  51.  
  52. Can someone point out my more obvious conceptual problems here, so I can move  
  53. on from thinking about sliders to thinking about shaders?  :)
  54.  
  55. -- joseph
  56.  
  57.