cc-20%ucbcory@ucbvax.UUCP (Peter Korn) (05/26/85)
I've been pouring over Inside Macintosh trying to figure out how to design my own control (for a real neat DA I'll post {w/source} as soon as it's written). I've read and reread the Bible on the subject, which is lacking in saying how to actually define part codes, where the drawing of the thing takes place and by what (how do I actually define what the control looks like, and where), etc. Has anyone out there actually made their own control? If so, could you give me a hand (where do I look, what does the definition look like, etc.)? Thanks in advance, Peter Korn
gus@Shasta.ARPA (05/26/85)
> I've been pouring over Inside Macintosh trying to figure out how to > design my own control (for a real neat DA I'll post {w/source} as soon > as it's written). I've read and reread the Bible on the subject, which > is lacking in saying how to actually define part codes, where the drawing > of the thing takes place and by what (how do I actually define what the > control looks like, and where), etc. > > Has anyone out there actually made their own control? > If so, could you give me a hand (where do I look, what does the definition > look like, etc.)? > > Thanks in advance, > Peter Korn Ditch the control manager. I really doesn't do anything for you unless you plan to release a library of controlls to the world with a common interface. I have discussed this with many people and the general concensus is that it is a lot easier, and perhaps more efficient to do your own 'controlls' directly using quickdraw. Use the control manager only for the things that are already provided. Gus Fernandez
spector@acf4.UUCP (David HM Spector) (05/28/85)
You write your own controls just like any other piece of code, 'cause thats all they is. For example, if you have ever seen Don Brown's "Executive Dec- ision Maker", he draw all of the buttons and things by hand. What you do is write a subroutine that makes all the quickdraw/sound/<Pick your manager> calls and returns some expected value. This is, in a more optomized form, exactly what the mac does itself. For a good idea of whats going on, write a tiny application that just lets you click a button, or move a scroll bar, and use MacsBug to watch the calls as they happen; you can also disassemble the control that way too..... - Hope that helps a little... Dave Spector NYU/acf Systems Group