Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intuition String Gadget Probs...

0 views
Skip to first unread message

Virtual Cowboy

unread,
May 24, 1997, 3:00:00 AM5/24/97
to

Hi...
Can anyone tell me where I can get the Amount of chars, which are written in
an intuition string gadget ? I want to say WHILE the user writes... Not if
he clicked anotherwhere or pressed return... So that I can code a counter,
which increases while I'm writing, and decreases when I'm using backspace...
Hope that was understandable...
Thx...
C'ya
--
___ -+- ____________________ __________________________________
\ \__ /\_____/_ ____________/ / / _______________/ ____ ______ \___
// / // / _ \// / / / _ // / // / /. / / / / __ \/. / / /
/ / / // / // / // / /__ / /__/ / / / / //__ / / /__ . /
\____/__/__/__/__/_____/__/__/_____/ \____/_____/________/_____/_____/_____/

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.3i

mQBtAzNbtlwAAAEDAOsilyHKFPvoEV0ZCb2jIiGChE1W1PNmR23qFeKA/qrwrWuU
uY7dkgRf+RetV8OT0G9wJCZE1eZt5LqLVhI5oOTd2w2cOBHz+HguVHNJ/sPQ5x6q
aC6heD2iT7dQ0YfMsQAFEbQdVmlydHVhbCBDb3dib3kgdmljdGhjQGlibS5uZXSJ
AHUDBRAzW7Zdok+3UNGHzLEBAd7nAv9A5HmpaHmX/ccQTZEALe3olMvMR5nw5+Y7
6kBHlWxFCVMbbXL+KPiuc0sa+pfoLJZpyDtPXPS+X4sgdneb6JIoL7kD1PIBamAE
nDay87lcUgHv36M0f03xomNNV6H+DEU=
=X+2D
-----END PGP PUBLIC KEY BLOCK-----


Ben Hutchings

unread,
May 24, 1997, 3:00:00 AM5/24/97
to

In article <1199.708...@ibm.net>, Virtual Cowboy <vic...@ibm.net> wrote:
>Hi...
>Can anyone tell me where I can get the Amount of chars, which are written in
>an intuition string gadget ? I want to say WHILE the user writes... Not if
>he clicked anotherwhere or pressed return... So that I can code a counter,
>which increases while I'm writing, and decreases when I'm using backspace...

Use a string-gadget hook. There's an example of how to use such hooks
in the RKRM: Libraries and on the RKRM Companion Disks (Aminet:
dev/misc/RKRM_Libs[123].lha).

--
Ben Hutchings,|finger m95...@booth42.ecs.ox.ac.uk|mail benjamin.hutchings@
compsci&mathmo|lynx http://users.ox.ac.uk/~worc0223|worcester.oxford.ac.uk
The two most common things in the universe are hydrogen and stupidity.

Michael van Elst

unread,
May 25, 1997, 3:00:00 AM5/25/97
to

Virtual Cowboy <vic...@ibm.net> writes:

>Hi...
>Can anyone tell me where I can get the Amount of chars, which are written in
>an intuition string gadget ? I want to say WHILE the user writes... Not if
>he clicked anotherwhere or pressed return... So that I can code a counter,
>which increases while I'm writing, and decreases when I'm using backspace...

>Hope that was understandable...

Nowhere. You could read out the gadget every INTUITICK and compute the
nuber of characters from the text buffer.

But a better method would be to create a BOOPSI subclass of string
gagdets with its own input method that passes the count to the
application (or another BOOPSI gadget that displays the number).

Regards,
--
Michael van Elst

Internet: mle...@serpens.swb.de
"A potential Snark may lurk in every tree."

Timothy Stack

unread,
May 25, 1997, 3:00:00 AM5/25/97
to

Michael van Elst (mle...@serpens.swb.de) wrote:
: Virtual Cowboy <vic...@ibm.net> writes:

struct StringInfo {
...
WORD NumChars;
...
};

Can't you just read the StringInfo? To actually get the number for every
character as it was entered you would need the boopsi gadget.

Tim


0 new messages