MASON-INTEREST-L Archives

August 2011

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Sean Luke <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Mon, 1 Aug 2011 10:46:57 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (39 lines)
You'll need to edit some source, but it's not hard.

One way to do it would be to override doClose() like this:

	    public void doClose()
		{
		pressHideAll();   // hides all the displays
		removeAllInspectors(true);  // kills all the inspectors
		}

... then make Console.pressHideAll() public. I guess we could expose  
that method for you if this works.  Then you're responsible for making  
the Console visible again later.

The problem with this approach is that the inspectors are killed, not  
hidden.  If you want the inspectors to stay around, you'll need to  
extract the inspector windows and hide them all (set them to non- 
visible), then maintain a list of them so you can make them visible  
again when the Console is made visible.  Look at the code for  
removeAllInspectors() to see how we find all the inspector windows.

Sean

On Aug 1, 2011, at 10:34 AM, Sam Brett wrote:

> I am running a Mason simulation inside of another application and  
> need to
> override the doClose() and/or doQuit() methods of the console  
> created by the
> createController() method of the GUIState instance. When the  
> simulation is
> closed, I do not want the application to exit, but only the simulation
> windows to close. What would be the best route to do this? I am  
> looking at
> the source and it appears the fields used in the Console class are all
> private. Should I edit the source and rebuild or is there some  
> easier way to
> avoid this?

ATOM RSS1 RSS2