Don’t put a print() in your drawRect: or bad things will happen. (No clue why, but it’d be handy for debugging!)
@_psonice You weren’t perchance seeing a message beginning with “Attempt to run a modal dialog during transaction commit”, were you?
-
-
@warrenm Yep, think that was it. -
@_psonice If you were in an NSView subclass, you need to qualify print as Swift.print so it doesn’t pick up NSView’s print method :) -
@warrenm ah, thanks! I’ve heard about this before, but never encountered it. (I should use my own ‘debuglog()’ and avoid this entirely :) -
@_psonice Sure thing! It’s mostly serendipity; I debugged this exact issue with @mhorga_ just a couple of days ago
-
@warrenm @mhorga_ I was lucky, only change since last run was adding print() ;) Can imagine it being a pain to figure out. -
@_psonice @mhorga_ Indeed, ’tis one of the downsides to implicit self when combined with generic method names :) -
@warrenm @mhorga_ There’s a good general lesson there. (Is there a compiler setting to warn about it?) -
@_psonice @mhorga_ You should get a warning by default; I’m not sure of the associated flag. http://ericasadun.com/2015/09/18/its-a-cocoa-thing-print-and-nsview-swiftlang/ … - 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.