🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #15

Some 3.1 questions

#15
From: Rijvordt EGK
Date: Wed, 28 Oct 1992 15:02
51 lines
2223 bytes
Hi,

Here are some IV questions I'm struggling with... 

    - Has anybody made an easy to use StringBrowser, based on the 3.1
	Browser class?	I would do it myself, but if somebody has already
	done it...  Especially since there is no documentation on the
	Browser class.

    - I am running a shell command in parallel with an IV application,
	and I want the IV windows being refreshed, but I don't want
	the user to be able to click on buttons etc., so I am using the
	following event loop while the shell command is executing
	(BTW, I have made a nice class to do the latter, if anyone is
	interested...):

        int AsyncCmd::wait() const
        {
            Event e;
	    while( running_ ) // this is updated via a timer
	    {
                // delay one second before checking running_ again
		if (e.read( 1, 0 )) 
		{   if (e.type() == Event::other_event)
		        e.handle();
		    // else ignore event, is probably mouse move/click (?)
                }
	    }
	    return result_;
        }

	This seems to work allright most of the time, but not when some
        handler grabs input.  For example, I have a menu-item in a menu
        that starts the AsyncCmd, and waits for its completion using the
        above routine.  While the wait is executing, the menu is still
        open and items can still be selected, which I don't want.
        Does anybody know a better way to achieve this?
        (PS: this is currently under 3.0, but if solutions under
             3.1 are available, that's ok too.)

    - How do I set a window's title in 3.1?
	window->style()->attribute( "name", title ) only works if
	the window is mapped, else a crash occurs.  Is this the way
	it is supposed to be?


Thanks for your attention.

                                -Edwin (erijvor@cs.vu.nl)

PS: 3.0 means IV3.0.1, 3.1 means IV3.1beta3
Technical Details
Message-ID: <Bwu749.3nE@cs.vu.nl>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!star.cs.vu.nl!erijvor

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.interviews
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!star.cs.vu.nl!erijvor
From: erijvor@cs.vu.nl (Rijvordt EGK)
Subject: Some 3.1 questions
Message-ID: <Bwu749.3nE@cs.vu.nl>
Sender: news@cs.vu.nl
Organization: Fac. Wiskunde & Informatica, VU, Amsterdam
Date: Wed, 28 Oct 1992 15:02:32 GMT
Lines: 52