Thumb owner gets fixed up, but not the track which is parented by a
UIComponent which is a child of the Slider

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of bryancostanich
Sent: Tuesday, August 19, 2008 1:49 PM
To: [email protected]
Subject: [flexcoders] Casting parent to HSlider fails

 

Hi all,

I have a custom track for a slider control. in it i'm trying to wire
up the change for the parent slider so that when the slider changes, i
can do some stuff. i have this in my initialize() method:

Slider(owner).addEventListener(SliderEvent.CHANGE, this.parent_change);

however, when i run it, i get:
TypeError: Error #1034: Type Coercion failed: cannot convert
mx.core::[EMAIL PROTECTED] to mx.controls.sliderClasses.Slider.

but the thing is, i stopped and debugged and i saw that the owner was
of type HSlider. I thought, well, maybe there is an inheritance issue,
so i changed the cast to HSlider temporarily and i still got the error.

am i misunderstanding something here?

thanks.
-b

 

Reply via email to