Re: Event loop expiration date insight

2012-10-31 Thread Vincent Habchi
I'm handling some mouse dragging tasks modally by implementing my own modal event loop using [NSApp nextEventMatchingMask:untilDate:inMode:dequeue:]. I'm wondering what is the usual correct thing to pass for the 'untilDate' parameter. For a long time I've been using [NSDate distantFuture],

Re: Event loop expiration date insight

2012-10-31 Thread Greg Parker
On Oct 30, 2012, at 9:58 PM, Graham Cox graham@bigpond.com wrote: I'm wondering what is the usual correct thing to pass for the 'untilDate' parameter. For a long time I've been using [NSDate distantFuture], but the documentation of this method says that by passing nil it uses [NSDate

Re: createDirectoryAtPath:withIntermediateDirectories:attributes:error: Returns NO when it exists

2012-10-31 Thread Andreas Grosam
On 30.10.2012, at 19:17, Quincey Morris wrote: On Oct 30, 2012, at 10:39 , Sean McBride s...@rogue-research.com wrote: Note that in my experience YES is returned if the directory exists. It's also worth consulting the header file comments:

Programmatically providing default value for new core data attribute?

2012-10-31 Thread Rick Mann
Hi. I've added a simple attribute to my model that should be a concatenation of a handful of other attributes, run through some code. I don't suppose there's any way to do the lightweight migration but tell it, here's a method to call to get the default value of this property? I looked at

printing Utf8

2012-10-31 Thread Gerriet M. Denkmann
I print strings like: NSString *s = @ร่วมรส; fprintf(stderr, %s\n, [ s UTF8String]); and usually it just works. But sometimes it does not and I get garbage like: ร่ว\340\270\241รส Converting these numbers to hex one gets: 0xe0 0xb8 0xa1 which is the Utf8-code for THAI CHARACTER

Re: printing Utf8

2012-10-31 Thread Ken Thomases
On Oct 31, 2012, at 9:41 AM, Gerriet M. Denkmann wrote: I print strings like: NSString *s = @ร่วมรส; fprintf(stderr, %s\n, [ s UTF8String]); and usually it just works. But sometimes it does not and I get garbage like: ร่ว\340\270\241รส Converting these numbers to hex one

Re: printing Utf8

2012-10-31 Thread lbland
hi- On Oct 31, 2012, at 10:41 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: NSString *s = @ร่วมรส; Not supported. The compiler should be issuing a warning. You need to escape the characters using a UTF encoding. thanks!- -lance ___

Re: printing Utf8

2012-10-31 Thread Ken Thomases
On Oct 31, 2012, at 10:17 AM, lbland wrote: On Oct 31, 2012, at 10:41 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: NSString *s = @ร่วมรส; Not supported. The compiler should be issuing a warning. You need to escape the characters using a UTF encoding. That's not true. The

Re: printing Utf8

2012-10-31 Thread Vincent Habchi
Le 31 oct. 2012 à 16:17, lbland lbl...@vvi.com a écrit : hi- On Oct 31, 2012, at 10:41 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: NSString *s = @ร่วมรส; Not supported. The compiler should be issuing a warning. You need to escape the characters using a UTF encoding. I

Re: printing Utf8

2012-10-31 Thread Gerriet M. Denkmann
On 31 Oct 2012, at 22:15, Ken Thomases k...@codeweavers.com wrote: On Oct 31, 2012, at 9:41 AM, Gerriet M. Denkmann wrote: I print strings like: NSString *s = @ร่วมรส; fprintf(stderr, %s\n, [ s UTF8String]); and usually it just works. But sometimes it does not and I get

Re: Programmatically providing default value for new core data attribute?

2012-10-31 Thread Dave Fernandes
[resent to list-serve] You can create a subclass of NSEntityMigrationPolicy, then specify this class in the Custom Policy for that entity in your mapping model. During migration, the createDestinationInstancesForSourceInstance method of your migration policy class will be called, and can

Re: Drawing customized window

2012-10-31 Thread Nick
Forgot to add, the slowness on 10.7/10.8 can be seen in Activity monitor during video playback (I am playing a QTMovie onto QTMovieLayer). While QuickTime player takes 30%, my app takes up to 100% of the CPU power to play the same video.. That's where I checked the app using Instruments - I am

Re: Drawing customized window

2012-10-31 Thread Jens Alfke
On Oct 31, 2012, at 8:50 AM, Nick eveningn...@gmail.com wrote: I am wondering if anyone created customized windows like this or reverse engineered this NSThemeFrame? Chrome does tricks like this; there’s some really ugly code to hack the window frame drawing to support its custom tabs. It’s

Re: printing Utf8

2012-10-31 Thread Jean-Daniel Dupas
Le 31 oct. 2012 à 16:31, Ken Thomases k...@codeweavers.com a écrit : On Oct 31, 2012, at 10:17 AM, lbland wrote: On Oct 31, 2012, at 10:41 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: NSString *s = @ร่วมรส; Not supported. The compiler should be issuing a warning. You need

Re: App rejection due to app-sandboxing invalid entitlement

2012-10-31 Thread Curt Clifton
On Oct 26, 2012, at 10:35 PM, Martin Hewitson martin.hewit...@aei.mpg.de wrote: So, the story's not over. I resubmitted and the app was reviewed quickly, but rejected again with the same rejection note. So, what now? Not sure how to figure out my error, other than to pay for DTS... Out

Re: printing Utf8

2012-10-31 Thread Gerriet M. Denkmann
On 31 Oct 2012, at 22:15, Ken Thomases k...@codeweavers.com wrote: On Oct 31, 2012, at 9:41 AM, Gerriet M. Denkmann wrote: I print strings like: NSString *s = @ร่วมรส; fprintf(stderr, %s\n, [ s UTF8String]); and usually it just works. But sometimes it does not and I get

Re: Drawing customized window

2012-10-31 Thread Corbin Dunn
On Oct 31, 2012, at 8:50 AM, Nick eveningn...@gmail.com wrote: Hello I am attempting to create an application with custom looking windows (similar to new iCalendar on mountain lion, or QuickTime player). I am targeting systems from Snow Leopard to Mountain Lion. So far I've been

Re: printing Utf8

2012-10-31 Thread Ken Thomases
On Oct 31, 2012, at 2:42 PM, Gerriet M. Denkmann wrote: When I run this in Xcode for a few times, I get sometimes good output, but sometimes not. Bad output looks like: 2012-11-01 01:56:29.971 Writing[76838:303] strlen 1027

Re: printing Utf8

2012-10-31 Thread Fritz Anderson
I ran into something similar in my own work, but my solution may not fit your needs. printf() won't work reliably for you. My conjecture is that printf buffers its work byte-by-byte, and if an encoded character falls across a buffer boundary, the two parts are output as escaped-decimal,

Re: Event loop expiration date insight

2012-10-31 Thread Graham Cox
On 31/10/2012, at 5:56 PM, Greg Parker gpar...@apple.com wrote: If the date is in the past then the method returns immediately. If there is a matching event in the queue then it will be returned. I've changed this to pass nil and my mouse dragging works as normal. This is generally

Re: Drawing customized window

2012-10-31 Thread Nick
Thanks Corbin, it works great (unfortunately I can't draw the gradient depending on the window size (so it's always white on top and black on bottom, no matter how high the window is, for example), but I guess that still gives possibilities for skinning).. I will join the Iain's question.. Is it

