Here's how I look at your situation.

Your view is bound to some property. It's job is to listen for KVO notifications and redraw when it gets the KVO notification. That's it. One input. When there's a change on that one input, then redraw.

What you have is 2 inputs and only one notification. ValueTransformers are meant to be less stateful than you're intending them to be.

You might be tempted to try adding a notification for your celsius/ fahrenheit choice and call [self setNeedsDisplay]; But that's not what I'd do.

I'd have whatever-controller-my-view-is-bound-to have a property that represents the temperature based on the current settings. It would receive the userDefault notification and update its temp. property.

We've never explicitly defined a "do this to make the view refresh its bound values". The main reason is that that's a messy way to mentally model the way bindings work.

Sorry if that doesn't answer the question you asked, but hopefully this is information you can use to get work done.

On Aug 14, 2008, at 4:03 PM, Markus Spoettl wrote:

On Aug 14, 2008, at 3:28 PM, Kyle Sluder wrote:
On Thu, Aug 14, 2008 at 6:21 PM, Markus Spoettl
<[EMAIL PROTECTED]> wrote:
So how can I manually make the view update? It seems so simple but I can't
figure out how to do this.

I can think of a couple of ways:
1) When your preference changes, post a notification.  The views
listen for that notificiation, and update themselves accordingly.

OK, but that's exactly what I tried to get down to: How do I make a view update when its value is bound to something. If I feed the value to the view manually, I can do just that again. But how do I make the view update when its value is bound?

Markus
--
__________________________________________
Markus Spoettl

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/luesang%40apple.com

This email sent to [EMAIL PROTECTED]


--------------------------
RONZILLA



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to