Re: [flexcoders] subclassing DataGrid in Beta 3

2006-05-12 Thread Manish Jethani



On 5/12/06, Jim Laing <[EMAIL PROTECTED]> wrote:
> So, one of our requirements is to make the up/down arrow keys work in
> a DataGrid that is being edited. In Beta 2, I was able to subclass
> certain functions (keyDownHandler, findNextEnterItemRenderer) of the
> DataGrid which were marked public at the time. Now it seems these
> functions are marked private so I am unable to subclass them. Does
> anyone have any ideas as to how I can achieve functionality similar to
> the code below?

I don't know why it's private now, but maybe you could try looking at
the findNextItemRenderer() implementation in the DataGrid.as in the B3
source and try implementing something along those lines?






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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  












[flexcoders] subclassing DataGrid in Beta 3

2006-05-11 Thread Jim Laing



So, one of our requirements is to make the up/down arrow keys work in
a DataGrid that is being edited. In Beta 2, I was able to subclass
certain functions (keyDownHandler, findNextEnterItemRenderer) of the
DataGrid which were marked public at the time. Now it seems these
functions are marked private so I am unable to subclass them. Does
anyone have any ideas as to how I can achieve functionality similar to
the code below?

Thanks,
Jim

--

package com.wgint.wglib {
  import mx.controls.DataGrid;
  import flash.ui.Keyboard;
  import flash.events.KeyboardEvent;

  public class WGDataGrid extends DataGrid {
    
    public function WGDataGrid() {
      super();
    }
    
    override public function keyDownHandler(event:KeyboardEvent):void {
      if(event.keyCode == Keyboard.DOWN) {
        event.shiftKey = false;
    findNextEnterItemRenderer(event);
         }
         if(event.keyCode == Keyboard.UP) {
           event.shiftKey = true;  
           findNextEnterItemRenderer(event);
         }
         super.keyDownHandler(event);
    }  
  }
}






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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.