The joy of unexpected SIGABRTs
I'm trying to get a rather important demo together and plan on being up all night again, so pleas pardon me if my brain power appears lacking. About 10 mins ago, before I started wiring up my GUI by simply dragging storyboard items into the .h file to make IBOutlets my app ran and displayed fine. I just spent 10 mins wiring up the GUI, did nothing else, and now when one scene appears, Xcode instantly SIGABRTs, without any information in the console or the debugger that comes close to telling why this happened. Nothing. This is what drives me insane about Xcode. So, I commented out all the code I just added and still, BLAM, directly when the scene loads. Even the breakpoint for the Init method isn't getting triggered. So, obviously, this is a storyboard issue, but which, but what? Considering that Xcode displays nothing at all that actually indicates what caused the SIGABRT, if it is thrown from a storyboard, what tips do you have to help track these unpleantries down when they are triggered form the storyboard? Trapping for -[NSObject(NSObject) doesNotRecognizeSelector:] doesn't help. Thanks in advance. ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Shared NSNumberFormatters
Binding the formatter's currencyCode worked brilliantly and lets me reuse almost all the existing NIBs without change. Thanks =) On 29 September 2012 02:28, Sean McBride wrote: > On Sat, 29 Sep 2012 01:37:58 +1200, Samuel Williams said: > > >Hi Friends, > > > >I have an application that is currency using multiple NSNumberFormatters. > > > >Now a requirement has come up to support a per-document currency code. > > > >I have about 10 NIB files and the most complex NIB files have about 10-15 > >fields using per-NIB file formatters connected to fields using outlets. > > > >I would ideally like to use a binding on the text fields, e.g. bind > >formatter to File's Owner document.currencyNumberFormatter but > >unfortunately this binding isn't exposed in Xcode, which is leading to > >quite a bit of additional code to manually create this binding. > > You can place your NSFormatters are the top-level of your nib and connect > your textfield's 'formatter' outlet to them, and also create outlets in > your window/view controller to the same formatters. formatters are > mutable, so you can configure them how you want in windowWillLoad or > awakeFromNib or whereever. > > Cheers, > > -- > > 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSPredicate / NSArray addObserver:forKeyPath:options:context: exception
On 28/09/2012, at 03.51, Keary Suska wrote: > On Sep 27, 2012, at 11:54 AM, Mikkel Eide Eriksen wrote: >> >> When I run my app, I get an exception (quoted below) as soon as I expose my >> objects to my array controller (via a property on my document it's bound >> to), though as far as I can tell, the predicate should be functionally the >> exact same? For completness, inspecting it in the debugger yields: > > I suspect that somewhere in your xib you are binding through the array, which > you can't do. Look for a binding key path that begins with or contains > "personalNames" and that has a key after it (such as "personalNames.value"). > The keypath: ANY personalNames.value.gedcomString CONTAINS "..." is composed of the following keys: GCIndividualEntity has a KVC-compliant collection property called _personalNames_ which is an array of GCPersonalNameAttributes which each have a GCValue property called _value_ which again have an NSString property _gedcomString_ (by the way these are NSObjects, not Core Data). I am not binding to the keypath in my xib, but obtain the predicate via code. The array controller is bound to a property "individuals" on File's Owner (my NSDocument subclass). When I've loaded the file, I set self.individuals = self.context.individuals, causing a table view bound to the array controller to show the objects; this works as expected, as well as a detail-view connected to the controller's selection. I then attempt to set the array controller's predicate and immediately it dies with the mentioned exception. Mikkel ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Spotlight and Quick Look plugin behaviour change on OS X 10.8
On 28 Sep 2012, at 10:02, jonat...@mugginsoft.com wrote: > My app uses a bundled Spotlight importer plugin and a Quick Look plugin. > > Pre 10.8 when the app is installed the 2 plugins are active immediately after > application installation. > I rely on Spotlight to index data files that I export from the app bundle > into ~/Documents > When my app is first installed I kick off @"/usr/bin/mdimport" and Spotlight > duly indexes my content. > > Under OS X 10.8 behaviour seems to have changed. > Neither of the plugins seem to be recognised by the OS until after a reboot. > This interferes with my initial Spotlight indexing (the plugin isn't active > so I get no results back). > > Has any one else noticed something similar? > Hmm. I was able to reproduce this in one of my 10.8 virtual machines. However, in another newly instantiated 10.8 vm I don't see the issue. Regards Jonathan Mitchell Mugginsoft LLP KosmicTask - the Integrated Scripting Environment for OS X. http://www.mugginsoft.com/KosmicTask ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: KVO Question: How to programmatically determine if one object is observing another on a keyPath and context?
On Sep 11, 2012, at 10:06 AM, Motti Shneor wrote: > OK. Could you spare some pseudo-code for this? Or some link to a known > code-sample? or maybe some 10 highlight lines from your own utilities? > > Documentation on method swizzling isn't that easy to use. In my case, all I > need to do is to "swizzle?" (like override) the "addObserver" of my observed > object, and record the high-level observation info (observer, options, > context, etc.) in some static container, so I can later question the observed > object about its observer. > > But how do I do that on my NSManagedObject sublcass? Sorry about the delayed response. I have been buried in work. I switched to 10.8 Mountain Lion and I am still adjusting to the revised Mail applicaiton. You could do swizzling like this. #import "JRSwizzle.h" @implementation NSManagedObject (MySpecialCategory) // Do the swizzling + (void)load { @autoreleasepool // NSAssert requires an autorelease pool { NSError *error = nil; [[NSObject class] jr_swizzleMethod:@selector(method) withMethod:@selector(my_swizzled_method) error:&error]; NSAssert(error == nil, @"%@", error); } } // Framework method // - (void)method // { // ... // } // Swizzled method - (void)my_swizzled_method { // do your thing // call original implementation [self my_swizzled_method]; } @end Note that the NSManagedObject documentation indicates "As with any class, you are strongly discouraged from overriding the key-value observing methods". I view swizzling like this: You are at your wits end, you have examined all other options, you want to use Apple's frameworks but you simply can figure out any other way. So you try swizzling. --Richard Somers ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Registering iOS developer program
On 28 Sep 2012, at 12:22 AM, kiran kumar wrote: > For registering iOS developer program, is same cost $99 for individual and > company. Assuming you mean for distribution through the App Store, yes. — F ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Shared NSNumberFormatters
On Sat, 29 Sep 2012 01:37:58 +1200, Samuel Williams said: >Hi Friends, > >I have an application that is currency using multiple NSNumberFormatters. > >Now a requirement has come up to support a per-document currency code. > >I have about 10 NIB files and the most complex NIB files have about 10-15 >fields using per-NIB file formatters connected to fields using outlets. > >I would ideally like to use a binding on the text fields, e.g. bind >formatter to File's Owner document.currencyNumberFormatter but >unfortunately this binding isn't exposed in Xcode, which is leading to >quite a bit of additional code to manually create this binding. You can place your NSFormatters are the top-level of your nib and connect your textfield's 'formatter' outlet to them, and also create outlets in your window/view controller to the same formatters. formatters are mutable, so you can configure them how you want in windowWillLoad or awakeFromNib or whereever. Cheers, -- 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Need some clarity about iOS developer Registration.
Sorry, my answer was that it supports devices i.e. iphone, ipod, ipad (upto 100). (not a PC, of course!) On Fri, Sep 28, 2012 at 4:34 AM, wrote: > Since when does iOS or the Mac OS run on a PC? > > Sent from my Verizon Wireless BlackBerry > > -Original Message- > From: kiran kumar > Sender: cocoa-dev-bounces+zav=mac.com@lists.apple.comDate: Fri, 28 Sep > 2012 12:22:45 > To: Cocoa-dev@lists.apple.com List > Subject: Need some clarity about iOS developer Registration. > > Hi All, > > > Need some clarity about iOS developer Registration. > > If i get the individual account for $99, does it support multiple iphone > or ipad devices and what about PC's ? > > Thus this account support no.of PC's? > > > Regards, > Kiran.K > > > The information contained in this email and any attachments is > confidential and may be subject to copyright or other intellectual property > protection. If you are not the intended recipient, you are not authorized > to use or disclose this information, and we request that you notify us by > reply mail or telephone and delete the original message from your mail > system. > ___ > > 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: > https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com > > This email sent to z...@mac.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: > https://lists.apple.com/mailman/options/cocoa-dev/therhythmic%40gmail.com > > This email sent to therhyth...@gmail.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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Notification Center settings
Hi all, Is there any API (or any other way) to read user settings for the Notification Center in OS X 10.8 (e.g. whether user notifications are enabled for a particular application)? The only thing I can find is some kind of database (.db) file located in the "~/Library/Application Support/Notification Center" folder, but I have no idea what its format is (SQLite perhaps) and how to extract any useful data from it. -- Dragan ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Shared NSNumberFormatters
Hi Friends, I have an application that is currency using multiple NSNumberFormatters. Now a requirement has come up to support a per-document currency code. I have about 10 NIB files and the most complex NIB files have about 10-15 fields using per-NIB file formatters connected to fields using outlets. I would ideally like to use a binding on the text fields, e.g. bind formatter to File's Owner document.currencyNumberFormatter but unfortunately this binding isn't exposed in Xcode, which is leading to quite a bit of additional code to manually create this binding. Is there some way of achieving this more elegantly and efficiently? Kind regards, Samuel ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Proper KVO with NSTreeController + NSOutlineView
On Sep 28, 2012, at 8:51 AM, Dave Keck wrote: >> I'd like to observe a notification when a user edits (renames) an item in >> the outline view that tells me the old and new values. I'm getting >> notifications, but the old and new values are always null. For what it's >> worth, I'm currently observing the "content.name" key path of the >> NSTreeController instance - not sure if that makes a difference. > > Sounds suspiciously similar to the NSArrayController bug where it > doesn't honor the NSKeyValueObservingOption{Old|New} KVO options. > There are quite a few references to this around the web, e.g.: > > > http://www.cocoabuilder.com/archive/cocoa/215277-nsarraycontroller-selectedindexes.html Hmmm, the example output on that page looks all too familiar. I'll try Negm-Awad's binding info example as soon as I get a chance. Thanks for the link. ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Proper KVO with NSTreeController + NSOutlineView
> I'd like to observe a notification when a user edits (renames) an item in the > outline view that tells me the old and new values. I'm getting notifications, > but the old and new values are always null. For what it's worth, I'm > currently observing the "content.name" key path of the NSTreeController > instance - not sure if that makes a difference. Sounds suspiciously similar to the NSArrayController bug where it doesn't honor the NSKeyValueObservingOption{Old|New} KVO options. There are quite a few references to this around the web, e.g.: http://www.cocoabuilder.com/archive/cocoa/215277-nsarraycontroller-selectedindexes.html ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Proper KVO with NSTreeController + NSOutlineView
On Sep 28, 2012, at 8:33 AM, Alex Zavatone wrote: > > On Sep 27, 2012, at 10:42 PM, Joseph M. Wollard wrote: > >> I'm pretty sure I'm doing something wrong here. I have an NSTreeController >> bound to the 'value' of an NSOutlineView's table column. The >> NSTreeController's content is then bound to a property of one of my classes >> which feeds it an appropriate hierarchy of NSMutableDictionary objects. So, >> dict -> tree -> outline. All data is being displayed beautifully in the >> outline view. >> >> I'd like to observe a notification when a user edits (renames) an item in >> the outline view that tells me the old and new values. I'm getting >> notifications, but the old and new values are always null. For what it's >> worth, I'm currently observing the "content.name" key path of the >> NSTreeController instance - not sure if that makes a difference. I think you're spot on with that one. I didn't realize that until after I sent this email last night, however I'm still not sure how to solve the issue (a.k.a. determine the correct key path). Here's an example of my data structure: ( { "name":"Boys", "child": ( { "name":Bill", "child": () }, { "name":"Steve", "child":() } ) }, { "name":"Girls", "child": ( { "name":"Anna", "child":() }, { "name":"Bella", "child":() } ) } ) In my outline view, "Girls" and "Boys" are group headings and are immutable. However, I want the names, "Anna", "Belle", "Bill" and "Steve" to be mutable (which they are), but *those* are the properties I need to observe. Given that this structure is in an NSTreeController, what is the proper keypath for something like this? I'm pretty sure I just don't know the syntax, because it seems like it should be something like "content.chi...@distinctunionofarrays.name", but when I do that I'm pretty sure I can hear the notification center giggling at me somewhere off in the distance. >> > > Seems like there's something that's not being passed, observed or called > properly. Unlike when calling a unimplemented method in an object which > crashes Objective C, I've found out that notifications of the wrong method > name don't crash, but simply act as if nothing has happened. What has > happened was that a notification was issued, but the method might have been > misspelled and the program merrily continues without crashing but without > telling you that there was no method to intercept and process that > notification. That happened to me a few weeks ago. That doesn't sound like > your problem, but thought that might help. > > But, if the observed and new values are null, I'd guess that your reference > to content.name isn't the correct reference to the object. Try tracing > through the debugger to see where it thinks it's getting the value from. > > ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Proper KVO with NSTreeController + NSOutlineView
On Sep 27, 2012, at 10:42 PM, Joseph M. Wollard wrote: > I'm pretty sure I'm doing something wrong here. I have an NSTreeController > bound to the 'value' of an NSOutlineView's table column. The > NSTreeController's content is then bound to a property of one of my classes > which feeds it an appropriate hierarchy of NSMutableDictionary objects. So, > dict -> tree -> outline. All data is being displayed beautifully in the > outline view. > > I'd like to observe a notification when a user edits (renames) an item in the > outline view that tells me the old and new values. I'm getting notifications, > but the old and new values are always null. For what it's worth, I'm > currently observing the "content.name" key path of the NSTreeController > instance - not sure if that makes a difference. > Seems like there's something that's not being passed, observed or called properly. Unlike when calling a unimplemented method in an object which crashes Objective C, I've found out that notifications of the wrong method name don't crash, but simply act as if nothing has happened. What has happened was that a notification was issued, but the method might have been misspelled and the program merrily continues without crashing but without telling you that there was no method to intercept and process that notification. That happened to me a few weeks ago. That doesn't sound like your problem, but thought that might help. But, if the observed and new values are null, I'd guess that your reference to content.name isn't the correct reference to the object. Try tracing through the debugger to see where it thinks it's getting the value from. ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Need some clarity about iOS developer Registration.
Since when does iOS or the Mac OS run on a PC? Sent from my Verizon Wireless BlackBerry -Original Message- From: kiran kumar Sender: cocoa-dev-bounces+zav=mac.com@lists.apple.comDate: Fri, 28 Sep 2012 12:22:45 To: Cocoa-dev@lists.apple.com List Subject: Need some clarity about iOS developer Registration. Hi All, Need some clarity about iOS developer Registration. If i get the individual account for $99, does it support multiple iphone or ipad devices and what about PC's ? Thus this account support no.of PC's? Regards, Kiran.K The information contained in this email and any attachments is confidential and may be subject to copyright or other intellectual property protection. If you are not the intended recipient, you are not authorized to use or disclose this information, and we request that you notify us by reply mail or telephone and delete the original message from your mail system. ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com This email sent to z...@mac.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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Spotlight and Quick Look plugin behaviour change on OS X 10.8
My app uses a bundled Spotlight importer plugin and a Quick Look plugin. Pre 10.8 when the app is installed the 2 plugins are active immediately after application installation. I rely on Spotlight to index data files that I export from the app bundle into ~/Documents When my app is first installed I kick off @"/usr/bin/mdimport" and Spotlight duly indexes my content. Under OS X 10.8 behaviour seems to have changed. Neither of the plugins seem to be recognised by the OS until after a reboot. This interferes with my initial Spotlight indexing (the plugin isn't active so I get no results back). Has any one else noticed something similar? Regards Jonathan Mitchell Mugginsoft LLP KosmicTask - the Integrated Scripting Environment for OS X. http://www.mugginsoft.com/KosmicTask ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com