🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #2629

Intuition - Windows & String Gadget help needed / 1.4 Req..

#2629
From: Koshy Abraham
Date: Thu, 07 Dec 1989 17:20
51 lines
2103 bytes
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.
Technical Details
Message-ID: <767@abekrd.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!ukc!pyrltd!abekrd!koshy

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!ukc!pyrltd!abekrd!koshy
From: koshy@abekrd.UUCP (Koshy Abraham)
Newsgroups: comp.sys.amiga.tech
Subject: Intuition - Windows & String Gadget help needed / 1.4 Req..
Message-ID: <767@abekrd.UUCP>
Date: 7 Dec 89 17:20:59 GMT
Distribution: comp
Organization: Abekas Video Systems Ltd, Reading, England
Lines: 51