Re: Looking for suggestions/help on a multi-file data model

2011-02-12 Thread Quincey Morris
On Feb 11, 2011, at 18:08, Andy Akins wrote: Imagine a purchasing application. First, you have to open a catalog - a file that lists the items that are available. There might be multiple files, representing multiple stores or sets of items, but you have to pick just one. Then, you have

Re: Looking for suggestions/help on a multi-file data model

2011-02-12 Thread Andy Akins
Thank you very much for your comments. On Feb 12, 2011, at 3:34 AM, Quincey Morris wrote: So you still at the stage where you need to think about design not implementation -- don't make the mistake of designing for a pre-chosen implementation strategy. First, start by designing your user

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 claw
hi, why not try something like : if ( [self isKindOfClass:[SuperClass class] ] ) { } so your test will not depend on instance but on 'typeof' usually in code you use 'super' to verify that some data in 'super' already exist or need to be initialised between testing super self Le 12

Re: subclass says unrecognized selector

2011-02-12 Thread Jerry Krinock
First of all, I agree with claw that this line looks really weird, although it might work. I've just never seen it done that way. if ([self class] == [SuperClass class]) { Second, are you sure that SubClass inherits from SuperClass? Is it declared like this? … @interface SubClass :

Re: subclass says unrecognized selector

2011-02-12 Thread claw
also, NSEnumerator *keyE = [[super tagDict] keyEnumerator]; //HERE it is not a good strategy to use NSEnumerator at this point what if super does not respond at all ?? . to avoid crash infinite loop you needs to specify 'forward messaging' ( another instance object that will respond to

Re: subclass says unrecognized selector

2011-02-12 Thread Thomas Clement
super is relative to the class where this code is implemented (SuperClass) which means the method lookup starts with the super class of SuperClass. This true even when the code is called from a subclass. You're getting the unrecognized selector sent to instance message because the super class

Re: subclass says unrecognized selector

2011-02-12 Thread Andy Lee
super does not change what class the object thinks it is an instance of. (It's different from C++ in this way, if I remember my C++.) If an object is an instance of class X, [self class] *always* returns X. Suppose you call [obj tagDict] where obj is an instance of SubClass. This is what

Re: NSTableView auto sorting does not work

2011-02-12 Thread Chris Tracewell
Did you actually bind the table view's sortDescriptors binding to the array controller's sortDescriptors property? No, but that's why I posted, trying to figure out when this can be avoided. In the simplest case (all columns bound to different keys on the same NSArrayController),

Cocoa Application without any menu, dock, etc.

2011-02-12 Thread Eckart Schlottmann
Hello, I wrote an application (using NSApplication) that adds a StatusItem to the StatusBar. Since this is totally sufficient and the application actually has no window I want to remove the menu of the application, the entry in the dock and also the application shall not appear when pressing

Re: subclass says unrecognized selector

2011-02-12 Thread Mikkel Eide Eriksen
Thanks for the suggestions, all. I think this will probably suit my needs for now. Mikkel On 12/02/2011, at 17.06, Andy Lee wrote: super does not change what class the object thinks it is an instance of. (It's different from C++ in this way, if I remember my C++.) If an object is an

Re: Cocoa Application without any menu, dock, etc.

2011-02-12 Thread Dave DeLong
Pretty easy: - add an entry to your Info.plist: LSUIElement = true (this is the Application is agent entry) It's not necessary to delete the menu from MainMenu.xib, because I believe that's only used when your app lives in the Dock. Leaving it in allows your app to still respond to things

Re: Cocoa Application without any menu, dock, etc.

2011-02-12 Thread David LeBer
On 2011-02-12, at 12:35 PM, Eckart Schlottmann wrote: Hello, I wrote an application (using NSApplication) that adds a StatusItem to the StatusBar. Since this is totally sufficient and the application actually has no window I want to remove the menu of the application, the entry in the

Sleep Notification

2011-02-12 Thread Gordon Apple
If it exists, could somebody point me to notifiers for sleep/wake in iOS? I have a comm link that goes down with sleep. I would like to bring it up again on wake (in case the user forgot to disable sleep). I'm already doing this for applicationWillEnterForeground, but that doesn't work for

Re: specifying new document types that an app opens

2011-02-12 Thread davelist
On Feb 11, 2011, at 8:04 PM, davel...@mac.com wrote: I'm working on a document-based app for the Mac App Store. The data file I'm reading/writing is actual a Sqlite database file. I've been able to get it to work with the following in my info.plist file (although for this email I've used

Re: subclass says unrecognized selector

2011-02-12 Thread Kyle Sluder
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 as super classes up to an arbitrary height, I've

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 as

Re: subclass says unrecognized selector

2011-02-12 Thread Kyle Sluder
On Sat, Feb 12, 2011 at 12:37 PM, Mikkel Eide Eriksen mikkel.erik...@gmail.com wrote: Thanks for the suggestion, but I should mention that it needs to be an instance method since it gets the name of the plist from a userInfo dictionary on its entity (SuperClass is a subclass of

Canceling NSInvocationOperation

2011-02-12 Thread Chase Latta
Hello all, I have run into a situation that I don't quite have a solution for. I have a UIScrollView that holds a bunch of CALayers. My controller is set up to check and see if it can cache layers that are offscreen after the user scrolls a certain amount. I found that doing this on the main