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 [n

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 NSImageView and one

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 [cocoa-d

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 text app, or > from p

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 wrote: > > >> On 30 Dec 2015, at 05:53, Lee Ann Rucker wrote: >> >> >>> >> >> >> Actually it's easy. For very similar reasons I needed the same behavior - >> live update of 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. > > However I wa

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. Unless my grep skills have completely deteriorated, there isn't an

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 sty

Re: Best Control for a Matrix these days?

2015-12-03 Thread Lee Ann Rucker
an write your own collection > layout flow. > >> On Dec 3, 2015, at 11:54 AM, Lee Ann Rucker wrote: >> >> That doesn't give you enough control over row/column layout. How about >> nested NSStackViews? >> >> >&g

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) https://urldefense.proofpoint.com/v2/url?u=http-3A__www.garywade.com_&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-

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: cocoa-dev-bounces+lrucker=vmware@lists.a

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 Snow Leopard or earlier, and not for any >> technological reason—

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 patt

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 rectangle), and it is 24 on my toolbar (and also >>

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 >> title bar" (from the doc). I need to display

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 forever that an application >>> pauses processing when the mouse

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. > >> On Sep 25, 2015, at

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 bla

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 - no

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 n

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 loadViewFromNIB

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: cocoa-dev-bounces+lrucker=vmware@lists.appl

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 t

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
e: On Jun 22, 2015, at 17:04 , Lee Ann Rucker mailto: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 some different effect in Yosemite, ID

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 Ju

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/ 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 doesn’t change the URL if you change

Re: NSPathControl

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

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 mailto:lruc...@vmware.com>> wrote: That's very annoying, because we aren

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

RE: NSPathControl

2015-06-01 Thread Lee Ann Rucker
5, at 3:43 PM, Lee Ann Rucker wrote: > > > On May 27, 2015, at 2:55 PM, Jens Alfke wrote: > >> >>> On May 27, 2015, at 2:46 PM, Raglan T. Tiger >>> wrote: >>> >>> I can setObjectValue: for the path; now I want to know what path component

Re: Looking at self = [super init].

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

Re: NSPathControl

2015-05-27 Thread Lee Ann Rucker
On May 27, 2015, at 2:55 PM, Jens Alfke wrote: > >> On May 27, 2015, at 2:46 PM, Raglan T. Tiger 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. Wire up the target/action to your

Re: Issues with implementing WYWIWYG font menu

2015-05-05 Thread Lee Ann Rucker
On May 5, 2015, at 2:21 PM, David Durkee 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 > is opened.

RE: Window Size and Location

2015-04-24 Thread Lee Ann Rucker
___ From: 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 wrote: > > ~/Library/Saved Application State Can the applicatio

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 S

RE: Converting to Window Coordinates

2015-04-22 Thread Lee Ann Rucker
unces+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 wrote: > >> Is hit testing the content view the

RE: Converting to Window Coordinates

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

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-21 Thread Lee Ann Rucker
the Mouse. All the Best Dave > On 21 Apr 2015, at 18:12, Lee Ann Rucker 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

RE: Converting to Window Coordinates

2015-04-21 Thread Lee Ann Rucker
the Content View, what’s the best way to handle this? I could compare the view returned to window.contentView or I could Thanks a lot Dave > On 21 Apr 2015, at 17:06, Lee Ann Rucker wrote: > > How are you getting your global point? There are non-Cocoa parts of the OS >

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 [cocoa-dev-bounces+lrucker=vmware@

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 man

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 e

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 wrote: >

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 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 verbatim > copies

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 wrote: > >> On Feb 27, 2015, at 2:26 PM, Lee Ann Rucker wrote: >> >> >> On Feb 27, 2015, at 9:24 AM, Corbin Dunn wrote: >> >>> >>>> On Feb 25, 2015, at 9:40 AM, Lee Ann Rucker wrote: >>&

Re: Mac OS X - AppDelegate applicationDidFinishLaunching

2015-03-03 Thread Lee Ann Rucker
On Mar 3, 2015, at 9:13 AM, Dave 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. > > Actually, awakeFromN

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 wrote: > >> On Feb 25, 2015, at 9:40 AM, Lee Ann Rucker wrote: >> >>> Great, because that's exactly what I'm using it for >> >> The toolbar case or the "certain control" one? When you're i

RE: Exception on launch when clicking on an NSUserNotification

2015-02-26 Thread Lee Ann Rucker
> The latter is just a notification that the application created internally, > and as a convenience passed to its delegate before or after broadcasting it > using NSNotificationCenter. Actually the delegate gets automatically registered as an observer of that notification, which makes sense - i

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 su

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 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 statistics on othe

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 wrote: > Hello, all. It has be

RE: Directory navigated to by menu File > Open

2015-01-16 Thread Lee Ann Rucker
On 16 Jan 2015, at 01:16, Jerry Krinock 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 do that,

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 wrote: > On Jan 15, 2015, at 6:16 PM, Jerry Krinock 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 trying to control it. > >>

Re: Observing changes in Table

2014-12-17 Thread Lee Ann Rucker
On Dec 17, 2014, at 8:12 AM, Jerry Krinock wrote: > >> On 2014 Dec 17, at 07:23, Keary Suska wrote: >> >> By not using NSMutableDictionary ;-) > > Yes, that is good advice. I’m also worried that you’ve interposed this > NSMutableDictionary in between your array controller and your actual d

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 Ap

Re: Opening an Embedded Application in Terminal

2014-12-08 Thread Lee Ann Rucker
On Dec 7, 2014, at 4:42 PM, Keary Suska wrote: > On Dec 7, 2014, at 1:35 PM, SevenBits 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 can >>> direct Terminal to run arbit

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, 201

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 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 n

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 co

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
On Nov 21, 2014, at 4:20 PM, Rick Mann wrote: > >> On Nov 21, 2014, at 16:19 , Lee Ann Rucker 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... > >

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 NSTableR

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 wrote: > >> On 13 Nov 2014, at 15:23, John Joyce wrote: >> >> >>>

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 wrote: > >> On 2014 Nov 07, at 16:02, Greg Parker wrote: >> >> You m

Re: NSImage glowing

2014-11-05 Thread Lee Ann Rucker
On Nov 5, 2014, at 5:53 PM, Wim Lewis wrote: > > On Nov 5, 2014, at 3:43 PM, Alex Kac 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 not understanding how th

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 sti

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 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 highlighting). So a b

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 wrote: > just updated my dev machine to yosemite. closing a docu

