• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [Newbie question] Subclassing NSButton
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: [Newbie question] Subclassing NSButton
      • From: "JECKER Frédéric" <email@hidden>
  • Prev by Date: Test - Please disregard
  • Next by Date: Crashing on all relevant exceptions
  • Previous by thread: Re: [Newbie question] Subclassing NSButton
  • Next by thread: Re: [Newbie question] Subclassing NSButton
  • Index(es):
    • Date
    • Thread