doubt in following code please do let me clear

0 views
Skip to first unread message

Gerald Anto

unread,
Oct 27, 2009, 6:24:07 AM10/27/09
to flex_delhi_india_group
see this code

<?xml version="1.0"?>
<!-- events/SingleRegisterHandler.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="createLinkHandler();">
<mx:Script><![CDATA[
private function linkHandler(event:MouseEvent):void {
var url:URLRequest = new URLRequest("http://
finance.google.com/finance?q=" +
event.target.label);
navigateToURL(url);
}
private function createLinkHandler():void {
p1.addEventListener(MouseEvent.CLICK,linkHandler);
}
]]></mx:Script>
<mx:Panel id="p1" title="Click on a stock ticker symbol">
<mx:LinkButton label="ADBE"/>
<mx:LinkButton label="GE"/>
<mx:LinkButton label="IBM"/>
<mx:LinkButton label="INTC"/>
</mx:Panel>
</mx:Application>

The above are code in the following page

http://livedocs.adobe.com/flex/3/html/help.html?content=events_08.html#219544


it was working fine but when i click the title of the border,
will through the error like

ReferenceError: Error #1069: Property label not found on
mx.core.UITextField and there is no default value.
at check/linkHandler()[H:\workspace\flexspace\testing\src\check.mxml:
6]
what is this error?

when i click directly click on it in the corresponding help page
it will not through the error

why?

Thanks&Regards,
Gerald A

AMIT PANDEY

unread,
Oct 27, 2009, 6:39:04 AM10/27/09
to flex_delhi_...@googlegroups.com
Dear Brother,

In the given example the event handler has been applied on the mouse click event, eventhough for the border lines there is no any event is available, it send back the exception which is shown as an error to you, you can apply the link button specific events to the application as you have to use on them only. You will never get suchh a message then.

Regards
Amit Kr Pandey

Gerald Anto Fernando

unread,
Oct 27, 2009, 9:39:09 AM10/27/09
to flex_delhi_...@googlegroups.com
ok Amit thanks i got it.

Gerald A
--
Thanks & Regards,
A  Gerald

AMIT PANDEY

unread,
Oct 28, 2009, 1:05:50 AM10/28/09
to flex_delhi_...@googlegroups.com
Your welcome buddy...

Regards
Amit Kr Pandey
Reply all
Reply to author
Forward
0 new messages