Re: [flexcoders] when is setFocus() not?

2007-05-01 Thread Manish Jethani
That is in the focusIn handler.

  
  
private function removeSelection():void
{
  ti.selectionBeginIndex = 0;
  ti.selectionEndIndex = 0;
}
  

On 5/1/07, Alex Harui <[EMAIL PROTECTED]> wrote:
>
>
>
>
> selectionBeginIndex = selectionEndIndex = 0
>
>
>
>  
>
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of barry.beattie
>  Sent: Tuesday, May 01, 2007 10:16 AM
>  To: flexcoders@yahoogroups.com
>  Subject: [flexcoders] when is setFocus() not?
>
>
>
>
>
>
> 1) Q: have I picked the wrong method and setFocus() is NOT what I want
>  - or - do I have to construct exactly what I want piece by piece?
>
>  [full code below]... I've got a TextInput that updates the underlying
>  XML when it loses focus (which it does OK). When the buttons are used,
>  it returns the focus back to the TextInput (which is sort-of does).
>  the bit I don't like is previously entered value itself have the
>  focus, ready to be wiped with an accidental keystroke.
>
>  What I really want is to place the cursor either in front or back of
>  the value so the user has to use the delete or backspace key (or
>  mouse) to delete/replace the value. I prefer at the back since plenty
>  of Mac users have forgotten "fn-delete" deletes forwards, not back.
>
>  do I have to do this piece by piece or is there something better than
>  setFocus(). doing this for a couple of controls is OK but I've got
>  lots to do in reality.
>
>  2) Q: is there any work being done to simplify setting of tab-orders,
>  shortcut keys and key stroke listeners? I've got (many) dozens of form
>  elements in each view driven off business logic - doing it before in
>  Javascript was a right royal pain, I was hoping Flex had it easier.
>
>  the end users are data entry ppl who rarely use mouses (mice?) and are
>  very fussy about how the UI performs for data entry (focus, tab
>  order, short-cut keys, etc)
>
>  any suggestions to make my life easier?
>  thanx
>
>  [watch out for text wrap and broken lines]
>  
>  
>  http://www.adobe.com/2006/mxml";
>  layout="absolute"
>  applicationComplete="init()"
>  >
>  
>  
>  
>  
>  
>  
>text="[EMAIL PROTECTED]"/>
>  
>  
>  
>  
>  
>text="[EMAIL PROTECTED]"
>  focusOut="onRatingChange( event )"/>
>  
>  
>  
>  
>
>  
>
>  ---
>
>  


RE: [flexcoders] when is setFocus() not?

2007-05-01 Thread Alex Harui
selectionBeginIndex = selectionEndIndex = 0

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of barry.beattie
Sent: Tuesday, May 01, 2007 10:16 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] when is setFocus() not?

 

1) Q: have I picked the wrong method and setFocus() is NOT what I want
- or - do I have to construct exactly what I want piece by piece?

[full code below]... I've got a TextInput that updates the underlying
XML when it loses focus (which it does OK). When the buttons are used,
it returns the focus back to the TextInput (which is sort-of does).
the bit I don't like is previously entered value itself have the
focus, ready to be wiped with an accidental keystroke. 

What I really want is to place the cursor either in front or back of
the value so the user has to use the delete or backspace key (or
mouse) to delete/replace the value. I prefer at the back since plenty
of Mac users have forgotten "fn-delete" deletes forwards, not back.

do I have to do this piece by piece or is there something better than
setFocus(). doing this for a couple of controls is OK but I've got
lots to do in reality.

2) Q: is there any work being done to simplify setting of tab-orders,
shortcut keys and key stroke listeners? I've got (many) dozens of form
elements in each view driven off business logic - doing it before in
Javascript was a right royal pain, I was hoping Flex had it easier.

the end users are data entry ppl who rarely use mouses (mice?) and are
very fussy about how the UI performs for data entry (focus, tab
order, short-cut keys, etc)

any suggestions to make my life easier?
thanx

[watch out for text wrap and broken lines]


http://www.adobe.com/2006/mxml
 "
layout="absolute" 
applicationComplete="init()"
>




















---