bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSCell enhancement


From: Ludovic Marcotte
Subject: NSCell enhancement
Date: Mon, 22 Oct 2001 16:35:32 -0400 (EDT)

Hi,

While porting GNUMail.app to MacOS-X, I've come across an annoying
problem.

In Cocoa, if we call NSCell: -setStringValue with nil, we get an
assertion.

I think we should modify NSCell: -setStringValue to:

- (void) setStringValue: (NSString*)aString
{
  NSString *string = aString;

  NSAssert(aString != nil, @"Invalid parameter not satisfying: aString !=
nil");

  _cell.type = NSTextCellType;
  ... 
}

In order to make porting applications to MacOS-X easier. It may break
some GNUstep apps but I think developers should update their code to be
sure they don't pass nil objects to this method.

I'll see if we should also 'enhance' some other methods.

Thanks,
        Ludovic

-- 
Live as if you were to die tomorrow.
Learn as if you were to live forever.
 - Gandhi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]