3 Replies Latest reply on Aug 18, 2008 11:05 AM by Newsgroup_User

    How to use function isPrototypeOf()?

    augur_guan
      I try to return a boolean value with
      event.target.isPrototypeOf("mx.controls.advancedDataGridClasses.AdvancedDataGridItemRender er") + "@@","Augur Message");
      I always get false, but I know the target is AdvancedDataGridItemRenderer.
        • 1. Re: How to use function isPrototypeOf()?
          Level 7

          "augur_guan" <webforumsuser@macromedia.com> wrote in message
          news:g8c10s$3b5$1@forums.macromedia.com...
          >I try to return a boolean value with
          >
          > event.target.isPrototypeOf("mx.controls.advancedDataGridClasses.AdvancedDataGrid
          > ItemRenderer") + "@@","Augur Message");
          > I always get false, but I know the target is
          > AdvancedDataGridItemRenderer.

          Have you looked at

          event.target.getQualifiedClassName()
          or event.target.className

          ?


          • 2. Re: How to use function isPrototypeOf()?
            augur_guan Level 1
            I have tried event.target.className, and it return AdvancedDataGridItemRenderer, so should I do it in such way:
            if(event.target.className == "AdvancedDataGridItemRenderer").
            Though it does works now, It doesn't look as graceful as in Java...
            • 3. Re: How to use function isPrototypeOf()?
              Level 7
              try currentTarget instead.

              "augur_guan" <webforumsuser@macromedia.com> wrote in message
              news:g8ccpb$g1d$1@forums.macromedia.com...
              >I have tried event.target.className, and it return
              > AdvancedDataGridItemRenderer, so should I do it in such way:
              > if(event.target.className == "AdvancedDataGridItemRenderer").
              > Though it does works now, It doesn't look as graceful as in Java...
              >