Do you want it watching per key-stroke or when the user hits enter or
removes focus.  I don't think you want to try to emulate the
PropertyWatcher setup if you have your own component to begin with, it
relies on the compiler knowing what to generate and lots of other setup
independent of the individual component.

So just add an event listener on the input for the "change" event (per
key-stroke) or on the "enter" or "focusOut" event for a more delayed
reaction.  Then in the handler for the event do whatever you want to do,
and if there's a problem set the errorString property.

Matt

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of JesterXL
Sent: Tuesday, December 27, 2005 12:19 PM
To: Flexcoders
Subject: [flexcoders] Custom Validation Error

I've been trying to solve this for a week.  I'm making progress, but at
a 
snails pace.  My goal is to have my custom component show a tooltip like

TextInputs do when you have a validation error.

In my debugging various Flex framework files, apparently 
_Application_watcherSetup creates a bunch of PropertyWatchers.  The
issue 
is, my custom comonent proprties do not pass in an object for the 2nd 
parameter to PropertyWatcher, and thus do not trigger validation events
so 
Binding + ToolTipManager and friends can show a validation error as a 
tooltip with the errorString.

The Application-generated.as file is weird, though; the 
_Application_watcherSetup just has 3 dependecy variables, and I can't
find 
who is creating the PropertyWatchers even though the FlexBuilder 1.5
call 
stack claims it's that function.

Any guidance?




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to