🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.acorn.tech
Article #305

Templates, RO3.1 and the dreaded Address Exception in the WindowManager

#305
From: Pete Goodwin
Date: Tue, 13 Oct 1992 07:46
37 lines
1559 bytes
After reading about the problem with 3d icons in templates, mainly when a 3d
icon is clicked to quit the application, I had a look at writing some code in C
to fix the problem:

/* The alarm handler to do the exit */
static void delayed_shutdown(int at, void *handle)
{
    wimp_mousestr mouse;

    /* Get the state of the mouse */
    wimpt_complain(wimp_get_point_info(&mouse));

    /* Check SELECT, MENU and ADJUST buttons */
    if (mouse.bbits & (wimp_BLEFT | wimp_BMID | wimp_BRIGHT))

	/* A button is still pressed, reschedule this handler */
	alarm_set(alarm_timenow() + 10, delayed_shutdown, NULL);
    else

	/* All buttons released, safely exit */
	exit(EXIT_SUCCESS);
}

/* Call this routine when you want to exit */
static void delayed_exit(void)
{
    /* Install handler */
    alarm_set(alarm_timenow() + 10, delayed_shutdown, NULL);
}

This appears to solve the problem (i.e you don't get the address exception at
address 0x03nnnnnn somewhere in the WindowManager module), though there may be
more elegant ways of doing it.

Pete Goodwin
goodwin@system.enet.dec.com
Technical Details
Message-ID: <1992Oct13.075319.1136@rdg.dec.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!decuac!pa.dec.com!rdg.dec.com!edieng.enet.dec.com!goodwin

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.acorn.tech
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!decuac!pa.dec.com!rdg.dec.com!edieng.enet.dec.com!goodwin
From: goodwin@edieng.enet.dec.com (Pete Goodwin)
Subject: Templates, RO3.1 and the dreaded Address Exception in the WindowManager
Message-ID: <1992Oct13.075319.1136@rdg.dec.com>
Sender: news@rdg.dec.com (Mr News)
Organization: Digital Equipment Corporation
Date: Tue, 13 Oct 1992 07:46:55 GMT
Lines: 37