Web Images Maps News Orkut Groups Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
doubt in following code please do let me clear
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Gerald Anto  
View profile  
 More options Oct 27, 3:55 pm
From: Gerald Anto <flex.gerald.a...@gmail.com>
Date: Tue, 27 Oct 2009 03:25:07 -0700 (PDT)
Local: Tues, Oct 27 2009 3:55 pm
Subject: doubt in following code please do let me clear
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.htm...

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


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yash Mody  
View profile  
 More options Oct 27, 4:03 pm
From: Yash Mody <modyy...@gmail.com>
Date: Tue, 27 Oct 2009 16:03:32 +0530
Local: Tues, Oct 27 2009 4:03 pm
Subject: Re: [Pune Flex Users:1978] doubt in following code please do let me clear

Use event.currentTarget in place of event.target and it should work fine

Thats how flex works

target -> is the dispatcher (in this case a UI text field in the header of
panel)
currentTarget -> where the event is being listened or where you have said
"addEventListener"

Events *bubble * and hence this behaviour

--
Yash Mody
CTO, Tekno Point Multimedia

On Tue, Oct 27, 2009 at 3:55 PM, Gerald Anto <flex.gerald.a...@gmail.com>wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
koteshwar Rao myneni  
View profile  
 More options Oct 27, 4:40 pm
From: koteshwar Rao myneni <mkoteshwar...@gmail.com>
Date: Tue, 27 Oct 2009 16:40:40 +0530
Local: Tues, Oct 27 2009 4:40 pm
Subject: Re: [Pune Flex Users:1978] doubt in following code please do let me clear

*Try  this*

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"

creationComplete="createLinkHandler();">

   <mx:Script><![CDATA[
       import mx.controls.Alert;
       private function linkHandler(event:MouseEvent):void {
           try{
                var url:URLRequest = new URLRequest("
http://finance.google.com/finance?q=" +
             event.target.label);
             navigateToURL(url);
           }catch(err:Error){
               Alert.show("Please select a stock ticker");
           }

       }
       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>

Myneni Koteshwar Rao Chowdary

On Tue, Oct 27, 2009 at 3:55 PM, Gerald Anto <flex.gerald.a...@gmail.com>wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gerald Anto Fernando  
View profile  
 More options Oct 27, 7:07 pm
From: Gerald Anto Fernando <flex.gerald.a...@gmail.com>
Date: Tue, 27 Oct 2009 19:07:50 +0530
Local: Tues, Oct 27 2009 7:07 pm
Subject: Re: [Pune Flex Users:1980] Re: doubt in following code please do let me clear

Thank you *Mr.Myneni Koteshwar Rao Chowdary*,
   This is what exactly i want.
   thank you very much.actually i dont know how handle this.
   once again thanks,
Gerald A

On Tue, Oct 27, 2009 at 4:40 PM, koteshwar Rao myneni <

--
Thanks & Regards,
A  Gerald

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gerald Anto Fernando  
View profile  
 More options Oct 27, 7:20 pm
From: Gerald Anto Fernando <flex.gerald.a...@gmail.com>
Date: Tue, 27 Oct 2009 19:20:55 +0530
Local: Tues, Oct 27 2009 7:20 pm
Subject: Re: [Pune Flex Users:1979] Re: doubt in following code please do let me clear

Hello yash mody well after changing currentTarget instead of target  it
working fine

Thanks,
Gerald A

--
Thanks & Regards,
A  Gerald

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google