Menus to distinguish Numpad vs normal digit keys

2010-09-27 Thread Russ
I have different menu keys set up in my app for control-4 and control-number-pad-4, but it seems that Cocoa is not distinguishing between the two. (There are several key equivalents in the number-pad area that are used for variants on directional motions, ie left, right, up, down, etc, whereas

NSTextView/Field to relinquish firstResponder after return key

2010-09-23 Thread Russ
The desired behavior is that when the user hits the return key after editing the contents of a NSTextView (replaced by NSTextField during editing), the firstResponder should be cleared and set to the overall window, with the text field no longer editing. Instead, the text field becomes fully

SetWindowModality Replacement

2009-01-07 Thread Russ
I'm still looking for a Cocoa replacement for SetWindowModality --- need to be able to change a dialog window modeless or modal for good reasons (this is a big tricky app, not a toy text editor). I tried calling [NSApp run] as a nested run loop to turn modeless, but NSApp stop:0 killed the

How can users check if their mac is 64-bit-capable?

2008-12-11 Thread Russ
Is there an official Apple-supplied list of which Macs (PPC and Intel) are capable of running 64-bit applications? I need something to refer customers to so they can verify whether their machine is 64-bit capable or not. Obviously I could supply a tiny app to tell them, but it's a bit

NSSavePanel mishandling extensions

2008-12-03 Thread Russ
I have a NSSavePanel set up for the user to select a file name to store a file. The user can store it in several different formats. I have a NSPopUpButton configured to allow the user to select the desired format; upon a change, it calls the setRequiredFileType function with that single file

Re: NSSavePanel mishandling extensions

2008-12-03 Thread Russ
It works as desired when only a single permissible file extension is involved. (I have setAllowsOtherFileType:NO) But the issue is that the user has the option to save jpg, tif, bmp, png etc files---a specific supported list of types; the popup selects which type will be saved, and the

Cocoa replacement for SetWindowModality

2008-12-02 Thread Russ
In my UI there's a spot where it's very useful for the user to be able to change a window from modal to modeless for a little while. In Carbon, I used SetWindowModality to do so. How can I do the same in Cocoa? It doesn't look like I can reconfigure a run loop to do this. Thanks.

Re: Cocoa replacement for SetWindowModality

2008-12-02 Thread Russ
in __wFlags, which suggests it is cached, and that this strategy probably won't work. - Original Message Sent: Tuesday, December 2, 2008 12:32:24 PM Subject: Re: Cocoa replacement for SetWindowModality On Dec 2, 2008, at 7:28 AM, Russ wrote: In my UI there's a spot where it's very useful

NSComboBox list is incorrect size on first dropdown

2008-11-25 Thread Russ
I have an NSComboBox whose contents (internal list) gets loaded dynamically during the comboBoxWillPopUp notification. It is created with setNumberOfVisibleItems:9 and setHasVerticalScroller:YES. The first time the button is clicked, there is a removeAllItems and then the items are loaded in

Re: Using PDF for help --- with spotlight search?

2008-11-24 Thread Russ
I'm trying to get spotlight search support for my PDF help file, users expect it to work since the input field is there. This is legit: Apple Final Cut Pro has PDF-based help. I've been studying what Final Cut Pro does--- it has CFBundleHelpBookFolder set to a folder containing the PDF, and

Re: Blue default button style hangs. (THREADED DRAWS!)

2008-11-21 Thread Russ
-emptively trap the cross-thread draw before it is flipped to the other thread, and generate a flat fall-back background. Better ideas or further explanation? - Original Message From: j o a r [EMAIL PROTECTED] To: Russ [EMAIL PROTECTED] Sent: Wednesday, November 12, 2008 3:51:14 PM Subject

Crash in Attributed String (x64)

2008-11-20 Thread Russ
I'm trying to change the color of a button's text by setting it's title using an attributed string; there are code snippets on the web, but I'm seeing a crash NSAttributedString *attrTitle; NSDictionary *dict; dict = [NSDictionary dictionaryWithObjectsAndKeys: colr,

Re: Crash in Attributed String (x64)

2008-11-20 Thread Russ
It turned out that the problem was really occurring in the setAttributedTitle --- a bad control value was getting passed in. Pretty sure I single-stepped through it a dozen different time, but whatever. - Original Message From: Shawn Erickson [EMAIL PROTECTED] To: Russ [EMAIL

Set Text Color of NSBox (ANSWERED)

2008-11-20 Thread Russ
Once I fixed the color of my checkboxes and radio buttons to match the overall light on dark UI scheme (user-configurable), my NSBox text stuck out as a sore thumb. NSBox does not support setAttributedTitle, but fortunately there is an incredibly simple way to set the color of NSBox text:

Using PDF for help --- with spotlight search?

2008-11-20 Thread Russ
I think this is an old feature request. I have a large existing PDF help file --- many hundreds of pages. Fact: it's not getting re-authored in Apple Help. Even Apple does not use Apple Help for products such as Motion --- very few pro apps do. So we work with what we've got. I do have a

Re: Blue default button style hangs.

2008-11-19 Thread Russ
I'm looking at this a little more at the moment. Three things concern me: 1) My NSButton instance that is supposed to become default button is enclosed within a small container view, so it is a little further down the view hierarchy than it might otherwise be. Ie the hierarchy is

Re: Fetch value from field editor during editing?

2008-11-18 Thread Russ
Yeah, I had one of these. Problem was, I needed two. I had the one set up using Target/Action instead of delegate. With the two separate flavors, much cheerier now. Thanks. - Original Message From: Wayne Packard [EMAIL PROTECTED] To: Russ [EMAIL PROTECTED] Cc: cocoa-dev

Re: Fetch value from field editor during editing?

2008-11-17 Thread Russ
Any ideas on why the field editor doesn't report the value as it is being edited? A further problem I've encountered: controlTextDidChange is called very infrequently --- only after committing the edit, after changing focus. I'm looking for notifications after each character --- that's my

Re: Fetch value from field editor during editing?

2008-11-17 Thread Russ
as the value changes. - Original Message Sent: Monday, November 17, 2008 10:52:46 AM Subject: Re: Fetch value from field editor during editing? On Mon, Nov 17, 2008 at 10:41 AM, Russ wrote: Any ideas on why the field editor doesn't report the value as it is being edited? NSTextField

Fetch value from field editor during editing?

2008-11-16 Thread Russ
I need to be able to find the current value of a NSTextField even if it is being edited. I have the following code to check if it is being edited, and get the value from the field editor instead: fresp = [[txtf window] firstResponder]; if ([fresp isKindOfClass:[NSTextView

Re: Setting up a main menu in a NIB(XIB)?

2008-11-12 Thread Russ
:28:46 AM Subject: Re: Setting up a main menu in a NIB(XIB)? On Wed, Nov 12, 2008 at 12:03 AM, Russ wrote: I am trying to get my application menu (About/Preferences/Services/Hide/Quit) set up. My app has no need for NIBs, There's no such thing as a Cocoa app which has no need for a nib

Re: Setting up a main menu in a NIB(XIB)?

2008-11-12 Thread Russ
It might be that your application doesn't use NSApplicationMain() as the program starting point.This function is responsible for initializing stuff and loading the main bundle's main nib file as specified in the Info.plist file. Correct, I do not use it. Use NSApplication's sharedApplication and

Blue default button style hangs.

2008-11-12 Thread Russ
I'm trying to get the blue default button style to show up. It's NSMomentaryPushInButton with NSRoundedBezelStyle. I have it set as InitialFirstResponder. Works fine to start with. But if I setKeyEquivalent:@\r on it, or take its parent (modal) window and setDefaultButtonCell:[btn cell] on it,

Re: Setting up a main menu in a NIB(XIB)?

2008-11-12 Thread Russ
argc, ...). (Same for termination, for that matter) This all runs on 64-bit btw. Thanks for the help. - Original Message From: Etienne Guérard To: Russ ; cocoa-dev@lists.apple.com Sent: Wednesday, November 12, 2008 1:52:25 PM Subject: RE: Setting up a main menu in a NIB(XIB

Setting up a main menu in a NIB(XIB)?

2008-11-11 Thread Russ
I am trying to get my application menu (About/Preferences/Services/Hide/Quit) set up. My app has no need for NIBs, aside from that I've been told that one is required to set up the application menu due to some indeterminate Cocoa hard-wiring. I'm correspondingly clueless about IB and happy to

Skinny NSPanel titlebar for NSWindow?

2008-11-07 Thread Russ
I'd like to be able to create NSWindows with the skinny titlebar of NSPanels, programmatically, without having to use NSPanel --- I've subclassed NSWindow, so if I need to create an NSPanel instead I'll have to have a duplicate subclass for the panel, which gets ugly. Is there a way to get

Re: Skinny NSPanel titlebar for NSWindow?

2008-11-07 Thread Russ
Subject: Re: Skinny NSPanel titlebar for NSWindow? On Nov 7, 2008, at 5:51 PM, Russ wrote: I'd like to be able to create NSWindows with the skinny titlebar of NSPanels, programmatically, without having to use NSPanel --- I've subclassed NSWindow, so if I need to create an NSPanel instead I'll

Re: Screen not redrawing - SOLVED

2008-10-20 Thread Russ
: Russ [EMAIL PROTECTED] To: cocoa-dev@lists.apple.com Sent: Monday, October 20, 2008 1:30:57 PM Subject: Re: Screen not redrawing Still having trouble getting my screen redraw to come to life. Very odd--- 1) The window title bar isn't getting redrawn right either when a different app's menu steps

Re: Screen not redrawing

2008-10-17 Thread Russ
that must be tickled, or the NSApp. Looks a lot like the draw is OK, just not making it to the screen. - Original Message Sent: Friday, October 17, 2008 5:53:36 PM Subject: Re: Screen not redrawing --- On Fri, 10/17/08, Russ [EMAIL PROTECTED] wrote: My app is drawing acceptably (for now

Re: Screen not redrawing

2008-10-17 Thread Russ
to the screen itself. So unfortunately I am indeed looking for a little magic pixie dust to sprinkle on this. Should work, doesn't, pull hair. - Original Message From: Graham Cox [EMAIL PROTECTED] To: Russ [EMAIL PROTECTED] Cc: cocoa-dev@lists.apple.com Sent: Friday, October 17, 2008 7:39:21 PM

Re: Screen not redrawing

2008-10-17 Thread Russ
Check to make sure [window isFlushWindowDisabled] is NO and [window isAutodisplay] is YES. Yes, both OK. Also, try dropping a standard control (e.g. a button) in and see if it redraws to the pressed state when you press it. When I do this programmatically after creating the main window's

Hand-building an Application Menu

2008-10-16 Thread Russ
My menus are generated programmatically, not with a NIB (non-negotiable). That works fine. I've been trying to get a correct Application menu, though, without success after a wasted day. The code I have is based on stuff I have found on the web and seems to make sense in principle. It all runs,

Re: Hand-building an Application Menu

2008-10-16 Thread Russ
own private NSMenu for the application and system menus, and combines the mainmenu supplied with those private submenus. So it seems to be a battle to get at the semi-private menus, which is a bit maddening. On Oct 16, 2008, at 5:45 PM, Russ wrote: My menus are generated programmatically

super respondsToSelector

2008-05-31 Thread Russ McBride
Anyone want to take a stab at explaining to me as thoroughly as possible why [super respondsToSelector: aSelector] doesn't actually do what it looks like it should do? Bonus points if you can explain why I can override the respondsToSelector:(SEL)aSelector method in my object and