Re: where to put persistent storage for command-line app

2014-05-16 Thread Rui Pacheco
Isn't /Application Support/ the standard? On 16 May 2014 05:47, William Squires wsqui...@satx.rr.com wrote: Should I put it in /Library/Application\ Support/ or /Library/Preferences, or somewhere else? ___ Cocoa-dev mailing list

Re: where to put persistent storage for command-line app

2014-05-16 Thread Roland King
~/Library/Application Support is what I consider to be the standard place for persistent storage. I'd always start getting library from URLSForDirectory:inDomains: for the NSLibraryDirectory and go from there. Also, if you sandbox the tool at some point, you'll get a NSLibraryDirectory

Re: Question on NSTableViewDataSource Protocol

2014-05-16 Thread Graham Cox
On 16 May 2014, at 11:18 am, Varun Chandramohan varun.chandramo...@wontok.com wrote: [_tableContents removeAllObjects]; I wouldn't do this, because it invalidates the value of 'row', which may be assumed by the table code to remain valid. Implementation details may change on different

Re: Share and store RSA - public key in java server and vice versa

2014-05-16 Thread ChanMaxthon
I got fed up by Apple already and found a little BSD-licensed CXX crypto library called Botan. I will either wrap it in Objective-C or rewrite it for my later projects. Sent from my iPhone On May 15, 2014, at 8:00 PM, Roland King r...@rols.org wrote: I try not to 'screw' the Apple crypto

debugging unrecognized selector

2014-05-16 Thread Torsten Curdt
I am seeing a crash in an iOS app and while I can reproduce it I am still struggling to find the location in my code because the debugger only stops in UIApplicationMain. What I am seeing in the log is 2014-05-16 09:46:56.796 MyApp[30998:60b] -[__NSCFString CGColor]: unrecognized selector sent to

Re: debugging unrecognized selector

2014-05-16 Thread ChanMaxthon
Strings does not have CGColor methods so it is not caught. Try break on [NSObject doesNotRecognizeSelector:] Sent from my iPhone On May 16, 2014, at 4:01 PM, Torsten Curdt tcu...@vafer.org wrote: I am seeing a crash in an iOS app and while I can reproduce it I am still struggling to find

Re: debugging unrecognized selector

2014-05-16 Thread Quincey Morris
On May 16, 2014, at 01:01 , Torsten Curdt tcu...@vafer.org wrote: the debugger only stops in UIApplicationMain. That’s most likely because your “level of detail” slider (the horizontal slider below the call stack in the Debug pane) isn’t at the extreme right end. What I am seeing in the log

Re: where to put persistent storage for command-line app

2014-05-16 Thread ChanMaxthon
If you wish to follow UNIX standards, store generated files in a sub directory in /var/lib (global files) or dot-files in user home directory. NeXTSTEP use /Library/Application Support for globals and ~/Library/Application Support for user-specific. Sent from my iPhone On May 16, 2014, at

Re: Opinion: Core Data or roll my own?

2014-05-16 Thread BareFeetWare
On Apr 8, 2014, at 5:31 PM, BareFeetWare list.develo...@barefeetware.com wrote: One option is to use SQLite. I've been putting together an open source BFWQuery library to hopefully simplify the whole thing, by letting you treat a database query just like an array of dictionaries. It uses

Re: Client certificate extraction out of SSL/TLS Connection on server side

2014-05-16 Thread Bastian Hafer
Hey, thanks Jens and Ben for your advice. I will try to play around with that. If it’s true that enabling client side authentication in the streams invalidates the app that is really a pity. Isn’t the optional client side authentication part of the SSL/TLS rfc? @Jens: What about the if

Re: debugging unrecognized selector

2014-05-16 Thread Torsten Curdt
the debugger only stops in UIApplicationMain. That’s most likely because your “level of detail” slider (the horizontal slider below the call stack in the Debug pane) isn’t at the extreme right end. OMG! There is slider!? That's a revelation. Thanks! The last 2 won’t help. NSString doesn’t

Re: Not getting mouseDown: called when control-clicking in view in menu item

2014-05-16 Thread Eric Shepherd
Try implementing rightMouseDown: instead for that. Eric Shepherd On May 15, 2014, at 12:39 PM, Tim Hewett tghewe...@onetel.com wrote: I have a NSMenuItem with a custom view (inheriting from NSImageView) which needs to react to mouseDown: events. An NSTrackingArea has been setup for the

Re: Not getting mouseDown: called when control-clicking in view in menu item

2014-05-16 Thread Tim Hewett
I have tried that too, no message for that either. Tim. On 16 May 2014, at 14:30, Eric Shepherd the.she...@gmail.com wrote: Try implementing rightMouseDown: instead for that. Eric Shepherd On May 15, 2014, at 12:39 PM, Tim Hewett tghewe...@onetel.com wrote: I have a NSMenuItem with a

