Re: operatingSystemVersionString replacement

2013-10-24 Thread Greg Parker
On Oct 24, 2013, at 10:36 PM, Maxthon Chan wrote: > Well I prefer uname() as it is 1) POSIX standard, cross-platform method If you're already working around an OS bug then it should be acceptable to use OS-specific means to do so. > 2) more fine grained as it tells minor versions apart. (e.g.

Re: operatingSystemVersionString replacement

2013-10-24 Thread Kyle Sluder
> On Oct 24, 2013, at 10:36 PM, Maxthon Chan wrote: > > Well I prefer uname() as it is 1) POSIX standard, cross-platform method and > 2) more fine grained as it tells minor versions apart. (e.g. I can tell > Mavericks DP4 apart from Mavericks DP7 from Mavericks GM from App Store > release of

Re: operatingSystemVersionString replacement

2013-10-24 Thread Maxthon Chan
Well I prefer uname() as it is 1) POSIX standard, cross-platform method and 2) more fine grained as it tells minor versions apart. (e.g. I can tell Mavericks DP4 apart from Mavericks DP7 from Mavericks GM from App Store release of Mavericks from Mavericks 10.9.1) On Oct 25, 2013, at 13:29, Greg

Re: operatingSystemVersionString replacement

2013-10-24 Thread Greg Parker
On Oct 24, 2013, at 9:46 PM, Gerriet M. Denkmann wrote: > On 25 Oct 2013, at 11:24, Greg Parker wrote: >> On Oct 24, 2013, at 8:49 PM, Gerriet M. Denkmann >> wrote: >>> The documentation tells me that NSProcessInfo operatingSystemVersionString >>> "is human readable, localized, and is appropri

Re: operatingSystemVersionString replacement

2013-10-24 Thread Gerriet M. Denkmann
On 25 Oct 2013, at 11:24, Greg Parker wrote: > On Oct 24, 2013, at 8:49 PM, Gerriet M. Denkmann wrote: >> The documentation tells me that NSProcessInfo operatingSystemVersionString >> "is human readable, localized, and is appropriate for displaying to the >> user. This string is not appropria

Re: operatingSystemVersionString replacement

