IBethune
2005.08.21, 01:21 PM
Ok, first off, I'm a complete beginner with Cocoa, so please be nice to me :)
What I'm in the process of doing is writing some code to allow SDL users to pop up Cocoa dialog boxes, and then query the results of user input when the dialog boxes are closed.
So what I've done is to draw out an NSPanel in IB, and created a custom sub-class. I did this so that I could have outlets for each of the controls of interest e.g. text boxes, radio buttons, or whatever is on the panel.
Then I generate the code for my custom subclass in IB, and add the files to my Xcode Project.
Now when I do [[Custom Window] alloc] init] setIsVisible:YES]; I get a small floating window, but it's blank, with no controls on it.
What is the proper way of doing this so that the controls appear correctly? If the answer is 'go and learn Cocoa properly' then that's fair enough, but any pointers to something specifically relevant would be great.
Cheers
- Iain
What I'm in the process of doing is writing some code to allow SDL users to pop up Cocoa dialog boxes, and then query the results of user input when the dialog boxes are closed.
So what I've done is to draw out an NSPanel in IB, and created a custom sub-class. I did this so that I could have outlets for each of the controls of interest e.g. text boxes, radio buttons, or whatever is on the panel.
Then I generate the code for my custom subclass in IB, and add the files to my Xcode Project.
Now when I do [[Custom Window] alloc] init] setIsVisible:YES]; I get a small floating window, but it's blank, with no controls on it.
What is the proper way of doing this so that the controls appear correctly? If the answer is 'go and learn Cocoa properly' then that's fair enough, but any pointers to something specifically relevant would be great.
Cheers
- Iain