anchor.diff:  cmd(P,<<"h">>) ->
   	print(P,?COMMANDS);
   cmd(_P,<<"q">>) ->
  -	halt(1);
  +	case whereis(wxproc) of
  +		undefined ->
  +			halt(1);
  +		_ ->
  +			wxproc ! stop,
  +			timer:sleep(200),
  +			halt(1)
  +	end;
   cmd(P,Bin) when is_binary(Bin) ->
   	cmd(P,Bin,actordb_sql:parse(Bin)).
   cmd(P,Bin,Tuple) ->
  
positive.code: 			io:format("Received ~p~n",[X])
  	end.
  
  wxrun() ->
  	register(wxproc,self()),
  	Wx = wx:new(),
  
negative.code: 	Cmd = Wx#wx.event,
  	case Cmd of
  		#wxKey{keyCode = ?WXK_UP} ->
  			% wxEvent:skip(Obj);
  			wxproc ! up,
  			ok;
  		#wxKey{keyCode = ?WXK_DOWN} ->
  			% wxEvent:skip(Obj);
  			wxproc ! down,
  			ok;
  		#wxKey{keyCode = K} when K == ?WXK_BACK; K == ?WXK_LEFT ->
  			{Input,Prompt} = Wx#wx.userData,
  			Len = length(wxTextCtrl:getValue(Input)),
  