My version of the code says that it died creating the track, not the
Slider itself which is defined by the "trackSkin" style.  Maybe that's
not a valid class

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of bryancostanich
Sent: Tuesday, August 19, 2008 10:50 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Custom Component: Instantiation attempted on a
non-constructor.

 

here's the stack trace, it's all internal stuff, so i didn't post:
TypeError: Error #1007: Instantiation attempted on a non-constructor.
at
mx.controls.sliderClasses::Slider/createBackgroundTrack()[E:\dev\3.0.x\f
rameworks\projects\framework\src\mx\controls\sliderClasses\Slider.as:167
2]
at
mx.controls.sliderClasses::Slider/createChildren()[E:\dev\3.0.x\framewor
ks\projects\framework\src\mx\controls\sliderClasses\Slider.as:1224]
at
mx.core::UIComponent/initialize()[E:\dev\3.0.x\frameworks\projects\frame
work\src\mx\core\UIComponent.as:5262]
at
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAd
ded <http://www.adobe.com/2006/flex/mx/internal::childAdded>
()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as
:5159]
at
mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdde
d <http://www.adobe.com/2006/flex/mx/internal::childAdded>
()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Container.as:3
297]
at
mx.core::Container/addChildAt()[E:\dev\3.0.x\frameworks\projects\framewo
rk\src\mx\core\Container.as:2210]
at
mx.core::Container/addChild()[E:\dev\3.0.x\frameworks\projects\framework
\src\mx\core\Container.as:2140]
at
mx.core::Container/createComponentFromDescriptor()[E:\dev\3.0.x\framewor
ks\projects\framework\src\mx\core\Container.as:3673]
at
mx.core::Container/createComponentsFromDescriptors()[E:\dev\3.0.x\framew
orks\projects\framework\src\mx\core\Container.as:3485]
at
mx.core::Container/createChildren()[E:\dev\3.0.x\frameworks\projects\fra
mework\src\mx\core\Container.as:2587]
at
mx.core::UIComponent/initialize()[E:\dev\3.0.x\frameworks\projects\frame
work\src\mx\core\UIComponent.as:5262]
at
mx.core::Container/initialize()[E:\dev\3.0.x\frameworks\projects\framewo
rk\src\mx\core\Container.as:2524]
at
mx.core::Application/initialize()[E:\dev\3.0.x\frameworks\projects\frame
work\src\mx\core\Application.as:847]
at
Test_InstantiationBug/initialize()[C:\[devlocal]\[flex]\src\Test_Instant
iationBug.mxml:0]
at
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::c
hildAdded <http://www.adobe.com/2006/flex/mx/internal::childAdded>
()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\SystemMana
ger.as:1625]
at
mx.managers::SystemManager/initializeTopLevelWindow()[E:\dev\3.0.x\frame
works\projects\framework\src\mx\managers\SystemManager.as:2482]
at
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::d
ocFrameHandler
<http://www.adobe.com/2006/flex/mx/internal::docFrameHandler>
()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\SystemMana
ger.as:2330]

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> That doesn't make sense. 
> 
> 
> 
> When you get a runtime exception always use a debug build and post the
> entire stacktrace.
> 
> 
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
[mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of bryancostanich
> Sent: Monday, August 18, 2008 2:14 PM
> To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] Custom Component: Instantiation attempted on a
> non-constructor.
> 
> 
> 
> Hi all, i've created an empty class that extends the Slider control.
> it compiles fine, but when i run it, i get the following error: Error
> #1007: Instantiation attempted on a non-constructor.
> 
> this is how i'm calling it:
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> 
> <http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> > "
> xmlns:tix="com.tixsmart.flex.controls.*" >
> <tix:SeekBar x="91" y="223" width="424" height="11"/> 
> 
> here's my code:
> package com.tixsmart.flex.controls
> {
> import mx.controls.sliderClasses.Slider;
> 
> public class SeekBar extends Slider
> {
> protected var _trackWidth:Number = 1;
> 
> public function SeekBar()
> {
> //TODO: implement function
> super();
> }
> }
> }
>

 

Reply via email to