RE: Return values of NSAlert

2014-10-21 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 - (void)beginSheetModalForWindow:(N

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 [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 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 glyph/character (Latin1) sh

Re: Binding to selection of NSArrayController

2014-09-23 Thread Lee Ann Rucker
On Sep 23, 2014, at 9:15 AM, Jonathan Taylor 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 don’t > know if that is

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 wrote: > H

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 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 direction of a b

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 wrote: > I have a key path like so which is observed: > > submission.status.name > > At one point i need to invoke a manual KVO notification like so: > >

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 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 > order, and

LSUIElement, NSStatusItem, and NSSearchField

2014-07-11 Thread Lee Ann Rucker
Questions on this date back to 2003, so I've tried a lot of things. I have an LSUIElement app, with an NSStatusItem and NSSearchField, and I'd much rather be using a menu item with a custom subview rather than showing a window when the status item gets clicked, because there's no way for the men

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 o

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" To: "Cocoa Dev List" Sent: Monday, July 7, 2014 1:42:10 PM Subject: Observing NSArrayController selection property Hello All, I'm observing the "selection" proper

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 onl

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. I

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 n

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

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 (no

Re: title bar hit test?

2014-06-15 Thread Lee Ann Rucker
adds something like Mavericks' non-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" To: "Lee Ann Rucker" Cc: "Uli

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" To: "Uli Kusterer" Cc: "Cocoa Cocoa-Dev

Re: NSOutlineView floating group row question

2014-06-14 Thread Lee Ann Rucker
uot; 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 wrote: > Actually, the "default" color you get from IB may not be the "proper" color: > rdar://16040037 > > Vie

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 a

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 (clicked

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 window

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 coloriz

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

2014-06-05 Thread Lee Ann Rucker
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 wrote: > > On 5 Jun 2014, at 12:54 pm, Lee Ann Rucker wrote: > >> It does? When I saw your subject line I thought you were were

  1   2   3   4   >