Re: Multiple instances of [NSUserDefaults standardUserDefaults]

2010-10-23 Thread Zach Drayer
Have you tried calling -synchronize before accessing user defaults to get a value (or after accessing them to set a value)? It should force a synchronization of all the defaults to disk. - Zach On Oct 23, 2010, at 5:47 AM, Chris Idou wrote: > > > I'm printing out the address of [NSUserDefaul

Re: Multiple instances of [NSUserDefaults standardUserDefaults]

2010-10-23 Thread Kyle Sluder
On Sat, Oct 23, 2010 at 2:20 PM, Chris Idou wrote: > > > Some stuff on the net seems to indicate that NSUserDefaults does support KVO. > If > it doesn't, how would NSUserDefaultsController accurately notify of all > changes > to NSUserDefaults? Or maybe one has to always access it > through NSUs

Why are spaces in the source directory's name killing device builds but not simulator builds?

2010-10-23 Thread G S
Hi all. I'm having a perplexing problem, where device builds issue a bunch of warnings about directories not being found, but it's because the spaces in the volume name are not being handled correctly. This only happens in device builds but not simulator builds. If you look at the link commands,

Re: Multiple instances of [NSUserDefaults standardUserDefaults]

2010-10-23 Thread Chris Idou
Some stuff on the net seems to indicate that NSUserDefaults does support KVO. If it doesn't, how would NSUserDefaultsController accurately notify of all changes to NSUserDefaults? Or maybe one has to always access it through NSUserDefaultsController to get consistent notifications? In which

Re: DO over unnamed sockets

2010-10-23 Thread Dave Keck
> You can verify this by breaking on connect() or using dtruss or the like.   > It's actually getting ENOENT.  It appears be using getsockname() on the send > port's socket to figure out where to connect, and that's giving a sockaddr_un > with an empty sun_path. Moments after sending my original

Re: DO over unnamed sockets

2010-10-23 Thread Ken Thomases
On Oct 23, 2010, at 6:00 AM, Dave Keck wrote: > Can DO work over unnamed sockets? It appears not. I wasn't able to find a way to make your code work, either. My past experience and the Distributed Objects Programming Guide both suggest that NSConnection expects to work more like the case with

Thread safety of CGEventSourceFlagsState()

2010-10-23 Thread Jerry Krinock
Even after reading last week's discussion I'm still not sure if it is OK to get the current modifier keys from a secondary thread. I realize that the keyboard is not a GUI, but it's UI, and I'm worried about that "accessing GUI from secondary thread" thing. Is it OK to call CGEventSourceFlagsS

Re: Multiple instances of [NSUserDefaults standardUserDefaults]

2010-10-23 Thread Dave Keck
> Well, I've got some code, which I presume used to work, which relies on > observing a value in the user defaults. The observer isn't getting triggered, > so > I am guessing it is because they are separate instances. Both should be on the > main thread. Are you observing an instance of NSUserDef

Re: Multiple instances of [NSUserDefaults standardUserDefaults]

2010-10-23 Thread Chris Idou
Well, I've got some code, which I presume used to work, which relies on observing a value in the user defaults. The observer isn't getting triggered, so I am guessing it is because they are separate instances. Both should be on the main thread. - Original Message From: Dave Keck

Re: Multiple instances of [NSUserDefaults standardUserDefaults]

2010-10-23 Thread Dave Keck
> Has anyone got any thoughts? I wouldn't be surprised if there's a separate NSUserDefaults instance for each thread. Regardless though, it's an implementation detail that shouldn't be relied on unless the docs guarantee certain behavior. Could you explain why you need to rely on NSUserDefaults r

DO over unnamed sockets

2010-10-23 Thread Dave Keck
Hey list, I'm attempting to use distributed objects over an unnamed socket pair created via socketpair(). I've tried every permutation of the following code that I can think of, but it always throws an exception when the client calls -rootProxy: http://pastie.org/pastes/1242749 Can DO work o

Multiple instances of [NSUserDefaults standardUserDefaults]

2010-10-23 Thread Chris Idou
I'm printing out the address of [NSUserDefaultsstandardUserDefaults] in several places in my app, and getting a different result! This is causing me problems. I'm using a plugin architecture, so I'm guessing this has something to do with it, but even so, I haven't seen anything like this happe