RE: What is the difference between vertical and horizontal views in iOS?

2016-02-28 Thread Lee Ann Rucker
It depends entirely on how you want to lay out your UI. Do you want [a] [b] [c] or [a] [b] [c] ? From: cocoa-dev-bounces+lrucker=vmware@lists.apple.com [cocoa-dev-bounces+lrucker=vmware@lists.apple.com] on behalf of nicholasacosta...@gmail.com

Re: Contextual menu for NSTableCellView in NSOutlineView

2016-02-10 Thread Lee Ann Rucker
Did you set the menu's delegate? It doesn't know about the outlineView's delegate. > On Feb 10, 2016, at 9:10 AM, Konidaris Christos wrote: > > I cannot get contextual menus to work inside the cells of my view-based > NSOutlineView. > > In my cell view I have one standard

Re: Easier way to make NSView subclasses refresh on a property change?

2016-02-03 Thread Lee Ann Rucker
[self addObserver:self forKeyPaths:[Foo keyPathsThatAffectDisplay] ...context:SomeUniquePtrValue]; (We have a class addition to NSObject to take an array of keyPaths and lopp through addObserver:forKeyPath: etc, because we use multiple key paths *everywhere*) - (void)observeValueForKeyPath:

RE: Trying to understand a permissions failure when writing to ~/Desktop

2016-01-28 Thread Lee Ann Rucker
Now that this is all resolved, the next question - why default to Desktop instead of Documents? I'd expect Documents, and I hate stuff that clutters up Desktop - one of the first things I do on new installs is change the default location of screen captures to Pictures.

RE: NSTextFields will not fully justify in 10.11

2016-01-24 Thread Lee Ann Rucker
If it's autolayout, double-check it, especially the priorities; it might be hugging more than you expect. What does the UI layout debugger show? I've found some layout surprises that way. From: cocoa-dev-bounces+lrucker=vmware@lists.apple.com

Re: Panes vs. Separate Windows

2016-01-11 Thread Lee Ann Rucker
> On Jan 11, 2016, at 7:35 AM, Jim Lee wrote: > > We have an application, TopXNotes that allows multiple “documents” (notes) to > be opened in adjacent views (panes). The notes can be edited individually. > One can cut/paste/copy from any text document to/from a seperate

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Lee Ann Rucker
> On Dec 29, 2015, at 3:51 PM, Roland King <r...@rols.org> wrote: > > >> On 30 Dec 2015, at 05:53, Lee Ann Rucker <lruc...@vmware.com> wrote: >> >> >>> >> >> >> Actually it's easy. For very similar reasons I needed the

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Lee Ann Rucker
> On Dec 29, 2015, at 12:44 AM, Roland King wrote: > > I have some NSSliders hooked up on my UI to text fields with formatters, all > set up with bindings so that the label shows the slider value. The sliders > are continuous, looks fine, nice feedback for whoever’s driving. >

Re: applicationSupportDirectory access for admin and standard users

2015-12-22 Thread Lee Ann Rucker
> On Dec 21, 2015, at 2:26 PM, Quincey Morris > wrote: > > On Dec 21, 2015, at 14:16 , Jonathan Mitchell wrote: >> >> Is there anything I need to be aware of here? > > Try using ‘URLsForDirectory:inDomains:' instead. Ditto.

RE: Best way to get a file path for presentation to the user

2015-12-19 Thread Lee Ann Rucker
NSPathControl really is the best thing - people are used to seeing it, even power users who know what those slashes mean. We use it everywhere in Fusion settings. Popup style is appropriate where the most important info is the last part but sometimes they want to see the whole path. Standard

RE: Best Control for a Matrix these days?

2015-12-03 Thread Lee Ann Rucker
That doesn't give you enough control over row/column layout. How about nested NSStackViews? NSCollectionView -- Gary L. Wade (Sent from my iPad)

Re: Best Control for a Matrix these days?

2015-12-03 Thread Lee Ann Rucker
and you can write your own collection > layout flow. > >> On Dec 3, 2015, at 11:54 AM, Lee Ann Rucker <lruc...@vmware.com> wrote: >> >> That doesn't give you enough control over row/column layout. How about >> nested NSStackViews? >> __

RE: Question about getBytes:length:

2015-11-23 Thread Lee Ann Rucker
[UUID1.data getBytes:b1 length:16] since that's the size of your buffer. Doc says "The number of bytes copied is the smaller of the length parameter and the length of the data encapsulated in the object." From:

Re: Installing older OS X

2015-11-18 Thread Lee Ann Rucker
> On Nov 17, 2015, at 9:21 PM, Quincey Morris > wrote: > > On Nov 17, 2015, at 21:03 , Charles Srstka wrote: >> >> I can personally vouch for Mountain Lion running well in VMWare. Where it >> gets hard is when you are running

