Re: swift - making array of subclass of class also conforming to protocol

2015-11-28 Thread Roland King
> On 29 Nov 2015, at 09:26, Quincey Morris > wrote: > > On Nov 28, 2015, at 10:32 , Quincey Morris > > wrote: >> >> It can’t be UIView+MasterControllable (in some syntax), because no such >> *single* type exists. > > One other dopey alternative

Re: swift - making array of subclass of class also conforming to protocol

2015-11-28 Thread Quincey Morris
On Nov 28, 2015, at 10:32 , Quincey Morris wrote: > > It can’t be UIView+MasterControllable (in some syntax), because no such > *single* type exists. One other dopey alternative occurred to me. You could add all the methods from UIView, or just those your app actually uses, directly to the

Re: Bunch of CoreData based NSDocument questions.

2015-11-28 Thread Quincey Morris
On Nov 28, 2015, at 14:41 , Motti Shneor wrote: > > This I don’t get. If that’s not a close what is a ‘close'… the document > disappears, windows close and disappear I’ll think about the other things you wrote, but I’ll answer this right now, since it’s an important conceptual part of the “mod

Re: Bunch of CoreData based NSDocument questions.

2015-11-28 Thread Gary L. Wade
I don't remember the details, but I seem to recall you having to override some methods in NSDocument (saving, closing, etc.) and possibly NSApplication terminate to get the behavior it sounds like you require. The app I worked on wanted to make sure the user had an option to submit an action to

Re: FSIsAliasFile deprecated - typeOfFile is slow

2015-11-28 Thread Gary L. Wade
Hopefully by that time those software developers in Apple who misquote Donald Knuth will gain enough experience to realize there are good reasons even small APIs should be efficient. -- Gary L. Wade (Sent from my iPad) http://www.garywade.com/ On Nov 28, 2015, at 10:38 AM, Charles Srstka wrote:

Re: FSIsAliasFile deprecated - typeOfFile is slow

2015-11-28 Thread Charles Srstka
> On Nov 28, 2015, at 11:26 AM, Gary L. Wade > wrote: > > Extended attributes aren't going away, and current alias files aren't going > away; those exist on the latest OS. Try this and getResourceValue: to see if > there's any significant difference, and if you eventually do need the alias >

Re: swift - making array of subclass of class also conforming to protocol

2015-11-28 Thread Quincey Morris
On Nov 28, 2015, at 03:51 , Roland King wrote: > > private var myViews : Array > // nope > private var myViews : Array // nope The problem is that you’re defining a variable. It can’t be generic — that would imply a different variable for each specialization. It can

Re: FSIsAliasFile deprecated - typeOfFile is slow

2015-11-28 Thread Gary L. Wade
Extended attributes aren't going away, and current alias files aren't going away; those exist on the latest OS. Try this and getResourceValue: to see if there's any significant difference, and if you eventually do need the alias data you might also try the bookmark API on the file (check to be s

Re: FSIsAliasFile deprecated - typeOfFile is slow

2015-11-28 Thread Charles Srstka
> On Nov 28, 2015, at 9:59 AM, Leonardo wrote: > > Hi Gary, > Thank you for your low level fine solution. Anyway, I'm afraid that Apple > changes the alias-rule and this method will not work longer. Do you have a > solution at a upper level? Or may I be 100% sure that Apple will never > change th

Re: FSIsAliasFile deprecated - typeOfFile is slow

2015-11-28 Thread Leonardo
Hi Gary, Thank you for your low level fine solution. Anyway, I'm afraid that Apple changes the alias-rule and this method will not work longer. Do you have a solution at a upper level? Or may I be 100% sure that Apple will never change this rule? Regards -- Leonardo > Da: "Gary L. Wade" > Data

Re: FSIsAliasFile deprecated - typeOfFile is slow

2015-11-28 Thread Leonardo
Thanks, I will check that. Regards -- Leonardo > Da: Sean McBride > Organizzazione: Rogue Research Inc. > Data: Fri, 27 Nov 2015 17:07:33 -0500 > A: Leonardo , > Oggetto: Re: FSIsAliasFile deprecated - typeOfFile is slow > > On Fri, 27 Nov 2015 23:00:16 +0100, Leonardo said: > >> The proble

swift - making array of subclass of class also conforming to protocol

2015-11-28 Thread Roland King
I have a protocol I want some of my UIView subclasses to conform to so they can be controlled by a specific master object. So they are UIVIews (class) and they are also MasterControllable (protocol) easy to make those UIView subclasses public class MyVIew1 : UIView, MasterControllable {} public