Adobe Dreamweaver Forums



Last 10 THreads :         Confused - Color control with multiple utilities available (Last Post : chris_farrell@adobeforums.com - Replies : 1 - Views : 2 )           »          Re: SFW and date created (Last Post : Neil_N@adobeforums.com - Replies : 0 - Views : 1 )           »          Em Dash (Last Post : Jiva Mukta - Replies : 0 - Views : 1 )           »          changeWatcher of variable? (Last Post : David Repas - Replies : 0 - Views : 1 )           »          ZEND STUDIO ! does it work on any php capable server orneed some sepcialized? (Last Post : LuigiL - Replies : 5 - Views : 6 )           »          How to turn IMAGE into MOVIECLIP??? (Last Post : LuigiL - Replies : 20 - Views : 21 )           »          Help with button sounds (Last Post : JDMD - Replies : 2 - Views : 3 )           »          Problem initialising quicktime (Last Post : eoinie - Replies : 0 - Views : 1 )           »          Table cell - text formatting question (Last Post : JRStaf4ord - Replies : 3 - Views : 4 )           »          Online Catalog (Last Post : chris.cavage - Replies : 0 - Views : 1 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-03-2008, 04:39 AM
Christian.Holsve
 
Posts: n/a
Diggs:
Default Unhandled IOErrorEvent on mx:Text

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?




Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-03-2008, 04:39 AM
wingobaxter
 
Posts: n/a
Diggs:
Default Re: Unhandled IOErrorEvent on mx:Text

At what point do you get the unhandled ioErrorEvent? When they are editing it? When you say embed how are you embedding it?
Reply With Quote
  #3 (permalink)  
Old 11-03-2008, 04:39 AM
Christian.Holsve
 
Posts: n/a
Diggs:
Default Re: Unhandled IOErrorEvent on mx:Text

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!

Reply With Quote


  #4 (permalink)  
Old 11-03-2008, 04:39 AM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Unhandled IOErrorEvent on mx:Text


"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?


Reply With Quote
  #5 (permalink)  
Old 11-03-2008, 04:39 AM
Christian.Holsve
 
Posts: n/a
Diggs:
Default Re: Unhandled IOErrorEvent on mx:Text

The Text-field is defined in mxml, and I can't enclose a try -catch clause around mxml code.
Reply With Quote
  #6 (permalink)  
Old 11-03-2008, 04:39 AM
*gsb*
 
Posts: n/a
Diggs:
Default Re: Unhandled IOErrorEvent on mx:Text

Extend or use composition to create a custom text component and override the offending function with a try ... catch in it as Amy suggested.


Reply With Quote


  #7 (permalink)  
Old 11-03-2008, 04:39 AM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Unhandled IOErrorEvent on mx:Text


"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?


Reply With Quote
  #8 (permalink)  
Old 11-03-2008, 04:39 AM
Christian.Holsve
 
Posts: n/a
Diggs:
Default Re: Unhandled IOErrorEvent on mx:Text

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>

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 09:28 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk