Re: NSUserDefaults not sticking

2014-09-10 Thread Rick C.
This is all very interesting and shows that there are issues out there, but back to my original issue if I’m writing and reading via NSUserDefaults and its not returning the expected values what else could be the trouble? rc On Sep 11, 2014, at 11:59 AM, Charles Srstka wrote: > On Sep 10, 2

Re: NSUserDefaults not sticking

2014-09-10 Thread Charles Srstka
On Sep 10, 2014, at 10:50 PM, Graham Cox wrote: > On 11 Sep 2014, at 1:19 pm, Charles Srstka wrote: > >> NSDictionary *domain = [def persistentDomainForName:@"com.apple.TextEdit"]; > > > The documentation states that this is not supported under sandboxing. > > When you say "does not ... work

Re: NSUserDefaults not sticking

2014-09-10 Thread Charles Srstka
On Sep 10, 2014, at 10:34 PM, Marco S Hyman wrote: > On Sep 10, 2014, at 8:19 PM, Charles Srstka wrote: > >> >>> Where did you get the idea that NSUserDefaults doesn't work for sandboxed >>> apps? It certainly does. >> >> #import >> >> int main(int argc, const char * argv[]) { >> @autore

Re: NSUserDefaults not sticking

2014-09-10 Thread Graham Cox
On 11 Sep 2014, at 1:19 pm, Charles Srstka wrote: > NSDictionary *domain = [def persistentDomainForName:@"com.apple.TextEdit"]; The documentation states that this is not supported under sandboxing. When you say "does not ... work", you really need to make clear what you mean. --Graham ___

Re: NSUserDefaults not sticking

2014-09-10 Thread Marco S Hyman
On Sep 10, 2014, at 8:19 PM, Charles Srstka wrote: > >> Where did you get the idea that NSUserDefaults doesn't work for sandboxed >> apps? It certainly does. > > #import > > int main(int argc, const char * argv[]) { >@autoreleasepool { >NSUserDefaults *def = [NSUserDefaults stand

Re: NSOutlineView

2014-09-10 Thread Shane Stanley
On 10 Sep 2014, at 12:49 pm, Shane Stanley wrote: > FWIW, and this is unrelated to your problem, I'm not sure you should delete > the empty custom views, but rather drag the outline view and text view/scroll > view into them. > > At least, I did what you outlined on a project some time ago. Wh

Re: NSUserDefaults not sticking

2014-09-10 Thread Charles Srstka
On Sep 10, 2014, at 9:39 PM, Graham Cox wrote: > On 11 Sep 2014, at 12:14 pm, Charles Srstka wrote: > >> If that's true, then why does the 'defaults' program work for sandboxed >> apps, while NSUserDefaults does not? > > > Where did you get the idea that NSUserDefaults doesn't work for sandb

Re: NSUserDefaults not sticking

2014-09-10 Thread Graham Cox
On 11 Sep 2014, at 12:14 pm, Charles Srstka wrote: > If that's true, then why does the 'defaults' program work for sandboxed apps, > while NSUserDefaults does not? Where did you get the idea that NSUserDefaults doesn't work for sandboxed apps? It certainly does. --Graham

Re: NSUserDefaults not sticking

2014-09-10 Thread Kyle Sluder
On Sep 10, 2014, at 7:04 PM, Scott Ribe wrote: > > The real point: plenty of sites on the web state that the .plist no longer > represents the current state, but that the defaults command will read the > current state so you can use it for debugging. They are wrong. Apparently > there's someth

Re: NSUserDefaults not sticking

2014-09-10 Thread Charles Srstka
On Sep 10, 2014, at 7:41 PM, Kyle Sluder wrote: > On Wed, Sep 10, 2014, at 07:32 PM, Rick C. wrote: >> And about not relying on the .plist if we don’t rely upon it how do we >> write our prefs? I understand I should not manipulate it directly, but I >> am calling everything via NSUserDefaults… >

Re: NSUserDefaults not sticking

2014-09-10 Thread Scott Ribe
On Sep 10, 2014, at 6:42 PM, Graham Cox wrote: > Then you should be fine. The point is that the .plist does not necessarily > represent the current state of the defaults for your app. Trashing it for > example no longer resets the defaults like it used to, you have to go through > the defaults

Re: NSUserDefaults not sticking

2014-09-10 Thread Graham Cox
On 11 Sep 2014, at 10:32 am, Rick C. wrote: > And about not relying on the .plist if we don’t rely upon it how do we write > our prefs? I understand I should not manipulate it directly, but I am > calling everything via NSUserDefaults… Then you should be fine. The point is that the .plist d

Re: NSUserDefaults not sticking

2014-09-10 Thread Kyle Sluder
On Wed, Sep 10, 2014, at 07:32 PM, Rick C. wrote: > And about not relying on the .plist if we don’t rely upon it how do we > write our prefs? I understand I should not manipulate it directly, but I > am calling everything via NSUserDefaults… Continue using NSUserDefaults for all interaction with

Re: NSUserDefaults not sticking

2014-09-10 Thread Rick C.
Thanks to everyone for the help. I’m pretty sure about this Graham but I will take one last look. Problem is I’m never able to reproduce this issue and as I mentioned this is happening to a very small percentage of users which would seem to mean it’s not my code (???). It’s just trying to fig

FYI, SQLite-based geo-queries are broken in Yosemite DP7

2014-09-10 Thread Jens Alfke
(I know this technically isn't about Cocoa APIs, but cocoa-dev still seems like the most appropriate list. I suspect a lot of app developers don't read darwin-userlevel.) Those of you with Mac apps that do geo-querying using SQLite may be interested to know that your queries probably broke in Y

Re: How to copy Color Panel behaviour?

2014-09-10 Thread Luc Van Bogaert
On 10 Sep 2014, at 23:32, Ken Thomases wrote: > On Sep 10, 2014, at 4:07 PM, Luc Van Bogaert wrote: > >> No succes so far with this. >> >> I subclassed NSPanel and overridden: >> >> - (BOOL) becomesKeyOnlyIfNeeded >> { >> return YES; >> } >> >> - (BOOL) canBecomeKeyWindow >> { >> return

Re: How to copy Color Panel behaviour?

2014-09-10 Thread Ken Thomases
On Sep 10, 2014, at 4:07 PM, Luc Van Bogaert wrote: > No succes so far with this. > > I subclassed NSPanel and overridden: > > - (BOOL) becomesKeyOnlyIfNeeded > { >return YES; > } > > - (BOOL) canBecomeKeyWindow > { >return YES; > } > > I also subclassed the collection view in the pan

Re: How to copy Color Panel behaviour?

2014-09-10 Thread Luc Van Bogaert
On 10 Sep 2014, at 01:56, Kyle Sluder wrote: > On Tue, Sep 9, 2014, at 06:42 PM, Graham Cox wrote: >> >> On 10 Sep 2014, at 7:13 am, Luc Van Bogaert >> wrote: >> >>> This opens the panel without making it key, which is OK, but it still makes >>> the panel key when I click any of the responder

Re: NSUserDefaults not sticking

2014-09-10 Thread Kyle Sluder
On Wed, Sep 10, 2014, at 11:15 AM, Todd Heberlein wrote: > > in the past few years when it's happened it's been an early symptom of > > filesystem corruption. Sometimes there have been a bunch of leftover > > temporary lock(?) files in the Preferences directory. > > > > If you're getting reports

Re: NSUserDefaults not sticking

2014-09-10 Thread Todd Heberlein
> in the past few years when it's happened it's been an early symptom of > filesystem corruption. Sometimes there have been a bunch of leftover > temporary lock(?) files in the Preferences directory. > > If you're getting reports of this from users of your app, it might be worth > asking them t

Re: How to set UILabel height to even multiple of line height with auto-layout?

2014-09-10 Thread Steve Christensen
That's not the issue I'm having. Let's say, for example, that label3 contains "abcdefghijklmnopqrstuvwxyz"; the line height for the font 10; and when the label is laid out the label height is 25. This results in a label that looks like this: +——+ |abcdefghij| |klmnopqrst| |(blank) | +

Re: NSUserDefaults not sticking

2014-09-10 Thread Jens Alfke
I've run into issues of app preferences/defaults not persisting (across lots of apps, not necessarily just my own), and in the past few years when it's happened it's been an early symptom of filesystem corruption. Sometimes there have been a bunch of leftover temporary lock(?) files in the Prefe