Re: PList Data Typing

2014-12-15 Thread Kevin Bracey
Thanks Jens, You’re fantastic! Have a great holiday season to all, and thanks for all the help over the years! On 16/12/2014, at 11:28 am, Jens Alfke wrote: > >> On Dec 15, 2014, at 2:10 PM, Kevin Bracey wrote: >> >> How can I tell if the Value is a Boolean or Numbe

PList Data Typing

2014-12-15 Thread Kevin Bracey
Hi All, I'm needing to read in a PList, that others have designed, I have no control over the input. One of the Keys stores either a String, Number or Boolean value. Checking for the NSString is straight forward. How can I tell if the Value is a Boolean or Number in the NSDictionary? as 0 and

Revert almost working

2014-12-02 Thread Kevin Bracey
Hi all, I’m sure I’m either way wrong or almost right. I have a NSDocument subclass that autosaves, saves, reads and automatically opens its opened docs on launch. When I go into Revert then are versions waiting to revert, when I choose one it appears to Revert, but the currently opened Documen

Re: Localization not working based on region with en-US

2013-02-11 Thread Kevin Bracey
Sadly no, see: https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPInternational/Articles/LanguageDesignations.html language-dialectic_locale, but is used either as language-dialectic or language_locale. The problem seems to be that the Folders used to hold the Localized

Localization not working based on region with en-US

2013-02-03 Thread Kevin Bracey
I found that Localisation of Nibs AND Help impossible to get to work together. The Documentation is also very old and misleading. With the App Stores being multilingual, I would hope this would be quick and simple, but it is not. New Zealand/Australia is bad enough, but South Africa is nightmare

Source List type OutlineView and bindings.

2012-08-22 Thread Kevin Bracey
Hi all, I hate to ask these questions, either its so obvious or I'm doing it so wrong its laughable. I have the "Source List" control dragged into a Window. Bind to a NSTreeController. The NSTreeController is getting and vending fine as when attached to a NSBrowser the data shows as expected.

Re: Displaying an arbitrary unicode character using CGContextShowTextAtPoint or CGContextShowGlyphsAtPoint

2012-03-30 Thread Kevin Bracey
did i miss something, I thought is - (void)drawAtPoint:(NSPoint)point not NSAttributedString not NSString. Cheers kevin ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Conta

Re:Problem printing offscreen PDFViews

2011-08-14 Thread Kevin Bracey
Old follow up to help anyone else who might wish to print PDFs. Having just run into the same problem as Waldo. I found the Apple Sample Code: PDFView a good starting point. While it no longer opens in Xcode 4.2 adding PDFImageView to my project worked fine. By changing the load code to use p

NSMutableArray Adding, Sorting and Removing?

2011-08-07 Thread Kevin Bracey
Hi All, I don't want to fall prey to preemptive optimising but I was wondering? I have a NSMutableArray and I'm sticking actions in it that are then sorted by NSDate compare:, things I need done at a certain day or time neatly in order. Up to about 1000 pending actions. Currently, I check the

Correct way to use contextInfo with ARC

2011-08-03 Thread Kevin Bracey
Hi All, A case of me not grasping C or/and ARC;-) I'm trying to pass the NSMutableArray across the void to the didEndSelector so I can access it if the user clicks ok. /snippits NSMutableArray *someInfo = [NSArray arrayWithObjects:@"made" , @"it", @"across",. nil]; [holdAlert beginSheetModalF

Re: Does anyone else dislike Xcode 4?

2011-07-24 Thread Kevin Bracey
I also had concerns re the changes, no-one likes their main work apps changed, for unknown reasons. But there are reasons, and if you watch the WWDC vids on Xcode you will learn how to make the most of these changes and why Apple has made this change. Mastering Schemes in Xcode 4 Mastering Sourc

Re: Seeding random() randomly

2011-05-26 Thread Kevin Bracey
I think this was from some programming book I have, sorry I can site it: srandom(time(NULL)); cheers Kevin ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the modera

Print Sheet: not changing when printinfo changed.

2011-04-14 Thread Kevin Bracey
Hi, this is a query for the Print Sheet wizards. I have a print job, that has 2 different report views, I have a custom AccessoryView that toggles the views, all working well. One report is best viewed in Landscape while the other in Portrait. Now I can change this via setOrientation, when togg

NSClassDescriptionNeededForClassNotification