2013-10-24 Thread Maxthon Chan
Darwin is the name of OS X kernel so that is plain okay. The release 13.0.0 means NeXTSTEP 13.0.0 (Do you remember that what was NeXTSTEP later became OS X?) which means OS X 10.9.0. The equation is that NeXTSTEP a.b.c = OS X 10.(a-4).b (OS X 10.0 = NeXTSTEP 4, the last version of NeXTSTEP that

Re: operatingSystemVersionString replacement

2013-10-24 Thread Greg Parker
On Oct 24, 2013, at 8:49 PM, Gerriet M. Denkmann wrote: > The documentation tells me that NSProcessInfo operatingSystemVersionString > "is human readable, localized, and is appropriate for displaying to the user. > This string is not appropriate for parsing." > > Ok. So what do I use for parsin

Re: operatingSystemVersionString replacement

2013-10-24 Thread Gerriet M. Denkmann
On 25 Oct 2013, at 10:53, Maxthon Chan wrote: > You can use uname(3) (on sone other system it is listed as uname(2)) - that > is the most classic UNIX way of telling a system from another. This returns: sysname = "Darwin" machine = "x86_64" release = "13.0.0" version = "Darwin Kernel Version 1

Re: operatingSystemVersionString replacement

2013-10-24 Thread Maxthon Chan
You can use uname(3) (on sone other system it is listed as uname(2)) - that is the most classic UNIX way of telling a system from another. On Oct 25, 2013, at 11:49, Gerriet M. Denkmann wrote: > The documentation tells me that NSProcessInfo operatingSystemVersionString > "is human readable, lo

operatingSystemVersionString replacement

2013-10-24 Thread Gerriet M. Denkmann
The documentation tells me that NSProcessInfo operatingSystemVersionString "is human readable, localized, and is appropriate for displaying to the user. This string is not appropriate for parsing." Ok. So what do I use for parsing? like: if ( current_os_x_version < 10.9 ) then do something...

Re: NSTextField, maximum string length, bindings and NSFormatter

2013-10-24 Thread Keary Suska
On Oct 24, 2013, at 9:01 AM, jonat...@mugginsoft.com wrote: > Have I missed something or is access to a decent NSFormatter subclass to > handle NSTextField string length limiting troublesome? > > There is some form on this: > http://stackoverflow.com/questions/827014/how-to-limit-nstextfield-tex

Spotlight importer don't work anymore under Mavericks (sandbox error)

2013-10-24 Thread Giacomo Tufano
Hi, I have a spotlight importer for a sandboxed coredata application, derived directly from the Xcode 4.x template and working embedded in the app. The importer works under OS X 10.7 and 10.8 but fails in allocating the NSManagedModel from the storeURL located in the sandbox at containerdir/Data

Re: Not documented: NSArray responds to -allObjects

2013-10-24 Thread Charles Srstka
On Oct 24, 2013, at 9:19 AM, Jerry Krinock wrote: > Starting somewhere after OS X 10.6, NSArray instances respond to the NSSet > method -allObjects. I can’t find any documentation of this. Also, it is not > declared in the header NSArray.h > > Although it does what you’d expect, returning a

Re: Field editors behavior.

2013-10-24 Thread Keary Suska
On Oct 24, 2013, at 2:17 PM, Dmitriy Balakirev wrote: > Can someone explain what the reason behind this NSTextView (i. e. every field > editor) behavior: > If we type something in text field('test', for example) and then select all, > copy, and finally past several times, we get 'testtesttest'.

Re: Field editors behavior.

2013-10-24 Thread Dmitriy Balakirev
Figured out this is smart copy/paste working. Not really smart for me… 25 окт. 2013 г., в 0:17, Dmitriy Balakirev написал(а): > Can someone explain what the reason behind this NSTextView (i. e. every field > editor) behavior: > If we type something in text field('test', for example) and then s

Field editors behavior.

2013-10-24 Thread Dmitriy Balakirev
Can someone explain what the reason behind this NSTextView (i. e. every field editor) behavior: If we type something in text field('test', for example) and then select all, copy, and finally past several times, we get 'testtesttest'. But if we instead do double click on text (selecting word 'test

Re: Not documented: NSArray responds to -allObjects

2013-10-24 Thread Jens Alfke
On Oct 24, 2013, at 10:35 AM, Sean McBride wrote: > You could also set OBJC_PRINT_REPLACED_METHODS=YES in the environment. > That's how I originally discovered my firstObject NSArray category method was > in conflict. This is why I always put a namespace prefix on any category methods I add

Re: Not documented: NSArray responds to -allObjects

2013-10-24 Thread Sean McBride
On Thu, 24 Oct 2013 07:19:51 -0700, Jerry Krinock said: >Just to make sure that I hadn’t implemented -allObjects in a forgotten >category, I ran the following test in a new little Command-Line Tool >project and target… You could also set OBJC_PRINT_REPLACED_METHODS=YES in the environment. That's

Re: Not documented: NSArray responds to -allObjects

2013-10-24 Thread Andy Lee
On Oct 24, 2013, at 10:19 AM, Jerry Krinock wrote: > Starting somewhere after OS X 10.6, NSArray instances respond to the NSSet > method -allObjects. I can’t find any documentation of this. Also, it is not > declared in the header NSArray.h I see it's also documented for NSEnumerator, NSHashT

Re: NSTextField, maximum string length, bindings and NSFormatter

2013-10-24 Thread jonat...@mugginsoft.com
Dmitriy On 24 Oct 2013, at 16:41, Dmitriy Balakirev wrote: > For limiting text in NSTextField this works well: (_limit == 5, 30, etc.) > > - (BOOL)isPartialStringValid:(NSString *__autoreleasing *)partialStringPtr > proposedSelectedRange:(NSRangePointer)proposedSelRangePtr >

Re: NSTextField, maximum string length, bindings and NSFormatter

2013-10-24 Thread Dmitriy Balakirev
For limiting text in NSTextField this works well: (_limit == 5, 30, etc.) - (BOOL)isPartialStringValid:(NSString *__autoreleasing *)partialStringPtr proposedSelectedRange:(NSRangePointer)proposedSelRangePtr originalString:(NSString *)origString originalSelectedRange:(NS

Re: How to create source-list programmatically?

2013-10-24 Thread Ken Thomases
On Oct 18, 2013, at 3:48 PM, Hoon Hwangbo wrote: > So should I always use the IB to make source-list correctly? Is there no > *purely programatic* - with only code - way to do that? You can set up source lists in code. Search the docs for "selectionHighlightStyle" and "sourcelist", especially

NSTextField, maximum string length, bindings and NSFormatter

2013-10-24 Thread jonat...@mugginsoft.com
Have I missed something or is access to a decent NSFormatter subclass to handle NSTextField string length limiting troublesome? There is some form on this: http://stackoverflow.com/questions/827014/how-to-limit-nstextfield-text-length-and-keep-it-always-upper-case/827598#827598 http://www.coc

Re: Not documented: NSArray responds to -allObjects

2013-10-24 Thread Roland King
I agree, that method exists, not quite sure what your question is though. Depends what you want to do with introspection. If you want to ensure a class responds to allObjects and you expect if it does it returns an NSArray, that still works in this case, if you are trying to work out what an ob

Not documented: NSArray responds to -allObjects

2013-10-24 Thread Jerry Krinock
Starting somewhere after OS X 10.6, NSArray instances respond to the NSSet method -allObjects. I can’t find any documentation of this. Also, it is not declared in the header NSArray.h Although it does what you’d expect, returning a copy of self, this can lead to some interesting bugs, partic

Re: Deadlock during NSCache flush

2013-10-24 Thread Jens Alfke
On Oct 24, 2013, at 3:37 AM, Maxthon Chan wrote: > Quite difficult as they emulated platform defines well, and I cannot reliably > detect either GNUSTEP or __LINUX__ flags. I can’t believe they don’t offer some kind of flag for detecting that environment. Every other platform API I can think

Re: Deadlock during NSCache flush

2013-10-24 Thread Greg Parker
On Oct 24, 2013, at 3:39 AM, Maxthon Chan wrote: > On Oct 24, 2013, at 18:23, Greg Parker wrote: >> On Oct 24, 2013, at 3:10 AM, Maxthon Chan wrote: >>> Neither is appropriate in my situation: Only one touch-up is needed so >>> converting entire file (even just one method since it is extremely

Re: Confirm 10.9 GM build number?

2013-10-24 Thread Roland King
Me too - I finally got OS X upgraded to the release version and it's 13A603, that's what appears to be on the appstore right now. On 23 Oct, 2013, at 4:00 am, Robert Martin wrote: > 13A603 is the last GM seed I downloaded… > > > On Oct 22, 2013, at 3:21 PM, Jens Alfke wrote: > >> Can someo

Re: Deadlock during NSCache flush

2013-10-24 Thread Maxthon Chan
And by the way, why not? It is well documented in LLVM documentations that those functions are required to be identical to the corresponding methods. Are you refusing your own dogfood, Apple? On Oct 24, 2013, at 18:23, Greg Parker wrote: > On Oct 24, 2013, at 3:10 AM, Maxthon Chan wrote: >> N

Re: Deadlock during NSCache flush

2013-10-24 Thread Maxthon Chan
Quite difficult as they emulated platform defines well, and I cannot reliably detect either GNUSTEP or __LINUX__ flags. On Oct 24, 2013, at 18:30, Graham Cox wrote: > > On 24/10/2013, at 12:10 PM, Maxthon Chan wrote: > >> Neither is appropriate in my situation > > > Time for a small bit of

Re: Deadlock during NSCache flush

2013-10-24 Thread Maxthon Chan
That does not work with GNUstep build system. With that system, I can only control ARC status on a per-target basis, and I cannot guarantee the non-existence of CoreFoundation on a GNUstep system. On Oct 24, 2013, at 18:23, Greg Parker wrote: > On Oct 24, 2013, at 3:10 AM, Maxthon Chan wrote:

Re: Deadlock during NSCache flush

2013-10-24 Thread Graham Cox
On 24/10/2013, at 12:10 PM, Maxthon Chan wrote: > Neither is appropriate in my situation Time for a small bit of conditional compilation then? --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or m

Re: Deadlock during NSCache flush

2013-10-24 Thread Greg Parker
On Oct 24, 2013, at 3:10 AM, Maxthon Chan wrote: > Neither is appropriate in my situation: Only one touch-up is needed so > converting entire file (even just one method since it is extremely long) to > MRR is is inappropriate Write a helper function in a separate non-ARC file. Do not call objc

Re: Deadlock during NSCache flush

2013-10-24 Thread Maxthon Chan
Neither is appropriate in my situation: Only one touch-up is needed so converting entire file (even just one method since it is extremely long) to MRR is is inappropriate and I need portability to GNUstep so CoreFoundation (and quite portion of Foundation) have to be avoided. First part of the s

Re: Deadlock during NSCache flush

2013-10-24 Thread Greg Parker
On Oct 23, 2013, at 10:57 PM, Maxthon Chan wrote: > Situation: I am writing a custom decoder that decodes objects from JSON-based > archives. My objects gets released prematurely, hence a manual retain is > asked for. > > I need to make this thing work across multiple platforms (that is, Cocoa