![]() |
![]() |
||||||
|
|||||||
| Tags: |
![]() |
|
|||
|
I use the mx:Text field to display html-text, using the htmltext property,
however when I embed a html I may get a Unhandled IOErrorEvent. I want to catch this exception (and ignore, or display a warning). Because the content I am showing i the html-field is edited by multiple users, and may contain errors (including links to non-existing images. Is there a way to capture these Errors? |
| Sponsored Links |
|
|||
|
I get the ioErrrorEvent when I load the swf. Embedding text are done in a
client form (html-form,not flex, without validation). But how the users edit the html is irrelevant, since theese error will occor (can also happen if images gets deleted from the source) - so I need a way to ignore these errors. I know that only users with the debug player will actually see the error message, but I want to avoid that as well. Hope someone has a solution to this problem! |
|
|||
|
"Christian.Holsve" <webforumsuser@macromedia.com> wrote in message news:gefq6l$kgp$1@forums.macromedia.com... >I get the ioErrrorEvent when I load the swf. Embedding text are done in a > client form (html-form,not flex, without validation). > > But how the users edit the html is irrelevant, since theese error will > occor > (can also happen if images gets deleted from the source) - so I need a way > to > ignore these errors. > > I know that only users with the debug player will actually see the error > message, but I want to avoid that as well. > > Hope someone has a solution to this problem! try catch? |
|
|||
|
"Christian.Holsve" <webforumsuser@macromedia.com> wrote in message news:gefvpo$r9e$1@forums.macromedia.com... > The Text-field is defined in mxml, and I can't enclose a try -catch clause > around mxml code. Have you thought about a try-catch around where you're setting the htmlText? |
|
|||
|
Thanks for replies, but yes I have tried a try-catch in actionscriptcode, to
catch the error when I set the htmltext property, but the still get the exception thrown: Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed. Please gsb can you go into more detail in how you would do this, I have included a simple application to demonstrate the error. <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"> <mx:Script> <![CDATA[ [Bindable] public var htText : String = "This is some text before a garbageimage<img src='http://www.noadress.com/image.png'/> <b>after image tag</b>"; private function init() : void { try { txtHtml.htmlText = htText; } catch ( er : IOError) { // Do nothing } catch (ioError : IOErrorEvent) { // Do nothing } catch (e : Error) { // Do nothing } } ]]> </mx:Script> <mx:Text creationComplete="init()" id="txtHtml" /> </mx:Application> |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise