[Gambas-user] [Gambas Bug Tracker] Bug #752: Gambas shows - gbx3: warning: trying to watch fd #-1
http://gambaswiki.org/bugtracker/edit?object=BUG.752&from=L21haW4- Benoît MINISINI changed the state of the bug to: Waiting. -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #778: gtk+/gtk3 different with qt4, clock example look different
http://gambaswiki.org/bugtracker/edit?object=BUG.778&from=L21haW4- Benoît MINISINI changed the state of the bug to: Fixed. -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #778: gtk+/gtk3 different with qt4, clock example look different
http://gambaswiki.org/bugtracker/edit?object=BUG.778&from=L21haW4- Comment #2 by Benoît MINISINI: Fixed in revision #7378. -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #778: gtk+/gtk3 different with qt4, clock example look different
http://gambaswiki.org/bugtracker/edit?object=BUG.778&from=L21haW4- Comment #1 by Benoît MINISINI: As for the CPU resource, I can't do a lot of things : the image rotation routine of Qt is faster than the GTK+ one, which was written by me in C. AFAIK, GTK+ has no image rotation function. -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Forward events from constructor
Le 03/10/2015 01:22, Tobias Boege a écrit : > Hi, > > I'm puzzled by some behaviour of the interpreter when objects raise events > from their constructors. > > The following big block of text just gives the rationale of my question. I > think what I'm doing is not too strange. There is a short demonstration > project attached. > > In my real project I want to implement a TextBox with a ToolButton next to > it. This thing has a Validate event and should it be Stop Event'd by the > user, this counts as invalid input. The validity of the input is reflected > by the ToolButton's Picture. The user can specify a message which is dis- > played as a Balloon over the ToolButton after the Button was clicked, > explaining why the input is invalid. > > This is done in the following manner: FValidateBox is a Form class which > handles all the logic. On top of that is ValidateBox.class which keeps an > internal FValidateBox. If that FValidateBox raises its Validate event, > ValidateBox forwards it to the user and redirects any Stop Event back to > the FValidateBox to evaluate. > > This works, except that I also want to force an initial validation of the > empty TextBox to initialise the ToolButton's Picture correctly (the question > is here: does the user accept the empty string?). So I write in the > constructor of ValidateBox.class: > >Inherits UserControl > >Private $frmControl As FValidateBox > >Public Sub _new() > $frmControl = New FValidateBox(Me) As "Control" > ' Call the Change handler of the TextBox which initiates the validation > ' process by raising $frmControl's Validate event. > $frmControl.txtInput_Change() >End > > I noticed that in this scenario, the event raised by $frmControl does not > reach the Control_Validate() handler in ValidateBox.class and therefore the > validation process gets a false positive "correct" answer since nobody had > a chance to Stop Event. [ As a workaround, I think I can use a Timer with > short delay, despite its ugliness. But I'm curious about the reason. ] > > Is there a limitation, about raising events from constructors, I don't know > of? Also note how, in the demonstration project, I can very well initiate > the validation procedure just after the constructor finished. > > Regards, > Tobi > The logic behind that behaviour is that an object whose constructor is not finished should not be able to raise or catch events. Said differently, an object must be ready to deal with events. Regards, -- Benoît Minisini -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #778: gtk+/gtk3 different with qt4, clock example look different
http://gambaswiki.org/bugtracker/edit?object=BUG.778&from=L21haW4- Benoît MINISINI changed the state of the bug to: Accepted. -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #781: gtk+/gtk3 different with qt4, position y = 0 qt4 window is not at bottom panel
http://gambaswiki.org/bugtracker/edit?object=BUG.781&from=L21haW4- Comment #1 by Benoît MINISINI: Is it better with revision #7377? -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #781: gtk+/gtk3 different with qt4, position y = 0 qt4 window is not at bottom panel
http://gambaswiki.org/bugtracker/edit?object=BUG.781&from=L21haW4- Benoît MINISINI changed the state of the bug to: Waiting. -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Forward events from constructor
Hi, I'm puzzled by some behaviour of the interpreter when objects raise events from their constructors. The following big block of text just gives the rationale of my question. I think what I'm doing is not too strange. There is a short demonstration project attached. In my real project I want to implement a TextBox with a ToolButton next to it. This thing has a Validate event and should it be Stop Event'd by the user, this counts as invalid input. The validity of the input is reflected by the ToolButton's Picture. The user can specify a message which is dis- played as a Balloon over the ToolButton after the Button was clicked, explaining why the input is invalid. This is done in the following manner: FValidateBox is a Form class which handles all the logic. On top of that is ValidateBox.class which keeps an internal FValidateBox. If that FValidateBox raises its Validate event, ValidateBox forwards it to the user and redirects any Stop Event back to the FValidateBox to evaluate. This works, except that I also want to force an initial validation of the empty TextBox to initialise the ToolButton's Picture correctly (the question is here: does the user accept the empty string?). So I write in the constructor of ValidateBox.class: Inherits UserControl Private $frmControl As FValidateBox Public Sub _new() $frmControl = New FValidateBox(Me) As "Control" ' Call the Change handler of the TextBox which initiates the validation ' process by raising $frmControl's Validate event. $frmControl.txtInput_Change() End I noticed that in this scenario, the event raised by $frmControl does not reach the Control_Validate() handler in ValidateBox.class and therefore the validation process gets a false positive "correct" answer since nobody had a chance to Stop Event. [ As a workaround, I think I can use a Timer with short delay, despite its ugliness. But I'm curious about the reason. ] Is there a limitation, about raising events from constructors, I don't know of? Also note how, in the demonstration project, I can very well initiate the validation procedure just after the constructor finished. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk constructor-event-0.0.1.tar.gz Description: Binary data -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #782: gtk+ popup menu position in tray icon is not perfect
http://gambaswiki.org/bugtracker/edit?object=BUG.782&from=L21haW4- Benoît MINISINI changed the state of the bug to: Rejected. -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #782: gtk+ popup menu position in tray icon is not perfect
http://gambaswiki.org/bugtracker/edit?object=BUG.782&from=L21haW4- Comment #1 by Benoît MINISINI: This is a GTK+ problem, he has to decide where the menu pops up, as soon as you use a desktop that does not support the new trayicon protocol. I can't do anything against that. -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #776: Gambas does not detect Breeze as desktop incon theme
http://gambaswiki.org/bugtracker/edit?object=BUG.776&from=L21haW4- Comment #24 by Benoît MINISINI: It should be fixed in revision #7376. Can you confirm? -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to input hide password into gambas command line project ?
Le 02/10/2015 17:42, Tobias Boege a écrit : > On Fri, 02 Oct 2015, Beno??t Minisini wrote: >> Le 02/10/2015 17:19, Tobias Boege a ?crit : >>> On Fri, 02 Oct 2015, Charlie wrote: Have you tried something simple like and let the computer do the work: - /Public Sub Form_Open() Dim sDesktop, sDir As String sDesktop = Desktop.Type Select Case sDesktop Case "GNOME" Shell "gksu ls -a" To sDir 'Ubuntu, Mint, Debian etc Case "KDE" Shell "kdesudo ls -a" To sDir'Kubuntu, Mint KDE etc End Select Print sDir End/ >>> >>> That would work only in a graphical environment. Also gb.desktop reports my >>> DE as "?". What do you do in that case? >>> >>> And also these programs don't return the password but start a process under >>> a different user. What if the password was meant to connect to a MySQL data- >>> base or to read a password-protected RAR archive? >>> >>> Regards, >>> Tobi >>> >> >> What's your desktop? >> > > It's Trinity[0] in version 3.5.13. But it seems there is some more work to > do than just in Desktop.Type, e.g. if I select a directory in the IDE's > project TreeView and "Open in file manager..." (I guess this is Desktop's > Open() method), it starts Firefox. And there was some commonly used file > format (which I can't recall) which it insisted to open with "kdesvn". But > these may be configuration problems on my side. > > I always wanted to fix it but found myself to have gotten used to it by now. > For Desktop.Type, I see several mentions of Trinity in my environment > variables, most notably it is > >DESKTOP_SESSION=trinity > > Regards, > Tobi > > [0] https://www.trinitydesktop.org/ > There is non-standard standard: setting the XDG_CURRENT_DESKTOP env. variable. All other things are not standard at all. So for Gambas, just set XDG_CURRENT_DESKTOP. But it won't do anything else, as the Stock class does not handle Trinity. Regards, -- Benoît Minisini -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #784: gb.logging reports bad callLocation
http://gambaswiki.org/bugtracker/edit?object=BUG.784&from=L21haW4- Emanuele SOTTOCORNO reported a new bug. Summary --- gb.logging reports bad callLocation Type : Bug Priority : Low Gambas version : 3.8.90 (TRUNK) Product : Language Description --- Regardless the class / function where the logger has called, the token ever report '[ComplexLogger.Log.60]'. The error derive from Formatter.GetCallLocation function, the line should be modified as: While System.Backtrace[iCount] Begins "Logger" Or System.Backtrace[iCount] Begins "Formatter" Or System.Backtrace[iCount] Begins "Complex" to extract the correct string from System.BackTrace System information -- [System] Gambas=3.8.90 r7375 OperatingSystem=Linux Kernel=3.19.0-30-generic Architecture=x86_64 Distribution=Ubuntu 15.04 Desktop=GNOME Theme=Cleanlooks Language=it_IT.UTF-8 Memory=3951M [Libraries] Cairo=libcairo.so.2.11400.2 Curl=libcurl.so.4.3.0 DBus=libdbus-1.so.3.8.9 GStreamer=libgstreamer-0.10.so.0.30.0 GStreamer=libgstreamer-1.0.so.0.405.0 GTK+2=libgtk-x11-2.0.so.0.2400.27 GTK+3=libgtk-3.so.0.1400.13 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.49.0.0 QT4=libQtCore.so.4.8.6 QT5=libQt5Core.so.5.4.1 SDL=libSDL-1.2.so.0.11.4 [Environment] CLUTTER_IM_MODULE=xim COMPIZ_BIN_PATH=/usr/bin/ COMPIZ_CONFIG_PROFILE=ubuntu DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-Ti5aP8RGHH DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path DESKTOP_SESSION=ubuntu DISPLAY=:0 GB_GUI=gb.qt4 GDMSESSION=ubuntu GDM_LANG=it_IT GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/gambas3.desktop GIO_LAUNCHED_DESKTOP_FILE_PID=2001 GNOME_DESKTOP_SESSION_ID=this-is-deprecated GNOME_KEYRING_CONTROL= GNOME_KEYRING_PID= GPG_AGENT_INFO=/run/user/1000/keyring/gpg:0:1 GTK_IM_MODULE=ibus GTK_MODULES=overlay-scrollbar:unity-gtk-module HOME= IM_CONFIG_PHASE=1 INSTANCE= JAVA_TOOL_OPTIONS=-javaagent:/usr/share/java/jayatanaag.jar JOB=unity-settings-daemon LANG=it_IT.UTF-8 LANGUAGE=it_IT LOGNAME= MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games PWD= QT4_IM_MODULE=xim QT_IM_MODULE=ibus QT_QPA_PLATFORMTHEME=appmenu-qt5 SESSION=ubuntu SESSIONTYPE=gnome-session SHELL=/bin/bash SHLVL=0 SSH_AUTH_SOCK=/run/user/1000/keyring/ssh TZ=:/etc/localtime UPSTART_EVENTS=xsession started UPSTART_INSTANCE= UPSTART_JOB=unity7 UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/1214 USER= XAUTHORITY=/.Xauthority XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg XDG_CURRENT_DESKTOP=Unity XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/ XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/ XDG_RUNTIME_DIR=/run/user/1000 XDG_SEAT=seat0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 XDG_SESSION_DESKTOP=ubuntu XDG_SESSION_ID=c2 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 XDG_SESSION_TYPE=x11 XDG_VTNR=7 XMODIFIERS=@im=ibus -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to input hide password into gambas command line project ?
On Fri, 02 Oct 2015, Beno??t Minisini wrote: > Le 02/10/2015 17:19, Tobias Boege a ?crit : > > On Fri, 02 Oct 2015, Charlie wrote: > >> Have you tried something simple like and let the computer do the work: - > >> > >> /Public Sub Form_Open() > >> Dim sDesktop, sDir As String > >> > >> sDesktop = Desktop.Type > >> > >> Select Case sDesktop > >>Case "GNOME" > >> Shell "gksu ls -a" To sDir 'Ubuntu, Mint, Debian etc > >>Case "KDE" > >> Shell "kdesudo ls -a" To sDir'Kubuntu, Mint KDE etc > >> End Select > >> > >> Print sDir > >> > >> End/ > > > > That would work only in a graphical environment. Also gb.desktop reports my > > DE as "?". What do you do in that case? > > > > And also these programs don't return the password but start a process under > > a different user. What if the password was meant to connect to a MySQL data- > > base or to read a password-protected RAR archive? > > > > Regards, > > Tobi > > > > What's your desktop? > It's Trinity[0] in version 3.5.13. But it seems there is some more work to do than just in Desktop.Type, e.g. if I select a directory in the IDE's project TreeView and "Open in file manager..." (I guess this is Desktop's Open() method), it starts Firefox. And there was some commonly used file format (which I can't recall) which it insisted to open with "kdesvn". But these may be configuration problems on my side. I always wanted to fix it but found myself to have gotten used to it by now. For Desktop.Type, I see several mentions of Trinity in my environment variables, most notably it is DESKTOP_SESSION=trinity Regards, Tobi [0] https://www.trinitydesktop.org/ -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to input hide password into gambas command line project ?
Le 02/10/2015 17:19, Tobias Boege a écrit : > On Fri, 02 Oct 2015, Charlie wrote: >> Have you tried something simple like and let the computer do the work: - >> >> /Public Sub Form_Open() >> Dim sDesktop, sDir As String >> >> sDesktop = Desktop.Type >> >> Select Case sDesktop >>Case "GNOME" >> Shell "gksu ls -a" To sDir 'Ubuntu, Mint, Debian etc >>Case "KDE" >> Shell "kdesudo ls -a" To sDir'Kubuntu, Mint KDE etc >> End Select >> >> Print sDir >> >> End/ > > That would work only in a graphical environment. Also gb.desktop reports my > DE as "?". What do you do in that case? > > And also these programs don't return the password but start a process under > a different user. What if the password was meant to connect to a MySQL data- > base or to read a password-protected RAR archive? > > Regards, > Tobi > What's your desktop? -- Benoît Minisini -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to input hide password into gambas command line project ?
On Fri, 02 Oct 2015, Charlie wrote: > Have you tried something simple like and let the computer do the work: - > > /Public Sub Form_Open() > Dim sDesktop, sDir As String > > sDesktop = Desktop.Type > > Select Case sDesktop > Case "GNOME" > Shell "gksu ls -a" To sDir 'Ubuntu, Mint, Debian etc > Case "KDE" > Shell "kdesudo ls -a" To sDir'Kubuntu, Mint KDE etc > End Select > > Print sDir > > End/ That would work only in a graphical environment. Also gb.desktop reports my DE as "?". What do you do in that case? And also these programs don't return the password but start a process under a different user. What if the password was meant to connect to a MySQL data- base or to read a password-protected RAR archive? Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to input hide password into gambas command line project ?
Have you tried something simple like and let the computer do the work: - /Public Sub Form_Open() Dim sDesktop, sDir As String sDesktop = Desktop.Type Select Case sDesktop Case "GNOME" Shell "gksu ls -a" To sDir 'Ubuntu, Mint, Debian etc Case "KDE" Shell "kdesudo ls -a" To sDir'Kubuntu, Mint KDE etc End Select Print sDir End/ -- View this message in context: http://gambas.8142.n7.nabble.com/How-to-input-hide-password-into-gambas-command-line-project-tp53669p53687.html Sent from the gambas-user mailing list archive at Nabble.com. -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to input hide password into gambas command line project ?
Thank you Fabien for the code. — Olivier Cruilles Le October 2, 2015 à 02:29:27, Fabien Bodard (gambas...@gmail.com) a écrit: This is a class i've found in my old archives :-) ' Gambas module file Public Sub Main() Dim i As Integer Dim s As String For i = 1 To 25 s &= String(80, " ") & "\n" Next vt100.SetAttribute([42]) Print s Print "e" VT100.SetAttribute([1]) VT100.SetColor(VT100.Yellow, VT100.Blue) Print " Coucou " VT100.SetColor(7, 0) Print Print VT100.FontSetG1 For i = 0 To 10 Print "Test de terminal" Next Wait 3 VT100.ForceCursorPosition(5, 5) For i = 0 To 80 Wait 0.05 VT100.ForceCursorPosition(5, i) Next End It may help you. I've added at the end the codes to manage echo. Regards, Fabien Bodard 2015-10-01 19:59 GMT+02:00 Fabien Bodard : > You can use escape codes too : > > Local Echo (Keyboard Send-Receive) > > This mode selects local echo, which causes every character transmitted > by the terminal to automatically appear on the screen. Therefore, the > computer does not have to transmit (echo) the character back to the > terminal for display. When local echo is off, the terminal only > transmits characters to the computer. The computer must echo the > characters back to the terminal for display. Select send-receive mode > by using the following sequences. > > Send-Receive Mode (SRM) > > ESC [ 1 2 h > 033 133 061 062 150 > Set turns off local echo. The terminal transmits characters to the > computer, which must echo characters for display on screen. > > ESC [ 1 2 l > 033 133 061 062 154 > Reset selects local echo. Characters transmitted to the computer > automatically appear on the screen. > > > > In mode off the program must return the char itself and the terminal > don't display the hitten key. > > > When i'll finished my term emulator i will think to a simplified > component that could implement simple terminal things, > like QBasic does in the past. > > So i had to just type Term.Foreground() > or Term.EchoOff... then ... > > > > 2015-10-01 19:22 GMT+02:00 Yahoo : >> Yes exactly, it’s the way that I've found to restore the terminal. >> >> Thank you >> >> >> — >> Olivier Cruilles >> >> >> Le October 1, 2015 à 13:18:31, Tobias Boege (tabo...@gmail.com) a écrit: >> >> On Thu, 01 Oct 2015, Yahoo wrote: >>> About gb.ncurses, when I say the terminal become unusable I mean that the >>> Carrier Return does not work after closing my program, so press on the >>> enter key does not create to a new line and the prompt is written on the >>> same line, at the location where is the cursor. >>> >> >> That should indeed not happen. It seems gb.ncurses does not clean up >> properly. On my system, gb.ncurses works fine... But you can use the >> program "reset" to restore the default settings in any case. >> >> Regards, >> Tobi >> >> -- >> "There's an old saying: Don't change anything... ever!" -- Mr. Monk >> >> -- >> >> ___ >> Gambas-user mailing list >> Gambas-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> -- >> >> ___ >> Gambas-user mailing list >> Gambas-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > -- > Fabien Bodard -- Fabien Bodard -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user