Sorry...
when i say tabs... i mean browser tabs...

raf
eNilsson Asia & Pacific
http://www.enilsson.com/blog/


--- In flexcoders@yahoogroups.com, "Rafael Faria"
<[EMAIL PROTECTED]> wrote:
>
> Hi sherif... Please check this
> 
> http://www.enilsson.com/assets/examples/menuTree.html
> 
> Select some items, and than change tabs, than come back to the menu...
> you will see that it automatically start editing an item. And it
> doesnt listen to the listeners. Just start editing from nowhere.
> 
> I tried Alex suggestion 
> 
> addEventListener(FocusEvent.FOCUS_IN, handleItemFocusIn);
> 
> and on handleItemFocusIn function i put
> 
> editedItemPosition = null;
> 
> i have a listening to the begginingedit too
> 
>     private function handleItemEditBeginning(event:ListEvent):void
>               {
>             event.preventDefault(); 
>         }
> 
> but it doesnt seems to work either.
> 
> 
> but it didnt change anything on FF but it throws an error on Safari.
> 
> 
> Also note that if you start editing (to start editing it works like
> mac, click once, and than click again) and you double click at the
> textinput it will jump to the native editor...
> 
> those 2 issues are making me lost some nights of work... doesnt matter
> what i do, it just don't fix it.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> This is what my listeners handle...
> 
>            
> addEventListener(ListEvent.ITEM_EDIT_BEGINNING,handleItemEditBeginning);
>             addEventListener(ListEvent.ITEM_EDIT_END,handleItemEditEnd);
> addEventListener(ListEvent.ITEM_CLICK,handleItemEdit);
> 
> 
> 
> 
> 
>       /**
>         * Action taken when you start editing the item
>         **/
>         private function handleItemEditBeginning(event:ListEvent):void
>               {
>             event.preventDefault(); 
>         }
>       
> 
>               /**
>         * Action taken when you finish editing the item
>         **/
>         private function handleItemEditEnd(event:ListEvent):void
>               {
>                       _tmpSelectedItem = null;
>                       
>         }
> 
>               /**
>         * Action taken when you edit a item
>         **/
>               private var _tmpSelectedItem:Object;
>               private var editTimer:Timer = new Timer(1500,1);
>         private function handleItemEdit(event:ListEvent):void
>               {
>                       
>                       if ((_tmpSelectedItem == selectedItem) && (editable)) {
>                               // Edit
>                               editedItemPosition = event;
>                               
>                       } else {
>                               // not edit
>                   event.preventDefault(); 
>                       }
>                       
>                       editTimer.removeEventListener(TimerEvent.TIMER_COMPLETE,
> clearSelectedItem);
>               
> editTimer.addEventListener(TimerEvent.TIMER_COMPLETE,clearSelectedItem);
>                       editTimer.start();
>                               
>                       _tmpSelectedItem = selectedItem;
>                       
>         }
>         
>         private function clearSelectedItem(event:TimerEvent):void
>         {
>               _tmpSelectedItem = null;
>               editTimer.removeEventListener(TimerEvent.TIMER_COMPLETE,
> clearSelectedItem);   
>         }
> 
> 
> 
> 
> 
> --- In flexcoders@yahoogroups.com, Sherif Abdou <sherif626@> wrote:
> >
> > u have a link or a bit of source code? try removing focus on the
> editing by listeneing to the stage leave
> > 
> > 
> > 
> > ----- Original Message ----
> > From: Rafael Faria <rafaelfaria.grupos@>
> > To: flexcoders@yahoogroups.com
> > Sent: Sunday, March 2, 2008 10:12:00 PM
> > Subject: [flexcoders] Re: Tree Bug?
> > 
> > anyone?
> > 
> > --- In [EMAIL PROTECTED] ups.com, "Rafael Faria"
> > <rafaelfaria. grupos@ .> wrote:
> > >
> > > I'm almost finished with my Tree custom component. 
> > > 
> > > Just 2 things are bugging me a lot.
> > > 
> > > Firstly, when i select a node (not editing), change tab on my
firefox,
> > > and come back, it enters to editing mode without touching anything.
> > > 
> > > Secondly, when i'm in the editing a node, and double click
inside the
> > > custom texteditor i created, it just jump back to the native editor.
> > > 
> > > Anyone knows how to prevent both of those things to happen?
> > > 
> > > thanks
> > > raf
> > >
> > 
> > 
> >  
> > 
> > 
> >      
>
____________________________________________________________________________________
> > Looking for last minute shopping deals?  
> > Find them fast with Yahoo! Search. 
> http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> >
>


Reply via email to