Re: NSTask curl

2009-06-07 Thread Dave Camp
On Jun 6, 2009, at 3:18 PM, Ammar Ibrahim wrote: On Sun, Jun 7, 2009 at 1:09 AM, Bill Bumgarner b...@mac.com wrote: On Jun 6, 2009, at 3:05 PM, Ammar Ibrahim wrote: Thanks that fixed it! Although when you call it directly from the command line, it's fine to have the space there! I'd

Using non-id sender in IBAction methods

2009-06-07 Thread Marc Liyanage
With the new dot notation I sometimes use explicit types in my IBAction methods: - (IBAction)doSomething:(UIButton *)button ... instead of - (IBAction)doSomething:(id)sender ... so I don't have to downcast sender to be able to use the dot notation. Do others do this too? Is this

NSOutlineView and tags...

2009-06-07 Thread Scott Andrew
This may sound like a newbie questions but never had this issue before.. I am trying to add a tag ID to an NSOutlineView thats in one view controller. In another view controller is a table view. I listen to NSOutlineViewSelectionDidChange notifications and fill the table based on the

Re: NSOutlineView and tags...

2009-06-07 Thread Keary Suska
On Jun 7, 2009, at 9:54 AM, Scott Andrew wrote: This may sound like a newbie questions but never had this issue before.. I am trying to add a tag ID to an NSOutlineView thats in one view controller. In another view controller is a table view. I listen to NSOutlineViewSelectionDidChange

Re: Using non-id sender in IBAction methods

2009-06-07 Thread Ken Thomases
On Jun 7, 2009, at 10:45 AM, Marc Liyanage wrote: With the new dot notation I sometimes use explicit types in my IBAction methods: - (IBAction)doSomething:(UIButton *)button ... instead of - (IBAction)doSomething:(id)sender ... so I don't have to downcast sender to be able to use the dot

NSTabView; How to get the current / active tab ..?

2009-06-07 Thread Martin Batholdy
hi, I have an IBOutlet defined in my header; IBOutlet NSTabView *tabView; This Outlet is connected with a TabView generated with Interface Builder. The TabView has two tabs, and in my implementation file I want to do something when tab1 is active and something else when tab2 is active.

Re: NSTabView; How to get the current / active tab ..?

