[comp.sys.amiga.tech] Intuition - Windows & String Gadget help needed / 1.4 Req..

koshy@abekrd.UUCP (Koshy Abraham) (12/08/89)

I have a couple of questions and I hope you net people can help me out.

1) Is it possible to find the the previously enabled window from the current
window when you receive a WINDOWENABLED message ?.

2) Is there a string gadget type similar to LongInt which accepts numbers
with different bases e.g. base 16 (HEX). If not, is it possible to examine the
the characters as they are entered but before being put into the buffer.

1.4 Request (with respect to latter part of 2 above)

If there is sufficient space left on the gadget structure or string info 
structure (4 bytes), can we have a user function called every time a character
is entered into a string gadget.

e.g.

If we modify the appropriate structure to include a pointer to the user 
function (KeyCheckFunc) :

struct [Gadget | SpecialInfo] {
   APTR something;  /* can't remember the structure contents */
   APTR etc.
   .
   .
   BOOL (*KeyCheckFunc)();
};

then , we can have something like 

int Myisxdigit(c)
UBYTE c;
{
   return(isxdigit(c)); /* isxdigit is a macro */
}

called everytime a character other than a line editing key is pressed. This 
function would then just return a TRUE or FALSE result (or whatever).

Of course, the user function could check for any sort of data not just HEX
characters.


Thanks in advance,
-- 
Koshy Abraham               NET: koshy@abekrd.co.uk
Abekas Video Systems Ltd.  UUCP: ...!mcvax!ukc!{reading,pyrltd}!abekrd!koshy
12 Portman Rd,   Reading, PHONE: +44 734 585421      //     |<= This looks
Berkshire.       RG3 1EA.   FAX: +44 734 597267  K\A/b      |better when
United Kingdom.           TELEX: 847579            \/       |printed.