2011-03-21 Thread Kevin Bracey
Hi there, I hope that I could "register class descriptions lazily", I like doing most things lazily. But I can't find where or how to listen for the NSClassDescriptionNeededForClassNotification. I've place [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector( registerClas

Re: NSXMLParserDelegateAbortedParseError

2011-03-08 Thread Kevin Bracey
Hi Josh, So you are not getting a parsing error, you're using the wrong mechanism. By calling abort you are setting the parsers error code, that code has nothing to do with the fact you are parsing some XML with "error" in it. I think you are confusing a Parsing Error and a valid XML stream wit

NSXMLParserDelegateAbortedParseError

2011-03-08 Thread Kevin Bracey
Hi Josh, I'm not sure that is the best place to be checking for a server/network error. If there was an API error, I would have thought the server would have returned valid XML with the error details, which should parse and not cause an parser error. I'd look at downloading the file, determine

Re: Undo with NSArrayController

2011-01-26 Thread Kevin Bracey
didn't get the nod to update the TableView correctly. Spending 4 hours tracking this won't be as bad as explaining to the boss;-) Thanks Kevin On 27/01/2011, at 5:02 PM, Quincey Morris wrote: > On Jan 26, 2011, at 19:44, Kevin Bracey wrote: > >> This is not Core Data. >

Re: Undo with NSArrayController

2011-01-26 Thread Kevin Bracey
i MVC. thanks Kevin On 27/01/2011, at 3:49 PM, Quincey Morris wrote: > On Jan 26, 2011, at 17:55, Kevin Bracey wrote: > >> I'm trying to patch in Undo and Redo to a NSTableView > NSArrayController > >> -( void )insertObject:( id )obj

Undo with NSArrayController

2011-01-26 Thread Kevin Bracey
Hi All, I'm trying to patch in Undo and Redo to a NSTableView > NSArrayController > -( void )insertObject:( id )object inAllImportHeadersAtIndex:( NSInteger )index and -( void )removeObjectfromAllImportHeadersAtIndex:( NSInteger )index, using the example from Cocoa® Programming for Mac® OS X, T

Re: @property and Garbage Collection

2011-01-25 Thread Kevin Bracey
x27;t mind being assigned. Thanks Kevin On 25/01/2011, at 11:03 PM, Thomas Davie wrote: > > On 25 Jan 2011, at 09:59, Kevin Bracey wrote: > >> Hi Guys, >> >> I've been using Retain/Release up til now but I have started my first GC >> project. >> &g

@property and Garbage Collection

2011-01-25 Thread Kevin Bracey
Hi Guys, I've been using Retain/Release up til now but I have started my first GC project. In a Garbage Collected App when using the @property is it correct that I still have to specify (copy) or (retain) or have I missed something? I thought using GC didn't require retain and that everything

Re: NSDocument updateChangeCount when using Bindings

2011-01-07 Thread Kevin Bracey
n 6, 2011, at 18:01, Kevin Bracey wrote: > >> MyDocument has a >> iVar = NSMutableArray *allScenes; >> @property( retain ) NSMutableArray *allScenes; >> @synthesize allScenes; >> >> In my nib I have a ArrayController bound to allScenes and it is hooked up

NSDocument updateChangeCount when using Bindings

2011-01-06 Thread Kevin Bracey
After hours of searching I have to presume I'm doing something wrong or missing something obvious, as no one else has this simple problem:-) OS X 10.6.6 NSDocument Application. MyDocument has a iVar = NSMutableArray *allScenes; @property( retain ) NSMutableArray *allScenes; @synthesize allScene

Moving Properties to

2010-11-07 Thread Kevin Bracey
Hi all, I may have painted myself into a corner with this one. To facilitate exporting my model objects as xml, I have my object properties stored in a NSDictionary, this makes for an easy export, both as plist and xml, I just walk the dictionary adding nodes. I have to maintain a lot of setter

retaining and releasing a Window Controller.

2010-08-08 Thread Kevin Bracey
Hi guys, every time I find myself doing something convoluted I think hey I must be doing this wrong:-) I have a Report WindowController, that opens a Window from it's own nib. This is great, I can open lots of different Reports all bases on the same Controller. But I only need the Window and t

Class Message

2010-03-29 Thread Kevin Bracey
Hi all, This may be a matter of style... I have a simple class whose job it is to check if it's a first run and create all the Folders required such as App Support and Logs, check CFBundleVersion and if different from the last run update any App Support files and reset any UserDefaults. Th

FSMountServerVolumeSync Authentication problem

2009-10-27 Thread Kevin Bracey
I found using Applescript far easier for this task. In Cocoa wait for the mount [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self selector:@sel

Re: odd behavior with NSError?

2009-10-16 Thread Kevin Bracey
If we get an NSError, or in the case of NSAppleScript an NSDictionary with the error description, what is the Retain count and do we release it when we're done with it? I'd been not releasing them, I didn't allocate or copy it, but when I Build and Analyzed my code in 3.2 on Snow Leopard it

Re: NSWorkspaceDidMountNotification not firing on Snow Leopard

2009-10-08 Thread Kevin Bracey
Thank you all for your help, I really couldn't believe something like this could be broken, lol. Ok, I've found the difference: On Leopard : 9/10/09 11:45:31 AM iLike Installer[11553] NSConcreteNotification 0x19d6f0 {name = NSWorkspaceDidMountNotification; object = ; userInfo = { NSDev

NSWorkspaceDidMountNotification not firing on Snow Leopard

2009-10-08 Thread Kevin Bracey
Hi Guys and Gals, I have some Leopard code that works fine, but on Snow it doesn't, hoping someone might have an idea how for fix it ;-) I use an AppleScript to mount a afp tell application "iLike Installer" set holdMountPoint to stringForKey "MountPoint" tel

How to share Cocoa classes?

2009-07-06 Thread Kevin Bracey
Hi, Another option is to just drag and drop the .m and .h icons from the main project to new project. This gives you the option of making a new copy or using a link to the originals. I often use the link method, having a Master app that is used to develop and test the object, then when it

Re: Targetting 10.4

2008-10-15 Thread Kevin Bracey
Hi Don't forget that the 10.4 sdk, is named MacOSX10.4u Cheers Kevin ___ 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(at)lists.apple

Re: Where is close/cancel icon used in search field & Safari etc.

2008-10-09 Thread Kevin Bracey
IB under the Media Tab Cheers Kevin ___ 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(at)lists.apple.com Help/Unsubscribe/Update your

Re: Restoring a .nib's Edit menu

2008-09-29 Thread Kevin Bracey
Drag the Edit Menu from the Library into the main .nib window. Then drag it up to the MainMenu and it will insert ok. Cheers Kevin ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

How to load a window

2008-09-21 Thread Kevin Bracey
If the Window you wish to open is in the same nib, then create a IBOutlet NSWindow *otherWindow in your controller, connect in IBuilder then [otherWindow makeKeyAndOrderFront:self]; Cheers Kevin ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)