Re: [Newbie question] Subclassing NSButton
Re: [Newbie question] Subclassing NSButton
- Subject: Re: [Newbie question] Subclassing NSButton
- From: Matt Neuburg <email@hidden>
- Date: Sun, 06 Aug 2006 15:23:23 -0700
- Thread-topic: [Newbie question] Subclassing NSButton
On Sun, 6 Aug 2006 20:52:11 +0200, " JECKER Fr?d?ric " <email@hidden>
said:
[snip irrelevant stuff]
>adding the following method to my HoverNSButton class:
>- (void) setContext:(NSString*)content container:(NSTextField*)field{
> NSLog(@"Setting Context");
> NSLog(content);
> text=content;
> NSLog(text);
> textfield=field;
>}
>
>I call this method for each button in my controller but this don't work.
>I tried to debug the whole thing but the debugger doesn't enter the
>setContext method.
What does "don't work" mean? Are the log messages appearing?
(a) If not, clearly you are *not* calling this method, and the question
would then be how you are forming those calls and who you're sending them
to.
(b) If the log messages are appearing, then it would be necessary to explain
what you think should happen, that "text" and "textfield" are, and so on.
Incidentally, if "text" is an ivar, you probably will have memory management
problems here (i.e. you aren't doing any, which since "content" is an
NSString is surely a mistake that could bite you one way or another). m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden