Re: NSPredicate / NSArray addObserver:forKeyPath:options:context: exception

2012-09-29 Thread Mikkel Eide Eriksen
On 29/09/2012, at 15.59, Keary Suska cocoa-...@esoteritech.com wrote: On Sep 28, 2012, at 7:17 PM, Mikkel Eide Eriksen wrote: 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

Re: NSPredicate / NSArray addObserver:forKeyPath:options:context: exception

2012-09-29 Thread Mikkel Eide Eriksen
On 29/09/2012, at 18.49, cocoa-dev-requ...@lists.apple.com wrote: Message: 5 Date: Sat, 29 Sep 2012 13:48:40 +0200 From: Willeke willeke2...@gmail.com To: Cocoa-Dev List Cocoa-dev@lists.apple.com Subject: Re: NSPredicate / NSArray addObserver:forKeyPath:options:context: exception

Re: NSPredicate / NSArray addObserver:forKeyPath:options:context: exception

2012-09-28 Thread Mikkel Eide Eriksen
On 28/09/2012, at 03.51, Keary Suska aksu...@gmail.com 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

NSPredicate / NSArray addObserver:forKeyPath:options:context: exception

2012-09-27 Thread Mikkel Eide Eriksen
the first object in the array I'm filtering. Can anyone provide some insights here? Regards, Mikkel Eide Eriksen 2012-09-27 19:08:18.261 GedcomGUI[29311:9e0b] An uncaught exception was raised 2012-09-27 19:08:18.261 GedcomGUI[29311:9e0b] [__NSArrayM 0x109cfb490 addObserver:forKeyPath:options:context

Missing children in NSTreeController/NSOutlineView

2012-05-14 Thread Mikkel Eide Eriksen
Hi all, I have as follows in Interface builder: - A superclass with a @property NSOrderedSet *properties containing zero or more instances of objects, as well as some normal string properties. All the objects inherit from the superclass. - An NSTreeController whose content object is bound to

Re: Missing children in NSTreeController/NSOutlineView

2012-05-14 Thread Mikkel Eide Eriksen
Thanks, I don't currently have leaf/count configured. They are empty in IB - my impression was that they were optional and for performace? Mikkel On 14/05/2012, at 10.06, Quincey Morris quinceymor...@rivergatesoftware.com wrote: On May 14, 2012, at 00:40 , Mikkel Eide Eriksen wrote

Re: Missing children in NSTreeController/NSOutlineView (SOLVED)

2012-05-14 Thread Mikkel Eide Eriksen
There it was! My properties property is an NSOrderedSet. After some more time in the debugger, I found out that the tree controller gets the object at children key path, and checks whether it's an NSSet or an NSArray. NSOrderedSet is neither, it inherits directly from NSObject and that appears

Re: Missing children in NSTreeController/NSOutlineView (SOLVED)

2012-05-14 Thread Mikkel Eide Eriksen
On 14/05/2012, at 19.15, Quincey Morris wrote: On May 14, 2012, at 09:29 , Mikkel Eide Eriksen wrote: On 14/05/2012, at 18.07, Quincey Morris wrote: On May 14, 2012, at 08:56 , Mikkel Eide Eriksen wrote: There it was! My properties property is an NSOrderedSet. After some more time

Re: Missing children in NSTreeController/NSOutlineView (SOLVED)

2012-05-14 Thread Mikkel Eide Eriksen
On 14/05/2012, at 19.37, Mikkel Eide Eriksen wrote: On 14/05/2012, at 19.15, Quincey Morris wrote: In the absence of other information this sounds like a bug in NSTreeController. What happens if you change the count property in IB to set.count? Same error as above

-[NSOutlineView ibIsInDesignMode]: unrecognized selector (???)

2012-02-14 Thread Mikkel Eide Eriksen
Hi, I was going to implement a source list, but it's causing XCode and the Simulator to freak out. I did the following in my existing project (and then in a fresh project to make sure): 1. Create window nib 2. Add a source list 3. Menu: Editor Simulate Document From the stacktrace it looks

Re: -[NSOutlineView ibIsInDesignMode]: unrecognized selector (???)

2012-02-14 Thread Mikkel Eide Eriksen
On 14/02/2012, at 23.55, Kyle Sluder wrote: View-based table views and outline views crash the IB simulator. This is a known issue. r. 9442221 Thanks for the into. Mikkel ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Unit testing a bundle

