Hi Brett,
> You confimed my suspicision. As the ctx-text/edit feel object is now, there
> is no simple way to extend the functionality. Adding a flag to the face is a
> good idea.
>
> Maybe there should be some special user-defined editing function that can
> be called for easy extended functionality.
A little less hack (i use face/user-data for flag):
ctx-text/insert-char: func [face char] bind [
delete-selected-text
if not same? head face/text head view*/caret [view*/caret: at face/text
index? view*/caret]
face/dirty?: true
;---changed part---
view*/caret: insert view*/caret either all [
string? face/user-data face/user-data = "--upper--"
][
first uppercase form char
][
char
]
] in ctx-text 'self
l: layout [f: field "" with [user-data: "--upper--"]]
view l
---
Ciao
Romano
>
> Brett.
>
> ----- Original Message -----
> From: "Gabriele Santilli" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 31, 2002 5:48 AM
> Subject: [REBOL] Re: fields and keyboard
>
>
> > Hello Brett!
> >
> > On 30-Gen-02, you wrote:
> >
> > BH> Any one else got some ideas?!!
> >
> > Creating a custom /engage (copying for the one of Field) that
> > calls a custom edit-text (copying from ctx-text/edit-text). You'll
> > just need to uppercase the character before inserting into the
> > string.
> >
> > Maybe you could just patch ctx-text/edit-text to check for a flag
> > in the face and then act accordingly...
> >
> > Regards,
> > Gabriele.
> > --
> > Gabriele Santilli <[EMAIL PROTECTED]> - Amigan - REBOL programmer
> > Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/
> >
> > --
> > To unsubscribe from this list, please send an email to
> > [EMAIL PROTECTED] with "unsubscribe" in the
> > subject, without the quotes.
> >
>
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
>
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.