What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)

2013-02-02 Thread 尹佳冀
Hi All Does anyone can know what the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread, If I do some work use operation on [NSOperationQueue mainQueue], the UI will not hang up, but if i use performSelectorOnMainThread the UI will hang up - (void) doTheThing { /

Re: NSScrollView Problems

2013-02-02 Thread Kyle Sluder
Unbalanced +[NSGraphicsContext saveGraphicsState] in your custom view's -drawRect? (Or in one of its subviews'?) --Kyle Sluder On Feb 2, 2013, at 9:19 PM, Patrick Cusack wrote: > You can see an example of the problem here: > > http://i45.tinypic.com/fu8bpz.png > > On Feb 2, 2013, at 8:06 PM,

Re: NSScrollView Problems

2013-02-02 Thread Graham Cox
On 03/02/2013, at 3:56 PM, Patrick Cusack wrote: > I call the following in my windowControllerDidLoadNib: > > [[scrollView contentView] setCopiesOnScroll:NO]; Why? Copy On Scroll is usually a good thing. If it's set to NO you have to redraw the entire content every time, which is rarel

Re: NSScrollView Problems

2013-02-02 Thread Patrick Cusack
You can see an example of the problem here: http://i45.tinypic.com/fu8bpz.png On Feb 2, 2013, at 8:06 PM, Graham Cox wrote: > > On 03/02/2013, at 1:59 PM, Patrick Cusack wrote: > >> Sorry, I have asked this before, but I am genuinely perplexed and need help. >> I have an NSScrollView enclosi

MIDIClientCreate fail

2013-02-02 Thread Ben
(Sorry for the repost, I forgot to change the title) Hi, I'm mighty confused by the following code. When I run this in one project it works fine, when I run it in another one it crashes. Both projects appear identical in terms of frameworks CoreAudio, CoreFoundation, CoreMIDI, AudioToolbox, Both

Re: Map and Contacts Icons on iOS?

2013-02-02 Thread Ben
Hi, I'm mighty confused by the following code. When I run this in one project it works fine, when I run it in another one it crashes. Both projects appear identical in terms of frameworks CoreAudio, CoreFoundation, CoreMIDI, AudioToolbox, Both target iOS 6 iPad Simulator. Though clearly something

Re: NSScrollView Problems

2013-02-02 Thread Patrick Cusack
> In IB, you can either add a scroll view than add a custom view to it, or add > a custom view and then use 'Embed in Scrollview' to wrap it in the > scrollview. Both work fine for me. I have embedded a custom view inside an NSScrollView. I have set the NSScrollview to be NSViewWidthResizable,

Re: KVC and Core Foundation types

2013-02-02 Thread Graham Cox
On 02/02/2013, at 4:17 AM, Quincey Morris wrote: > You might be interested in a different subset of property types, but this > shows at least part of the way to get there. Thanks Quincey, that looks very useful. --Graham ___ Cocoa-dev mailing l

Re: NSScrollView Problems

2013-02-02 Thread Graham Cox
On 03/02/2013, at 1:59 PM, Patrick Cusack wrote: > Sorry, I have asked this before, but I am genuinely perplexed and need help. > I have an NSScrollView enclosing a custom view. When, I launch my > application, I see the scroll bars of my NSScrollView being echoed or > duplicated in the middl

Re: Localization not working based on region with en-US, en-UK and en lproj

2013-02-02 Thread Arun
My project has 1. en_GB.lproj 2. en_US.lproj 3. en.lproj Directories. Each time even if I change region setting, always strings from en.lproj directory is displayed. On Feb 3, 2013 2:03 AM, "Keith Duncan" wrote: > >> 1. en-US > >> 2. en-UK > >> 3. en > > There is no en-UK locale ID, nor an en_UK,

NSScrollView Problems

2013-02-02 Thread Patrick Cusack
Sorry, I have asked this before, but I am genuinely perplexed and need help. I have an NSScrollView enclosing a custom view. When, I launch my application, I see the scroll bars of my NSScrollView being echoed or duplicated in the middle of my custom view. It is so annoying. I have tried everyth

Re: Binding problem with core data

2013-02-02 Thread Velocityboy
Finally got a chance to do some more debugging on this. I looked at the referenced object and figured out why the fault, at least. I had tried to bind the subcategory column's Content to category.subcategories, which resolved to a relationship on an NSManagedObject. Under the covers, evidently

Re: Core Data & NSPersistentDocument & Concurrency

2013-02-02 Thread Eric Gorr
On Feb 1, 2013, at 6:59 PM, Mike Abdullah wrote: > On 1 Feb 2013, at 20:13, mail...@ericgorr.net wrote: > >> I've got a NSPersistentDocument. I have read the Concurrency with Core Data >> in the Core Data Programming Guide and am following the typically >> recommended approach which is to cre

Re: Core Data & NSPersistentDocument & Concurrency

2013-02-02 Thread Eric Gorr
On Feb 1, 2013, at 7:00 PM, Mike Abdullah wrote: > > On 1 Feb 2013, at 22:11, Felix Franz wrote: > >> >> On 01.02.2013, at 21:13, mail...@ericgorr.net wrote: >> >>> >>> The problem then is that my NSPersistentDocument generates an error which >>> says: >>> >>> "The document "xxx" could

