Problem with NSPersistentStore

2013-02-15 Thread Laurent Daudelin
I got a few crash reports from users that have a problem with my CoreData app. Given the following code: /* Returns the persistent store coordinator for the application. If the coordinator doesn't already exist, it is created and the application's store added to it. */ - (NSPersistentStoreCoo

Re: How to use NSManagedObjectContext, NSManagedObjectModel, NSEntityDescription, NSManagedObject

2013-02-15 Thread Keary Suska
On Feb 15, 2013, at 4:21 PM, Jens Alfke wrote: > On Feb 15, 2013, at 8:11 AM, Keary Suska wrote: > >> If what you are looking for are the benefits of Core Data but with your own >> database back-end, you pretty much will have to write your own database >> coordination methods, as well as chang

Re: Custom control with 4 vertical sliders

2013-02-15 Thread Graham Cox
I sometimes find that trying to subclass existing classes such as NSCell is more trouble that it's worth, unless you really need your custom cell to be used anywhere a cell can be used, e.g. buttons, matrices, list rows, etc. If you just want a particular custom control that doesn't need that d

Re: How to use NSManagedObjectContext, NSManagedObjectModel, NSEntityDescription, NSManagedObject

2013-02-15 Thread Jens Alfke
On Feb 15, 2013, at 8:11 AM, Keary Suska wrote: > If what you are looking for are the benefits of Core Data but with your own > database back-end, you pretty much will have to write your own database > coordination methods, as well as change tracking and undo > management0--essentially everyt

Re: OS X Collection Views videos?

2013-02-15 Thread Rick Mann
Yeah, I saw those, but figured they wouldn't have much applicable. Maybe I'll skim through them. On Feb 15, 2013, at 13:51 , Jean Suisse wrote: > Well, there are session 205 & 219 of WWDC2012, but I think both are > exclusively about IOS6. Might be worth fast forwarding through them, thought.

Re: OS X Collection Views videos?

2013-02-15 Thread Jean Suisse
Well, there are session 205 & 219 of WWDC2012, but I think both are exclusively about IOS6. Might be worth fast forwarding through them, thought. Jean On 15 févr. 2013, at 22:46, Rick Mann wrote: > Are there any WWDC videos covering Cocoa Collection Views (not iOS Collection > Views)? I just

OS X Collection Views videos?

2013-02-15 Thread Rick Mann
Are there any WWDC videos covering Cocoa Collection Views (not iOS Collection Views)? I just looked through the titles online, but it's hard to discern, and doesn't look like there are any expressly dedicated to the topic. -- Rick ___ Cocoa-dev

Re: iOS Document Interaction Technology

2013-02-15 Thread koko
This was an interesting problem, well to me anyway. I copied CFBundleDocumentTypes and UTExportedTypeDeclarations from an OSX project to an iOS project. The OSX app is recognized as the app to open files of types specified in these keys so I assumed the key values were constructed properly. We

Re: Custom control with 4 vertical sliders

2013-02-15 Thread Steve Mills
On Feb 15, 2013, at 13:35:38, Steve Mills wrote: > What's the easiest way to create a custom control that contains a matrix of 4 > custom vertical sliders, like a mini graphic EQ? The sliders will not draw > the slot, only the knob. First I started with a subclass of NSMatrix and a > subclass

Custom control with 4 vertical sliders

2013-02-15 Thread Steve Mills
What's the easiest way to create a custom control that contains a matrix of 4 custom vertical sliders, like a mini graphic EQ? The sliders will not draw the slot, only the knob. First I started with a subclass of NSMatrix and a subclass of NSCell. No matter what I've tried, the cells always end

Re: [solved] Re: NSImage leaks open file in 10.8.2?

2013-02-15 Thread Kyle Sluder
On Fri, Feb 15, 2013, at 09:30 AM, norbert wrote: > Thanks a lot for your comments. I have tried to set > setCacheMode:NSImageCacheNever, but that still left the file open. > > But I have changed my code to use this now: > > NSImage *result = [[NSImage alloc] > initByReferencingFil

[solved] Re: NSImage leaks open file in 10.8.2?

2013-02-15 Thread norbert
Thanks a lot for your comments. I have tried to set setCacheMode:NSImageCacheNever, but that still left the file open. But I have changed my code to use this now: NSImage *result = [[NSImage alloc] initByReferencingFile:[[NSBundle mainBundle] pathForResource:[theName stringByDe

Re: Binding a NSArrayController to a NSPopupButtonn & NSTextField

2013-02-15 Thread Keary Suska
On Feb 15, 2013, at 5:41 AM, Eric Gorr wrote: > I have a NSArrayController filled with an array of NSDictionaries. > > [[self controller] addObject:@{ @"name" : @"itemA", @"part" : @"partA" }]; > [[self controller] addObject:@{ @"name" : @"itemB", @"part" : @"partB" }]; > [[self controller] addOb

Re: How to use NSManagedObjectContext, NSManagedObjectModel, NSEntityDescription, NSManagedObject

2013-02-15 Thread Keary Suska
On Feb 15, 2013, at 2:06 AM, Christ Levesque wrote: > I want to use these classes in my app but I don't want to use it in Core Data. You can use all of these *except* NSManagedObjectContext for your own purposes. I know because I have a significant project where I do exactly that. NSManagedObje

Binding a NSArrayController to a NSPopupButtonn & NSTextField

2013-02-15 Thread Eric Gorr
What I want to accomplish seems like it should be fairly straightforward. I have placed a sample project at https://github.com/ericgorr/arraycontrollerbindings. I have a NSArrayController filled with an array of NSDictionaries. [[self controller] addObject:@{ @"name" : @"itemA", @"part" : @"par

Observing changes user did in Print&Scan tab in System Preferences.

2013-02-15 Thread Dmitriy Balakirev
Hi all, How can i observe changes( like renaming printer, set another default printer, delete printer, add printer) user did in Print&Scan tab in System Preferences? Thanks. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post ad

Re: How to use NSManagedObjectContext, NSManagedObjectModel, NSEntityDescription, NSManagedObject

2013-02-15 Thread Dave Keck
> NSManagedObjectContext, NSManagedObjectModel, NSEntityDescription, > NSManagedObject > > I want to use these classes in my app but I don't want to use it in Core Data. These classes *are* Core Data; I'm afraid you're not making much sense. ___ Cocoa-

Re: Dynamic Object, How to implement B-Tree in Objective-c, Archiving on each B-Tree node

2013-02-15 Thread Graham Cox
On 15/02/2013, at 8:01 PM, Christ Levesque wrote: > How to create dynamic object based on user request and then how to insert it > in a B-Tree and then how to archive/unarchive this tree. How indeed? How about studying CS for a few years, getting a degree, working in industry for a further

Re: Recursive file copy with good progress data?

2013-02-15 Thread Mike Abdullah
On 15 Feb 2013, at 05:22, Graham Cox wrote: > > On 15/02/2013, at 1:55 PM, Jim Zajkowski wrote: > >> s there anything that provides the level of progress that FSCopyObjectAsync >> does but gives the callback more control like copyfile() does? > > > You could look into NSFileManager's -copy

How to use NSManagedObjectContext, NSManagedObjectModel, NSEntityDescription, NSManagedObject

2013-02-15 Thread Christ Levesque
Hello I want to use these classes in my app but I don't want to use it in Core Data. ___ 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(

Dynamic Object, How to implement B-Tree in Objective-c, Archiving on each B-Tree node

2013-02-15 Thread Christ Levesque
Hello How to create dynamic object based on user request and then how to insert it in a B-Tree and then how to archive/unarchive this tree. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Re: lengthOfBytesUsingEncoding not correct

2013-02-15 Thread Markus Spoettl
On 2/15/13 9:13 AM, Gerriet M. Denkmann wrote: This program: NSString *s = @"หัวหิน"; NSUInteger l3 = [ s lengthOfBytesUsingEncoding: NSUTF16StringEncoding ]; NSLog(@"%s NSUTF16StringEncoding length %lu", __FUNCTION__, l3); NSData *d9 = [ s dataUsingE

lengthOfBytesUsingEncoding not correct

2013-02-15 Thread Gerriet M. Denkmann
This program: NSString *s = @"หัวหิน"; NSUInteger l3 = [ s lengthOfBytesUsingEncoding: NSUTF16StringEncoding ]; NSLog(@"%s NSUTF16StringEncoding length %lu", __FUNCTION__, l3); NSData *d9 = [ s dataUsingEncoding: NSUTF16StringEncoding ]; N