Re: [Gambas-user] dynamic created Menus
Hi Fabien, let's see if I can clarify this. In Gambas there are three different types of class: - The real Class and its to be instantiated through the constructor (_new). - The Form which is a class already instantiated, but can receive the parameters which exposes the constructor (_new). - The Module is a class already instantiated, and that does not expose the constructor. Therefore I can refer to a module with Me, I can use inside events and I can even assign _new with another name to the module even if do not really need. I'm on the right track? Regards Gianluigi 2017-02-14 19:27 GMT+01:00 Gianluigi : > But if it is static, because I can write this? > > Public Sub Form_Open() > > Dim foo As New MMenu > > foo.AddMenuFromModule(MenuCharacters) > > End > > I have trouble understanding > > Regards > Gianluigi > > 2017-02-14 18:46 GMT+01:00 Fabien Bodard : > >> A module is a class but static. Like i you declare all element of a >> class as static >> >> 2017-02-14 17:02 GMT+01:00 Gianluigi : >> > Hi all, >> > first let me say that I do not want to teach anybody anything, I take >> part >> > in discussions to learn telling you what I think I know. >> > If I gave a different impression I apologize, it's my poor English that >> has >> > struck again. >> > >> > And now the question, how is it that an event is in a module? >> > See attached >> > >> > Thank you >> > Gianluigi >> > >> > 2017-02-08 14:50 GMT+01:00 Gianluigi : >> > >> >> While should not, it work also in a Module. >> >> >> >> ' Gambas module file >> >> >> >> Public Sub AddMenuFromOutsideForm(hMenu As Menu) >> >> >> >> Dim hMenuItem As Object >> >> >> >> hMenuItem = New Menu(hMenu) As "mnCharacters" >> >> hMenuItem.Text = "this don't work" >> >> hMenuItem.Tag = "This do not work" >> >> hMenuItem = New Menu(hMenu) As "mnCharacters" >> >> hMenuItem.Text = "this also don't work'" >> >> hMenuItem.Tag = "Also this do not work" >> >> >> >> End >> >> >> >> Public Sub mnCharacters_Click() >> >> >> >> Print Last.tag & " - " & Last.Text >> >> >> >> End >> >> >> >> 2017-02-08 14:25 GMT+01:00 Gianluigi : >> >> >> >>> Hi Karl, >> >>> >> >>> If you want to work with events, you should use a class. >> >>> See attached example. >> >>> >> >>> Regards >> >>> >> >>> Gianluigi >> >>> >> >>> 2017-02-07 23:41 GMT+01:00 Karl Reinl : >> >>> >> Am Montag, den 06.02.2017, 15:36 +0100 schrieb Fabien Bodard: >> > I think the good way is this one :-) >> > >> > Public Sub AddMenuFromOutsideForm(hMenu As Menu) >> > Dim hMenuItem As Object >> > Dim hParent As Object = Object.Parent(hMenu) >> > >> > hMenuItem = New Menu(hMenu) >> > hMenuItem = New Menu(hMenu) >> > Object.Attach(hMenuItem, hParent, "mnu_this_dont_work") >> > hMenuItem.Text = "this don't work" >> > hMenuItem = New Menu(hMenu) >> > Object.Attach(hMenuItem, hParent, "mnu_this_dont_work") >> > hMenuItem.Text = "this also don't work'" >> > >> > End >> > >> > >> > First find the class that handle menus events with object.parent on >> > the given menu container. >> > >> > then attach the new menu events to the same class instance with >> object.attach. >> > >> > 2017-02-06 15:08 GMT+01:00 Charlie Reinl : >> > > Salut, >> > > >> > > how can I use dynamic created Menus, when they are made outside >> the >> > > Form. >> > > I expanded an example from Gianluigi to show what I want. >> > > The problem is, the Click event is not fired, if the menu is not >> created >> > > in the forms class. >> > > >> >> Salut, >> >> Fabien, gave me a solution for my problem. But I do not understand >> why I >> can attach Items to the menu, but not their events? >> -- >> Amicalement >> Charlie >> >> >> >> -- >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >> ___ >> Gambas-user mailing list >> Gambas-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> >>> >> >>> >> >> >> > >> > >> -- >> > Check out the vibrant tech community on one of the world's most >> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot >> > ___ >> > Gambas-user mailing list >> > Gambas-user@lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/gambas-user >> > >> >> >> >> -- >> Fabien Bodard >> >> >> -- >> Check out the vibrant tech community on one of the world's most >> engagi
Re: [Gambas-user] dynamic created Menus
On Wed, 15 Feb 2017, Gianluigi wrote: > Hi Fabien, > let's see if I can clarify this. > In Gambas there are three different types of class: > - The real Class and its to be instantiated through the constructor (_new). > - The Form which is a class already instantiated, but can receive the > parameters which exposes the constructor (_new). > - The Module is a class already instantiated, and that does not expose the > constructor. > > Therefore I can refer to a module with Me, I can use inside events and I > can even assign _new with another name to the module even if do not really > need. > I'm on the right track? > This is not how I would understand the matter. First of all, you have your normal classes in Gambas. You can alter their behaviour by setting certain "flags" in your class. These flags are actually keywords in the Gambas language and you have to specify them at the beginning of your class file at compile time. o CREATE PRIVATE tells the interpreter that the current class is not instanciable. o CREATE STATIC tells the interpreter to create an automatic instance of the class which is used automatically when you use the class name like an object. There is also EXPORT and INHERITS, but they're of minor relevance for the topic at hand. None of these flags influence the presence of ME or events. They are always available. Now, a module is a normal class in which every symbol is implicitly made static by the compiler. You can still create objects from a module but that isn't useful because you don't have dynamic symbols in a module. You will just end up with multiple objects that all reference the same data. The only way the Form class is any special is because it has dedicated support for .form files in the compiler. Other than that it is a normal class -- which uses the CREATE STATIC flag. Quoting the definition of the Form class from gb.qt4/src/CWindow.cpp: 1466 GB_DESC CFormDesc[] = 1467 { 1468 GB_DECLARE("Form", sizeof(CFORM)), GB_INHERITS("Window"), 1469 GB_AUTO_CREATABLE(), 1470 1471 GB_STATIC_METHOD("Main", NULL, CFORM_main, NULL), 1472 GB_STATIC_METHOD("Load", NULL, CFORM_load, "[(Parent)Control;]"), 1473 GB_METHOD("_new", NULL, CFORM_new, NULL), 1474 1475 FORM_DESCRIPTION, 1476 1477 GB_END_DECLARE 1478 }; The macro GB_AUTO_CREATABLE() is the C rendition of CREATE STATIC. As you can see, Form just inherits Window and adds three further methods. These methods are actually what makes Form classes behave the special way they do, like automatically showing on program startup and being their own event observers. (And, well, there's the FORM_DESCRIPTION macro but don't worry about it.) My point is, the behaviour of a Form is accomplished by standard Gambas mechanisms, that are available to everyone (only the conversion of .form files to executable code needs specific support in the compiler). Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] dynamic created Menus
Hi Tobias, I thank you a lot for explanations, in fact I was too concise because, but not only, of my English. One thing, when you say: "You can still create objects from a module but that isn't useful because you don't have dynamic symbols in a module", what exactly do you mean by "symbols", because in a module we can insert dynamics variables, functions, sub etc. Regards Gianluigi 2017-02-15 13:47 GMT+01:00 Tobias Boege : > On Wed, 15 Feb 2017, Gianluigi wrote: > > Hi Fabien, > > let's see if I can clarify this. > > In Gambas there are three different types of class: > > - The real Class and its to be instantiated through the constructor > (_new). > > - The Form which is a class already instantiated, but can receive the > > parameters which exposes the constructor (_new). > > - The Module is a class already instantiated, and that does not expose > the > > constructor. > > > > Therefore I can refer to a module with Me, I can use inside events and I > > can even assign _new with another name to the module even if do not > really > > need. > > I'm on the right track? > > > > This is not how I would understand the matter. First of all, you have your > normal classes in Gambas. You can alter their behaviour by setting certain > "flags" in your class. These flags are actually keywords in the Gambas > language and you have to specify them at the beginning of your class file > at compile time. > > o CREATE PRIVATE tells the interpreter that the current class is not > instanciable. > o CREATE STATIC tells the interpreter to create an automatic instance of > the class which is used automatically when you use the class name like > an object. > > There is also EXPORT and INHERITS, but they're of minor relevance for the > topic at hand. > > None of these flags influence the presence of ME or events. They are always > available. > > Now, a module is a normal class in which every symbol is implicitly made > static by the compiler. You can still create objects from a module but that > isn't useful because you don't have dynamic symbols in a module. You will > just end up with multiple objects that all reference the same data. > > The only way the Form class is any special is because it has dedicated > support for .form files in the compiler. Other than that it is a normal > class -- which uses the CREATE STATIC flag. Quoting the definition of the > Form class from gb.qt4/src/CWindow.cpp: > > 1466 GB_DESC CFormDesc[] = > 1467 { > 1468 GB_DECLARE("Form", sizeof(CFORM)), GB_INHERITS("Window"), > 1469 GB_AUTO_CREATABLE(), > 1470 > 1471 GB_STATIC_METHOD("Main", NULL, CFORM_main, NULL), > 1472 GB_STATIC_METHOD("Load", NULL, CFORM_load, > "[(Parent)Control;]"), > 1473 GB_METHOD("_new", NULL, CFORM_new, NULL), > 1474 > 1475 FORM_DESCRIPTION, > 1476 > 1477 GB_END_DECLARE > 1478 }; > > The macro GB_AUTO_CREATABLE() is the C rendition of CREATE STATIC. As you > can see, Form just inherits Window and adds three further methods. These > methods are actually what makes Form classes behave the special way they > do, like automatically showing on program startup and being their own event > observers. (And, well, there's the FORM_DESCRIPTION macro but don't worry > about it.) My point is, the behaviour of a Form is accomplished by standard > Gambas mechanisms, that are available to everyone (only the conversion of > .form files to executable code needs specific support in the compiler). > > Regards, > Tobi > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] dynamic created Menus
On Wed, 15 Feb 2017, Gianluigi wrote: > Hi Tobias, > I thank you a lot for explanations, in fact I was too concise because, but > not only, of my English. > One thing, when you say: "You can still create objects from a module but > that > isn't useful because you don't have dynamic symbols in a module", what > exactly do you mean by "symbols", because in a module we can insert > dynamics variables, functions, sub etc. > By symbols I mean variables, properties and methods (constants and events, too, but they don't matter here). If you write them into a module, they are automatically static. You can't have dynamic ones in a module. Attached is a project which demonstrates this. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk test-0.0.1.tar.gz Description: Binary data -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] dynamic created Menus
oh I finally understand! Thanks Tobias, you are a great. You made me happy :-) A big big greeting Gianluigi 2017-02-15 15:38 GMT+01:00 Tobias Boege : > On Wed, 15 Feb 2017, Gianluigi wrote: > > Hi Tobias, > > I thank you a lot for explanations, in fact I was too concise because, > but > > not only, of my English. > > One thing, when you say: "You can still create objects from a module but > > that > > isn't useful because you don't have dynamic symbols in a module", what > > exactly do you mean by "symbols", because in a module we can insert > > dynamics variables, functions, sub etc. > > > > By symbols I mean variables, properties and methods (constants and events, > too, but they don't matter here). If you write them into a module, they are > automatically static. You can't have dynamic ones in a module. Attached is > a project which demonstrates this. > > Regards, > Tobi > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] gb-qt4 vs gb-qt5 (systray)
Salutation Benoit I am restructuring my project (Innova Deskop) to improve. I want to create a light, functional and beautiful project. Example: GbPanel - GbLauncher - GbSettings - GbDate - GbTheme - GbPlugins - GbWidget - PCInfo - More I want to use gb-qt5 for a new design and take into account all the suggestions made. I have some problems and I need help. gb-qt4 vs gb-qt5 1.0 - systray does NOT work with gb-qt5 1.1 - systray SI works with gb-qt4 2.0 - controls are better and cleaner with gb-qt5 2.1 - the controls are more rustic and not showy with gb-qt4 3.0 - I would like to use plasma-nm (KDE) 3.1 - I would not like to use nm-applet (Gnome) Tell me if it is possible that I can work with gb-qt5 I think that if I continue working with gb-qt4 I will stay behind and I will be stuck and I will not be able to use new technology (gb-qt5) Can you help me please or find some solution to my problem ...? Thank you very much Herberth Guzmán Attached screenshots https://drive.google.com/file/d/0B2gI4jYOofp0amRfLXBzVUloVjA/view https://drive.google.com/open?id=0B2gI4jYOofp0WUJOdU1wS0s0NG8 -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] gb-qt4 vs gb-qt5 (systray)
Le 15/02/2017 à 19:00, herberth guzman a écrit : > Salutation Benoit > > I am restructuring my project (Innova Deskop) to improve. > I want to create a light, functional and beautiful project. > > Example: > GbPanel - GbLauncher - GbSettings - GbDate - GbTheme - GbPlugins - GbWidget > - PCInfo - More > > I want to use gb-qt5 for a new design and take into account all the > suggestions made. > > I have some problems and I need help. > > gb-qt4 vs gb-qt5 > > 1.0 - systray does NOT work with gb-qt5 > 1.1 - systray SI works with gb-qt4 Maybe it's time for you to try to implement the DBus Systray instead of using the X11 systray? I will check anyway why the QT5 X11 systray does not work anymore. > > 2.0 - controls are better and cleaner with gb-qt5 > 2.1 - the controls are more rustic and not showy with gb-qt4 It's more a matter of widget style in use. I suggest you try to implement your own controls in Gambas for your desktop, so that you have exactly the look you want. It's a very good exercise. :-) > > 3.0 - I would like to use plasma-nm (KDE) > 3.1 - I would not like to use nm-applet (Gnome) I can't help you about that, I don't know them. I'm afraid that plasma-nm, according to its name, heavily depends on plasma. P.S. If you make screenshots with desktop background inside, better use JPEG than PNG. Or use a single color as your desktop background before making the PNG screenshot. Regards, -- Benoît Minisini -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #1077: gb.form.terminal - Enhancement request
http://gambaswiki.org/bugtracker/edit?object=BUG.1077&from=L21haW4- Comment #4 by Brian G: Hi I am using the terminal as a separate front end for my application, eventually I will support access to a number of different systems, including rs232 interface for switches , I am using the terminal form to display the output. The software establishes the connection, rs232 or ssh, and manages the interface with scripts for control. I am using the Print interface to display the output and the key interface to get the keystrokes. I am managing the back end in my application. It would be very helpful to be able to query the display interface to discover the current rows and columns. The print interface provides good terminal support for output. And is very useful. It would simplify many different application of this component to be able to query the dimensions of the screen. Many of the remote system employ text graphics which fail if I don’t resize the remote terminals, straight terminal mode works fine as it just spits out line after line of text, The resize must be managed by my back end. Thanks for your time and consideration, this addition would make the terminal very much more flexible. Also where can I find some more information regarding the key filters as ALT-anything prints a debug console message that they are not supported. many of the graphic terminal interfaces allow shortcut key sequences. Thanks Brian G -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #1077: gb.form.terminal - Enhancement request
http://gambaswiki.org/bugtracker/edit?object=BUG.1077&from=L21haW4- Comment #5 by Brian G: When I speak of graphics I am talking about text mode graphics only -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #1077: gb.form.terminal - Enhancement request
http://gambaswiki.org/bugtracker/edit?object=BUG.1077&from=L21haW4- Comment #6 by Benoît MINISINI: I will add a Resize event, but, again, you normally don't need it! If you run your software inside the TerminalView with the Exec() or Shell() method, it will receive the terminal resize signal, and will be able to transmit it to the remote process. I guess you are using the TerminalView just as a display widget, not as a true terminal, and this is the reason why you need to know when it is resized... Benoît MINISINI changed the state of the bug to: Working. -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #1077: gb.form.terminal - Enhancement request
http://gambaswiki.org/bugtracker/edit?object=BUG.1077&from=L21haW4- Comment #7 by Benoît MINISINI: As for the "ALT+anything" thing, I don't know what you are talking about exactly... -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #1077: gb.form.terminal - Enhancement request
http://gambaswiki.org/bugtracker/edit?object=BUG.1077&from=L21haW4- Comment #8 by Benoît MINISINI: Done in revision #8091. Benoît MINISINI changed the state of the bug to: Fixed. -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #1075: Make Installation Package fails under Arch
http://gambaswiki.org/bugtracker/edit?object=BUG.1075&from=L21haW4- Comment #1 by Moviga TECHNOLOGIES: Just to clarify, this seems to be an issue with the IDE's tool for making Arch packages, as there is no duplicate folder in the Innova DE. -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #1078: X11 Systray behaves strangely under GTK or QT5
http://gambaswiki.org/bugtracker/edit?object=BUG.1078&from=L21haW4- Benoît MINISINI changed the state of the bug to: Accepted. -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #1076: Error with FAST
http://gambaswiki.org/bugtracker/edit?object=BUG.1076&from=L21haW4- Comment #1 by Benoît MINISINI: It seems the Rand() function is not supported by the JIT compiler. As a workaround, you can use the Rnd() function with Int(). -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #1080: The top-left Save button does not save the comment
http://gambaswiki.org/bugtracker/edit?object=BUG.1080&from=L21haW4- Moviga TECHNOLOGIES reported a new bug. Summary --- The top-left Save button does not save the comment Type : Bug Priority : Medium Gambas version : Unknown Product : Bugtracker Description --- There appears to be two Save buttons on the screen; one at the top-left for the bug-post and one at the bottom-right for comments. A bit confusing with two buttons having the same name, but doing different things. I found this "bug" when making a comment and clicking the top button. Nothing happened, except taking me to the front page. -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #1076: Error with FAST
http://gambaswiki.org/bugtracker/edit?object=BUG.1076&from=L21haW4- Benoît MINISINI changed the state of the bug to: Accepted. -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] dynamic created Menus
Hi Tobias, kindly can you deepen the concept of static. See attached project. Regards Gianluigi 2017-02-15 16:23 GMT+01:00 Gianluigi : > oh I finally understand! > Thanks Tobias, you are a great. > You made me happy :-) > > A big big greeting > Gianluigi > > 2017-02-15 15:38 GMT+01:00 Tobias Boege : > >> On Wed, 15 Feb 2017, Gianluigi wrote: >> > Hi Tobias, >> > I thank you a lot for explanations, in fact I was too concise because, >> but >> > not only, of my English. >> > One thing, when you say: "You can still create objects from a module but >> > that >> > isn't useful because you don't have dynamic symbols in a module", what >> > exactly do you mean by "symbols", because in a module we can insert >> > dynamics variables, functions, sub etc. >> > >> >> By symbols I mean variables, properties and methods (constants and events, >> too, but they don't matter here). If you write them into a module, they >> are >> automatically static. You can't have dynamic ones in a module. Attached is >> a project which demonstrates this. >> >> Regards, >> Tobi >> >> -- >> "There's an old saying: Don't change anything... ever!" -- Mr. Monk >> >> >> -- >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >> ___ >> Gambas-user mailing list >> Gambas-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> > TestFunction-0.0.1.tar.gz Description: GNU Zip compressed data -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #1076: Error with FAST
http://gambaswiki.org/bugtracker/edit?object=BUG.1076&from=L21haW4- Comment #2 by Gianluigi GRADASCHI: Hi Benoit, thank you for the suggestion Regards Gianluigi -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] dynamic created Menus
On Wed, 15 Feb 2017, Gianluigi wrote: > Hi Tobias, > > kindly can you deepen the concept of static. > See attached project. > For reference: this is the Main routine Public Sub Main() Dim cl As New Class1 Print cl.myAdd(12, 12) Print cl.myAdd() ' I expected zero Print Module1.myAdd(12, 12) Print Module1.myAdd() ' I expected 24 End and in Class1 as well as Module1 we have Public Function myAdd(Optional a As Integer, b As Integer) As Integer Return (a + b) End where one is a static method and the other is not. Let me first explain static vs. dynamic in general, then you'll see why the code prints 24 0 24 0 You can declare variables, properties and methods as either static or dynamic in Gambas. If you don't declare it as static, then it's dynamic. If a variable is dynamic, then each object you create from the class receives its own separate memory region for the variable, so the value of the variable can be different in every object. This is usually what you want (hence there is no extra keyword to make things dynamic, they are by default, unless you make a module). If you declare a variable as static, you can think of the variable belonging not to an object but to the class itself. All objects you create from the class will share the same memory region for a static variable. If you modify the variable from one object, the change is visible in all other objects. This is what happens to variables. If you make a method static, then it also "belongs to the class" (not to dynamic objects), in the sense that you can only access static variables from a static method. Lastly a static property is just implemented by using the two static Property_Read() and Property_Write() methods, so the explanation of static methods applies here as well. Now about your code: the myAdd() method just calculates the sum of its arguments. It does not access any variables. Whether something is static or not only makes a difference if you access memory in your class or object. The attached project serves better to highlight the difference, because it actually *stores* values, once statically and once dynamically: ' Main.module Public Sub Main() Dim x, y As New Class1 Dim u, v As New Module1 x.Add(10) y.Add(5) x.Print() y.Print() Print "---" u.Add(10) v.Add(5) u.Print() v.Print() End ' Class1.class and Module1.module identical code Public sum As Integer Public Sub Add(a As Integer) sum += a End Public Sub Print() Print sum End Output is 10 5 --- 15 15 because in the first half, x and y have a dynamic sum variable, i.e. both objects have their own variable, whereas in the second case sum is static, so both additions actually go to the same region in memory and you get 10+5 = 15. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk TestFunction-0.0.2.tar.gz Description: Binary data -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #1077: gb.form.terminal - Enhancement request
http://gambaswiki.org/bugtracker/edit?object=BUG.1077&from=L21haW4- Comment #9 by Brian G: Ok more details regarding error I receive when text graphics are used the debug console displays TerminalFilter_VT100.Escape.627: Not implemented: "[1034h" TerminalFilter_VT100.Escape.627: Not implemented: "[1034h" TerminalFilter_VT100.Escape.627: Not implemented: "[1034h" TerminalFilter_VT100.Escape.627: Not implemented: "[1034h" TerminalFilter_VT100.Escape.627: Not implemented: "[1034h" TerminalFilter_VT100.Escape.627: Not implemented: "[1034h" TerminalFilter_VT100.Escape.627: Not implemented: "[1034h" TerminalFilter_VT100.Escape.627: Not implemented: "[1034h" TerminalFilter_VT100.Escape.627: Not implemented: "[1034h" TerminalFilter_VT100.Escape.627: Not implemented: "[1034h" TerminalFilter_VT100.Escape.627: Not implemented: "[1034h" TerminalFilter_VT100.Escape.627: Not implemented: "[1034h" -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #1077: gb.form.terminal - Enhancement request
http://gambaswiki.org/bugtracker/edit?object=BUG.1077&from=L21haW4- Comment #10 by Brian G: So my question was how do I modify the filter? -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Configure real httpd for gb.web.form
Hi list, has anyone here ever set up a real HTTP server for running gb.web.form applications? I've decided to use nginx and setting up https there was easy enough (https being the the reason why I can't use gb.httpd). Normal Gambas CGI, i.e. a Gambas script with gb.web, also works fine. But I have no idea about gb.web.form. I read around in the gb.httpd source code and kind of get its control flow but I'm none the wiser about how to set up an external HTTP server to work with this component. In particular I would run the .gambas executable archive on every request, which, I presume, involves rewriting the request URL, i.e. /my/project.gambas/x should be redirected to /my/project.gambas while setting Request.Path to "/x". I'm not sure if any other information about my setup is useful here. I think I succeeded in redirecting all requests to my program and by setting PATH_INFO from the original request URL, I get a meaningful Request.Path in Gambas. The result being that the skeleton HTML of my page is shown but it's not responsive at all (and it appears to be the wrong page, i.e. the wrong Webform.Startup, indicating that probably Session management doesn't work). It also seems like the browser is not able to communicate with gb.web.form. Instead of trying to debug my setup which looks completely wrong, my question would be if someone has a working configuration for this type of project for any HTTP server (that isn't gb.httpd) -- in the hope that I can go from there to nginx. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Configure real httpd for gb.web.form
Le 16/02/2017 à 03:20, Tobias Boege a écrit : > Hi list, > > has anyone here ever set up a real HTTP server for running gb.web.form > applications? I've decided to use nginx and setting up https there was > easy enough (https being the the reason why I can't use gb.httpd). > Normal Gambas CGI, i.e. a Gambas script with gb.web, also works fine. > > But I have no idea about gb.web.form. Projects using gb.web.form are CGI scripts too, no difference. > I read around in the gb.httpd > source code and kind of get its control flow but I'm none the wiser > about how to set up an external HTTP server to work with this component. > In particular I would run the .gambas executable archive on every request, > which, I presume, involves rewriting the request URL, i.e. > > /my/project.gambas/x > > should be redirected to > > /my/project.gambas > > while setting Request.Path to "/x". > > I'm not sure if any other information about my setup is useful here. > I think I succeeded in redirecting all requests to my program and by > setting PATH_INFO from the original request URL, I get a meaningful > Request.Path in Gambas. The result being that the skeleton HTML of my > page is shown but it's not responsive at all (and it appears to be the > wrong page, i.e. the wrong Webform.Startup, indicating that probably > Session management doesn't work). It also seems like the browser is not > able to communicate with gb.web.form. > > Instead of trying to debug my setup which looks completely wrong, my > question would be if someone has a working configuration for this type > of project for any HTTP server (that isn't gb.httpd) -- in the hope > that I can go from there to nginx. > > Regards, > Tobi > Example with the configuration file of lighttpd: ... # This tells that all and executable files are cgi scripts, # and just them cgi.execute-x-only = "enable" cgi.assign = ( "" => "" ) ... # This tell that the "/manager" URL is associated with the CGI script alias.url = ( "/manager" => "/path/to/MyCgiScript.gambas" ) Regards, -- Benoît Minisini -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Configure real httpd for gb.web.form
Le 16/02/2017 à 03:33, Benoît Minisini a écrit : > > Example with the configuration file of lighttpd: > > ... > # This tells that all and executable files are cgi scripts, ---> This tells that all executable files are cgi scripts, -- Benoît Minisini -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #1077: gb.form.terminal - Enhancement request
http://gambaswiki.org/bugtracker/edit?object=BUG.1077&from=L21haW4- Comment #11 by Brian G: Thank you for making the change, I really appreciate it! -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #1077: gb.form.terminal - Enhancement request
http://gambaswiki.org/bugtracker/edit?object=BUG.1077&from=L21haW4- Comment #12 by Benoît MINISINI: You can ignore these messages. I will remove them, as these escape sequences usually do not have any effect in terminal emulators. -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #1077: gb.form.terminal - Enhancement request
http://gambaswiki.org/bugtracker/edit?object=BUG.1077&from=L21haW4- Comment #13 by Brian G: Question regarding this, Are you spanning escape sequences across Print calls. That is can I send part on first call and then rest of the sequence on the next call? I am not checking that I send complete escape sequence as they are received and forwarded to the terminal! This may be the issue with the serious errors! my screens are also missing graphics here and there. -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Gambas Bug Tracker] Bug #1077: gb.form.terminal - Enhancement request
http://gambaswiki.org/bugtracker/edit?object=BUG.1077&from=L21haW4- Comment #14 by Brian G: Spurious not serious -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user