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

2011-02-11 Thread Andy Akins
I'm working on an application that has multiple files as part of its data model, and I'm not sure on the approach I should take. An example of what I mean: Imagine a "purchasing" application. First, you have to open a "catalog" - a file that lists the items that are available. There might be mu

Re: NSTableView auto sorting does not work

2011-02-11 Thread Kyle Sluder
On Fri, Feb 11, 2011 at 5:14 PM, Chris Tracewell wrote: > I have experienced that an NSTableview which is bound to an array controller > will sometimes automatically sort when their column headers are clicked and > sometimes not. As an example, I currently have two windows, each with a > tablev

NSTableView auto sorting does not work

2011-02-11 Thread Chris Tracewell
I have experienced that an NSTableview which is bound to an array controller will sometimes automatically sort when their column headers are clicked and sometimes not. As an example, I currently have two windows, each with a tableview bound to an array controller. One tableview sorts, the other

specifying new document types that an app opens

2011-02-11 Thread davelist
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 appname in place of the actual appname and file extension I'

Re: Performing the selector from a stored IMP

2011-02-11 Thread Bill Bumgarner
On Feb 11, 2011, at 1:16 PM, Joanna Carter wrote: > I would totally agree that it is a phenomenally powerful concept, giving just > the kind of functionality I was originally looking for, as a replacement for > method pointers. I will be using it as soon as I find a need that warrants it. > >

Re: [ANN] Cong 0.7

2011-02-11 Thread David Rowland
I have two apps in the store now. I run Cong and drag the release version of either one from the Build folder onto Cong. It gives me one report -- "./Contents folder not found". Earlier versions of these have been accepted and put on the store. What is it telling me? Am I using it wrong?

Re: Performing the selector from a stored IMP

2011-02-11 Thread Joanna Carter
Hi Matt > But consider NSUndoManager. What its +prepareWithInvocationTarget:+ does is > almost exactly what you describe: you give it a target and send it a method > call, a method call that NSUndoManager itself cannot respond to. Instead of > complaining, it freeze-dries that method call and i

Re: Performing the selector from a stored IMP

2011-02-11 Thread Matt Neuburg
On Feb 11, 2011, at 12:20 PM, Joanna Carter wrote: > >> Consider NSInvocation... m. > > Hmmm, nice! > > My only objection to using it in the circumstances I have is that it is a lot > more code to setup But consider NSUndoManager. What its +prepareWithInvocationTarget:+ does is almost exact

Re: Performing the selector from a stored IMP

