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

NSView and NSMenuItem not updating displays


  • Subject: NSView and NSMenuItem not updating displays
  • From: Matt Wilks <email@hidden>
  • Date: Thu, 3 Feb 2005 15:57:09 -0500
  • Mail-followup-to: Cocoa Dev <email@hidden>
  • Organization: Computing and Networking Services

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];

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"];

There is even an explicit call to [status display] in the function to
update the NSView.  I can see that these functions are being called with
some NSLog statements I threw in, but none of these things are actually
being updated in the application GUI during runtime.  Any suggestions on
where I might be going off?

--
Matthew Wilks
University of Toronto        Computing and Networking Services
(416) 978-3328               email@hidden
4 Bancroft Ave., Rm. 102     Toronto, ON  M5S 1C1
 _______________________________________________
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

  • Prev by Date: Re: Stop dragging my <NSWindow> around
  • Next by Date: Re: Detecting ctrl-click (context menu) in NSBrowser
  • Previous by thread: NSComboBoxCell on a NSTableColumn getting and setting its value from/to the model through bindings
  • Next by thread: Re: NSView and NSMenuItem not updating displays
  • Index(es):
    • Date
    • Thread