我當前正在嘗試添加一個自定義類,它將UIComponent的子類同時添加到樹和畫布,但是當我嘗試通過拖動重新排序樹時,出現此錯誤:在Flex中添加UIComponent到畫布和樹3
TypeError:錯誤#1010:術語未定義且沒有屬性。 at mx.controls :: Tree/get firstVisibleItem()[C:\ autobuild \ 3.2.0 \ frameworks \ projects \ framework \ src \ mx \ controls \ Tree.as:764] at flash.utils :: ByteArray/writeObject() at flash.desktop :: Clipboard/putSerialization() at flash.desktop :: Clipboard/convertFlashFormat()flash.desktop :: Clipboard/setData() at mx.managers :: NativeDragManagerImpl/doDrag() )[C:\ autobuild \ 3.2.0 \ frameworks \ projects \ airframework \ src \ mx \ managers \ NativeDragManagerImpl.as:282] at mx.managers :: DragManager $/doDrag()[C:\ autobuild \ 3.2。 0 \ frameworks \ projects \ framework \ src \ mx \ managers \ DragManager.as:243] at mx.controls.listClasses :: ListBase/dragStartHandler()[C:\ autobuild \ 3.2.0 \ frameworks \ projects \ framework \ src \ mx \ controls \ listClasses \ ListBase.as:9085] 在flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core :: UIComponent/dispatchEvent()[C:\ autobuild \ 3.2.0 \ frameworks \ projects \ framework \ src \ mx \ core \ UIComponent.as:9298] at mx.controls.listClasses :: ListBase/mouseMoveHandler()[C:\ autobuild \ 3.2.0 \ frameworks \ projects \ framework \ src \ mx \ controls \ listClasses \ ListBase.as:8822]
當我不將UIComponent添加到畫布時,這個錯誤不會發生,任何人都不知道爲什麼會發生這種情況?
你想添加你的類的同一個實例或不同的實例嗎? – 2010-04-09 08:30:36