Search the web
Sign In
New User? Sign Up
flexcoders · RIA Development with Adobe Flex
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Tabbing bug - disabling tabbing in the application   Message List  
Reply | Forward Message #75214 of 149588 |
RE: [flexcoders] Tabbing bug - disabling tabbing in the application

Well, if you can create a mini-example, we can try to see what’s going on.

 

I looked at the FM code again.  I guess you can capture keyDown in the same way and eat the TABs, something like:

 

 

systemManager.stage.addEventListener(KeyboardEvent.KEY_DOWN, eatTabHandler, true);

 

private function eatTabHandler(event : KeyboardEvent) : void
{

   if (event.keyCode == Keyboard.TAB) event.stopImmediatePropagation();
}

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Mark Kornfilt
Sent: Wednesday, May 23, 2007 1:24 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Tabbing bug - disabling tabbing in the application

 

Tried the hotfix and didn't work.

Also tried listening to the event on stage like you specified, but again that gets fired after the error.

Interesting you mention the problem with scrollbars, because that's what it seems like the problem is here too. The FM is looking for the parent of VScrollBar (or HSCrollBar) in a VBox for example and that's what throws the error. It's a shame that the hotfix didn't work, i was really enthusiastic.

Other ideas?

Mark

On 5/23/07, Alex Harui <aharui@adobe.com> wrote:

The hotfix fixed a problem where scrollbars were accidentally getting focus.

 

In theory in your creationComplete handler, you should be able to do:

 

systemManager.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, focusChangeHandler);

 

and start seeing traces.

 


From: flexcoders@yahoogro ups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Mark Kornfilt
Sent: Wednesday, May 23, 2007 10:13 AM


To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Tabbing bug - disabling tabbing in the application

 

I have tried adding the listener to the main application, and to an individual text input, but i can't catch it.
I have tried listening both with and without useCapture (therefore attaching in an mxml tag and also manually on creation complete -- not both at the same time of course).

the handler is just a dumb handler but I can still provide it:

private function focusChangeHandler(event : Event) : void
{
   trace("focus change");
}

I would be interested to know how you were able to shut down the FM.

We are not running 2.0.1 hotfix, because we don't use any DataGrid and I didn't see any fix worth making the change for now. Is there a fix that wasn't described in the hotfix kb?

Mark

On 5/23/07, Alex Harui <aharui@adobe.com> wrote:

What does your keyFocusChange handler look like and how did you attach the listener?  We use it elsewhere to shut down the FM.

 

Also, are you running 2.0.1 with the latest hotfix?

 


From: flexcoders@yahoogroups.com [mailto: flexcoders@ yahoogroups.com] On Behalf Of Mark Kornfilt
Sent: Wednesday, May 23, 2007 7:37 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Tabbing bug - disabling tabbing in the application

 

Tried the keyFocusChange, but nothing to do, the event still gets fired after the FocusManager handles the keyDown event.

Any other ideas?

Mark

On 5/23/07, Mark Kornfilt <markk03@gmail.com> wrote:

Maybe as part of a state change. Could that be the issue? The child it's looking for seems to be quite often a VScrollBar and the parent a VBox.

I'll try the keyFocusChange today.

Thanks,

Mark

On 5/23/07, Alex Harui <aharui@adobe.com > wrote:

Did you reparent some child in a container?

 

You can turn off tabbing by capturing keyFocusChange event from the stage.

 


From: flexcoders@yahoogro ups.com [mailto: flexcoders@ yahoogroups.com] On Behalf Of Mr_MarkK


Sent: Tuesday, May 22, 2007 5:15 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Tabbing bug - disabling tabbing in the application

 

We are having a bug in our application when the user presses the tab
key in any field. The error is the following:

ArgumentError: Error #2025: The supplied DisplayObject must be a child
of the caller.
at flash.display::DisplayObjectContainer/getChildIndex()
at
mx.core::Container/getChildIndex()[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\Container.as:2442]
at fl.managers::FocusManager/::getChildIndex()
at fl.managers::FocusManager/::sortByDepth()
at Array$/Array::_sort()
at Array/http://adobe.com/AS3/2006/builtin::sort()
at fl.managers::FocusManager/::sortFocusableObjects()
at fl.managers::FocusManager/::keyDownHandler()

I am currently unable to narrow down the problem to a specific
component, so until I find a better solution, I would like to disable
tabbing globally in the application.

It's impossible to provide an exhaustive list of things I've tried in
order to achieve that result, but I've been unable to block the tab
keydown event from getting to the FocusManager. I have tried listening
to the keydown event everywhere (also using useCapture = true) in the
application, from the root component to the fields where the user can
actually press tab, but nothing works.

Does anybody have a quick fix to disable tabbing?

Thanks,

Mark

 

 

 

 



Wed May 23, 2007 9:28 pm

alex_harui
Online Now Online Now
Send Email Send Email

Forward
Message #75214 of 149588 |
Expand Messages Author Sort by Date

We are having a bug in our application when the user presses the tab key in any field. The error is the following: ArgumentError: Error #2025: The supplied...
Mr_MarkK
Offline Send Email
May 23, 2007
12:19 am

Did you reparent some child in a container? You can turn off tabbing by capturing keyFocusChange event from the stage. ________________________________ From:...
Alex Harui
alex_harui
Online Now Send Email
May 23, 2007
7:20 am

Maybe as part of a state change. Could that be the issue? The child it's looking for seems to be quite often a VScrollBar and the parent a VBox. I'll try the...
Mark Kornfilt
Mr_MarkK
Offline Send Email
May 23, 2007
1:37 pm

Tried the keyFocusChange, but nothing to do, the event still gets fired after the FocusManager handles the keyDown event. Any other ideas? Mark...
Mark Kornfilt
Mr_MarkK
Offline Send Email
May 23, 2007
2:37 pm

What does your keyFocusChange handler look like and how did you attach the listener? We use it elsewhere to shut down the FM. Also, are you running 2.0.1 with...
Alex Harui
alex_harui
Online Now Send Email
May 23, 2007
4:42 pm

I have tried adding the listener to the main application, and to an individual text input, but i can't catch it. I have tried listening both with and without...
Mark Kornfilt
Mr_MarkK
Offline Send Email
May 23, 2007
5:16 pm

The hotfix fixed a problem where scrollbars were accidentally getting focus. In theory in your creationComplete handler, you should be able to do: ...
Alex Harui
alex_harui
Online Now Send Email
May 23, 2007
7:32 pm

Tried the hotfix and didn't work. Also tried listening to the event on stage like you specified, but again that gets fired after the error. Interesting you...
Mark Kornfilt
Mr_MarkK
Offline Send Email
May 23, 2007
8:26 pm

Well, if you can create a mini-example, we can try to see what's going on. I looked at the FM code again. I guess you can capture keyDown in the same way and...
Alex Harui
alex_harui
Online Now Send Email
May 23, 2007
9:29 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help