|
window of document
It looks like there is no public getter for the "window" IBOutlet, even though Interface Builder knows about it and even though there is a public *setter*. You can get to your window by way of the doc
It looks like there is no public getter for the "window" IBOutlet, even though Interface Builder knows about it and even though there is a public *setter*. You can get to your window by way of the doc
|
By
Andy Lee
· #1353
·
|
|
How to Correctly Resize Views with Manual Layout
Two quick comments: - You want to set the subview's frame relative to the superview's bounds, not its frame. - You might want to experiment with a scratch app before making a lot of code changes at on
Two quick comments: - You want to set the subview's frame relative to the superview's bounds, not its frame. - You might want to experiment with a scratch app before making a lot of code changes at on
|
By
Andy Lee
· #777
·
|
|
Temperatur etc. from Locale
I haven't played with it myself, but maybe NSMeasurementFormatter? --Andy
I haven't played with it myself, but maybe NSMeasurementFormatter? --Andy
|
By
Andy Lee
· #767
·
|
|
Can NSView and NSImageView respond to Mouse Clicks?
From the docs: <https://developer.apple.com/documentation/appkit/nsimageview?language=objc> --Andy
From the docs: <https://developer.apple.com/documentation/appkit/nsimageview?language=objc> --Andy
|
By
Andy Lee
· #716
·
|
|
Window Position and Size Restored
Try unchecking the "Restorable" checkbox in IB. I don't know why you aren't able to manually "override" this. --Andy
Try unchecking the "Restorable" checkbox in IB. I don't know why you aren't able to manually "override" this. --Andy
|
By
Andy Lee
· #698
·
|
|
Maintaining Aspect Ration of a Window
Yes, there is a window delegate method. Given a proposed window size, you return the actual window size you would like to constrain to. https://developer.apple.com/documentation/appkit/nswindowdelegat
Yes, there is a window delegate method. Given a proposed window size, you return the actual window size you would like to constrain to. https://developer.apple.com/documentation/appkit/nswindowdelegat
|
By
Andy Lee
· #691
·
|
|
Handling a menu item in a modal dialog
I got curious and created a scratch app to fiddle with. I called [NSApp runModalForWindow:] and was surprised to see that even though the dialog was demonstrably modal (clicking on the window behind i
I got curious and created a scratch app to fiddle with. I called [NSApp runModalForWindow:] and was surprised to see that even though the dialog was demonstrably modal (clicking on the window behind i
|
By
Andy Lee
· #662
·
|
|
Handling a menu item in a modal dialog
I forget the tweak to do this -- I think it has something to do with using your own run loop. I'm pretty sure I've done what you describe. If I can find how I'll post it here, but maybe the run loop h
I forget the tweak to do this -- I think it has something to do with using your own run loop. I'm pretty sure I've done what you describe. If I can find how I'll post it here, but maybe the run loop h
|
By
Andy Lee
· #659
·
|
|
Tootips in NSTextView/NSTextfields
I did find a problem: the tooltip doesn't seem to work the first time I position the cursor, only on subsequent attempts. For testing purposes I found it helped to add .cursor:NSCursor.pointingHand to
I did find a problem: the tooltip doesn't seem to work the first time I position the cursor, only on subsequent attempts. For testing purposes I found it helped to add .cursor:NSCursor.pointingHand to
|
By
Andy Lee
· #487
·
|
|
Tootips in NSTextView/NSTextfields
Your code works for me. It's a little fussy though about placement of the text cursor. I had to position the tiny horizontal mark in the middle of the text cursor just *under* the word "tooltip" inste
Your code works for me. It's a little fussy though about placement of the text cursor. I had to position the tiny horizontal mark in the middle of the text cursor just *under* the word "tooltip" inste
|
By
Andy Lee
· #486
·
|
|
Opening File in Finder
Oh wow, I didn't know about that method -- perhaps because my code predated 10.6. :) --Andy
Oh wow, I didn't know about that method -- perhaps because my code predated 10.6. :) --Andy
|
By
Andy Lee
· #391
·
|
|
Opening File in Finder
Hi Gerriet, Try this: BOOL didSelect = [[NSWorkspace sharedWorkspace] selectFile:filePath inFileViewerRootedAtPath:containingDirPath]; -Andy
Hi Gerriet, Try this: BOOL didSelect = [[NSWorkspace sharedWorkspace] selectFile:filePath inFileViewerRootedAtPath:containingDirPath]; -Andy
|
By
Andy Lee
· #389
·
|