Re: Odd behavior re: -windowWillReturnUndoManager:

2014-01-17 Thread Quincey Morris
On Jan 16, 2014, at 11:51 , Matthew LeRoy mle...@minitab.com wrote: - (NSUndoManager *)windowWillReturnUndoManager:(NSWindow *)window { if (window == [self window]) { return [[self inspectedDocument] undoManager]; } return nil; } It seems to me that this is

PDFDocument, ARC and 10.9 question

2014-01-17 Thread Totte Alm
Hello again, Still debugging my CG - ARC move and I'm stuck with one problem that I just can't understand. DEBUG SNIP WHERE THIS HAPPENS _thePDF = [[PDFDocument alloc] initWithData:_data]; // test- if (_thePDF) { @try { *CRASHES HERE* - [_thePDF

Any way to determine where a string will be truncated?

2014-01-17 Thread Sixten Otto
Using the methods in the UIStringDrawing category on NSString, it's pretty straightforward to measure the size of a string as it will appear on screen, or to draw it into some constrained area. And I love that UIKit handles all of the logic to truncate the string to fit. But I find myself in a

Re: PDFDocument, ARC and 10.9 question

2014-01-17 Thread David Duncan
Your problem is likely well before that point, since it looks like the failure has to do with a font. Either the font is damaged somehow, or the reference is invalid. On Jan 17, 2014, at 4:22 AM, Totte Alm to...@code66.se wrote: Hello again, Still debugging my CG - ARC move and I'm stuck

Why does menu item with shift-delete not work?

2014-01-17 Thread Steve Mills
We have a menu item whose key equiv is shift-delete (backspace, not forward delete). Typing that key does not even call the menu's performKeyEquivalent method. How can we get this to work like it should? BTW, I've already noticed that when you set the key equiv in IB, it sets it to 8 (Unicode

Re: PDFDocument, ARC and 10.9 question

2014-01-17 Thread Totte Alm
17 jan 2014 kl. 18:43 skrev David Duncan david.dun...@apple.com: Your problem is likely well before that point, since it looks like the failure has to do with a font. Either the font is damaged somehow, or the reference is invalid. I thought so too, and the fact that running the app from

Re: Any way to determine where a string will be truncated?

2014-01-17 Thread T.J. Usiyan
I think that you might want NSLayoutManager. This depends on how you are displaying the text, NSLayout manager can allow you to both find out and change where truncation will happen. WWDC 2013 session 220 has some info about iOS's version of this which is very similar to Cococa's. TJ On Fri,

Re: Why does menu item with shift-delete not work?

2014-01-17 Thread Andy Lee
I think the key event is getting stolen by the first responder of whatever your key window is at the time. I did a quick test and found the menu item did not get invoked when a text view was selected but *did* get invoked when I removed the text view. I suspect a more precise technical answer

Re: Any way to determine where a string will be truncated?

2014-01-17 Thread Sixten Otto
I did get a proof of concept working with the TextKit classes. Turns out to be possible, but more complicated and more moving parts than I would have (naively?) expected. Beyond the complexity, the main drawback to that approach is that it won't work on iOS 6, which the app in question still

Re: Why does menu item with shift-delete not work?

2014-01-17 Thread Steve Mills
On Jan 17, 2014, at 13:34:08, Andy Lee ag...@mac.com wrote: I think the key event is getting stolen by the first responder of whatever your key window is at the time. I did a quick test and found the menu item did not get invoked when a text view was selected but *did* get invoked when I