2011-02-11 Thread Tito Ciuro
Hello, Being curious about the performance implications of using NSInvocation vs Objective-C message send vs IMP-cached message send, I was surprised to see how much slower NSInvocation seems to be compared to the other two mechanisms (the following data was last collected on Leopard, so these

Re: Performing the selector from a stored IMP

2011-02-11 Thread Joanna Carter
Hi Matt > Consider NSInvocation... m. Hmmm, nice! My only objection to using it in the circumstances I have is that it is a lot more code to setup than the idea of a protocol with three methods, implemented by the target class. However, I am indebted to you for pointing out this class and sha

Re: NSUnicodeStringEncoding

2011-02-11 Thread Kyle Sluder
On Fri, Feb 11, 2011 at 10:57 AM, Todd Heberlein wrote: > Looking at the NSString class there is the method > >        initWithBytes:length:encoding: > > I have a unicode string (in C++ object) that I can extract in a number of > different byte stream formats (UTF-8, UTF-16 (w or w/o BOM)) that I

NSUnicodeStringEncoding

2011-02-11 Thread Todd Heberlein
Looking at the NSString class there is the method initWithBytes:length:encoding: I have a unicode string (in C++ object) that I can extract in a number of different byte stream formats (UTF-8, UTF-16 (w or w/o BOM)) that I need to encode into an NSString. Does the NSUnicodeStringEncodin

Re: [ANN] Cong 0.7

2011-02-11 Thread Kyle Sluder
On Feb 11, 2011, at 9:57 AM, Carter Allen wrote: > Really excellent work on this! Nice job catching the fact that I was using an > embedded framework and kept the headers in there...though I'm not sure how to > automate the removal of them during the build (hmm). It would be great if > this wa

Re: [ANN] Cong 0.7

2011-02-11 Thread Carter Allen
Really excellent work on this! Nice job catching the fact that I was using an embedded framework and kept the headers in there...though I'm not sure how to automate the removal of them during the build (hmm). It would be great if this was part of Xcode in some way (obviously a tough request). Oh

Re: Performing the selector from a stored IMP

2011-02-11 Thread Matt Neuburg
> Date: Fri, 11 Feb 2011 12:21:29 + > From: Joanna Carter > Subject: Performing the selector from a stored IMP > > I want to store a "method pointer" in a dictionary, recover it and call it > from elsewhere in code. > Consider NSInvocation... m. -- matt neuburg, phd = m...@tidbits.com, h

Re: Get ProcessSerialNumber of last front application

2011-02-11 Thread Mr. Gecko
Thanks, I'm working out the code now and if it will compile on 64bit, then I'll use it. On Feb 11, 2011, at 10:15 AM, Jean-Daniel Dupas wrote: > Does your application compile on 64 bits ? > Do you get a deprecation warning when using required functions ? > > When the answer is no for both que

Re: Get ProcessSerialNumber of last front application

2011-02-11 Thread Jean-Daniel Dupas
Does your application compile on 64 bits ? Do you get a deprecation warning when using required functions ? When the answer is no for both questions, I personally consider that the function is not deprecated. If you have a specific question about Store validation, ask Apple directly. Nobody o

Re: Get ProcessSerialNumber of last front application

2011-02-11 Thread Mr. Gecko
Would using carbon events be against the rules of the Mac App Store? I thought carbon was deprecated. I think it may just be the interface stuff in carbon, but not sure. On Feb 9, 2011, at 1:21 PM, Jean-Daniel Dupas wrote: > Carbon events are events. As long as you don't receive one, your app i

Carbon overlay window in place of a cocoa view

2011-02-11 Thread Kevin Meaney
Hi, I've taken the Audio Unit (AU) code for carbon overlay windows over a cocoa view and modified it for my purposes as a proof of concept test. I needed to make some changes to improve the AU code in my case (the left edge of the cocoa view can move because it is on the right side of a s

Re: Need help sorting with NSSortDescriptor and/or/NSPredicate (Core Data)

2011-02-11 Thread Ken Thomases
On Feb 11, 2011, at 9:19 AM, Michael Crawford wrote: > Thank you both for your suggestions. You're welcome. I'm glad I could help. > I ended up going with Ken's idea regarding the synthetic property. It was > added to a NSManagedObject derived class so I couldn't use it during the > fetch re

Re: Need help sorting with NSSortDescriptor and/or/NSPredicate (Core Data)

2011-02-11 Thread Michael Crawford
Thank you both for your suggestions. I ended up going with Ken's idea regarding the synthetic property. It was added to a NSManagedObject derived class so I couldn't use it during the fetch request without actually adding an attribute but I did use it to sort the resulting array. The syntheti

Re: Strange problem drawing a custom grid in NSTableView

2011-02-11 Thread Eric Gorr
I filed a bug report on this: rdar://8988596 Hopefully this will be fixed soon or a workaround provided. In the meantime, I will just disable the Automatically Hide Scrollers feature of NSScrollView. On Feb 10, 2011, at 7:07 PM, Eric Gorr wrote: > Unfortunately, no. > > - (void)drawRect:(NS

NSTreeNode mutableChildNodes documented as observable using key-value observing

2011-02-11 Thread jonat...@mugginsoft.com
The docs for NSTreeNode -mutableChildNodes states: "The array that is returned is observable using key-value observing." This doesn't seem to make any sense nor does it seem to be true. What does seem to be true is that NSTreeNode - childNodes is observable using key-value observing. When -mut

Re: Performing the selector from a stored IMP

2011-02-11 Thread Jean-Daniel Dupas
Le 11 févr. 2011 à 14:31, Joanna Carter a écrit : > Hi Jerry > >> You've misunderstood what an IMP *is*. > > Heheheh, I thought as much :-) > >> If you want to store a method, you could probably wrap that the pointer >> value of an IMP as an NSValue. Read NSValue. Or, for persistent storage

Re: Performing the selector from a stored IMP

2011-02-11 Thread Joanna Carter
Hi Jerry > You've misunderstood what an IMP *is*. Heheheh, I thought as much :-) > If you want to store a method, you could probably wrap that the pointer value > of an IMP as an NSValue. Read NSValue. Or, for persistent storage, store > the method name you get from NSStringFromSelector(), t

Re: Performing the selector from a stored IMP

2011-02-11 Thread Jean-Daniel Dupas
Le 11 févr. 2011 à 13:21, Joanna Carter a écrit : > Hi folks > > I want to store a "method pointer" in a dictionary, recover it and call it > from elsewhere in code. > > So, I have code like this to store the "method pointer": > > { > IMP anIMP = [anObject methodForSelector:@selector( myMeth

Re: Performing the selector from a stored IMP

2011-02-11 Thread Jerry Krinock
On 2011 Feb 11, at 04:21, Joanna Carter wrote: > IMP anIMP = [anObject methodForSelector:@selector( myMethod: )]; > [myDictionary setObject:anIMP forKey:myKey]; The compiler should warn you on that second line that an IMP is not an object. This code won't work. > Or have I misunderstood wha

Performing the selector from a stored IMP

2011-02-11 Thread Joanna Carter
Hi folks I want to store a "method pointer" in a dictionary, recover it and call it from elsewhere in code. So, I have code like this to store the "method pointer": { IMP anIMP = [anObject methodForSelector:@selector( myMethod: )]; [myDictionary setObject:anIMP forKey:myKey]; } … and then