• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Xcode cross-developing to 10.1 and NSProgressIndicator
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode cross-developing to 10.1 and NSProgressIndicator


  • Subject: Re: Xcode cross-developing to 10.1 and NSProgressIndicator
  • From: Justin Lundy <email@hidden>
  • Date: Wed, 19 Nov 2003 14:14:25 -0800

Here is an update: I did not know that not only did I have change SDK to 10.1.5, but also the Deployment OS Version to 10.1 AND the GCC compiler to 2.95.2. I made all these changes, and STILL I get no warning or errors related to NSProgressIndicator setStyle method, which still seems to cause my app to crash under 10.1.5. Following is the output of Console at the crash of my application:

2003-11-19 10:48:06.257 MyApp[279] *** -[NSProgressIndicator setStyle:]: selector not recognized
2003-11-19 10:48:06.258 MyApp[279] An uncaught exception was raised
2003-11-19 10:48:06.258 MyApp[279] *** -[NSProgressIndicator setStyle:]: selector not recognized
2003-11-19 10:48:06.258 MyApp[279] *** Uncaught exception: <NSInvalidArgumentException> *** -[NSProgressIndicator setStyle:]: selector not recognized
2003-11-19 10:48:07.010 loginwindow[245] Can't connect to pbs object "RulebookServer"
2003-11-19 10:48:07.011 loginwindow[245] Can't connect to pbs object "RulebookServer"
2003-11-19 10:48:07.015 loginwindow[245] Can't connect to pbs object "RulebookServer"
2003-11-19 10:48:07.015 loginwindow[245] Can't connect to pbs object "RulebookServer"
2003-11-19 10:48:07.045 loginwindow[245] Can't connect to pbs object "RulebookServer"
2003-11-19 10:48:07.045 loginwindow[245] Can't connect to pbs object "RulebookServer"


I do not know for a fact that the Uncaught exception caused the crash, but it seems like the obvious solution.
I found the NSAppKitVersion as a way to check system version, so I'll try that out.


Again, I ask why doesn't Xcode, or GCC 2.95.2, catch that there is no setStyle method for NSProgressIndicator in 10.1.5?

---
Box O' Rox Software
www.boxorox.com

On Nov 19, 2003, at 9:46 AM, Markus Hitter wrote:


Am 19.11.2003 um 03:23 schrieb Justin Lundy:

I restarted in 10.1.5 and tried my app and it crashed with a console error saying that NSProgressIndicator doesn't recognize setStyle selector.

Trying to use a unknown selector/method shouldn't make your app crash.


But it compiled fine, so WTF?

Even without warnings? I doubt so.


1) Why didn't Xcode catch this?

XCode can't. The compiler invoked by XCode can.

The default compiler for .c and .m files in XCode is gcc3.3. gcc usually spits out a warning for unrecognized methods.

2) Should I bother cross-developing to 10.1.5 if I'm going to have to test everything anyway? (a little snide)

Alternatively, you can dual boot into 10.1.5 or require 10.3 as an app prerequisite ...


3) How can I work around this to get the backwards compatibility I'm looking for? (Check OS version?)

Checking for a specific OS is always a bad idea. Check for the feature directly. See -[NSObject respondsToSelector:]



Have fun, Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Xcode cross-developing to 10.1 and NSProgressIndicator (Modified by Justin Lundy) (From: Justin Lundy <email@hidden>)

  • Prev by Date: Re: Xcode cross-developing to 10.1 and NSProgressIndicator (Modified by Justin Lundy)
  • Next by Date: Re: (no subject) (xcode gdb attach)
  • Previous by thread: Re: Xcode cross-developing to 10.1 and NSProgressIndicator (Modified by Justin Lundy)
  • Next by thread: Interface Builder: NewApplication by default?
  • Index(es):
    • Date
    • Thread