Re: runModalForWindow is disabling my menus

2015-09-06 Thread Felipe Monteiro de Carvalho
On Sat, Sep 5, 2015 at 8:49 PM, Stephane Sudre wrote: > Which feature of a modal window are you looking for? Disabling all other windows in the app and staying on top of them. > Because having > all the menu items being enabled in the case of a modal dialog does > not match the nature of the mod

Re: runModalForWindow is disabling my menus

2015-09-06 Thread dangerwillrobinsondanger
> On Sep 6, 2015, at 5:20 PM, Felipe Monteiro de Carvalho > wrote: > > In Mac OS X maybe, but in Linux and Windows there is no problem in a > modal window having a menu, so its not like its a conceptual problem. No. It IS a conceptual problem. That is not how Cocoa apps work. Don't try to fi

Re: runModalForWindow is disabling my menus

2015-09-06 Thread Stephane Sudre
On Sun, Sep 6, 2015 at 10:20 AM, Felipe Monteiro de Carvalho wrote: > On Sat, Sep 5, 2015 at 8:49 PM, Stephane Sudre wrote: >> Which feature of a modal window are you looking for? > > Disabling all other windows in the app and staying on top of them. > >> Because having >> all the menu items bein

Getting started with Cocoa Bindings in My Project?

2015-09-06 Thread Alex Hall
Hello list, I've got a Mac app that has a table with a data source. Every few minutes, the data source updates itself, and when that happens, I call myTableView.reloadData(). This is a prime candidate for Cocoa bindings, so I thought I'd learn how that mechanism works, and make my code much pret

Re: Swift generics, circular type declarations, and segfaults, oh my!

2015-09-06 Thread has
On 05/09/2015 07:07, Charles Srstka wrote: On Sep 4, 2015, at 7:59 PM, Quincey Morris > wrote: On Sep 4, 2015, at 16:31 , has > wrote: At risk of derail... Do you mean “derail” or “detail”? I feel like I’m drowning

Re: "Computed segue" in iOS?

2015-09-06 Thread Mike Abdullah
Ideally, you use different cells for the different data elements, and wire them up to the appropriate segue, letting the system take care of most of it for you. If you need something more complex, it’s time to trigger the segues programatically. You can wire up multiple segues from your source V

Re: Getting started with Cocoa Bindings in My Project?

2015-09-06 Thread Ken Thomases
On Sep 6, 2015, at 10:59 AM, Alex Hall wrote: > Since I'm using arrays, albeit retrieved from a dictionary, I thought an > NSArrayController would do the job. I'm not sure what to enter for the key > path, though. My view controller has a reference to both my table and my data > model object,

Re: Swift generics, circular type declarations, and segfaults, oh my!

2015-09-06 Thread Charles Srstka
On Sep 6, 2015, at 12:25 PM, has wrote: > > Yes! Exactly this. And yeah, I'm getting that sinking Radar feeling too. But > since I'm relatively new to Swift, I'm just holding out a vain hope that > there's some sort of solution that's embarrassingly obvious to everyone else > but me. If it we

Re: Getting started with Cocoa Bindings in My Project?

2015-09-06 Thread Charles Srstka
> On Sep 6, 2015, at 1:14 PM, Ken Thomases wrote: > > The easiest approach is to provided a class method named > keyPathsForValuesAffecting which returns a set of key > paths for the input properties. In Objective-C, this might look like: > > + (NSSet*) keyPathsForValuesAffectingMyComputedPro

NSXMLDocument - XSLT version

2015-09-06 Thread Jonathan Mitchell
It seems that NSXMLDocument only supports XSLT v 1.0. In particular I am interested in the date format support that is part of XSLT 2. I have found extension code such as this: http://exslt.org/date/functions/format-date/ But it seems rather old school. Is there a better approach out there? Sam

Re: Swift generics, circular type declarations, and segfaults, oh my!

2015-09-06 Thread Quincey Morris
On Sep 6, 2015, at 10:25 , has wrote: > > Each of those intermediates describes a valid query in itself; you just keep > chaining var/method calls until you build up the query you actually want. Yes, that’s what I thought. I was trying to say that from an API perspective, it’s not necessary th

Re: Swift generics, circular type declarations, and segfaults, oh my!

2015-09-06 Thread Charles Srstka
> On Sep 6, 2015, at 3:19 PM, Quincey Morris > wrote: > > (But merely defining a protocol for each of your subclasses is not an > improvement here.) It does, however, seem to avoid the crash: class ObjectBase { required init() {} } protocol MyProtocol { func foo() fun

Re: Swift generics, circular type declarations, and segfaults, oh my!

2015-09-06 Thread Jonathan Mitchell
> On 6 Sep 2015, at 21:19, Quincey Morris > wrote: > > I’ve been thinking about the implications of this for a couple of days now. > Of course, you should file a Radar if you see some compiler behavior that > looks like it ought to work. But I think there’s a higher order problem > that’s wo

Getting a Popover's frame

2015-09-06 Thread Jonathan Hull
Hello, I have a UIPopoverPresentationController and I would like to get the popover’s frame in either window coordinates or the presenting controller’s view’s coordinates. A little background: The popover contains a custom color picker, and after it opens, several passthrough views representi

Re: Swift generics, circular type declarations, and segfaults, oh my!

2015-09-06 Thread Jonathan Hull
I am wondering if the compiler feature which might allow this (and several other things) would be to allow implementors of a protocol to adhere to it with a more restrictive type (either a subclass or an implementer/inheritor of a returned protocol). For example: protocol Thing { var n

Re: Getting started with Cocoa Bindings in My Project?

2015-09-06 Thread Alex Hall
Thanks for the help, both you and Charles. I want to try to summarize the procedure as I now understand it, to make sure I have it all straight. No sense going and doing a bunch of work if I'm still missing something vital or don't have it right. My first step is to make a KVO-compliant backing

Re: Getting started with Cocoa Bindings in My Project?

2015-09-06 Thread Ken Thomases
On Sep 7, 2015, at 12:01 AM, Alex Hall wrote: > My first step is to make a KVO-compliant backing store, because Swift arrays > won't do the job. As you said, my goal of updating an array and having my > table automagically update itself to match the array just won't happen. What > I need is a

recent applications list question

2015-09-06 Thread Rick C.
Hi, I’m setting LSUIElement to 1 and using [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular] to transform to visible depending upon user preferences. However, this seems to have the effect of not having my app show up in the Recent Applications list. Does anyone know if there