Re: Passing a swift function to objective-c

2014-10-17 Thread Roland King
> > let r = x.createImageOptional( nil ) > is of course let r = x.createImage( nil ) I had two properties in my test code and didn’t fix it when I copy/pasted it, sorry. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: Passing a swift function to objective-c

2014-10-17 Thread Roland King
>> >> ok this simple test works for me .. I also don’t understand the extra parens >> etc in your example. So where does your code differ from the below? Note I >> set it both with a public function and a closure, just to see if it works. > > A detail I should have included. The @property is de

Creating a new OS X document in Swift

2014-10-17 Thread Rick Mann
I have an app with two document types. I created a "New Type 2" menu item, and in the IBAction for that, I create the document, like this: https://pastee.org/qyx3s This works, and the new window appears on top of other windows, but it is not the active window. The topmost window before

Re: Passing a swift function to objective-c

2014-10-17 Thread Quincey Morris
On Oct 17, 2014, at 09:59 , Kevin Meaney wrote: > > I got the assigning to a property working when that property was declared as > part of the class, but not when it has been declared in the optional section > of a protocol. So I was able to duplicate what you did Roland. But no matter > what

Re: Passing a swift function to objective-c

2014-10-17 Thread Kevin Meaney
Thanks Roland. On 17 Oct 2014, at 00:20, Roland King wrote: > >> On 17 Oct 2014, at 6:13 am, Kevin Meaney wrote: >> >> Hi, >> >> I'm beginning to feel this above my pay grade as I can't seem to work it out. >> >> I have a framework in Objective-C. I've been writing some tests for it, and >>

Re: NSTableView inside NSTextView

2014-10-17 Thread Ulf Dunkel
Lee Ann, thank you for pointing me to the TextEdit sources which I had already checked. They do not even contain the terms "NSTable" or "NSTextTable" at all. TextEdit seems to keep all text content in a simple NSTextView. They just added the system method -orderFrontTablePanel: to the app menu