You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Harbs <ha...@gmail.com> on 2014/09/15 08:05:05 UTC

SelectionState.pointFormat

I’m a bit stumped here and I’m probably missing something very obvious, but I can use some help…

SelectionManager.setNewSelectionPoint() calls selectRange() which in turn first calls internalSetSelection() which sets the pointFormat and then it calls selectionChanged() with no arguments which sets the pointFormat to null.

The SELECTION_CHANGE event is dispatched only after that. I don’t see how you would ever has a valid pointFormat in a SelectionState.

What am I missing?

Harbs

Re: SelectionState.pointFormat

Posted by NishinaYoshiki <ni...@icloud.com>.
The fact 

iPhoneから送信

2014/09/29 18:16、Harbs <ha...@gmail.com> のメッセージ:

> Okay. I think the logic for removing the pointFormat is that we want to get rid of it when the cursor moves.
> 
> internalSetSelection() can be called without calling selectionChanged(), so that’s when it makes sense to set the pointFormat there.
> 
>> On Sep 15, 2014, at 9:05 AM, Harbs <ha...@gmail.com> wrote:
>> 
>> I’m a bit stumped here and I’m probably missing something very obvious, but I can use some help…
>> 
>> SelectionManager.setNewSelectionPoint() calls selectRange() which in turn first calls internalSetSelection() which sets the pointFormat and then it calls selectionChanged() with no arguments which sets the pointFormat to null.
>> 
>> The SELECTION_CHANGE event is dispatched only after that. I don’t see how you would ever has a valid pointFormat in a SelectionState.
>> 
>> What am I missing?
>> 
>> Harbs
> 

Re: SelectionState.pointFormat

Posted by Harbs <ha...@gmail.com>.
Okay. I think the logic for removing the pointFormat is that we want to get rid of it when the cursor moves.

internalSetSelection() can be called without calling selectionChanged(), so that’s when it makes sense to set the pointFormat there.

On Sep 15, 2014, at 9:05 AM, Harbs <ha...@gmail.com> wrote:

> I’m a bit stumped here and I’m probably missing something very obvious, but I can use some help…
> 
> SelectionManager.setNewSelectionPoint() calls selectRange() which in turn first calls internalSetSelection() which sets the pointFormat and then it calls selectionChanged() with no arguments which sets the pointFormat to null.
> 
> The SELECTION_CHANGE event is dispatched only after that. I don’t see how you would ever has a valid pointFormat in a SelectionState.
> 
> What am I missing?
> 
> Harbs