The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   OS X Developer (http://hintsforums.macworld.com/forumdisplay.php?f=27)
-   -   n00b obj-c question @property (http://hintsforums.macworld.com/showthread.php?t=100119)

Mikey-San 03-29-2009 10:13 AM

Well, it looks that way. Does changing the compiler affect the target's ability to build? If not, there's your answer.

robinwmills 03-29-2009 01:46 PM

I believe that XCode is a UI which uses gcc and gdb to do the heavy lifting. So it's possible that when you install XCode 2.5 and 3.x on the same machine, they both use the same gcc and gdb. If the error message about '@' is coming from gcc (which I believe is the case), XCode 2.5 may be able to successfully build the project when both are installed. However on a "pure" XCode 2.5, it cannot. I said there was something interesting to investigate here. Goodness that's not obvious.

messels 03-29-2009 11:42 PM

Quote:

Originally Posted by robinwmills (Post 526246)
I'd like to challenge to messels. Why is the result wrong? 1/2 + 1/4 = 6/8. When I was in elementary school in Scotland, 1/2+1/4=3/4.

well, tehre's nothing reducing it to 3/4. that's an extra logic step. "reduction" that is.

anyway, sounds like i need to update to leopard at least...so i can just learn the latest version and not worry so much about what's been enhanced and what's not. i just want to learn this stuff.

thx'

Mikey-San 03-30-2009 12:39 PM

Quote:

Originally Posted by messels (Post 526465)
well, tehre's nothing reducing it to 3/4. that's an extra logic step. "reduction" that is.

anyway, sounds like i need to update to leopard at least...so i can just learn the latest version and not worry so much about what's been enhanced and what's not. i just want to learn this stuff.

thx'

You need to read the Objective-C 2.0 documentation. The newer runtime is not available on Tiger, and properties are part of the new runtime version.

robinwmills 03-30-2009 08:37 PM

Indeed I get a segmentation fault when I try to execute the Leopard build of Fractions.app on Tiger. The original issue is the compiler's error message which is due to @property not being supported in 2.5. So for both the compiler and the runtime, Tiger and @property don't live happily together.

It's a little odd that XCode 2.5 can build @property on Leopard when 3.0 has also been installed. And for sure you need the Leopard run-time system to execute it.

So I think we've beaten this one to death. M's thoughts to update to Leopard seem like a good idea I wish him every success in learning Cocoa. A journey worth the effort.

Mikey-San 03-30-2009 09:23 PM

Quote:

Originally Posted by robinwmills (Post 526584)
It's a little odd that XCode 2.5 can build @property on Leopard when 3.0 has also been installed.

Do we actually know this for certain, though? (Did you try?) It was just speculation on my part, since I'm unable to reconcile my memory otherwise.

robinwmills 03-31-2009 12:32 AM

Quote:

Originally Posted by Mikey-San (Post 526587)
Do we actually know this for certain, though? (Did you try?) It was just speculation on my part, since I'm unable to reconcile my memory otherwise.

I don't know for certain - I took your word for it!

However I don't think it really matters much whether this statement is true or not. Compiling @property on 2.5 doesn't really get anybody anywhere. As you have pointed out they still need Leopard to execute the code. So I think that is the conclusion - we're encouraging M to upgrade to Leopard and XCode 3.:)

Mikey-San 03-31-2009 12:52 AM

Quote:

Originally Posted by robinwmills (Post 526606)
I don't know for certain - I took your word for it!

What word? I think I made it pretty clear that I can't remember what I did.


All times are GMT -5. The time now is 05:36 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.