Re: [Gambas-user] Pre-release of gambas 3.8.2
Hello, Tested last Gambas version 3.8.2 on Fedora 16. Compiled without any problem and quickly tested a lot of projects mine and all seems to work well. No reported any problem for the moment. Continuing to test. Cordialement, Olivier Cruilles > Le 4 oct. 2015 à 15:03, Benoît Minisini a > écrit : > > Le 04/10/2015 16:50, Benoît Minisini a écrit : >> Hi, >> >> I have just uploaded a pre-release of Gambas 3.8.2 at: >> >> http://sourceforge.net/projects/gambas/files/gambas3/gambas3-3.8.2.tar.bz2/download >> >> You will find in it everything that was is /trunk: all the bug fixes, >> and the changes, that (normally) are all backward-compatible. >> >> The full changelog is on the wiki. >> >> Please report if you have any problem with it. Now I am going to test it >> on my Mint virtual machine. >> >> Regards, >> > > A new package has been uploaded. The "VERSION" file was missing for a > while, and nobody noticed! > > -- > Benoît Minisini > > -- > ___ > 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
Re: [Gambas-user] Fwd: Need help on treeview
Hi, This my code. I hope that you search for your project: Public sub Compte_Item() DIM KEYSAV as Integer ColumnView1.MoveFirst() WHILE ColumnView1.Available KEYSAV = ColumnView1.Item.Key ' Do what you want here IF ColumnView1.MoveChild() THEN 'PRINT "No child" ColumnView1.MoveTo(KEYSAV2) IF ColumnView1.MoveNext() THEN 'PRINT " No Next" ColumnView1.MoveTo(KEYSAV2) IF NOT ColumnView1.MoveParent() THEN ColumnView1.MoveNext() END IF END IF END IF WEND Olivier > > > De : Fabien Bodard > > > Date : 28 avril 2009 23:12:33 HAEC > > > À : gambas-user@lists.sourceforge.net > > > Objet : [Gambas-user] Need help on treeview > > > Répondre à : mailing list for gambas users > > > > > > > > > > > > Private Sub Filter() > > > > > > Dim s As String > > > > > >With $hTreeView > > >.MoveFirst > > >While .Available > > > $hFltCV.Add(.item.Key, .item.Text, .Item.Picture) > > > Print .Key > > >If Not .MoveChild Then > > > Print .Item.Count > > > Filter() > > > .MoveParent > > >Endif > > > .MoveNext > > >Wend > > > > > >Print "sortie" > > > > > > End With > > > > > > End > > > > > > this is a code that intend to copy a treeview on another one :/ > > > > > > but I've missed the curses on treeview, someone have more affinity > > > on this ? > > > > > > > > > My code just detect the first entry and don't purchase on > > > childs > > > > > > PLEEAASE HEEELP ! > > > > > > Regards > > > Fabien Bodard > > > > > > -- > > > Register Now & Save for Velocity, the Web Performance & > > > Operations > > > Conference from O'Reilly Media. Velocity features a full day of > > > expert-led, hands-on workshops and two days of sessions from > > > industry > > > leaders in dedicated Performance & Operations tracks. Use code > > > vel09scf > > > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > > > ___ > > > Gambas-user mailing list > > > Gambas-user@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Problem to use a TextArea
Hi all, I'm using a TextArea in a little project like a Text Editor. When I add the part of code to search in the text of this TextArea, I have a problem during search text whith the command 'instr'. In fact, when this command find accented characters, it count 2 characters instead of 1 and the position of the search at the end it false. Does any body have an explication about this problem please ? Joined the code to search in the TextArea - Public SAVMARKER as Interger Public Button1_Click() SearchTextInEditor(1) End PUBLIC SUB SearchTextInEditor(MODE AS Integer) ' MODE: 0 => From the beginning of the text ' MODE: 1 => After the last search DIM IndexCarac AS Integer DIM CaracTexte AS String DIM IndexRecherche AS Integer DIM LongueurRecherche AS Integer TextBox39.Text = Replace(TextBox39.Text, "\"", "") TextBox40.text = Replace(TextBox40.text, "\"", "") IF TextArea1.Length > 0 THEN IF TextBox39.text = "" THEN Message.Warning(("Please entrer text to search !"), ("Close")) RETURN END IF Application.Busy = 1 SELECT CASE MODE CASE 0 ' search from the beginning of the text SAVMARKER = 0 IF ToggleButton5.Value = TRUE THEN ' Use the case sensitive IndexRecherche = InStr(TextArea1.Text, TextBox39.Text, SAVMARKER, gb.Text) ELSE ' No case sensitive IndexRecherche = InStr(Lower$(TextArea1.Text), Lower $(TextBox39.Text), SAVMARKER, gb.Text) END IF IF IndexRecherche > 0 THEN $TextEditor.Select(IndexRecherche - 1, Len(TextBox39.Text)) $TextEditor.EnsureVisible() SAVMARKER = IndexRecherche + Len(TextBox39.Text) PRINT "IndexRecherche=" & IndexRecherche IF SAVMARKER > TextArea1.Length THEN SAVMARKER = TextArea1.Length END IF LongueurRecherche = Len(TextBox39.Text) ELSE Application.Busy = 0 Message.Info(("Search finished. End of list attained."), ("Close")) RETURN END IF CASE 1 ' Search following ... IF ToggleButton5.Value = TRUE THEN ' Use the case sensitive IndexRecherche = InStr(TextArea1.Text, TextBox39.Text, SAVMARKER, gb.Text) ELSE ' Ne pas tenir compte de la casse IndexRecherche = InStr(Lower$(TextArea1.Text), Lower $(TextBox39.Text), SAVMARKER, gb.Text) END IF IF IndexRecherche > 0 THEN TextArea1.Select((IndexRecherche - 1), Len(TextBox39.Text)) SAVMARKER = IndexRecherche + Len(TextBox39.Text) IF SAVMARKER > TextArea1.Length THEN SAVMARKER = TextArea1.Length END IF ELSE Application.Busy = 0 Message.Info(("Search finished. End of list attained."), ("Close")) RETURN END IF END SELECT END IF Application.Busy = 0 END - Thank you in advance. -- Olivier CRUILLES Email: linu...@club-internet.fr -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] ERRATUM: Problem to use a TextArea
Hi all, I'm using a TextArea in a little project like a Text Editor. When I add the part of code to search in the text of this TextArea, I have a problem during search text whith the command 'instr'. In fact, when this command find accented characters, it count 2 characters instead of 1 and the position of the search at the end it false. Does any body have an explication about this problem please ? Joined the code to search in the TextArea - Public SAVMARKER as Interger Public Button1_Click() SearchTextInEditor(1) End PUBLIC SUB SearchTextInEditor(MODE AS Integer) ' MODE: 0 => From the beginning of the text ' MODE: 1 => After the last search DIM IndexCarac AS Integer DIM CaracTexte AS String DIM IndexRecherche AS Integer DIM LongueurRecherche AS Integer TextBox39.Text = Replace(TextBox39.Text, "\"", "") TextBox40.text = Replace(TextBox40.text, "\"", "") IF TextArea1.Length > 0 THEN IF TextBox39.text = "" THEN Message.Warning(("Please entrer text to search !"), ("Close")) RETURN END IF Application.Busy = 1 SELECT CASE MODE CASE 0 ' search from the beginning of the text SAVMARKER = 0 IF ToggleButton5.Value = TRUE THEN ' Use the case sensitive IndexRecherche = InStr(TextArea1.Text, TextBox39.Text, SAVMARKER, gb.Text) ELSE ' No case sensitive IndexRecherche = InStr(Lower$(TextArea1.Text), Lower $(TextBox39.Text), SAVMARKER, gb.Text) END IF IF IndexRecherche > 0 THEN TextArea1.Select(IndexRecherche - 1, Len(TextBox39.Text)) TextArea1.EnsureVisible() SAVMARKER = IndexRecherche + Len(TextBox39.Text) PRINT "IndexRecherche=" & IndexRecherche IF SAVMARKER > TextArea1.Length THEN SAVMARKER = TextArea1.Length END IF LongueurRecherche = Len(TextBox39.Text) ELSE Application.Busy = 0 Message.Info(("Search finished. End of list attained."), ("Close")) RETURN END IF CASE 1 ' Search following ... IF ToggleButton5.Value = TRUE THEN ' Use the case sensitive IndexRecherche = InStr(TextArea1.Text, TextBox39.Text, SAVMARKER, gb.Text) ELSE ' Ne pas tenir compte de la casse IndexRecherche = InStr(Lower$(TextArea1.Text), Lower $(TextBox39.Text), SAVMARKER, gb.Text) END IF IF IndexRecherche > 0 THEN TextArea1.Select((IndexRecherche - 1), Len(TextBox39.Text)) SAVMARKER = IndexRecherche + Len(TextBox39.Text) IF SAVMARKER > TextArea1.Length THEN SAVMARKER = TextArea1.Length END IF ELSE Application.Busy = 0 Message.Info(("Search finished. End of list attained."), ("Close")) RETURN END IF END SELECT END IF Application.Busy = 0 END - Thank you in advance. -- Olivier CRUILLES Email: linu...@club-internet.fr -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Problem to use a TextArea
Thank's Fabien it works fine now. so cool.. Olivier Le mercredi 28 avril 2010 à 01:09 +0200, Fabien Bodard a écrit : > it's utf8 use : > > String.Instr instead Intr > > http://gambasdoc.org/help/comp/gb/string/instr > > 2010/4/28 linus : > > > > Hi all, > > > > I'm using a TextArea in a little project like a Text Editor. > > > > When I add the part of code to search in the text of this TextArea, I > > have a problem during search text whith the command 'instr'. > > > > In fact, when this command find accented characters, it count 2 > > characters instead of 1 and the position of the search at the end it > > false. > > > > Does any body have an explication about this problem please ? > > > > Joined the code to search in the TextArea > > > > - > > > > > > Public SAVMARKER as Interger > > > > > > Public Button1_Click() > > > > SearchTextInEditor(1) > > > > End > > > > > > PUBLIC SUB SearchTextInEditor(MODE AS Integer) > > > > ' MODE: 0 => From the beginning of the text > > ' MODE: 1 => After the last search > > > > DIM IndexCarac AS Integer > > DIM CaracTexte AS String > > DIM IndexRecherche AS Integer > > DIM LongueurRecherche AS Integer > > > > TextBox39.Text = Replace(TextBox39.Text, "\"", "") > > TextBox40.text = Replace(TextBox40.text, "\"", "") > > > > IF TextArea1.Length > 0 THEN > > > >IF TextBox39.text = "" THEN > > Message.Warning(("Please entrer text to search !"), ("Close")) > > RETURN > >END IF > > > >Application.Busy = 1 > > > >SELECT CASE MODE > > CASE 0 > >' search from the beginning of the text > >SAVMARKER = 0 > >IF ToggleButton5.Value = TRUE THEN > > ' Use the case sensitive > > IndexRecherche = InStr(TextArea1.Text, TextBox39.Text, > > SAVMARKER, gb.Text) > >ELSE > > ' No case sensitive > > IndexRecherche = InStr(Lower$(TextArea1.Text), Lower > > $(TextBox39.Text), SAVMARKER, gb.Text) > >END IF > > > >IF IndexRecherche > 0 THEN > > > > $TextEditor.Select(IndexRecherche - 1, Len(TextBox39.Text)) > > $TextEditor.EnsureVisible() > > SAVMARKER = IndexRecherche + Len(TextBox39.Text) > > PRINT "IndexRecherche=" & IndexRecherche > > IF SAVMARKER > TextArea1.Length THEN > >SAVMARKER = TextArea1.Length > > END IF > > > > LongueurRecherche = Len(TextBox39.Text) > > > >ELSE > > Application.Busy = 0 > > Message.Info(("Search finished. End of list attained."), > > ("Close")) > > RETURN > >END IF > > > > CASE 1 > >' Search following ... > >IF ToggleButton5.Value = TRUE THEN > > ' Use the case sensitive > > IndexRecherche = InStr(TextArea1.Text, TextBox39.Text, > > SAVMARKER, gb.Text) > >ELSE > > ' Ne pas tenir compte de la casse > > IndexRecherche = InStr(Lower$(TextArea1.Text), Lower > > $(TextBox39.Text), SAVMARKER, gb.Text) > >END IF > > > >IF IndexRecherche > 0 THEN > > TextArea1.Select((IndexRecherche - 1), Len(TextBox39.Text)) > > SAVMARKER = IndexRecherche + Len(TextBox39.Text) > > IF SAVMARKER > TextArea1.Length THEN > >SAVMARKER = TextArea1.Length > > END IF > > > >ELSE > > Application.Busy = 0 > > Message.Info(("Search finished. End of list attained."), > > ("Close")) > > RETURN > >END IF > >END SELECT > > END IF > > > > Application.Busy = 0 > > > > > > END > > > > - > > > > Thank you in advance. > > > > -- > > Olivier CRUILLES > > Email: linu...@club-internet.fr > > > > > > > > -- > > ___ > > 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 > -- Olivier CRUILLES Email: linu...@club-internet.fr * hypoaristerolactotherapie : methode de depannage des machines par le coup de pied en bas a gauche. * Mais si, Linux est user-friendly. Mais Linux il choisit ses amis, lui ! * Software is like sex, it's better when it's free (Linus Torvalds) -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gridview icon detection
Hi Fabien, Thank you for the example but I made a mistake and it’s not for a GRIDVIEW but for ColumnView that I would detect the Icon. Do you have any idea to do that please ? Olivier Cruilles > Le 19 janv. 2017 à 07:46, Gianluigi a écrit : > > Hi Fabien, > > very interesting especially the explanation of _Draw :-) > > I thank you so much > > Regards > > Gianluigi > > 2017-01-19 12:07 GMT+01:00 Fabien Bodard : > >> Ok this is my fault as i've not tested my code ... so i've forgot to >> little things >> >> This is so the working code : >> >> >> Private aMyValues As New String[] >> Private aMyStates As New Integer[] >> Private aMyPicState As New Picture[3] >> >> Public Sub _New() >> >> aMyPicState[0] = Picture["img/checked.png"] >> aMyPicState[1] = Picture["img/unchecked.png"] >> aMyPicState[2] = Picture["img/tristate.png"] >> >> 'Load here values and states in arrays >> aMyValues.Push("First") >> aMyStates.Push(CheckBox.True) >> aMyValues.Push("Second") >> aMyStates.Push(CheckBox.None) >> aMyValues.Push("Third") >> aMyStates.Push(CheckBox.False) >> gridview1.columns.count = 2 >> gridview1.Columns[0].Width = 22 >> >> GridView1.Rows.height = 22 >> >> GridView1.Rows.Count = aMyValues.Count >> >> End >> >> Public Sub GridView1_Data(Row As Integer, Column As Integer) >> >> Select Case Column >> >>Case 0 >> Last.Data.Picture = aMyPicState[aMyStates[Row] + 1] >>Case 1 >> Last.data.text = aMyValues[Row] >> >> End Select >> >> End >> >> Public Sub GridView1_Click() >> >> If Last.Column = 0 Then >>Inc aMyStates[GridView1.Row] >>If aMyStates[GridView1.Row] > 1 Then aMySTates[GridView1.Row] = -1 >> Endif >> GridView1.Refresh >> >> End >> >> >> And I've corrected your project and added a form that show how to use >> the _draw event. Here it allow to get checkboxes drawed with the >> current desktop theme. >> >> >> -- >> 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 -- 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] Help about interfacing 'net-snmp' C library with Gambas3
Hello, I try to create a component in Gambas3 based on the 'net-snmp' C library. I already have a component to manage requests by snmp written in Gambas3 but using directly the various commands given by net-snmp like: - snmpget - snmpwalk - snmpbulk Now I try to use directly the 'net-snmp' C library to be faster in execution time and I'm not a C/C++ developer to write this component in C/C++. I have started to write a little project and it is joined into this email. My question is, as it's necessary to create and give to the 'net-snmp' C library a C structure (available inside the project as comments) to use it, could someone say to me if it's possible to use the 'PUBLIC STRUCT' to translate the 'snmp_session' C structure in Gambas3 and help me on this task please. Thank you in advance. Links: http://www.net-snmp.org/dev/agent/session__api_8h_source.html http://www.net-snmp.org/tutorial/tutorial-5/toolkit/demoapp/snmpdemoapp.c -- Olivier Cruilles olivier.cruil...@yahoo.fr gb.snmpclient_test-0.0.1.tar.gz Description: application/gzip -- 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] collection of collection problem
Fabien, Thank you for this great explication and I completely agree with it. :) Thank you again to all persons that make Gambas possible and usable…since more than 12 years... Olivier Cruilles > Le 25 mars 2017 à 11:51, Fabien Bodard a écrit : > > A long thought in bazaar... > > > I think, the first job is to teach a new time to developpers how to > develop. There is nothing great in the code i've sended, juste the > evidence. > > I've start learnin coding in gwbasic and qbasic... well not the best > to start. Now we have better languages like python, java, c# and > i've the impression that taking one hour for making the lacking > function,has become something insurmountable (in this case 10 minutes > for me). > > In the past I had no choice, no internet, if I wanted something or if > it did not exist, you had to buy it or create it (sometimes find it in > a book). Honestly, today I have reproduced so much with Gambas that I > think we can almost do everything. What is lacking in Gambas is > documentation. Unfortunately, we do not have time to write it because > we have grown up and have a lot of work now. All I can do is swing > from time to time a spade on the mailing list to help the newcomers to > understand the pattern of thought behind Gambas. Because I see that > this is also the problem. Whether at the level of the language or at > the level of the arrangement of forms, at the level of the event > structure (gridview, drawingarea and many other widgets), the choices > are quite innovative and destabilizing. Gambas is not there to replace > or compete with other languages, it is as in kungfu there are several > phylosophy and it is one among others. > To summarize it is not the language in itself that must be understood, > but the phylsophy of development. For the language, there is the wiki. > For phylosophy ... we'll have to bend over. > > Benoit, had said that language was able to appreciate different types > of procedural, object or event programming. But with time I realize > that the object / event couple is dominant and that this is our > signature somehow. > > Today it is a coherent mature language (despite the bugs), with > coherent libraries. > > By experience, it is not necessary to copy a code from one language to > another, but a concept. What it lacks for me would be a UML > integrator, which would make it easier to manipulate the concepts of a > project. >  > I think over time have spotted key points that make Gambas more > difficult to digest for developers a bit too pampered. > > I will take the time to make a document for the helpers to appreciate > our philosophy and allow them not to try to model the programming > style of other languages in Gambas. > > -- > 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