Re: NSMenuItem enabling

2010-10-14 Thread Graham Cox
On 15/10/2010, at 3:13 AM, Andreas Höschler wrote: > The validateMenuItem: method is not implemented or always returns YES: The > delegate of the window is my document controller class. This really should > work and it does on MacOSX 10.2, but on MacOSX 10.5 the menu items are all > greyed out

Re: Debug Problem on MacOSX 10.5

2010-10-14 Thread Dave Keck
Try breaking on objc_exception_throw() instead. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/U

Debug Problem on MacOSX 10.5

2010-10-14 Thread Andreas Höschler
Hi all, I am debuging a Objective-C application using gdb /Applications/SOSmartBrowser.app/Contents/MacOS/SOSmartBrowser set environment CRASH_ON_ABORT yes b main r b -[NSException raise] c I get 14.10.2010 6:57:52 PM SOSmartBrowser[15231] *** Canceling drag because exception 'NSInvalidArgum

NSMenuItem enabling

2010-10-14 Thread Andreas Höschler
Hi all, I am still having difficulties getting the NSMenuItems of a programmatically built menu enabled. I am doing _sdmMenu = [[NSMenu alloc] initWithTitle:@"SDM"]; [_sdmMenu addItemWithTitle:@"Emphasize" action:@selector(emphasize:) keyEquivalent:@"e"]; [_sdmMenu addItemWithT

Re: Why is 'missing sentinel in function call' appearing?

2010-10-14 Thread Sean McBride
On Thu, 14 Oct 2010 13:50:42 -0700, Greg Parker said: >`[self alloc]` returns `id`, so the compiler has to guess which method >prototype to use, yours or NSArray's. If it guesses wrong, you'll get >that warning. Sometimes you'll get crashes or incorrect parameter values >when the compiler guesses

Re: Smooth scrolling in NSScrollView

2010-10-14 Thread Gideon King
Thanks for trying to keep me on the design straight and narrow path Kyle, but in this case, it will not affect normal scrolling within the application - only for use in special circumstances which the user will activate. I just tried out the smooth scrolling option and it is a bit smoother than

Re: Smooth scrolling in NSScrollView

2010-10-14 Thread Kyle Sluder
On Thu, Oct 14, 2010 at 6:12 PM, Gideon King wrote: > Hi, I am trying to get a large view to scroll smoothly in an NSScrollView > using an animation on the scrollpoint. The first time I do this, the > scrolling is quite jerky, especially when I get to places where there are > subviews. Once it

Smooth scrolling in NSScrollView

2010-10-14 Thread Gideon King
Hi, I am trying to get a large view to scroll smoothly in an NSScrollView using an animation on the scrollpoint. The first time I do this, the scrolling is quite jerky, especially when I get to places where there are subviews. Once it has shown the subviews (either by my previous manual scrollin

Re: Missing something with CGColorGetComponents()

2010-10-14 Thread Laurent Daudelin
On Oct 14, 2010, at 12:32, Conrad Shultz wrote: > On 10/14/10 10:58 AM, Laurent Daudelin wrote: >> My first foray in Quartz and I'm having some problems, obviously >> missing something. >> >> Given the following code in a subclass of UIButton: >> >> UIColor *baseColor = self.backgroundColor; CGC

Re: Why is 'missing sentinel in function call' appearing?

2010-10-14 Thread Tito Ciuro
Hi Greg, On 14/10/2010, at 17:50, Greg Parker wrote: > There's already a method -[NSArray initWithObjects:], but it accepts a > nil-terminated list of objects. The compiler warns if you call [array > initWithObjects:a, b, c] and forget the nil terminator. > > `[self alloc]` returns `id`, so th

Re: Why is 'missing sentinel in function call' appearing?

2010-10-14 Thread Greg Parker
On Oct 14, 2010, at 1:25 PM, Tito Ciuro wrote: > I'm seeing a weird behavior in Xcode 3.2.4/GCC 4,2. The warning I'm getting > is: missing sentinel in function call > > This is how I have defined the methods: > > + (NSFSomeClass*)someClassWithObjects:(NSArray *)someObjects > { >return [[[sel

Re: Why is 'missing sentinel in function call' appearing?

2010-10-14 Thread Tito Ciuro
Hi David, On 14/10/2010, at 17:32, David Duncan wrote: > On Oct 14, 2010, at 1:30 PM, David Duncan wrote: > >> On Oct 14, 2010, at 1:25 PM, Tito Ciuro wrote: >> >>> return [[[self alloc]initWithObjects:someObjects]autorelease]; >>> warning occurs here >> >> >> -initWithObjects

Re: Why is 'missing sentinel in function call' appearing?

2010-10-14 Thread David Duncan
On Oct 14, 2010, at 1:30 PM, David Duncan wrote: > On Oct 14, 2010, at 1:25 PM, Tito Ciuro wrote: > >> return [[[self alloc]initWithObjects:someObjects]autorelease]; >> warning occurs here > > > -initWithObjects expects a list with a nil terminator, which you have not > provide

Re: Why is 'missing sentinel in function call' appearing?

2010-10-14 Thread David Duncan
On Oct 14, 2010, at 1:25 PM, Tito Ciuro wrote: >return [[[self alloc]initWithObjects:someObjects]autorelease]; > warning occurs here -initWithObjects expects a list with a nil terminator, which you have not provided. If this "works" it is because you are getting very lucky wit

Why is 'missing sentinel in function call' appearing?

2010-10-14 Thread Tito Ciuro
Hello, I'm seeing a weird behavior in Xcode 3.2.4/GCC 4,2. The warning I'm getting is: missing sentinel in function call This is how I have defined the methods: + (NSFSomeClass*)someClassWithObjects:(NSArray *)someObjects { return [[[self alloc]initWithObjects:someObjects]autorelease];

Re: Missing something with CGColorGetComponents()

2010-10-14 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/14/10 10:58 AM, Laurent Daudelin wrote: > My first foray in Quartz and I'm having some problems, obviously > missing something. > > Given the following code in a subclass of UIButton: > > UIColor *baseColor = self.backgroundColor; CGColorRef cg

Missing something with CGColorGetComponents()

2010-10-14 Thread Laurent Daudelin
My first foray in Quartz and I'm having some problems, obviously missing something. Given the following code in a subclass of UIButton: UIColor *baseColor = self.backgroundColor; CGColorRef cgColor = baseColor.CGColor; int32_t model = CGColorSpaceGetModel(CGColorGetColorS

Re: iPhone/iPad device orientation problems

2010-10-14 Thread David Duncan
On Oct 13, 2010, at 10:36 PM, Philip Mobley wrote: > In your UIViewController write something like this (example below is to force > the app into landscape mode only): > > // Override to allow orientations other than the default portrait orientation. > - > (BOOL)shouldAutorotateToInterfaceOrien

Re: Tableview similar to the network preferences in snowleopard

2010-10-14 Thread jonat...@mugginsoft.com
On 14 Oct 2010, at 11:24, Rajendran P wrote: > I am planning to implement a tableview similar to the one present in System > Preferences ---> network pane .will be appropriate to implemented it using a > custom cell similar to ImageAndText cell or is there any other alternate > method > ava

Tableview similar to the network preferences in snowleopard

2010-10-14 Thread Rajendran P
HI I am planning to implement a tableview similar to the one present in System Preferences ---> network pane .will be appropriate to implemented it using a custom cell similar to ImageAndText cell or is there any other alternate method available in snowleopard ? Thanks Rajendran P