A simple status window for regional maps

Edit: I've culled all the scene stuff from the window and am now attempting to call the window directly. This should keep the current map in context and allow it to run alongside the other events that are being triggered. Now the window vanishes after one cycle; I'm not sure how to convince it to stick around. I assume this is due to garbage collection? How do you get around that, if that's what it is?

If anyone can provide me any assistance, I would be very grateful. I do intend to release my whole system back into the community once it's finished and I've ported the actual framework into RGSS3.



Code:
class Window_RegionMapDisplay < Window_Base
  def initialize(line_number=2)
	@version = 0001
	print("**** initializing Region Map Display version #{@version} \n")
	@line_number = line_number
	@SWITCH = 20
	super(0,0,Graphics.width,fitting_height(line_number))
	create_contents
	self.visible = $game_switches[@SWITCH]
	refresh
  end


  def set_text(text)
	print("** setting text to #{text}\n")
	if text != @text
	  @text = text
	  refresh
	end
  end

  def clear
	print("clearing contents\n")
	set_text("")
  end

def update
	print ("updating region map window...\n")
	if $game_switches[@SWITCH]
	  super
	end
  end  

  def refresh
	print("** draw refresh triggered\n")
	contents.clear
	draw_window_content
  end
end


#~		 @movesleft = $game_variables(13)
#~		 @cur_hour = $game_variables(14)
#~		 @regiontype = $game_variables(19)

  def draw_window_content
	print("drawing window content...\n")
	draw_text(0, 0, Graphics.width, line_height, "Moves: #{$game_variables[13]}")
  end

Original thread: https://forums.rpgmakerweb.com/threads/a-simple-status-window-for-regional-maps.3751/