[WASTE-list] Text Filter callback

Marco Piovanelli marco.piovanelli at pobox.com
Sun Oct 14 14:25:59 EDT 2007


On Sun, 14 Oct 2007 19:26:21 +0700,
Brother Josef (thykeeper at nerdshack.com) wrote:



>It was my understanding that returning false from the text filter

>hook would prevent WASTE from inserting the character but my callback

>is not producing these results. If that is not the usage of the

>callback how can I achieve these effects? thank you.


No, returning false from the text filter hook tells WASTE
that no filtering was performed, and the original text
should be processed as usual.

If you want to prevent WASTE from inserting the text,
you need to set the text handle size to zero, and
return true from your hook, like this:

Boolean MyTextFilter
(
ComponentInstance inTextInputComponent,
Handle inFilterableText,
UInt32 inModifiers,
UInt32 inKeyCode,
WEReference inWE
)
{
SetHandleSize(inFilterableText, 0);
return true;
}


HTH,


-- marco

--
It's not the data universe only, it's human conversation.
They want to turn it into a one-way flow that they have entirely
monetized. I look at the collective human mind as a kind of
ecosystem. They want to clear cut it. They want to go into the
rainforest of human thought and mow the thing down.



More information about the WASTE-list mailing list