On Sun, Jun 15, 2014, at 09:56 PM, Trygve Inda wrote:
> Someone suggested here:
>
> http://stackoverflow.com/questions/20025868/cgdisplayioserviceport-is-deprec
> ated-in-os-x-10-9-how-to-replace?answertab=votes#tab-top
>
> that
>
> io_service_t service = IOServicePortFromCGDisplayID(displayID);
Someone suggested here:
http://stackoverflow.com/questions/20025868/cgdisplayioserviceport-is-deprec
ated-in-os-x-10-9-how-to-replace?answertab=votes#tab-top
that
io_service_t service = IOServicePortFromCGDisplayID(displayID);
Could be used to replace
io_service_t service = CGDisplayIOServiceP
>
> Ah ok, figured it out; your code gave me a hint. If you have a String, the
> methods that are in NSString just work on it. If you want the extensions, you
> have to be explicit about NSString:
>
> drawable.name is a String?:
>
>
> // does not work, sizeWithFont not found
>
On Sun, Jun 15, 2014, at 02:17 PM, Lee Ann Rucker wrote:
> Why do you want to change the position? It's not something Mac windows
> normally do so users will be confused, and you've also got OSX itself
> with its own ideas of where windows should go, especially when it adds
> something like Maveric
I don't think you'll have much luck with trying to make it snap during a move,
but you can detect the new position with windowDidMove: and fix it up there.
You can't just watch setFrame or anything like that, because it's possible for
the NSWindow's idea of its position to get out of sync with t
> I have edge snapping too. Try:
>
> windowWillResize:toSize:
> Return Value
> A custom size to which the specified window will be resized.
>
> It's called before every size change, including during live resizing.
Thanks, that's good for resizing. There's still a problem with the moving.
_
I have edge snapping too. Try:
windowWillResize:toSize:
Return Value
A custom size to which the specified window will be resized.
It's called before every size change, including during live resizing.
- Original Message -
From: "Cosmin Apreutesei"
To: "Uli Kusterer"
Cc: "Cocoa Cocoa-Dev
> Can I ask why you’re trying to do this? This sounds like something that’s so
> unusual to do that I suspect you’re trying to use an overly complicated
> approach to achieve something that is really simple in Cocoa. And what
> exactly do you mean by “synchronous window moving event”?
I want t
>
> Did you mean “implicitly unwrapped”? Then, by the above logic, the type of
> the ‘if’ expression is Bool, so it would crash if ‘bbb’ is nil. Otherwise, it
> would test the boolean value of ‘bbb’.
Turns out, after a try in a playground, that this is the right way to do it:
var b : Bool! = n