Re: Programmatically providing default value for new core data attribute?

2012-10-31 Thread Jerry Krinock
On 2012 Oct 31, at 02:44, Rick Mann rm...@latencyzero.com wrote: Will -isConfiguration:compatibleWithStoreMetadata: tell me a lightweight migration-capable change is incompatible? I think all it does is compare UUIDs or hashes, so the answer is no. I looked at doing a mapping model, but

Getting rid of primitive accessor warnings

2012-10-31 Thread Rick Mann
I'm not sure what's going on here. But I've got an iOS project that declares (but does not define) some primitiveFoo methods in my NSManagedObject subclass, and an OS X project that does so as well. However, the iOS project doesn't emit any warnings, while the OS X project does.

Re: App rejection due to app-sandboxing invalid entitlement

2012-10-31 Thread Martin Hewitson
I did include a description on the resubmit. Seems it didn't help. I wrote: I'm using this entitlement to allow the app to send documents by mail from within the app. On 10.8 I can use the new com.apple.security.scripting-targets but this isn't available on 10.7, so there I need to use the

Re: ARC question

2012-10-31 Thread BobCromwell
Every assignment will release the old one,so no leak. From My iPhone 在 2012-10-29,下午7:34,Mike Abdullah cocoa...@mikeabdullah.net 写道: On 29 Oct 2012, at 10:06, Vincent Habchi vi...@macports.org wrote: Hi folks, before aught else, all my thoughts to those of you in the Eastern coast that

Re: Drawing customized window

2012-10-31 Thread iain
Hi Corbin, sorry for semi-hijacking the thread On Wed, Oct 31, 2012 at 8:17 PM, Corbin Dunn corb...@apple.com wrote: I am wondering if anyone created customized windows like this or reverse engineered this NSThemeFrame? Maybe there are any articles on the internet that I have missed