Re: NSWindow Question

2015-10-29 Thread Lee Ann Rucker
windowDidBecomeKey or BecomeMain? Probably Key, if you want the one that got clicked on. Front isn’t all that useful; a window could be key but not front if it has something like a floating tools palette. Window notifications/delegate methods always start with windowVerb, so searching that

Re: NSButton with NSTexturedRoundedBezelStyle outside of NSToolbar

2015-10-19 Thread Lee Ann Rucker
Or use the UI debugger in newer Xcodes. On Oct 19, 2015, at 5:58 PM, Richard Charles wrote: > >> On Oct 19, 2015, at 1:08 AM, Jacek Oleksy wrote: >> >> I double checked it (I use the screenshot mechanism, it displays the >> size of selection

Re: NSButton with NSTexturedRoundedBezelStyle outside of NSToolbar

2015-10-16 Thread Lee Ann Rucker
On Oct 16, 2015, at 1:57 PM, Richard Charles wrote: > >> On Oct 16, 2015, at 1:24 AM, Jacek Oleksy wrote: >> >> NSToolbar is not a view, it is a class designed to "provide the >> mechanism for a titled window to display a toolbar just below its >>

Re: Continue application processing with mouse down on a menu

2015-09-28 Thread Lee Ann Rucker
On Sep 26, 2015, at 10:03 AM, Eric Schlegel wrote: > >> On Sep 26, 2015, at 9:51 AM, Jens Alfke wrote: >> >> >>> On Sep 26, 2015, at 7:11 AM, Programmingkid >>> wrote: >>> >>> It has seem like a rule that has been in place

Re: swift: windowControllerDidLoadNib called twice

2015-09-25 Thread Lee Ann Rucker
I had one of those. Apple would send out updates - “please replace page X with pages X1-X20" On Sep 25, 2015, at 10:56 AM, Peter Teeson wrote: > FWIW before the nice hardcover books there was a single (as I recall) loose > leaf binder with documentation for the 128K. > >>

Re: Toolbar Template Image help

2015-09-23 Thread Lee Ann Rucker
A template image is just one that’s designed according to specific rules and has a name ending in “Template” or the isTemplate flag set: https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/ToolbarIcons.html#//apple_ref/doc/uid/2957-CH89-SW1 Any

RE: NSSplitViewController : not in Interface Builder library?

2015-09-16 Thread Lee Ann Rucker
What OS are you running Xcode in? I had some interesting fun when NSVisualEffectView showed up in Xcode 6.1 on 10.10 and built just fine with ibtool (we do it with scons) but didn't exist with the same Xcode and ibtool on 10.9. So I made it an NSView and set custom class NSVisualEffectView -

Re: Arrow Keys in NSSlider

2015-09-08 Thread Lee Ann Rucker
NSSlider does normally respond to keystrokes if you’ve turned on Full Keyboard Access in System Prefs > Keyboard > Shortcuts. If it works with that but not with your changes, it’s doing something complicated you’ll have to adjust for. I’ve only subclassed it to enhance the snapping behavior, I

Re: NSView's in Separate NIB

2015-09-04 Thread Lee Ann Rucker
NSViewController doesn’t really work that way. It’s like an NSWindowController - it manages one view and handles all the nib unloading top-level objects stuff for you. (Trust me, you do not want to manage top-level objects yourself) So instead of > myDetailView = [LTWDetailView

RE: Impossible leak warning in OS X init method

2015-08-29 Thread Lee Ann Rucker
Have you tried reordering it into something like if (!self) return nil; if (!do_stuff_successfully) { [self release]; return nil; } ... That's our house style and I've never seen an error like yours. From:

Re: NSStackView - Gravity Question

2015-08-28 Thread Lee Ann Rucker
The doc for stackViewWithViews: says it’s a horizontal layout and they’re added to the “view’s leading gravity area” - if I were writing that I’d use the constant name, it’s easy to overlook. It doesn’t mention it, but if it’s vertical they go in Top. If you just want your views to show up in

RE: Edit menu localisation, default application menu

2015-07-11 Thread Lee Ann Rucker
There are some that it will translate for you - Show/Hide Toolbar, for one. If you have Show Toolbar, it'll swap in Hide Toolbar for you. However! If your translation of Show doesn't match, it won't swap in the translated Hide. This is easy to fall into if your localizers don't phrase it the

Re: How to resize accessory view to match Open panel

2015-07-08 Thread Lee Ann Rucker
My accessory views use autolayout and that seems to work fine in 10.9 and up. In 10.8, you need [accessoryView layoutSubtreeIfNeeded]; if (floor(NSAppKitVersionNumber) = NSAppKitVersionNumber10_8) { [accessoryView setTranslatesAutoresizingMaskIntoConstraints:YES]; } On Jul 8, 2015,

Re: Changing the color of an NSWindow’s titlebar text

2015-06-22 Thread Lee Ann Rucker
I think Safari is using NSUnifiedTitleAndToolbarWindowMask. If you do that and you don’t have a toolbar, you can just center an NSTextField where you want it. If you do have a toolbar you can still put an NSTextField in it, you just can’t control whether it stays centered or even if it stays in

Re: Changing the color of an NSWindow’s titlebar text

2015-06-22 Thread Lee Ann Rucker
In rdar://12617674 , back in 2012 when making windows with dark titlebars like QuickTime Player has involved doing things we can’t discuss here, I requested a [NSWindow setTitleColor:]. There’s been no activity on that bug since, but if you file a new one it might get marked as duplicate! On

Re: Changing the color of an NSWindow’s titlebar text

2015-06-22 Thread Lee Ann Rucker
...@rivergatesoftware.com wrote: On Jun 22, 2015, at 17:04 , Lee Ann Rucker lruc...@vmware.commailto:lruc...@vmware.com wrote: NSUnifiedTitleAndToolbarWindowMask That’s something much older. AFAIK it just controls whether there’s any visible boundary between the title bar and toolbar. It may have

Re: NSPathControl

2015-06-02 Thread Lee Ann Rucker
I just looked at what’s in my pathControl - the objectValue and URL are both the same, the initial file://localhost/Applications/file:///localhost/Applications/ that you see in the nib. Makes sense - if you’re letting the PathControl make the components it builds them from the URL, but it

RE: Looking at self = [super init].

2015-06-01 Thread Lee Ann Rucker
The == case that has been mentioned just omits the second step because self isn't modified by calling [super init]. And the equivalent statements for the other case (! / ==) do the same thing except that the test step is the inverse. init is allowed to return a different self, so if you

RE: NSPathControl

2015-06-01 Thread Lee Ann Rucker
Ann Rucker lruc...@vmware.com wrote: On May 27, 2015, at 2:55 PM, Jens Alfke j...@mooseyard.com wrote: On May 27, 2015, at 2:46 PM, Raglan T. Tiger r...@crusaderrabbit.net wrote: I can setObjectValue: for the path; now I want to know what path component the users selects. I am using Pop

Re: NSPathControl

2015-06-01 Thread Lee Ann Rucker
NS_AVAILABLE_MAC(10_10); Because I couldn’t possibly be the only person using that for a non-URL path. Even if I could URL-ify my data, I still need to tweak the icons to match it. On Jun 1, 2015, at 12:28 AM, Lee Ann Rucker lruc...@vmware.commailto:lruc...@vmware.com wrote: That's very annoying, because we

Re: NSPathControl

2015-06-01 Thread Lee Ann Rucker
On Jun 1, 2015, at 2:39 PM, Quincey Morris quinceymor...@rivergatesoftware.commailto:quinceymor...@rivergatesoftware.com wrote: On Jun 1, 2015, at 13:59 , Lee Ann Rucker lruc...@vmware.commailto:lruc...@vmware.com wrote: Because I couldn’t possibly be the only person using that … What does

Re: Looking at self = [super init].

2015-05-29 Thread Lee Ann Rucker
On May 29, 2015, at 11:17 AM, Alex Zavatone z...@mac.com wrote: On May 29, 2015, at 2:16 PM, Scott Ribe wrote: On May 29, 2015, at 11:49 AM, Alex Zavatone z...@mac.com wrote: Would this handle it properly? if (!(self = [super init])) { return nil; } Yes. if (!(self == [super

Re: NSPathControl

2015-05-27 Thread Lee Ann Rucker
On May 27, 2015, at 2:55 PM, Jens Alfke j...@mooseyard.com wrote: On May 27, 2015, at 2:46 PM, Raglan T. Tiger r...@crusaderrabbit.net wrote: I can setObjectValue: for the path; now I want to know what path component the users selects. I am using Pop Up style. It’s an NSControl.

Re: Issues with implementing WYWIWYG font menu

2015-05-05 Thread Lee Ann Rucker
On May 5, 2015, at 2:21 PM, David Durkee da...@dwdurkee.com wrote: Yes, this approach has worked much better. I see only two drawbacks. 1) The first time the menu is opened, it takes as much as two seconds for it to appear. This only seems to be true for the first instance of the menu that

RE: Window Size and Location

2015-04-24 Thread Lee Ann Rucker
: Raglan T. Tiger [r...@crusaderrabbit.net] Sent: Friday, April 24, 2015 11:33 AM To: Lee Ann Rucker Cc: Cocoa Dev Subject: Re: Window Size and Location On Apr 24, 2015, at 11:36 AM, Lee Ann Rucker lruc...@vmware.com wrote: ~/Library/Saved Application State Can the application delete its

RE: Window Size and Location

2015-04-24 Thread Lee Ann Rucker
~/Library/Saved Application State From: cocoa-dev-bounces+lrucker=vmware@lists.apple.com [cocoa-dev-bounces+lrucker=vmware@lists.apple.com] on behalf of Raglan T. Tiger [r...@crusaderrabbit.net] Sent: Friday, April 24, 2015 10:05 AM To: Cocoa Dev

RE: Converting to Window Coordinates

2015-04-22 Thread Lee Ann Rucker
There's also +[NSEvent mouseLocation], which gives you the position in the same screen coordinate space the windows use. Do I have to worry about this? It seems to work, but the window I am testing in is a plain (no title bar etc) window, so the content view and the window Frame coincide,

RE: Converting to Window Coordinates

2015-04-22 Thread Lee Ann Rucker
to be bottom left, does anyone know why? All the Best Dave On 22 Apr 2015, at 15:13, Lee Ann Rucker lruc...@vmware.com wrote: There's also +[NSEvent mouseLocation], which gives you the position in the same screen coordinate space the windows use. Do I have to worry about this? It seems to work

RE: Converting to Window Coordinates

2015-04-22 Thread Lee Ann Rucker
+lrucker=vmware@lists.apple.com] on behalf of Dave [d...@looktowindward.com] Sent: Wednesday, April 22, 2015 1:56 PM To: Cocoa Developers Subject: Re: Converting to Window Coordinates On 22 Apr 2015, at 20:52, Lee Ann Rucker lruc...@vmware.com wrote: Is hit testing the content view the only

RE: Converting to Window Coordinates

2015-04-21 Thread Lee Ann Rucker
the Mouse. All the Best Dave On 21 Apr 2015, at 18:12, Lee Ann Rucker lruc...@vmware.com wrote: Your screen flipping code is a good start, but it's not going to work with multiple monitors. That's why knowing where it comes from would be helpful - for instance, if it's the current mouse point

RE: Converting to Window Coordinates

2015-04-21 Thread Lee Ann Rucker
returned to window.contentView or I could Thanks a lot Dave On 21 Apr 2015, at 17:06, Lee Ann Rucker lruc...@vmware.com wrote: How are you getting your global point? There are non-Cocoa parts of the OS that do use top-left instead of bottom-left origins, so those will need converting

RE: Converting to Window Coordinates

2015-04-21 Thread Lee Ann Rucker
How are you getting your global point? There are non-Cocoa parts of the OS that do use top-left instead of bottom-left origins, so those will need converting. From: cocoa-dev-bounces+lrucker=vmware@lists.apple.com

RE: NIB for Cocoa Standard Alert Sheet

2015-04-20 Thread Lee Ann Rucker
It's a very simple layout, you could make your own. Use the Xcode 6 layout debugger option to see where all the parts end up. I'm pretty sure it's all generated in code, actually, since it's older than autolayout and the variable number of buttons, with the spacing changing depending on how

RE: NSStatusItem, Popover and NSTextField make responder

2015-04-17 Thread Lee Ann Rucker
It's just not possible. When you're in the runloop to track the menu (or presumably popover, though I haven't tried that) [NSApp isActive] is NO, activateIgnoringOtherApps has no effect, so there's no keyWindow and the textfield needs to be in a keyWindow to become firstResponder. I have done

Re: Drawing in a view with alpha 1.0 shows windows behind

2015-03-31 Thread Lee Ann Rucker
It also depends on your window’s transparency settings, which you don’t always control - Apple changed that on the window that holds the toolbar accessory in fullscreen, changing my patterned grab zone into a bunch of tiny ungrabbable holes :( On Mar 31, 2015, at 2:53 PM, Eyal Redler

Re: Weird crashes on Yosemite

2015-03-13 Thread Lee Ann Rucker
Your code may not have changed, but Apple's code has - are you still using reference counting? Because I'm willing to bet that NSTableView isn't, and I filed rdar://17733863 over a situation very much like this one - the workaround was to setDelegate:nil earlier than you might think necessary.

Re: Base.lproj vs en.lproj?

2015-03-12 Thread Lee Ann Rucker
On Mar 12, 2015, at 1:51 PM, Karl Moskowski kmoskow...@me.com wrote: If “Use Base Internationalization” is checked in a project’s info tab, and the resources—.xib files and Localizable.strings—are all in English, are the .strings files in en.lproj/ required? The strings in en.lproj/ are

Re: titlebar accessory? window:willPositionSheet:usingRect: not called in full-screen mode

2015-03-04 Thread Lee Ann Rucker
On Mar 4, 2015, at 8:13 AM, Corbin Dunn corb...@apple.com wrote: On Feb 27, 2015, at 2:26 PM, Lee Ann Rucker lruc...@vmware.com wrote: On Feb 27, 2015, at 9:24 AM, Corbin Dunn corb...@apple.com wrote: On Feb 25, 2015, at 9:40 AM, Lee Ann Rucker lruc...@vmware.com wrote: Great

Re: Mac OS X - AppDelegate applicationDidFinishLaunching

2015-03-03 Thread Lee Ann Rucker
On Mar 3, 2015, at 9:13 AM, Dave d...@looktowindward.com wrote: Hi, A, ok, I was trying to avoid mentioning the Window Controller specifically in the App Delegate, but I think this is warped and I will change it so that it creates it there instead of referencing it in the NIB.

titlebar accessory? window:willPositionSheet:usingRect: not called in full-screen mode

2015-02-27 Thread Lee Ann Rucker
On Feb 27, 2015, at 9:24 AM, Corbin Dunn corb...@apple.com wrote: On Feb 25, 2015, at 9:40 AM, Lee Ann Rucker lruc...@vmware.com wrote: Great, because that's exactly what I'm using it for The toolbar case or the certain control one? When you're in fullscreen mode, the toolbar isn't

RE: window:willPositionSheet:usingRect: not called in full-screen mode

2015-02-25 Thread Lee Ann Rucker
Great, because that's exactly what I'm using it for The toolbar case or the certain control one? When you're in fullscreen mode, the toolbar isn't actually attached to your window. It's attached to a separate one so it can slide down with the menubar. But if it's the control, it wouldn't

Re: Human-understandable process name

2015-02-13 Thread Lee Ann Rucker
Start with [NSRunningApplication runningApplicationWithProcessIdentifier:(pid_t)] On Feb 13, 2015, at 1:05 PM, Andrew Keller and...@kellerfarm.com wrote: Hello all, I’m not sure if this is the correct list, but I figure I’ll start somewhere. I’m writing a program that collects activity

Re: How to add a window to a window list(or open document list) on a dock tile menu?

2015-01-27 Thread Lee Ann Rucker
-[NSApplicationDelegate applicationDockMenu:] You can customize everything except the recent documents; you get that for free and can't get rid of it - no, not even if the user clears recent documents from the main menu. On Jan 27, 2015, at 10:38 AM, JongAm Park jongamp...@sbcglobal.net wrote:

RE: Directory navigated to by menu File Open

2015-01-16 Thread Lee Ann Rucker
On 16 Jan 2015, at 01:16, Jerry Krinock je...@ieee.org wrote: So, great, I thought, just override -currentDirectory in the NSDocumentController subclass for TextEdit, and I can make it go wherever I want to. Have you thought about just setting the directoryURL of the NSOpenPanel? If you

Re: Directory navigated to by menu File Open

2015-01-15 Thread Lee Ann Rucker
On Jan 15, 2015, at 4:34 PM, Ken Thomases k...@codeweavers.com wrote: On Jan 15, 2015, at 6:16 PM, Jerry Krinock je...@ieee.org wrote: I have noticed that the directory which is navigated to in the File Open dialog of my NSDocument-based application does not give what I expect, and am

Re: Observing changes in Table

2014-12-17 Thread Lee Ann Rucker
On Dec 17, 2014, at 8:12 AM, Jerry Krinock je...@ieee.org wrote: On 2014 Dec 17, at 07:23, Keary Suska cocoa-...@esoteritech.com wrote: By not using NSMutableDictionary ;-) Yes, that is good advice. I’m also worried that you’ve interposed this NSMutableDictionary in between your

Re: NSView nextResponder always the viewController?

2014-12-16 Thread Lee Ann Rucker
I don't know the answer to that, but even before 10.10 I had problems with inserting responders and found that 10.7's supplementalTargetForAction:sender: did everything I needed insertion for. If that works for what you need it's so much easier to manage. On Dec 16, 2014, at 3:51 PM, Gordon

Re: Opening an Embedded Application in Terminal

2014-12-08 Thread Lee Ann Rucker
On Dec 7, 2014, at 4:42 PM, Keary Suska cocoa-...@esoteritech.com wrote: On Dec 7, 2014, at 1:35 PM, SevenBits sevenbitst...@gmail.com wrote: I don't know if this approach is more likely to work in a sandboxed app. I doubt it, because it would be an enormous hole in the sandbox. If you

Re: TextEdit Document Icon

2014-12-02 Thread Lee Ann Rucker
It's probably being done by this QuickLook plugin: qlmanage -m plugins public.plain-text - /System/Library/QuickLook/Text.qlgenerator There's no sample code for that, but there is QuickLookSketch for the Sketch sample app. QuickLook puts the turned-down corner on for you. On Dec 2,

Re: App fails on Yosemite - Cannot remove an observer

2014-12-01 Thread Lee Ann Rucker
On Dec 1, 2014, at 1:08 PM, Andreas Höschler ahoe...@smartsoft.de wrote: Hi Kyle, Adding #ifdef __APPLE__ - (void)setWindow:(NSWindow *)window { } #endif to my GSScrollView : NSScrollView subclass fixed (or at least worked around) the issue (no exception anymore and no apparent

RE: when has AutoLayout finished its work?

2014-11-26 Thread Lee Ann Rucker
Try setting up width and height constraints on the custom view, then setting their constants to the newSize values. If possible, it should be done in the customView's layout method, and when you need to update it, call setNeedsLayout: first. If it has to be calculated by something else, you

RE: Binding a unique-selection checkbox in a table view?

2014-11-22 Thread Lee Ann Rucker
If your data model allows for Jobs knowing about the active job, I think it'll work to bind the checkbox to something like this: -(BOOL)isActiveJob { self.dataModel.activeJob == self; } and use keyPathsForValuesAffectingValueForKey: to trigger updates to isActiveJob when dataModel.activeJob

Re: Binding a unique-selection checkbox in a table view?

2014-11-21 Thread Lee Ann Rucker
I think binding to a method would be simplest; if you bound it to a value on File's Owner or some other object you'd still have to figure out which one of them was clicked. IBAction gives you the sender, then you can do NSInteger row = [tableView rowForView:sender]; since that works on

Re: Binding a unique-selection checkbox in a table view?

2014-11-21 Thread Lee Ann Rucker
On Nov 21, 2014, at 4:20 PM, Rick Mann rm...@latencyzero.com wrote: On Nov 21, 2014, at 16:19 , Lee Ann Rucker lruc...@vmware.com wrote: I think binding to a method would be simplest; You mean wiring the column's action up? Oops, yeah, so many ways to describe things... if you

Re: Locale query

2014-11-13 Thread Lee Ann Rucker
You could subclass NSDatePicker and have the subclass always set the configuration the way you need it. It's just an NSControl, its only designated initializer is initWithFrame: On Nov 13, 2014, at 7:51 AM, Jonathan Mitchell jonat...@mugginsoft.com wrote: On 13 Nov 2014, at 15:23, John

Re: Weird crash in -[NSSearchField setRecentSearches:]

2014-11-10 Thread Lee Ann Rucker
Do you implement any of the delegate methods corresponding to the notifications? Cocoa will add notifications for you instead of bothering with respondsToSelector: all the time. On Nov 9, 2014, at 5:02 AM, Jerry Krinock je...@ieee.org wrote: On 2014 Nov 07, at 16:02, Greg Parker

Re: NSImage glowing

2014-11-05 Thread Lee Ann Rucker
On Nov 5, 2014, at 5:53 PM, Wim Lewis w...@omnigroup.com wrote: On Nov 5, 2014, at 3:43 PM, Alex Kac a...@webis.net wrote: BUT, in this case I’m just trying to get the glow on selected images, so when I look at the code below all I see is that we’re getting the bitmap and drawing it. I’m

Re: NSImage glowing

2014-11-04 Thread Lee Ann Rucker
If you want the same blue highlight that NSButton applies to template images, you can get the NSButtonCell to draw it into a graphics context and get an image that way - I answered this when you asked about buttons specifically back in June. (My bug requesting an NSImage method to do that is

Re: Turn off background click behavior on a window?

2014-10-29 Thread Lee Ann Rucker
On Oct 29, 2014, at 12:15 PM, Kyle Sluder k...@ksluder.com wrote: On Wed, Oct 29, 2014, at 11:57 AM, Quincey Morris wrote: However, this is the wrong solution. A button that doesn’t click through should *look* different when the app is in the background (and shouldn’t do rollover

Re: NSSavePanel load error

2014-10-27 Thread Lee Ann Rucker
Apple bug - according to classdump, that class has had a “layout” method since before autolayout even existed, and I know from experience it doesn’t grok autolayout. You can ignore it. On Oct 27, 2014, at 11:56 AM, edward taffel etaf...@me.com wrote: just updated my dev machine to yosemite.

RE: Return values of NSAlert

2014-10-22 Thread Lee Ann Rucker
Even the old selector-based one could return NSModalResponse values - I saw it happen once in some over-paranoid code that had a switch for the resultCode and an assert in the default case. Surprise, it wasn't handling Abort. NSSavePanel doc shows it as just -

RE: NSTableView inside NSTextView

2014-10-16 Thread Lee Ann Rucker
You can get TextEdit's source code and see how they did it: https://developer.apple.com/library/mac/samplecode/textedit/Introduction/Intro.html From: cocoa-dev-bounces+lrucker=vmware@lists.apple.com

Re: Compressing glyphs programmatically

2014-09-30 Thread Lee Ann Rucker
On Sep 30, 2014, at 1:04 AM, Hado Hein macli...@batchmaker.de wrote: Hoi. I have a project with a custom font of my customer. Whyever the client wants theirs font in some typos (strings/labels/buttons on screen) to be compressed by 20%. Compressing in this case means that the

Re: Binding to selection of NSArrayController

2014-09-23 Thread Lee Ann Rucker
On Sep 23, 2014, at 9:15 AM, Jonathan Taylor jonathan.tay...@glasgow.ac.uk wrote: [*] One slight glitch - if I add an object to the NSMutableArray then it does not immediately show up in the table, I have to call will/didChangeValueForKey on the property that returns the array. I

Re: NSButton checkbox type with the disable color is not visible in Yosemite

2014-09-22 Thread Lee Ann Rucker
You can file a bug with Apple, it’ll probably get marked as a duplicate of rdar://17986405 A radio button where we set the cell to NSBackgroundStyleDark is drawing in black when its window is not key, and the correct white when it is. On Sep 21, 2014, at 8:41 PM, Appa Rao Mulpuri

RE: return string that is the difference between two other strings

2014-09-21 Thread Lee Ann Rucker
On 21 Sep 2014, at 13:03, Kyle Sluder k...@ksluder.com wrote: No, it is nowhere near a common operation to perform on strings. I stand corrected on that front, then (apparently...). Doesn't change the fact that I need to know how to do it, unless someone is willing to point me in the

Re: Responder Chain Confusion

2014-09-08 Thread Lee Ann Rucker
If you’re targeting 10.7 or later, you can use supplementalTargetForAction:sender: to add a responder chain side branch without modifying the actual chain. On Sep 7, 2014, at 9:24 AM, dangerwillrobinsondan...@gmail.com wrote: Hi all I just spent a bit of time poking around the responder

Re: KVO query

2014-08-13 Thread Lee Ann Rucker
Have you implemented +automaticallyNotifiesObserversForKey: and returned NO for “status” ? On Aug 13, 2014, at 2:53 PM, Jonathan Mitchell jonat...@mugginsoft.com wrote: I have a key path like so which is observed: submission.status.name At one point i need to invoke a manual KVO

Re: applicationWillFinishLaunching vs. applicationDidFinishLaunching for NSDocument-based apps

2014-08-04 Thread Lee Ann Rucker
On Aug 4, 2014, at 1:42 PM, Daryle Walker dary...@mac.com wrote: A lot of sample code I see on web pages about application delegates use the applicationDidFinishLaunching: method for setting up any application-global data or routines. I just read a page about the Cocoa app initialization

Re: Issue with -[NSOutlineView autosaveExpandedItems] - SOLVED

2014-07-11 Thread Lee Ann Rucker
On Jul 11, 2014, at 5:35 AM, Bill Cheeseman wrote: 4. In -awakeFromNib or equivalent, set up the initial expanded/collapsed state of rows in the outline view only once, at first launch on a given computer. Thereafter, leave it to the datasource methods to expand or collapse the

Re: Observing NSArrayController selection property

2014-07-07 Thread Lee Ann Rucker
Do you have selects inserted objects enabled? It's on by default in the nib. - Original Message - From: Luc Van Bogaert luc.van.boga...@me.com To: Cocoa Dev List cocoa-dev@lists.apple.com Sent: Monday, July 7, 2014 1:42:10 PM Subject: Observing NSArrayController selection property Hello

Re: Setting a tag on NSProgressIndicator

2014-07-05 Thread Lee Ann Rucker
Put your collection view prototype in a separate nib, make its File's Owner a subclass of NSCollectionViewItem, add IBOutlets to that. The IconCollection sample app shows how to implement collection view prototypes in separate nibs. Having it in the same nib as the collection view is really

Re: MyShadow was deallocated while key value observers...

2014-06-27 Thread Lee Ann Rucker
Make sure you do self.textShadow = nil before self goes away, that's what gets rid of the observers on it. On Jun 27, 2014, at 1:21 PM, Leonardo wrote: While the user moves the selection within an NSTextView, I show on the UI the values of the current textShadow: offsetX, offsetY and blur. In

Re: NSButton, Templates, images…

2014-06-24 Thread Lee Ann Rucker
According to rdar://9643033, which I filed 3 years ago, the bezelStyle has to be NSTexturedRoundedBezelStyle, and it'll work in 10.6 if bordered is NO, but 10.7 needs a border. I don't know if the bordered part is still required; I came up with a workaround to get just the image in the style I

Re: Dictionaries or custom class containing no methods?

2014-06-17 Thread Lee Ann Rucker
Doesn't seem weird to me, I do it all the time. One advantage of using a custom class over a dictionary is that the compiler knows what's expected of it, while a dictionary is just a black box. On Jun 17, 2014, at 3:21 PM, Trygve Inda wrote: I need to store a large collection of settings

Re: Dictionaries or custom class containing no methods?

2014-06-17 Thread Lee Ann Rucker
On Jun 17, 2014, at 4:16 PM, Trygve Inda wrote: Doesn't seem weird to me, I do it all the time. One advantage of using a custom class over a dictionary is that the compiler knows what's expected of it, while a dictionary is just a black box. On Jun 17, 2014, at 3:21 PM, Trygve Inda

Re: title bar hit test?

2014-06-15 Thread Lee Ann Rucker
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 cosmin.apreute...@gmail.com To: Uli

Re: title bar hit test?

2014-06-15 Thread Lee Ann Rucker
-primary menubars and retrofits the new behavior in surprising ways. But depending on what your goals are, we might know better ways to achieve them. - Original Message - From: Cosmin Apreutesei cosmin.apreute...@gmail.com To: Lee Ann Rucker lruc...@vmware.com Cc: Uli Kusterer witness.of.teacht

Re: NSOutlineView floating group row question

2014-06-14 Thread Lee Ann Rucker
Actually, the default color you get from IB may not be the proper color: rdar://16040037 View-based SourceList header cell default text color should not be a custom It's 49% gray, instead of a named system color. One effect of that is that it's an unreadable gray on blue when selected. It

Re: NSOutlineView floating group row question

2014-06-14 Thread Lee Ann Rucker
@lists.apple.com Sent: Saturday, June 14, 2014 2:17:30 PM Subject: Re: NSOutlineView floating group row question On Jun 14, 2014, at 5:02 PM, Lee Ann Rucker lruc...@vmware.com wrote: Actually, the default color you get from IB may not be the proper color: rdar://16040037 View-based SourceList header

Re: Contextual menus in view-based NSOutlineView

2014-06-11 Thread Lee Ann Rucker
In my cell-based table I created an empty menu whose delegate was the outlineView, then implemented menuNeedsUpdate:, and it didn't need to change for view-based. I think it came from Apple sample code originally, and is basically NSInteger clickedRow = [outlineView clickedRow]; if

Re: Another dumb question about NSWindowController(s)

2014-06-07 Thread Lee Ann Rucker
Delete that init method. Xcode has a standard template and doesn't change it when you tick the make a xib file checkbox. Replace it with - (id)init { return [self initWithWindowNibName:@myGeneratedNibFileName]; } There are plenty of sample apps you can download from Apple that use windows

Re: Simple question? NSButton/checkbox color

2014-06-06 Thread Lee Ann Rucker
There's no supported way to do it and never has been; back in the day when Java's compatibility test had a set button color, the MacLookAndFeel got an exemption because it's just not possible. If you look in the Calendar app bundle it has grayscale checkbox images, which they probably colorize

Re: viewDidLoad and KVO

2014-06-05 Thread Lee Ann Rucker
In my -setFoo: method, I set up KVO on the properties of the foo that I'm interested in displaying. In the -observe... method, I update the various bits of UI as properties change. If you're doing something like this: - (void)setFoo: (Foo *)aFoo { [foo removeObserver:self

Re: Drawing custom contiguous selection highlight in view-based NSOutlineView

2014-06-05 Thread Lee Ann Rucker
Sent: Thursday, June 5, 2014 2:42:49 AM Subject: Re: Drawing custom contiguous selection highlight in view-based NSOutlineView On 05 Jun 2014, at 05:18, Graham Cox graham@bigpond.com wrote: On 5 Jun 2014, at 12:54 pm, Lee Ann Rucker lruc...@vmware.com wrote: It does? When I saw

Re: Drawing custom contiguous selection highlight in view-based NSOutlineView

2014-06-04 Thread Lee Ann Rucker
On Jun 4, 2014, at 7:05 PM, Graham Cox wrote: I have a view-based NSOutlineView, in which I'm using a custom NSTableRowView subclass to customise the appearance of the selection. This works fine. However, because I'm using a gradient effect for the highlight, when there are several

  1   2   3   4   >