Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Why are my calculator readout and buttons upside down???

With a lot of trouble, I have been trying to decipher the 2002 Garfinkel and Mahoney Cocoa book because of its excellent projects. Needless to say, Apple has made many changes and the book is difficult to follow.

However, I am making progress, but for some reason my calculator UI is upside down. When I either sim the app in IB or build and run it in Xcode, the calculator readout appears BELOW the keys. When in IB the Calculator window appears normal - readout above the buttons.

Does anyone know why this is happening??

I have not tried trashing the Calculator window and beginning afresh, but I may end up having to do this.

Thanks,
Phillip Anthony

24" iMac, 17" PowerBook, Mac OS X (10.6.3)

Posted on Jul 5, 2010 10:01 AM

Reply
4 replies

Jul 5, 2010 10:55 AM in response to Phillip Anthony

No, this should not ?
Did you have a look to the layout values in the TextField Size tab of the info panel ?
But if the values are correct you should get the correct layout running command-R.
When running from Xcode if you don't save the xib in IB there will be no warning and Xcode will run with the previous values ..
You could trash the textField before trashing the whole window and try with a new one.
Starting a new window is anyway a good exercise when beginning 😉

About old book like that i used another one (learning Cocoa with Objective-C) and with last version of Xcode it's much easier to follow step by step because it's anew possible to create classes, outlets and actions directly in IB through the Class tab of the library panel.

Jul 5, 2010 12:11 PM in response to laurent demaret

laurent,

Thanks for your post.

As far as the book goes, I am fairly knowledgeable of Obj-C, but need to get a better handle on building apps using Interface Builder. The G&M book has some great apps if only you can figure out how to make them work using todays version of Xcode. The methodology is quite different that it was 8 years or so ago when the book was written.

Take care,
Phillip Anthony

Jul 5, 2010 1:11 PM in response to Phillip Anthony

Yes, using the methodoloy of those days you would write your app, at least a running squeleton from IB while now you are expected to lay down your classes in Xcode first and use them in IB after.
But it is possible to follow their methodology using the Class tab of the library panel since last version of Xcode.
you can select nsobject and subclass it to MyController and add it outlets and actions as well. You have to use the little popmenu a the bottom of the panel or the right click of the mouse on your parent class (for subclassing), you can write or add those files to project, you have even the FileMerge tool that starts automaticaly (but is buggy ++).
has been a good surprise for me 🙂
hth

Why are my calculator readout and buttons upside down???

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.