[Mono-bugs] [Bug 570959] UISlider does not fire ValueChanged when the value is set via code
http://bugzilla.novell.com/show_bug.cgi?id=570959 http://bugzilla.novell.com/show_bug.cgi?id=570959#c3 Geoff Norton changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #3 from Geoff Norton 2010-02-20 18:19:02 UTC --- This appears to be a bug in the underlying obj-c implementation of UISlider. I wrote the following objc testcase: @implementation SliderController // Implement loadView to create a view hierarchy programmatically, without using a nib. - (void)loadView{ [super loadView]; CGRect frame = CGRectMake(10, 50, 300, 260); label = [[UILabel alloc] initWithFrame:frame]; label.textAlignment = UITextAlignmentCenter; label.font = [UIFont fontWithName:@"Verdana" size:36]; label.text = @"10"; [self.view addSubview:label]; frame = CGRectMake(10, 370, 300, 10); slider = [[UISlider alloc] initWithFrame:frame]; slider.minimumValue = 0.0; slider.maximumValue = 100.0; slider.continuous = NO; slider.value = 10.0; [slider addTarget:self action:@selector(updateLabel:) forControlEvents:UIControlEventValueChanged]; [self.view addSubview: slider]; frame = CGRectMake(10, 10, 300, 40); button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; button.frame = frame; [button setTitle:@"Click Me" forState:UIControlStateNormal]; [button addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview: button]; } - (void)buttonClick: (id) sender { slider.value = 80.0; } - (void)updateLabel: (id) sender { label.text = [NSString stringWithFormat:@"%f", slider.value]; } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { [super viewDidUnload]; // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [super dealloc]; } @end Pushing the button causes the slider to move, but does NOT cause the label to be updated, just like in MonoTouch. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the QA contact for the bug. You are the assignee for the bug. ___ mono-bugs maillist - mono-bugs@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-bugs
[Mono-bugs] [Bug 570959] UISlider does not fire ValueChanged when the value is set via code
http://bugzilla.novell.com/show_bug.cgi?id=570959 http://bugzilla.novell.com/show_bug.cgi?id=570959#c2 Manfred Pohler changed: What|Removed |Added Status|NEEDINFO|NEW Info Provider|manf...@pp-p.net| --- Comment #2 from Manfred Pohler 2010-02-20 06:59:46 UTC --- (In reply to comment #1) > Is this still happening? If so can you provide a test case please. Yes it happens. Create a project and add a class like this. public class VCTest : UIViewController { UIButton btN; UISlider slD; UILabel lbL; public override void ViewDidLoad() { base.ViewDidLoad(); btN = UIButton.FromType(UIButtonType.RoundedRect); btN.Frame = new RectangleF(10, 10, 200, 30); btN.SetTitle("Test", UIControlState.Normal); btN.TouchUpInside += delegate { slD.Value = 50; }; slD=new UISlider(new RectangleF(10, 60, 300, 30)); slD.MinValue = 0; slD.MaxValue = 100; slD.ValueChanged += delegate { lbL.Text = slD.Value.ToString(); }; lbL= new UILabel(new RectangleF(10, 160, 100, 30)); View.AddSubview(btN); View.AddSubview(slD); View.AddSubview(lbL); } } Use this class as you view with public override bool FinishedLaunching (UIApplication app, NSDictionary options) { window.AddSubview(new VCTest().View); window.MakeKeyAndVisible (); return true; } Expected: the button should set the value and fire slD.ValueChanged It does: the button changes the slider value - but it does NOT fire slD.ValueChanged -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the QA contact for the bug. You are the assignee for the bug. ___ mono-bugs maillist - mono-bugs@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-bugs
[Mono-bugs] [Bug 570959] UISlider does not fire ValueChanged when the value is set via code
http://bugzilla.novell.com/show_bug.cgi?id=570959 http://bugzilla.novell.com/show_bug.cgi?id=570959#c1 Geoff Norton changed: What|Removed |Added Status|NEW |NEEDINFO CC||gnor...@novell.com Info Provider||manf...@pp-p.net --- Comment #1 from Geoff Norton 2010-02-19 22:11:33 UTC --- Is this still happening? If so can you provide a test case please. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the QA contact for the bug. You are the assignee for the bug. ___ mono-bugs maillist - mono-bugs@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-bugs