Re: Is it possible to update a single tab of an NSTabView?
Re: Is it possible to update a single tab of an NSTabView?
- Subject: Re: Is it possible to update a single tab of an NSTabView?
- From: "David P. Henderson" <email@hidden>
- Date: Tue, 17 Jul 2001 09:40:43 -0400
On Tuesday, July 17, 2001, at 01:46 , email@hidden wrote:
>
I have a tabview with multiple tabs. When new content arrives on one
>
of the tabs, I'd like to flash a small indicator up in the tab to catch
>
the user's eye. Currently, I'm sending the entire NSTabView a display
>
message twice a second (which works great), but you can imagine what
>
that does to my CPU cycles! I've searched all over but can't seem to
>
find an easy way to tell the individual tab to update/redisplay (a
>
command similar to NSOutlineView's reloadItem perhaps?).
>
>
Is there a simple solution to the problem I'm missing? does anyone have
>
any experience with this?
>
You should look at using Notifications. Have whichever object is
responsible for receiving/processing new content post a notification
that there is new content; then, register your view delegate/object as
an observer of that notification. See NSNotification and
NSNotificationCenter in Foundation. For an example of posting/observing
notifications take a look at the Vermont Recipes
<
http://www.stepwise.com/Articles/VermontRecipes/>
Dave
--
Chaos Assembly Werks
"Imagination is more important than knowledge."
- Albert Einstein