🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #5676

Help with xrn modifications

#5676
From: Tim Thompson
Date: Fri, 03 Sep 1993 20:41
79 lines
2786 bytes
[I'm a complete novice to X programming. If my terminology is not correct,
 please forgive me.			-tgt]

I'm working on some mods to xrn to have the user input a password if it has 
not been provided recently (i.e. within the last 12 hours.)

I've got things close to working - a popup window appears asking the user to 
re-enter the password, it can be typed in, at which point the user can either
hit return, or click on the "enter" button. Immediately after doing so, the
following error message appears:

	xrn: X Error: BadWindow
	    serial number: 590
	    error code:  3
	    request code:  2
	    minor code:  0
	    resource id: 0
	xrn: X Error

I have no idea what this means, nor where to turn for further help.  I've 
included the relevant code below - it's basically swiped from the routines 
ConfirmationBox() in dialogs.c and gotoHandler() in buttons.c of the xrn 
source code. Any X and/or xrn wizards, if you could lend a hand, I'd sure 
appreciate it.

						Tim Thompson
						tim.g.thompson@att.com


static void
passHandler(widget, client_data, call_data)
Widget widget;
caddr_t client_data;
caddr_t call_data;
{
    char *nntppass;
 
/* will do something significant with nntppass once I get things working. */
    nntppass = GetDialogValue(GetNntpPassBox);
 
    PopDownDialog(GetNntpPassBox);
    GetNntpPassBox = 0;
    return;
}




int
GetNntpPass()
/*
 * pop up a box asking for NNTP Password
 */
{
    static struct DialogArg args[] = {
        {"enter", passHandler, (caddr_t) XRN_CB_CONTINUE},
    };
 
    XEvent ev;
 
    retVal = -1;
 
    GetNntpPassBox = CreateDialog(TopLevel,
                "Your NNTP password has expired.\nPlease re-enter it:",
                DIALOG_TEXT,
                args, XtNumber(args));
 
    PopUpDialog(GetNntpPassBox);
 
    for(;;) {
        XtNextEvent(&ev);
        (void) XtDispatchEvent(&ev);
        if (retVal != -1) {
            PopDownDialog(GetNntpPassBox);
            return(retVal);
        }
    }
}
Technical Details
Message-ID: <CCspGK.8MB@cbfsb.cb.att.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.windows.x.apps.mbox.zip!gmd.de!xlink.net!howland.reston.ans.net!gatech!rutgers!att-out!cbfsb!cbnewsg.cb.att.com!tgt

Show Full Headers
Complete Article Headers
Message-ID: <CCspGK.8MB@cbfsb.cb.att.com>
Subject: Help with xrn modifications
Date: Fri, 03 Sep 1993 20:41:08 +0000
From: tgt@cbnewsg.cb.att.com (Tim Thompson)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.windows.x.apps.mbox.zip!gmd.de!xlink.net!howland.reston.ans.net!gatech!rutgers!att-out!cbfsb!cbnewsg.cb.att.com!tgt
Newsgroups: news.software.readers,comp.windows.x.intrinsics,comp.windows.x.apps
Keywords: xrn password
Sender: news@cbfsb.cb.att.com
Followup-To: poster
Organization: AT&T
Lines: 78