04-21-2008, 05:42 PM #1
XCode and Cocoa - unsure of how to use multiple windows together
- Member Since
- Apr 21, 2008
I'm very new to xcode and cocoa, I'm trying to develop an application that displays pictures on different NSWindows depending on whether they're landscape/portrait.
My problem is that I cannot get the windows to work together. I dragged and dropped windows into my MainMenu.xib from the library, and creater PortraitScreen and LandscapeScreen classes and connected one to each window. I've been trying to get a simple method which just changes text on a label on one window when a button is clicked on the main application window, i've tried putting methods in the main app.m class, and also the associated window classes, and connecting the button to the method but they just don't seem to work together..
Does anyone know why this may be and how to solve it? Thanks in advance for any help
04-23-2008, 04:36 AM #2
- Member Since
- Jun 25, 2005
- On the road
- 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
Have you used some of the online sources such as cocoadevcentral.com or a book? This question you are asking suggests you have not, or have not dug deep enough.
Look into a document based application and the graphics frameworks that allow you to read and understand images. I think you'd allow the user to choose their image, read it in, and dynamically create a new window based on the image dimensions and finally load the image (perhaps scaled) into the view of the window. Maybe this tutorial can help.CameraTime - Time lapse photography for novice and advanced users.
When asking questions, post the version of your software. You'll receive better answers.
Please post your results to the thread as it is good feedback.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By rtainc in forum OS X - Operating SystemReplies: 0Last Post: 04-29-2012, 10:43 AM
By osa in forum OS X - Development and DarwinReplies: 2Last Post: 07-03-2008, 03:06 AM
By majik in forum OS X - Development and DarwinReplies: 1Last Post: 06-30-2008, 03:39 PM
By mr..nemo in forum OS X - Development and DarwinReplies: 0Last Post: 04-26-2005, 06:05 AM
By dim in forum OS X - Development and DarwinReplies: 1Last Post: 10-20-2004, 11:59 PM