开发者

Runtime Error 1007 on a simple ProgressBar in Flex 4

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:Butt开发者_运维百科on as well, before the skinned button component. So obviously those can't be the problem.


Just ran into this... I'm guessing it's because you've got a 3.x swf loading into a 4.x application.

Checkout this link for more info... http://forums.adobe.com/message/2721478

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