Multi window cocoa application
Hi,
I am currently working on porting an existing open source windows application to mac OSX.
I am fairly new to cocoa programming.
The application involves opening a new window for a specifying the parameters of the simulation.
The second window has about 20 textboxes and cannot be a modal window.
I have the XIB files and I got the windows working together somehow, but needs a lot of fixing.
If there are multiple windows in an application, how do I pass values and messages between them?
Apple developer library does not have an example source code and many internet sources point to
/Developer/Examples/InterfaceBuilder/SimpleMultiWindow which is apparently not present in leopard.
If some one has this example, that would be great. Also, this example being removed hints that there is a new and better way to do it?
I would appreciate if someone can pass on resources or sample code on working with multiple windows in a cocoa application.
Just to clarify, this is not a document based application. You can reach me on gmail: barbi dot bruce
Thanks,
B
I have the SampleMultiWindow code on my elderly PowerBook (running 10.4 and XCode 2.5). I've built it on my Snow Leopard iMac and it works OK. The UI is a little quirky - it displays a couple of text fields. You have to push the "Ask a question" button to interact with the program. And as it was originally intended for 10.4, I had to change the target to build with XCode 3.x and target 10.5 (or 10.6).
You send messages between windows using the [objectInstance method:data] syntax in Obj/C. You'll see this being used in the sample code.
I'll send you a private email and you can take this discussion off-line if you wish. However I'll probably report a summary of our discussion back to this thread for the benefit of others interested in this subject.