Re: NSPrefrencePane with Garbage Collection won't work in System Preferences?
On Feb 27, 2009, at 11:52 AM, Tobias Zimmerman wrote: I have googled this and am surprised I haven’t seen references to the issue. Am I doing something wrong (other than not writing dual-mode code), or is there a known incompatibility between GC and the System Preferences? The PreferencePanes framework in Leopard doesn't support GC for some unknown reason. I believe I filed a bug on this when it was in early beta, and nothing changed in the final. Nick Zitzmann http://www.chronosnet.com/ ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSPrefrencePane with Garbage Collection won't work in System Preferences?
On Feb 27, 2009, at 11:00 AM, Nick Zitzmann wrote: The PreferencePanes framework in Leopard doesn't support GC for some unknown reason. I believe I filed a bug on this when it was in early beta, and nothing changed in the final. The System Preferences application does not support GC, thus framework support is irrelevant. An application is either GC'd or non-GC'd; all or none for all frameworks and bundles loaded. Applications *can* be compiled dual-mode, but it is generally discouraged as there is no real point to doing so and would require re- launching to switch modes. b.bum ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSPrefrencePane with Garbage Collection won't work in System Preferences?
On Feb 27, 2009, at 12:08 PM, Bill Bumgarner wrote: The System Preferences application does not support GC, thus framework support is irrelevant. Actually, it is relevant. We used to use the PreferencePanes framework for things having nothing to do with System Preferences, but had to rewrite a fair bit of code create some compatibility issues when we wanted to release an application that used GC. (And I know what you're thinking, but we were not using private APIs.) It would have saved us a lot of effort and headaches if it only supported GC in the first place, just like most every other system framework in Leopard. Nick Zitzmann http://www.chronosnet.com/ ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSPrefrencePane with Garbage Collection won't work in System Preferences?
Sorry, you have confused me slightly (or perhaps given me false hope). I have 3 targets in my project: (1) the preference pane; (2) a framework; and (3) an application. 1 2 are both dual mode insofar as they can be compiled and run without garbage collection. #3, which doesn't interact with the System Prefs, but uses code out of the framework (#2), requires GC. I thought the point of supported versus required compile options for frameworks was that the first would support a GC app, but not require it, and the second would...well...require it. So, if a non-GC pref pane is loading a GC-Supported framework, shouldn't it be GC-free? Is the only way to do this to have entirely separate versions of the framework? (or just put the same code in each target separately and dispense with a a framework)? From: Bill Bumgarner b...@mac.com Date: Fri, 27 Feb 2009 11:08:27 -0800 To: Nick Zitzmann n...@chronosnet.com Cc: Tobias Zimmerman automa...@gmail.com, cocoa-dev@lists.apple.com cocoa-dev@lists.apple.com Subject: Re: NSPrefrencePane with Garbage Collection won't work in System Preferences? On Feb 27, 2009, at 11:00 AM, Nick Zitzmann wrote: The PreferencePanes framework in Leopard doesn't support GC for some unknown reason. I believe I filed a bug on this when it was in early beta, and nothing changed in the final. The System Preferences application does not support GC, thus framework support is irrelevant. An application is either GC'd or non-GC'd; all or none for all frameworks and bundles loaded. Applications *can* be compiled dual-mode, but it is generally discouraged as there is no real point to doing so and would require re- launching to switch modes. b.bum ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSPrefrencePane with Garbage Collection won't work in System Preferences?
On Feb 27, 2009, at 11:36 AM, Nick Zitzmann wrote: On Feb 27, 2009, at 12:08 PM, Bill Bumgarner wrote: The System Preferences application does not support GC, thus framework support is irrelevant. Actually, it is relevant. We used to use the PreferencePanes framework for things having nothing to do with System Preferences, but had to rewrite a fair bit of code create some compatibility issues when we wanted to release an application that used GC. (And I know what you're thinking, but we were not using private APIs.) It would have saved us a lot of effort and headaches if it only supported GC in the first place, just like most every other system framework in Leopard. Ahh.. NSPreferencePane. I forgot about that and its reusability in the first place. Yes; that is a bug -- any framework that can be embedded in a Cocoa application as supported API should be GC enabled. Please file a bug. b.bum ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSPrefrencePane with Garbage Collection won't work in System Preferences?
On Feb 27, 2009, at 11:47 AM, Tobias Zimmerman wrote: Sorry, you have confused me slightly (or perhaps given me false hope). I have 3 targets in my project: (1) the preference pane; (2) a framework; and (3) an application. 1 2 are both dual mode insofar as they can be compiled and run without garbage collection. #3, which doesn't interact with the System Prefs, but uses code out of the framework (#2), requires GC. I thought the point of supported versus required compile options for frameworks was that the first would support a GC app, but not require it, and the second would...well...require it. So, if a non-GC pref pane is loading a GC-Supported framework, shouldn't it be GC-free? Is the only way to do this to have entirely separate versions of the framework? (or just put the same code in each target separately and dispense with a a framework)? A framework can be dual mode; can support both GC and non-GC operation. This is how all of the frameworks [should be -- seems one slipped through] are compiled on the system. The issue, though, is that you can't load a GC-required bundle into System Preferences.app. b.bum ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSPrefrencePane with Garbage Collection won't work in System Preferences?
On Feb 27, 2009, at 1:16 PM, Bill Bumgarner wrote: Yes; that is a bug -- any framework that can be embedded in a Cocoa application as supported API should be GC enabled. Please file a bug. I did, almost exactly a month before Leopard shipped. The bug # is 5493316, and it was closed as a duplicate of an earlier report. Nick Zitzmann http://www.chronosnet.com/ ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSPrefrencePane with Garbage Collection won't work in System Preferences?
On Feb 27, 2009, at 12:24 PM, Nick Zitzmann wrote: On Feb 27, 2009, at 1:16 PM, Bill Bumgarner wrote: Yes; that is a bug -- any framework that can be embedded in a Cocoa application as supported API should be GC enabled. Please file a bug. I did, almost exactly a month before Leopard shipped. The bug # is 5493316, and it was closed as a duplicate of an earlier report. Thank you. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSPrefrencePane with Garbage Collection won't work in System Preferences?
On 2/27/09 12:18 PM, Bill Bumgarner said: A framework can be dual mode; can support both GC and non-GC operation. This is how all of the frameworks [should be -- seems one slipped through] are compiled on the system. The CHUD.framework is also not GC-friendly. This is a shame, since it prevents programatically activating Shark's remote profiling. (Yes, I have submitted rdar://6109237 to the Black Hole. I dutifully await the end of time. :) And yes, this isn't that bad, since shipping apps shouldn't link to that framework.) -- Sean McBride, B. Eng s...@rogue-research.com Rogue Researchwww.rogue-research.com Mac Software Developer Montréal, Québec, Canada ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSPrefrencePane with Garbage Collection won't work in System Preferences?
On Feb 27, 2009, at 12:28 PM, Sean McBride wrote: On 2/27/09 12:18 PM, Bill Bumgarner said: A framework can be dual mode; can support both GC and non-GC operation. This is how all of the frameworks [should be -- seems one slipped through] are compiled on the system. The CHUD.framework is also not GC-friendly. This is a shame, since it prevents programatically activating Shark's remote profiling. (Yes, I have submitted rdar://6109237 to the Black Hole. I dutifully await the end of time. :) And yes, this isn't that bad, since shipping apps shouldn't link to that framework.) And thank you for that, too. Seriously -- folks -- if you file a bug that is related to GC, feel free to drop me an email with the #. b.bum ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSPrefrencePane with Garbage Collection won't work in System Preferences?
OK, I'm being dense today, but is it the case that the entire bundle is marked as GC-required if any piece of it requires GC? If I move the app out of the bundle (so it is just the Pane and the framework) does that make it no longer GC-required (if the Framework is compiled as GC-supported)? Again, the only parts of my code that touch the system prefs is the Pane and the framework, neither of which are compiled with GC-required. From: Bill Bumgarner b...@mac.com Date: Fri, 27 Feb 2009 12:18:34 -0800 To: Tobias Zimmerman automa...@gmail.com Cc: Nick Zitzmann n...@chronosnet.com, cocoa-dev@lists.apple.com cocoa-dev@lists.apple.com Subject: Re: NSPrefrencePane with Garbage Collection won't work in System Preferences? On Feb 27, 2009, at 11:47 AM, Tobias Zimmerman wrote: Sorry, you have confused me slightly (or perhaps given me false hope). I have 3 targets in my project: (1) the preference pane; (2) a framework; and (3) an application. 1 2 are both dual mode insofar as they can be compiled and run without garbage collection. #3, which doesn't interact with the System Prefs, but uses code out of the framework (#2), requires GC. I thought the point of supported versus required compile options for frameworks was that the first would support a GC app, but not require it, and the second would...well...require it. So, if a non-GC pref pane is loading a GC-Supported framework, shouldn't it be GC-free? Is the only way to do this to have entirely separate versions of the framework? (or just put the same code in each target separately and dispense with a a framework)? A framework can be dual mode; can support both GC and non-GC operation. This is how all of the frameworks [should be -- seems one slipped through] are compiled on the system. The issue, though, is that you can't load a GC-required bundle into System Preferences.app. b.bum ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSPrefrencePane with Garbage Collection won't work in System Preferences?
On Feb 27, 2009, at 12:58 PM, Tobias Zimmerman wrote: OK, I'm being dense today, but is it the case that the entire bundle is marked as GC-required if any piece of it requires GC? If I move the app out of the bundle (so it is just the Pane and the framework) does that make it no longer GC-required (if the Framework is compiled as GC- supported)? Again, the only parts of my code that touch the system prefs is the Pane and the framework, neither of which are compiled with GC-required. The GC-ness marker applies to individual binaries, not bundle packages. So your framework can be marked GC-supported, even if it's inside an app bundle where the app's executable is marked GC- unsupported. You can use `otool` to verify the GC-ness of your binaries. If the value isn't what you want, double-check your compiler settings and make sure no wrong-GC files leaked in. (The linker should complain when linking files built with incompatible GC, though.) % otool -ov -arch i386 /path/to/MyApp.app/Contents/MacOS/MyApp [...] Contents of (__OBJC,__image_info) section version 0 flags 0x02 GC RR RR is support for non-GC (retain-release). GC is support for GC. So GC RR is GC-supported, RR alone is GC-unsupported, and GC alone is GC-required. -- Greg Parker gpar...@apple.com Runtime Wrangler ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com