2012-01-12 Thread Mikkel Eide Eriksen
Hi, I have a bundle project that produces an NSBundle. I am trying to add unit tests to this, but am getting the following error: 2012-01-12 01:23:33.644 otest[12650:407] The test bundle at /.../DerivedData/.../Debug/PluginTests.octest could not be loaded because a link error occurred. It is

context-aware bindings

2011-02-27 Thread Mikkel Eide Eriksen
Hi, I have a property on an object that would ideally return either its value or nil, depending on the context it's being called from. I could do this with multiple selectors, but was wondering if there was a cleaner way of determining how it is being called. Regards, Mikkel smime.p7s

Re: context-aware bindings

2011-02-27 Thread Mikkel Eide Eriksen
On 27/02/2011, at 11.39, Joanna Carter wrote: Le 27 févr. 2011 à 10:07, Andy Lee a écrit : On Feb 27, 2011, at 3:19 AM, Mikkel Eide Eriksen wrote: I have a property on an object that would ideally return either its value or nil, depending on the context it's being called from. Can you

Re: context-aware bindings

2011-02-27 Thread Mikkel Eide Eriksen
On 27/02/2011, at 17.19, Joanna Carter wrote: Le 27 févr. 2011 à 15:25, Mikkel Eide Eriksen a écrit : It would only return nil in some cases. I'm working on some Gedcom - Core Data code. All objects in Gedcom have a tag identifier. One such object is an Event, with the generic tag EVEN

subclass says unrecognized selector

2011-02-12 Thread Mikkel Eide Eriksen
Hi all, I think I may have misunderstood something about how super works. In trying to build a dictionary that contains key/value pairs from the class itself as well as super classes up to an arbitrary height, I've hit a wall. Simplified, I have two classes, SuperClass and SubClass. In

Re: subclass says unrecognized selector

2011-02-12 Thread Mikkel Eide Eriksen
:[self class]]; } --Andy On Feb 12, 2011, at 8:52 AM, Mikkel Eide Eriksen wrote: Hi all, I think I may have misunderstood something about how super works. In trying to build a dictionary that contains key/value pairs from the class itself as well as super classes up

Re: subclass says unrecognized selector

2011-02-12 Thread Mikkel Eide Eriksen
On 12/02/2011, at 21.03, Kyle Sluder wrote: On Sat, Feb 12, 2011 at 5:52 AM, Mikkel Eide Eriksen mikkel.erik...@gmail.com wrote: I think I may have misunderstood something about how super works. In trying to build a dictionary that contains key/value pairs from the class itself as well

non-NSString values in model user info via xcode UI

2011-01-20 Thread Mikkel Eide Eriksen
counterproductive. Any suggestions? Regards, Mikkel Eide Eriksen smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: non-NSString values in model user info via xcode UI

2011-01-20 Thread Mikkel Eide Eriksen
dictionaries arrays in there via the UI. Mikkel On 20/01/2011, at 21.26, Quincey Morris wrote: On Jan 20, 2011, at 11:57, Mikkel Eide Eriksen wrote: I have a Core Data model and I'd like to add some metadata about the entities/attributes/relationships. In most cases, strings are fine, but I'd also

Re: bindings via file's owner don't update

2010-12-02 Thread Mikkel Eide Eriksen
On Dec 2, 2010, at 1:47 AM, Quincey Morris wrote: On Dec 1, 2010, at 11:08, Mikkel Eide Eriksen wrote: See line 48 onwards below: http://code.google.com/p/cocoa-gedcom/source/browse/trunk/GCCoreData/src/GCDocument.m (there are probably lots of terribly ugly non-Cocoa things in here, I'm

Re: bindings via file's owner don't update

2010-12-01 Thread Mikkel Eide Eriksen
:P Mikkel On Nov 30, 2010, at 6:39 PM, Mikkel Eide Eriksen wrote: On Nov 30, 2010, at 5:34 PM, Quincey Morris wrote: On Nov 29, 2010, at 21:36, Mikkel Eide Eriksen wrote: I'm updating the objectCount property during readFromURL:ofType:error: - could that be it? No, that's a suitable

Re: bindings via file's owner don't update

2010-12-01 Thread Mikkel Eide Eriksen
On Dec 1, 2010, at 7:41 PM, Kyle Sluder wrote: On Wed, Dec 1, 2010 at 10:09 AM, Mikkel Eide Eriksen mikkel.erik...@gmail.com wrote: Well I feel a little dumb now. After lots of debugging and digging at values that looked correct everywhere, checking object creating again again, and what

