[Gambas-user] Is this the correct way to deal with File.In terminal settings?

Cedron Dawg cedron at exede.net
Thu Mar 14 00:55:04 CET 2019


Okay, a little more hunting brings this.
 
 ===========================
 
 '---- Put the Terminal in a Raw State
        
        theUpdateTS = theSavedTS.Copy()
        theUpdateTS.MakeRaw()
        
        File.In.Term.SetAttr(Term.TCSANOW, theUpdateTS)

 ===========================
 I had no clue before what to use for the "mode" parameter.
 
 http://gambaswiki.org/wiki/comp/gb.term/.stream.term
 http://gambaswiki.org/wiki/comp/gb.term/.stream.term/setattr

 
Still, the fundamentals are correct aren't they?
 
  1) Save the settings
  2) Make a copy of the settings
  3) Modify the setting
  4) Apply the modified Settings
  ....
  5) Restore Original settings
 
I mean it works.  It worked before.  But just because it works doesn't mean you are doing it right.  It's been twenty years since I did this the last time, so I'm a little unclear on it.

The Raw works a little different than what I had, but that is okay too.  

Any cautionary advice as I dive recklessly into the abyss?


----- Original Message -----
From: "Benoît Minisini" <g4mba5 at gmail.com>


No: SetAttr() is like OS function tcsetattr(). The second argument is 
like its third argument, i.e. a constant among: Term.TCSANOW, 
Term.TCSADRAIN or Term.TCSAFLUSH.

'man tcsetattr' for the details.

-- 
Benoît Minisini

----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----


More information about the User mailing list