Re: custom view won't update
Re: custom view won't update
- Subject: Re: custom view won't update
- From: H M <email@hidden>
- Date: Mon, 10 Sep 2007 20:06:46 +0100
On 10. Sep 2007, at 19:40, I. Savant wrote:
-display forces the view to redraw itself immediately.
meaning it should call the drawRect method, right? but that method
does not get called when i move a slider. it is only called when i
change the size of the window and thereby the size of the view.
If you want changes to happen while moving the slider, you need to
check the slider's "Continuously send action while sliding" checkbox
in Interface Builder.
I know. I've done that.
Regarding necessary code, what's in your view's -drawRect: method?
"Post your code" means you need to post all the relevant code. The
contents of your custom -drawRect: method is certainly that.
I fail to see what difference the code in the drawRect method can
make if it isn't even called...
<outlets>
You don't need them unless you want to message them. The "sender"
argument refers to the sender of the message (in this case, your
slider), so it will be fine in this case.
I turned those lines into comments and re-built the program, and it
behaved exactly the same way. so I guess I won't need them for this
version.
I guess I better keep them, because i plan to add some new features
like double-click on the view, in which case I want the sliders to be
in the correct positions for the new values...
--
GPG Key ID: 92AD877F7E4E32B9
Fingerprint: 16B0 7DCD 3AB0 0C45 F5FD 581D 92AD 877F 7E4E 32B9
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden