Image and class
Image and class
- Subject: Image and class
- From: jean-michel daix <email@hidden>
- Date: Wed, 17 Oct 2001 12:07:28 +0200
Hello, again,
I9ve got a class where I create an image. I want to resize this Image from
my main implementation. Should I re-init my class or can I change my image
size.
When I try to do this I9ve got this message : "app has exited due to signal
10 (SIGBUS)."
I mean I've created my class like this :
- (id)init {
self = [super init];
if (self) {
myRect = VALID_RECT;
[self createImageFromrect: myRect ];
}
return self;
}
- (void)createImageFromrect:(NSRect)rect {
if (myImage != nil)
[myImage release];
myImage= [[NSImage alloc] initWithSize: rect.size ];
}
From my main implementation I Init like this :
myClass= [[ImageClass alloc] init];
But the app failed on this :
[myClass createImageFromrect:myNewrect];
I know I'm wrong, but can someone tell me where ? Thanks !
-----------------------------------
jean-michel daix / <email@hidden>
Sorry, I9m French !
visit <
http://www.adforum.com>