views:

39

answers:

0

This is such a simple code that compiles correctly, but I'm getting the error below when running it

TypeError: Error #1007: Instantiation attempted on a non-constructor.
           at mx.controls::ProgressBar/createChildren()[E:\dev\4.0.0\frameworks\pro jects\framework\src\mx\controls\ProgressBar.as:1110]
           at mx.core::UIComponent/initialize()[E:\dev\4.0.0\frameworks\projects\fr amework\src\mx\core\UIComponent.as:7250]
......

Here's the code that gives this error:

<s:TitleWindow ...>
.....
.....


<s:controlBarContent>
<com:IconButton id="btnAdd" toolTip="Add file(s)" click="addFiles()" icon="{addIcon}"
                          skinClass="com.skins.IconButtonSkin" width="20"/>
<com:IconButton id="btnRemove" toolTip="Remove file(s)" click="removeFiles()" icon="{removeIcon}"
                          skinClass="com.skins.IconButtonSkin" width="20"/>
<mx:ProgressBar id="uploadProg" labelPlacement="center" width="100%"/>
<com:IconButton id="btnCancel" toolTip="Cancel upload" icon="{cancelIcon}" click="onUploadCanceled()"
                          skinClass="com.skins.IconButtonSkin" width="20"/>
<com:IconButton label="Upload" toolTip="Upload file(s)" id="btnUpload" icon="{uploadIcon}" click="uploadFiles()"
                          skinClass="com.skins.IconButtonSkin" width="20"/>
<com:IconButton id="btnView" toolTip="Show/Hide file(s)" click="changeView()"
                          icon.full="{viewIconFull}" icon.mini="{viewIconMini}"
                          skinClass="com.skins.IconButtonSkin" width="20"/>
</s:controlBarContent>
</s:TitleWindow>

If I remove the progressbar code from here, it runs fine. But with that one line, I get above error during runtime. With this line in, even the Design mode doesn't show-up in Flash Builder 4 :(

Any idea what could be the issue here?

PS: I've tried with the normal s:Button as well, before the skinned button component. So obviously those can't be the problem.