Binding alignment property of NSTextField

2012-10-27 Thread Luc Van Bogaert
Hi, I'm using bindings to set various properties of a textfield object in a nib file, eg. Font, TextColor, Hidden, etc. These textfield properties are all bound to the nib's File's Owner, which is a viewcontroller. This all works fine, except for the alignment property. The textfield alignment

Re: Binding alignment property of NSTextField

2012-10-27 Thread Ken Thomases
On Oct 27, 2012, at 4:26 AM, Luc Van Bogaert wrote: > The textfield alignment is bound to an enum property of the viewcontroller. > The strange thing is that, when I create a *new* viewcontroller object from > the nib, the textfield alignment is set correctly based on the current enum > propert

How to check if the app is sandboxed and what entitlements it has got?

2012-10-27 Thread Oleg Krupnov
Hi, I'm writing a component which I intend to use in several my apps. Some of the apps may be sandboxed. I'd like to turn off some functionality in case if the app is sandboxed and there are no entitlements that I need. I'd be happy with either compile-time or run-time solution. I've googled a s

Re: App rejection due to app-sandboxing invalid entitlement

2012-10-27 Thread Shane Stanley
On 27/10/2012, at 5:11 PM, Quincey Morris wrote: > I don't recall if the session has the entitlements needed for your specific > case, but I think it is worth watching. (IIRC it did use Mail as an example > scripting target, so it might well have exactly your answer.) Interestingly the slides

Sandbox, security bookmarks and trash

2012-10-27 Thread Simone Tellini
Hello, I need to handle an "export" function in a document-based application. When the user creates the document, he can also choose a couple of path where to save different exported results (e.g. "~/Documents/exporteddata.xml"). The document contains security bookmarks that point to those file

Re: Binding alignment property of NSTextField

2012-10-27 Thread Luc Van Bogaert
Yes, I'm using a synthesised setter to change the property value. I am also observing the property (to redraw the controller's view whenever something changes) and this way I can confirm that the property is indeed changed in a KVO compliant manner. One thing I forgot to mention is that I'm usi

Re: Scalability of CALayers

2012-10-27 Thread Richard Somers
On Oct 25, 2012, at 6:18 PM, Graham Cox wrote: > I'm wondering how scalable the Core Animation layer model is. Look at the WWDC 2006 video around the 0:50 mark. Scott Forstall introduces Core Animation and discusses its scalability. He show a demo of the iTunes album screen saver app written t

Warning message using stringWithContentsOfFile:encoding:error:

2012-10-27 Thread Paul Johnson
I get a compiler warning message at the following line of code: NSString *text = [NSString stringWithContentsOfFile:fullPath encoding: NSUTF8StringEncoding error:&error]; The warning message is: Class method '+stringWithContentsOfFile:encoding:Rf_error' not found (return type defaults to 'id')

[ANN] zipzap -- zip file I/O library

2012-10-27 Thread Glen Low
Hi All Announcing my new zip file I/O library -- zipzap. zipzap is easy to use (just 3 public classes!) and efficient, being highly optimized for low memory overhead and reduced disk I/O. I believe it makes the zip file format a no-brainer choice of container for Cocoa-based compound documents.

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-27 Thread Nick Zitzmann
On Oct 27, 2012, at 4:04 PM, Paul Johnson wrote: > I get a compiler warning message at the following line of code: > > NSString *text = [NSString stringWithContentsOfFile:fullPath encoding: > NSUTF8StringEncoding error:&error]; > > The warning message is: > > Class method '+stringWithContents

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-27 Thread Paul Johnson
Nick, I can't find any headers that #define 'Rf_error'. The warning message seems to be complaining about assigning to the type 'NString *' when type 'id' is expected, though. I'm not sure where Rf_error is defined, but it must be in the Cocoa headers. Thanks for your reply. On Sat, Oct 27, 201

Re: [ANN] zipzap -- zip file I/O library

2012-10-27 Thread Gene Crucean
Very cool Glen. Thanks for sharing! On Saturday, October 27, 2012, Glen Low wrote: > Hi All > > Announcing my new zip file I/O library -- zipzap. zipzap is easy to use > (just 3 public classes!) and efficient, being highly optimized for low > memory overhead and reduced disk I/O. I believe it ma

variable problem is driving me nuts

2012-10-27 Thread H Miersch
hi. in my current project i have this line in the header for the app delegate: NSMutableArray *clients; in the app delegate itself, there's this line, in applicationDidFinishLaunching: clients = [[NSMutableArray alloc] init]; that works as expected. so far so good. but later, in another metho

Re: variable problem is driving me nuts

2012-10-27 Thread M Pulis
clients is not (yet) a proper NSMutableArray.. Try one of the init methods within the NSMutableArray. gary On Oct 27, 2012, at 4:51 PM, H Miersch wrote: hi. in my current project i have this line in the header for the app delegate: NSMutableArray *clients; in the app delegate itself, th

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-27 Thread Gary L. Wade
What you think you're calling is the NSString class method +stringWithContentsOfFile:encoding:error: but due to an unexpected definition, you're actually calling the NSString class method +stringWithContentsOfFile:encoding:Rf_error: Apple does not have a publicly defined selector of that name,

Re: variable problem is driving me nuts

2012-10-27 Thread Andy Lee
You're sure the later method is being called before clients is set? What if you put NSLog statements next to each of the two statements you showed? Any chance you have another variable called "clients" somewhere? Any chance you have two instances of your app delegate class? In the NSLog stateme

Re: variable problem is driving me nuts

2012-10-27 Thread Jens Alfke
On Oct 27, 2012, at 4:51 PM, H Miersch wrote: > in the app delegate itself, there's this line, in > applicationDidFinishLaunching: > > clients = [[NSMutableArray alloc] init]; > > that works as expected. so far so good. but later, in another method in the > app delegate, there's this line: >