Re: NSSharingService with Animated GIFs?

2014-05-16 Thread Charles Carver
I’ve been doing some more testing and I attempted to save the file to the hard drive first (instead of pulling the data from a URL) and then load it into NSImage. The results are the same, however, as it just attaches the image as a PNG instead of a GIF. I’m really stumped here... Charles

Re: Client certificate extraction out of SSL/TLS Connection on server side

2014-05-16 Thread Jens Alfke
On May 16, 2014, at 2:55 AM, Bastian Hafer bastian.ha...@googlemail.com wrote: @Jens: What about the if !TARGET_OS_IPHONE. Is this implemented in your framework to prevent someone using your framework on the iphone in a way that their app gets rejected? Did I got that right? Right. In fact

setUsesFontPanel:NO for a given NSColorWell only

2014-05-16 Thread Leonardo
I have 2 NSColorWells and 1 NSTextView. The 1st colorWell displays the color the selected text. The 2nd colorWell displays the visited color of the selected text ONLY if this text contains a link. I have bound it to mLink.mVisitedColor. In the textView method textViewDidChangeSelection: I set the

Re: Share and store RSA - public key in java server and vice versa

2014-05-16 Thread Jens Alfke
On May 16, 2014, at 12:37 AM, ChanMaxthon xcvi...@me.com wrote: I got fed up by Apple already and found a little BSD-licensed CXX crypto library called Botan. I will either wrap it in Objective-C or rewrite it for my later projects. I’m cautious of ‘alternative’ crypto implementations;

Re: Share and store RSA - public key in java server and vice versa

2014-05-16 Thread ChanMaxthon
Keychain is okay, I just cannot bear the crypto libraries. Sent from my iPhone On May 17, 2014, at 1:08 AM, Jens Alfke j...@mooseyard.com wrote: On May 16, 2014, at 12:37 AM, ChanMaxthon xcvi...@me.com wrote: I got fed up by Apple already and found a little BSD-licensed CXX crypto

Re: 'nuther dumb question

2014-05-16 Thread Quincey Morris
On May 16, 2014, at 16:46 , William Squires wsqui...@satx.rr.com wrote: Why doesn't NSData have a +[NSData dataWithString:(NSString *)] or -[NSData initWithString:(NSString *)] method? Because strings consist of *encoded* data, which (in principle) has no meaning outside the internals of

Re: 'nuther dumb question

2014-05-16 Thread Sixten Otto
On Fri, May 16, 2014 at 4:46 PM, William Squires wsqui...@satx.rr.comwrote: Why doesn't NSData have a +[NSData dataWithString:(NSString *)] or -[NSData initWithString:(NSString *)] method? i.e. how do I convert the contents of an NSString object into an NSData object? Try -[NSString

get set firewall status

2014-05-16 Thread 2551
Is there a Cocoa way to get get and set the status of the built-in OS X Firewall? At the moment I'm using an NSTask and extracting the relevant part of the string from system_profiler SPFirewallDataType to get the status, but it's slow. Is there a better way? TIA Phil signature.asc

Re: 'nuther dumb question

2014-05-16 Thread Graham Cox
[NSString dataUsingEncoding:] sometimes you have to look at the source object, not the destination (in fact usually, I'd say). Also, in this case, [NSData initWithString:] would lack the information needed to perform the conversion - you need to pass in what encoding you require. --Graham

Re: 'nuther dumb question

2014-05-16 Thread Graham Cox
On 17 May 2014, at 9:46 am, William Squires wsqui...@satx.rr.com wrote: Also, how come NSFileHandle doesn't have a -[NSFileHandle readFileWithSeparator:(NSString *)] method so one can read in only chunks of a file (of varying size, such as CSV records, or lines in a text file, separated

Re: 'nuther dumb question

2014-05-16 Thread Graham Cox
On 17 May 2014, at 9:46 am, William Squires wsqui...@satx.rr.com wrote: how do I convert the contents of an NSString object into an NSData object? Why? Because -[NSFileHandle writeData:(NSData *)] takes an NSData object, not an NSString object. Arrrgg. :( BTW, is there some reason you

Re: NSSharingService with Animated GIFs?

2014-05-16 Thread Charles Carver
Ken, Thanks for the response. NSImage never ended up working, but your suggestion of attaching the local URL worked: NSString *fileUrl = @http://i.imgur.com/V8w9fKt.gif;; NSString *fileName = [fileUrl lastPathComponent]; NSURL *saveUrl = [NSURL URLWithString:[NSString

Re: debugging unrecognized selector

2014-05-16 Thread ChanMaxthon
I believe the intention of the slider is that it won't drop you to stack frames that does not have your code (and show you with assembler) but it can be troublesome. When LLDB break your program at signal your program could have already progressed past where the exception happened and already