|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
The trouble with Alert.show()I am trying to troubleshoot a problem that only occurs in the Flash
Player ActiveX embedded in an application, so I can't use normal debug methods. I'm trying to use Alert.show() to try to get to the bottom of what's going on. The problem I'm having is that in some situations, this just pops up the blurry overlay with no Alert on top (which means the Alert can't be dismissed). I tried making my Application really narrow to ensure it's not off the side. This is definitely not what is happening. Does anyone know what would cause Alert.show() to come up without an actual Alert? It might provide a clue as to what the larger problem is. Thanks! Amy |
|
|
Re: The trouble with Alert.show()I can't help with the Alert issue, but since I often debug within a
wrapper, here's one alternative that provides a constant, simple debug window. I can't remember, but I might've grabbed it from this forum originally. Paste the code below in your app. Call showWindow() to activate the window. Call debug("your text here") for your debug text. Good luck. import mx.events.*; import mx.containers.*; import mx.controls.*; import mx.managers.PopUpManager; private var _window:TitleWindow; private var debugText:TextArea = new TextArea(); private function showWindow():void { debugText.height = 600; debugText.width= 400; _window = TitleWindow(PopUpManager.createPopUp(this, TitleWindow)); _window.addChild(debugText); _window.showCloseButton = true; _window.addEventListener(CloseEvent.CLOSE,closeHandler); } public function debug(str:String):void { if (debugText.text.length > 1000) debugText.text = ""; debugText.text += str; } private function closeHandler(event:CloseEvent):void { PopUpManager.removePopUp(_window); } --- In flexcoders@..., "Amy" <amyblankenship@...> wrote: > > I am trying to troubleshoot a problem that only occurs in the Flash > Player ActiveX embedded in an application, so I can't use normal debug > methods. I'm trying to use Alert.show() to try to get to the bottom of > what's going on. The problem I'm having is that in some situations, > this just pops up the blurry overlay with no Alert on top (which means > the Alert can't be dismissed). I tried making my Application really > narrow to ensure it's not off the side. This is definitely not what is > happening. > > Does anyone know what would cause Alert.show() to come up without an > actual Alert? It might provide a clue as to what the larger problem is. > > Thanks! > > Amy > |
|
|
Re: The trouble with Alert.show()--- In flexcoders@..., "EddieBerman"
<eddieberman2000@...> wrote: > > I can't help with the Alert issue, but since I often debug within a > wrapper, here's one alternative that provides a constant, simple > debug window. I can't remember, but I might've grabbed it from this > forum originally. > > Paste the code below in your app. > Call showWindow() to activate the window. > Call debug("your text here") for your debug text. > Good luck. > > import mx.events.*; > import mx.containers.*; > import mx.controls.*; > import mx.managers.PopUpManager; > > private var _window:TitleWindow; > private var debugText:TextArea = new TextArea(); > private function showWindow():void { > debugText.height = 600; > debugText.width= 400; > _window = TitleWindow(PopUpManager.createPopUp(this, > TitleWindow)); > _window.addChild(debugText); > _window.showCloseButton = true; > _window.addEventListener(CloseEvent.CLOSE,closeHandler); > } > public function debug(str:String):void { > if (debugText.text.length > 1000) > debugText.text = ""; > debugText.text += str; > } > private function closeHandler(event:CloseEvent):void { > PopUpManager.removePopUp(_window); > } I think the problem is with the DisplayList itself, since other objects are failing to appear, even though everything looks OK and no errors are being thrown. I believe that the problem with the Alert is related to whatever has thrown the display list into a tizzy. So I'm thinking anything else trying to draw to the screen will fail in the same way. I've figured out how to get the problem to happen outside the wrapper, so I'm tracking it down that way. Thanks :-) -Amy |
| Free Forum Powered by Nabble | Forum Help |