2009-06-07 Thread Greg Guerin
Martin Batholdy wrote: if([tabViewItemX isEqualTo:[tabView tabViewItemAtIndex:0]]){ Don't use isEqualTo: in this situation. Read the docs for isEqualTo:, and compare with the docs for isEqual:. Use isEqual:, which I suspect will work, or just use == since you're probably

NSMenuItem with CustomView - strange behavior

2009-06-07 Thread Peter Krajcik
Hello, I ma trying to mimic a grey color look of menus like in Apple Pro Apps. I found a way how to change a background color of menu (top and bootom caps) and using custom View in NSMenuItem I can do what I need in NSView in a place of NSMenuItem (background, text, image). I am using this

Re: NSOutlineView and tags...

2009-06-07 Thread Scott Andrew
Chalk this up to me having two copies of the project around and having one of those moments.. Scott On Jun 7, 2009, at 9:47 AM, Keary Suska wrote: On Jun 7, 2009, at 9:54 AM, Scott Andrew wrote: This may sound like a newbie questions but never had this issue before.. I am trying to add

Re: Using non-id sender in IBAction methods

2009-06-07 Thread Uli Kusterer
Am 07.06.2009 um 08:45 schrieb Marc Liyanage: With the new dot notation I sometimes use explicit types in my IBAction methods: - (IBAction)doSomething:(UIButton *)button ... instead of - (IBAction)doSomething:(id)sender ... so I don't have to downcast sender to be able to use the dot

How to detect a click on app's dock icon (when the app is active)?

2009-06-07 Thread Stuart Malin
I have a non Document based app. If the window is closed, I want to have the user be able to get it back by clicking on the dock icon. (Note that Apple's Mail does this). I have implemented NSApplication's - (void) applicationDidBecomeActive:(NSNotification *)notif but that is only

Re: How to detect a click on app's dock icon (when the app is active)?

2009-06-07 Thread Andy Lee
On Jun 7, 2009, at 8:50 PM, Stuart Malin wrote: I have a non Document based app. If the window is closed, I want to have the user be able to get it back by clicking on the dock icon. (Note that Apple's Mail does this). I have implemented NSApplication's - (void)

Re: Using non-id sender in IBAction methods

2009-06-07 Thread Bryan Henry
I hope you aren't suggesting that he use assertions in production code - that's much worse practice than specifying a non-id parameter for an action method. As someone already said, if your action method is specific enough to the type of sender object where specifying it's type keeps you

Re: How to detect a click on app's dock icon (when the app is active)?

2009-06-07 Thread Stuart Malin
On Jun 7, 2009, at 3:05 PM, Andy Lee wrote: On Jun 7, 2009, at 8:50 PM, Stuart Malin wrote: I have a non Document based app. If the window is closed, I want to have the user be able to get it back by clicking on the dock icon. (Note that Apple's Mail does this). I have implemented

Re: Using non-id sender in IBAction methods

2009-06-07 Thread Andy Lee
On Jun 7, 2009, at 9:09 PM, Bryan Henry wrote: I hope you aren't suggesting that he use assertions in production code - that's much worse practice than specifying a non-id parameter for an action method. Well, you can configure your build to strip NSAssert from Release code, if that isn't

Re: NSTabView; How to get the current / active tab ..?

2009-06-07 Thread Scott Andrew
Why not use unique identifiers for each tab item? Each NSTabViewItem has an identifier value. Using that and some defines you can use do the following: #define GENERAL_TAB 1 #define FONT_TAB 2 NSTabViewItem* tabViewItem = [tabView selectedTabViewItem]; switch([tabViewItem identifier]) {

Re: How to detect a click on app's dock icon (when the app is active)?

2009-06-07 Thread Andy Lee
On Jun 7, 2009, at 9:17 PM, Stuart Malin wrote: Q: I presume it doesn't matter what value is returned for - applicationOpenUntitledFile (I happen to be returning NO because no file was opened). I don't know, but my guess is that if it seems to work, you can assume it works. Maybe a

Re: NSTabView; How to get the current / active tab ..?

2009-06-07 Thread Andy Lee
Well, [tabViewItem identifier] returns an id, not an int, but the general idea is probably a good one -- decide your action based on the identifier rather than the position of the tab, in case you decide to rearrange the tabs later. --Andy On Jun 7, 2009, at 9:36 PM, Scott Andrew wrote:

Re: NSTabView; How to get the current / active tab ..?

2009-06-07 Thread Scott Andrew
Duh.. So a bit of correction to my code. #define GENERAL_TAB 100 #define FONT_TAB 101 NSTabViewItem* item = [tabView selectedTabViewItem]; switch ([[item identifier] intValue]) { case GENERAL_TAB: NSLog(@Tab 1); break; case

selecting tab in a tabless NSTabView in IB

2009-06-07 Thread Stephen Blinkhorn
Hello Cocoa Dev, Does anyone know if it is possible to change the current tab in a tabless NSTabView from within Interface Builder without having to go into the inspector and change tabless style to top tabs, right tabs etc. I use a lot of small tabless NSTabView objects and I finally got

Re: Backtabbing into an NSTableView

2009-06-07 Thread Vadim
An update on this question. It turns out the first bit of code does not work after all, because 48 is the keyCode for [Tab] and [Shift +Tab]. I needed to change the code to the following: -(void)keyDown:(NSEvent *)theEvent { if ([theEvent keyCode] == 48 ([theEvent modifierFlags]

Shadow is inside of the object. After Clipping object does not show.

2009-06-07 Thread Agha Khan
Hi: I have a Hexagon where I have filled a solid color and it is working. Now I placed a shadow which is showing in side of hexagon, which it should not. Very strange. Second I wanted to clip that hexagon so outside of this hexagon (I used path to make that object) should not be dragged.

Re: selecting tab in a tabless NSTabView in IB

2009-06-07 Thread Rob Keniger
On 06/06/2009, at 6:08 AM, Stephen Blinkhorn wrote: Does anyone know if it is possible to change the current tab in a tabless NSTabView from within Interface Builder without having to go into the inspector and change tabless style to top tabs, right tabs etc. I use a lot of small tabless

Re: selecting tab in a tabless NSTabView in IB

2009-06-07 Thread Jonathan Hess
On Jun 7, 2009, at 9:13 PM, Rob Keniger wrote: On 06/06/2009, at 6:08 AM, Stephen Blinkhorn wrote: Does anyone know if it is possible to change the current tab in a tabless NSTabView from within Interface Builder without having to go into the inspector and change tabless style to top