[futurebasic] Re: [FB] Carbon event related to moving selected text in edit fields

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 2011 : Group Archive : Group : All Groups

From: Deep <Info@...>
Date: Thu, 29 Dec 2011 22:24:15 +0000
Domokos,

Further to Brian's post, you need to install Control Handlers which 
respond to:

Class:                  Kind:

_kEventClassControl     _kEventControlValueFieldChanged
_kEventClassTextField   _kEventTextDidChange
_kEventClassTextInput   _kEventTextInputUnicodeForKeyEvent

This covers almost all situations where the text field will change, 
including changes by drag/drop of text from an external source such as a 
text clipping dragged over, text drag/drop from within the same field, 
as well as Paste from the contextual menu instead of the Edit menu.

Hope it helps,

Deep



On 29/12/2011 21:34, Domokos Vekas wrote:
> Brian, sorry for my imprecision. By "moves" I meant drag-and-drop: the
> user selects a portion of text then drags it (with the mouse) elsewhere,
> within the same text field or into a different field, then releases the
> mouse button, this way the selected text has moved.
>
> I tried _kEventTextDidChange, but it isn't about the drag-and-drop event.
>
> I will take a look at the EUTC Key filter demo too.
> Thanks
> Domokos
>
>
> 2011/12/29 Brian S <fblistserve@... <mailto:fblistserve@...>>
>
>
>     On Dec 29, 2011, at 12:24 PM, Domokos Vekas wrote:
>
>>
>>     I need the list's kind help in finding a carbon event related to
>>     moving selected text in edit fields.
>
>     Not sure what "moves" means. I’m assuming cut and paste, so please
>     clarify if that is wrong.
>
>     _kEventTextAccepted and _kEventTextDidChange come to mind. This adds
>     _kEventTextDidChange event using the CEUtil function:
>
>     fn CEAddEvent( _kEventClassTextField, _kEventTextDidChange )
>
>     _kEventTextDidChange has a parameter to get the range
>     ( kEventParamUnconfirmedRange   but I haven’t tried it. )
>
>
>>
>>     I should know the start and end points of the selection before and
>>     after the move (so I can handle the situation and make the
>>     necessary modifications).
>>
>>     Furthermore, is it possible to prevent the user from dragging text
>>     to a different edit field?
>
>     I haven’t investigated this but it is possible to limit edit field
>     input( Util_EUTCKeyFilter.incl could be used---see demo in
>     Examples/Text/EUTC Key filter )
>
>
>
>     Brian S
>
>
>
>
>
>
>
>     --
>     To unsubscribe, send ANY message to:
>     futurebasic-unsubscribe@...
>     <mailto:futurebasic-unsubscribe@...> To access the list
>     archives, go to: http://freegroups.net/groups/futurebasic/
>
>
>
>
> --
> To unsubscribe, send ANY message to:
> futurebasic-unsubscribe@...
> <mailto:futurebasic-unsubscribe@...> To access the list
> archives, go to: http://freegroups.net/groups/futurebasic/
>
>