• 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: NSView and NSMenuItem not updating displays
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView and NSMenuItem not updating displays


  • Subject: Re: NSView and NSMenuItem not updating displays
  • From: Matt Neuburg <email@hidden>
  • Date: Fri, 04 Feb 2005 08:25:07 -0800

On Thu, 3 Feb 2005 15:57:09 -0500, Matt Wilks <email@hidden>
said:
>I've got a custom NSView and a couple of NSMenuItems (in the main menu)
>declared like so:
>
> IBOutlet ConnectStatus *status = [[ConnectStatus alloc] init];
> IBOutlet NSMenuItem *connectItem = [[NSMenuItem alloc] init];
> IBOutlet NSMenuItem *disconnectItem = [[NSMenuItem alloc] init];

If you are creating these objects yourself, then in what sense are these
IBOutlets?

>I am having trouble getting them to update their displays during
>execution of the program.  The MenuItems are being enabled and disabled
>like:
>
> [connectItem setEnabled:YES];
> [disconnectItem setEnabled:NO];
>
>And the custom NSView something like:
>
> [status setColor:[NSColor redColor]];
> [status setString:@"DISCONNECTED"];

What makes an NSView display is what its drawRect says. The way a menu item
is enabled depends on your response to validateMenuItem:. m.

--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>



 _______________________________________________
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: NSView and NSMenuItem not updating displays
      • From: Matt Wilks <email@hidden>
  • Prev by Date: Re: NSOutlineview Datasource
  • Next by Date: MEETING: Pittsburgh - Thursday February 10, 7PM
  • Previous by thread: NSView and NSMenuItem not updating displays
  • Next by thread: Re: NSView and NSMenuItem not updating displays
  • Index(es):
    • Date
    • Thread