Re: Annoying dialog

2013-02-02 Thread Graham Cox
On 03/02/2013, at 7:03 AM, Jan E. Schotsman wrote: > start an NSOpenPanel with beginWithCompletionHandler, then I try to debug > the handler. > Unfortunately the dialog stays on top of the XCode project window. It isn't a > big problem, but would like to get rid of it. > I've tried to make th

Re: Localization not working based on region with en-US, en-UK and en lproj

2013-02-02 Thread Keith Duncan
>> 1. en-US >> 2. en-UK >> 3. en There is no en-UK locale ID, nor an en_UK, the identifier for the United Kingdom is GB. en-GB refers to British English as used anywhere in the world en_GB refers to Generic English as used in the United Kingdom > Docs say to use an underscore, not a hyphen. Are

Re: Canadian French localization

2013-02-02 Thread Keith Duncan
On 2 Feb 2013, at 15:26, Arun wrote: > Even that does not work either. Define doesn’t work, what are you doing and what are your expected results and actual results? Keith ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post a

Re: goto and ARC

2013-02-02 Thread Aaron Montgomery
I use goto in places with ARC without too much trouble. When I get this warning, it is because ARC cannot figure out the lifetime of an object created after a possible branch and before the the . Sometimes you can get rid of the error by simply making the lifetime clear. Here's a silly example t

Annoying dialog

2013-02-02 Thread Jan E. Schotsman
Hello, I start an NSOpenPanel with beginWithCompletionHandler, then I try to debug the handler. Unfortunately the dialog stays on top of the XCode project window. It isn't a big problem, but would like to get rid of it. I've tried to make the dialog invisible starting the handler with

goto and ARC

2013-02-02 Thread Jan E. Schotsman
Hello, Today I got an error message about goto and ARC, something about "leaving a protected area". Does this mean goto is nearly unusable under ARC? Jan E. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: converting coredata files

2013-02-02 Thread Dave Fernandes
On 2013-02-02, at 2:09 PM, Amy Heavey wrote: > Hi, > > I've got an app that I write for myself (I am the only user). I made a > mistake when creating the datamodel in xcode 3 (targeting 10.5), I used > "description" as an attribute name. I have now upgraded and the current > xcodes do not li

converting coredata files

2013-02-02 Thread Amy Heavey
Hi, I've got an app that I write for myself (I am the only user). I made a mistake when creating the datamodel in xcode 3 (targeting 10.5), I used "description" as an attribute name. I have now upgraded and the current xcodes do not like the project file at all. I've got quite a lot of data i

Re: Localization not working based on region with en-US, en-UK and en lproj

2013-02-02 Thread Arun
Yes. I used underscores. The project directories are also correctly named On Feb 2, 2013 10:44 PM, "Kyle Sluder" wrote: > On Feb 2, 2013, at 7:25 AM, Arun wrote: > > > Hi All > > > > I have a sample cocoa application which i am trying to localize in 3 > > flavors. > > > > 1. en-US > > 2. en-UK >

Re: Localization not working based on region with en-US, en-UK and en lproj

2013-02-02 Thread Kyle Sluder
On Feb 2, 2013, at 7:25 AM, Arun wrote: > Hi All > > I have a sample cocoa application which i am trying to localize in 3 > flavors. > > 1. en-US > 2. en-UK > 3. en Docs say to use an underscore, not a hyphen. Are you sure your .lproj directories are correctly-named? --Kyle Sluder __

Re: Canadian French localization

2013-02-02 Thread Arun
Even that does not work either. On Sat, Feb 2, 2013 at 7:46 PM, Keith Duncan wrote: > > On 2 Feb 2013, at 10:39, Arun wrote: > > > What is the folder name for making the app on Mac to support Canadian > > French localization? fr_CA is not working > > Try using fr-CA, fr_CA is Generic French as

Localization not working based on region with en-US, en-UK and en lproj

2013-02-02 Thread Arun
Hi All I have a sample cocoa application which i am trying to localize in 3 flavors. 1. en-US 2. en-UK 3. en The application just tries to set the title of the Window. My language setting is "English" and region is "United kingdom". Irrespective of region setting, always strings from "en.lproj"

Re: Canadian French localization

2013-02-02 Thread Keith Duncan
On 2 Feb 2013, at 10:39, Arun wrote: > What is the folder name for making the app on Mac to support Canadian > French localization? fr_CA is not working Try using fr-CA, fr_CA is Generic French as used in Canada, fr-CA is French Canadian. ___ Cocoa-

Re: Core Data & NSPersistentDocument & Concurrency

2013-02-02 Thread Felix Franz
On 02.02.2013, at 00:59, Mike Abdullah wrote: > > One downside of that is whenever a child needs to fetch data, it must do so > via the main context, blocking the main thread while doing so. Depending on > your model, that may prove unacceptable. If so, your better bet is to have a > single "

Canadian French localization

2013-02-02 Thread Arun
What is the folder name for making the app on Mac to support Canadian French localization? fr_CA is not working ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moder