Re: Problem with fontDescriptorWithFontAttributes:

2009-09-19 Thread John C. Randolph
Looks like NSFontColorAttribute is deprecated after 10.4. Try NSForegroundColorAttributeName instead. -jcr ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

nested NSDictionary's and objectForKey

2009-09-19 Thread Russell Gray
I am wanting to create an NSArray from strings stored (at various levels) in a plist of nested NSDictionary's. I am trying the following code, but it only reads the key from the root dictionary: (FolderPath, and PlistFullName, have been previously defined) Code: NSString *plistFolder = [F

Re: nested NSDictionary's and objectForKey

2009-09-19 Thread Quincey Morris
On Sep 19, 2009, at 00:34, Russell Gray wrote: I am wanting to create an NSArray from strings stored (at various levels) in a plist of nested NSDictionary's. I am trying the following code, but it only reads the key from the root dictionary: (FolderPath, and PlistFullName, have been previ

Re: nested NSDictionary's and objectForKey

2009-09-19 Thread Russell Gray
That is what I need to do, I should clarify a little. I have one plist. Inside that plist, is an NSDictionary with multiple keys, one of the keys is an NSArray with multiple keys. (some NSDictionaries, and NSStrings. One of the NSDictionaries contains an NSArray with multiple keys. I

Re: nested NSDictionary's and objectForKey

2009-09-19 Thread Quincey Morris
On Sep 19, 2009, at 01:46, Russell Gray wrote: That is what I need to do, I should clarify a little. I have one plist. Inside that plist, is an NSDictionary with multiple keys, one of the keys is an NSArray with multiple keys. (some NSDictionaries, and NSStrings. One of the NSDictionaries c

Re: Static Analyzer and Core Foundation

2009-09-19 Thread Jean-Daniel Dupas
Le 19 sept. 2009 à 02:25, Steve Cronin a écrit : Luke; I've adapted the code to accomodate your's and Chris' answer to question 2. Here's the entire method, which now shows not static analyzer issues but I still would like to understand why not. + (NSDictionary *)metadataForFilePath:(NS

Re: Reliable way to find out if CoreData finished loading

2009-09-19 Thread Mantas Masalskis
Hi, I have 3 objects in Interface Builder: NSArrayController, NSManagedObjectContext and object that is NSApp's delegate. NSManagedObjectContext is using XML store as backend NSArrayController is binded to NSManagedObjectContext When application starts, on applicationFinishedLauncing NSAr

Re: Reliable way to find out if CoreData finished loading

2009-09-19 Thread Mantas Masalskis
Hi, I have 3 objects in Interface Builder: NSArrayController, NSManagedObjectContext and object that is NSApp's delegate. NSManagedObjectContext is using XML store as backend NSArrayController is binded to NSManagedObjectContext When application starts, on applicationFinishedLauncing NSAr

Re: NSNotificationQueue : NSPostingStyle : Definitions for Dummies

2009-09-19 Thread Ken Thomases
On Sep 16, 2009, at 8:35 AM, Jerry Krinock wrote: From NSNotificationQueue Documentation: NSPostASAP [...] NSPostWhenIdle [...] NSPostNow [...] Since a run loop is a closed loop, I always get confused about what is the "end", and when it is idle. I guess the "notification callout" is the

Re: Grand Central Dispatch vs CFRunLoop

2009-09-19 Thread Ken Thomases
On Sep 16, 2009, at 1:47 PM, Chris Kane wrote: On Sep 13, 2009, at 9:18 PM, Ken Thomases wrote: With respect to NSTask, there's no reason to believe that it will work if you just run the main dispatch queue rather than running the NSRunLoop. I highly doubt it would. I think it will work

Re: 2 simple questions

2009-09-19 Thread Ken Thomases
On Sep 18, 2009, at 11:05 AM, Uli Kusterer wrote: How do I get it to list it under "Places" (on the left of the Finder window) programmatically? That last one doesn't really have an official solution. The Places in the Finder sidebar correspond to kLSSharedFileListFavoriteItems in the LSS

Re: Syntax Coloring?

2009-09-19 Thread Uli Kusterer
I would hope that there's come Cocoa class for parsing source text into tokens etc, but don't know of anything. For what it's worth, this may help: http://zathras.de/sourcecode.htm#UKSyntaxColoredTextDocument It shows you how to re-examine only the parts that actually changed, and not the e

Re: Movable Document Modal Dialogs

2009-09-19 Thread Uli Kusterer
What is the suggested user interface when creating modal dialogs for documents that have be movable? For our application (think of it as a drawing program), the user sometimes NEEDS to be able to view the document under the modal dialog. We can not use sheets, because they cover up the doc

Re: Using libcrypto & the 10.6 SDK with a minimum OS requirement of 10.5

2009-09-19 Thread jonat...@mugginsoft.com
On 19 Sep 2009, at 10:58, Jean-Daniel Dupas wrote: You should copy the libcrypto from the 10.5 SDK in your project and link your executable on this file. Note that you don't have to distribute this file, just putting it somewhere the linker can find it, so your executable will use the sys

Re: CoreData / SQL hang on save

2009-09-19 Thread Greg Hoover
Hi Anthony, I actually debugged this issue with an Apple engineer and it turns out there's a bug connected to float and double types when you write back identical or nearly identical values. I solved it by extending NSManagedObjectContext and calling this bit of code instead of the regul

Loading background wallpaper

2009-09-19 Thread PCWiz
Hi, I've created a minimal boot USB stick sort of thing for emergencies. Basically what I did was take my Snow Leopard DVD, strip packages and unwanted things out, then make a LaunchDaemon that executes a script to launch whatever app I want. Right now the background in this minimal inte

What is the best way to call parent view controller methods from within child view controller?

2009-09-19 Thread Alex Reynolds
I have a view hierarchy managed with UINavigationController, of the form A -> B, where A and B are UIViewController subclasses. When I am in the B view, I have a backBarButtonItem in the navigation bar that will pop the application back to the A view, when selected. The title of the backBar

Push-on push-off buttons doesn't show state

2009-09-19 Thread Gabriel Zachmann
I made a button (in my case it's the bevel button) with mode set to "push on push off". The funny thing now is that the buttons does not show it's state. However, the state I get from [sender state] is alright: first time I push the button it's true, second time it's false, etc. Even more f

kAELogOut and no dialog

2009-09-19 Thread Heizer, Charles
Hello, Does anyone know if there is a way to send a kAELogOut event and not display the logout dialog message? Thanks, Charles ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

Re: How to set the media box for a CGPDFPageRef?

2009-09-19 Thread DairyKnight
OK. I'm using PDFKit now. Thanks for your advice. On Thu, Sep 10, 2009 at 4:04 AM, David Duncan wrote: > On Sep 8, 2009, at 8:07 PM, DairyKnight wrote: > > I'm trying to convert my program with PDFKit to CGPDF to get better >> performance. I'm trying to crop a page, with PDFPage I can simply do

Re: How to determine if a PDFPage is image based? (A scanned page)

2009-09-19 Thread DairyKnight
That's a very smart idea. Thanks. On Tue, Sep 15, 2009 at 2:45 AM, John Calhoun wrote: > On Sep 13, 2009, at 5:01 AM, DairyKnight wrote: > >> Is there a way to determine if a PDFPage contains only a picture? >> > > You could see if NULL is returned for -[PDFPage string]. That sort of > indirect

Any way to control the image format in CGPDFContext?

2009-09-19 Thread DairyKnight
Hi all, I'm trying to generate PDF files from images, but by creating a CGPDFContext and draws on it, the PDFs generated are all quite big. Is there a way to control it, say, to generate JPG or PNG streams in the PDF page? Regards, Dairyknight ___ Co

Re: Running run loops in 10.6 (was: Need -[NSTask waitUntilExitOrTimeout:])

2009-09-19 Thread Jerry Krinock
Trying to find a way to "tickle" a run loop into returning in Mac OS 10.6, I wrote another little tool which, instead of spawning a short- duration NSTask, sends a message to a mach port which has been added to the current run loop. To my surprise, result is the same. Running in Mac OS 10.