Re: bindings via file's owner don't update

2010-11-30 Thread Mikkel Eide Eriksen
On Nov 30, 2010, at 5:34 PM, Quincey Morris wrote: On Nov 29, 2010, at 21:36, Mikkel Eide Eriksen wrote: I'm updating the objectCount property during readFromURL:ofType:error: - could that be it? No, that's a suitable method, but the question is whether it's running in the main thread

bindings via file's owner don't update

2010-11-29 Thread Mikkel Eide Eriksen
Hi all, In a document-based app, I have the main Document xib a Loading xib. The latter is shown while the program reads a file closes after. When reading a file, my Document object tells LoadingWindowController to show its window [loadingWindowController setDocument:self]; This is to

Re: bindings via file's owner don't update

2010-11-29 Thread Mikkel Eide Eriksen
I don't think I'm replacing the document per se. In my NSDocument init override, I do this (only relevant parts copied): if (![self loadingWindowController]) [self setLoadingWindowController:[[MyLoadingWindowController alloc] init]]; [[self loadingWindowController] setDocument:self];

Re: bindings via file's owner don't update

2010-11-29 Thread Mikkel Eide Eriksen
Eide Eriksen wrote: I don't think I'm replacing the document per se. In my NSDocument init override, I do this (only relevant parts copied): if (![self loadingWindowController]) [self setLoadingWindowController:[[MyLoadingWindowController alloc] init]]; [[self

Re: bindings via file's owner don't update

2010-11-29 Thread Mikkel Eide Eriksen
On Nov 30, 2010, at 3:18 AM, Quincey Morris wrote: On Nov 29, 2010, at 08:10, Mikkel Eide Eriksen wrote: Reading up on the documentation, I guess what I should do in my Document init is this: if (![self loadingWindowController]) [self setLoadingWindowController

Re: respondsToSelector warning: may not respond

2010-11-27 Thread Mikkel Eide Eriksen
Thanks all, I ended up changing around my object hierarchy and casting to a superclass that has ordinals. Mikkel On Nov 26, 2010, at 10:38 PM, Julien Jalon wrote: Z) ignore the warning On Fri, Nov 26, 2010 at 9:44 PM, Ken Thomases k...@codeweavers.com wrote: On Nov 26, 2010, at 12:27 PM,

Core data binding first of to-many relationship

2010-11-27 Thread Mikkel Eide Eriksen
Hi I have an NSArrayController that holds a set of persons. These persons have a to-many relationship of name objects. Usually they will only have one name, but there may be multiple (or even no name). In my interface, I have an NSTableView that will display the persons. The attributes are

respondsToSelector warning: may not respond

2010-11-26 Thread Mikkel Eide Eriksen
Hi all, I have the following bit in my code: if ([obj respondsToSelector:@selector(setOrdinal:)]) { [obj setOrdinal:value]; } XCode gives a warning that obj may not respond to setOrdinal: which won't be a problem unless something is really screwy. But how do I get rid of the warning?

Re: respondsToSelector warning: may not respond

2010-11-26 Thread Mikkel Eide Eriksen
I should have mentioned that it is declared, but obj can be one of many classes only some of which have setOrdinal: On Nov 26, 2010, at 6:46 PM, banane wrote: declare the method in your header file. -(void)setOrdinal; On Fri, Nov 26, 2010 at 9:08 AM, Mikkel Eide Eriksen mikkel.erik

Re: NSData as value in NSManagedObject

2010-02-20 Thread Mikkel Eide Eriksen
Hi Jerry Thanks for the reply, here are the methods in question. Bear in mind I'm still new to Core Data so there are probably some grievous things going on (the project is GC, by the way). addXML:toBucket:atPath: gets called when self receives new XML. I choose from the added XML via an

Re: NSData as value in NSManagedObject

2010-02-20 Thread Mikkel Eide Eriksen
the lastObject can go either place. Thanks! Mikkel On 20/02/2010, at 16.54, Alexander Spohr wrote: Am 20.02.2010 um 16:29 schrieb Mikkel Eide Eriksen: NSData *xmlData = (NSData *)[[[treeController selectedObjects] valueForKey:@xml] lastObject]; //HERE'S THE PROBLEM Well, yes. You ask your xml