Re: [Gambas-user] How to sort a TableView?
That's exactly what I needed, Gianluigi. Thank you. It works well even preserving distinct rows with duplicate key values. I added a few comments to your code and added it as an example to http://gambaswiki.org/wiki/comp/gb.qt4/gridview/sorted. (I hope that's okay with you. If not, please let me know and I'll modify or remove it.) -- Lee __ "Artificial Intelligence is no match for natural stupidity." On 03/31/2016 04:51 AM, Gianluigi wrote: > Without using the database, have taught me so: > > Public Sub TableView1_Sort() > Dim Values, ValueSorted As New String[] > Dim Nx, iNx As Integer > Dim tmp As String > > For Nx = 0 To TableView1.Rows.Max >Values.Add(TableView1[Nx, TableView1.Columns.Sort].Text) > Next > ValueSorted = Values.Copy() > ValueSorted.Sort(TableView1.Columns.Ascending) > For Nx = 0 To ValueSorted.Max >For iNx = 0 To TableView1.Columns.Max > Swap TableView1[Nx, iNx].Text, > TableView1[Values.Find(ValueSorted[Nx], 0, Nx), iNx].Text >Next >Values.Clear() >For iNx = 0 To TableView1.Rows.Max > Values.Add(TableView1[iNx, TableView1.Columns.Sort].Text) >Next > Next > TableView1.Refresh() > End > > Regards > Gianluigi -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to sort a TableView?
Thank you, Frank. That is an interesting example. It uses an array of variant arrays as the underlying data-store similar to what I had done in the past with objects. And, they extend Object[] with a custom sort routine. Neat. On 03/31/2016 02:55 AM, Frank wrote: > Hi TLD, I found something that might help: > > I have put the whole code here but the bit you talk about start at line 76. > > found it here:http://gambas-buch.de/dw/doku.php?id=k17:k17.7:k17.7.4:start -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] languages
hello Benoit i got it kind regards Dag Am 31.03.2016 um 18:30 schrieb Benoît Minisini: > Le 31/03/2016 18:19, Dag Jarle Nerland Johansen a écrit : >> hello Benoit >> >> it is a big pity that people are using very much their native languages >> in the forums. if i try to get simple examples (and i mean simple), the >> are mostly in french or spanish, so i cannot understand the >> explanations. f.exs. the printer example goes over my horizon, perhaps i >> get silly on my old days. the same for report. i just want to print a >> pure textfile, and have no chanse zo achive that with the samples on the >> softwarefarm. i struggled now since 2 days and give it up. >> >> sorry to say, the structures are not to overlook for me, where to find >> what. >> i am and old-fashioned line-by-line programmer, understand of course >> event-programming. but many of the properties are explained so poor - >> the say nothing at all. many times only one line, where are useful >> examples? not page by page, only one simple example to describe the >> function. not everyone is, like you, capebal to write an compiler. >> feeling lost. >> >> kind regards >> Dag >> > > The "Printing" example project is in english, but it has no comment > inside. Does it help you anyway? What don't you understand? > > In Gambas 3 (copying the way GTK+ and QT actually work), the Printer > is an object that raise an event before printing ('Begin' event), one > for each page that must be printed ('Draw' event) and an event when > everything is finished ('End' event). > > But it can't know how many pages to print by itself, so you have to > tell it in the 'Count' property during the 'Begin' event. > > Then, if you event a clean text print, it's no so simple, as you have > to layout your text carefully before printing to know how many pages > you have to print. > > Finally, actually starting all that process is done by calling the > 'Print' method on the Printer object. > > To see what I mean, just run the 'Printing' example step by step using > the debugger. > > Regards, > -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] languages
Nei, så kult med en nordmann?? om bord :D -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] languages
Le 31/03/2016 19:11, Dag Jarle Nerland Johansen a écrit : > hello again > > i hope last time > as i can see now, it sould be a html-file > but why do i have to write out my data in html-format for a simple print? > > kind regards > Dag > It's not HTML, it's Gambas rich text. So the drawing function is Paint.DrawRichText(). If you want to draw text, you have to use Paint.DrawText(). Anyway, it's up to you to layout your text (using different fonts, different sizes, different alignments...). -- Benoît Minisini -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] languages
hello again i hope last time as i can see now, it sould be a html-file but why do i have to write out my data in html-format for a simple print? kind regards Dag Am 31.03.2016 um 18:30 schrieb Benoît Minisini: > Le 31/03/2016 18:19, Dag Jarle Nerland Johansen a écrit : >> hello Benoit >> >> it is a big pity that people are using very much their native languages >> in the forums. if i try to get simple examples (and i mean simple), the >> are mostly in french or spanish, so i cannot understand the >> explanations. f.exs. the printer example goes over my horizon, perhaps i >> get silly on my old days. the same for report. i just want to print a >> pure textfile, and have no chanse zo achive that with the samples on the >> softwarefarm. i struggled now since 2 days and give it up. >> >> sorry to say, the structures are not to overlook for me, where to find >> what. >> i am and old-fashioned line-by-line programmer, understand of course >> event-programming. but many of the properties are explained so poor - >> the say nothing at all. many times only one line, where are useful >> examples? not page by page, only one simple example to describe the >> function. not everyone is, like you, capebal to write an compiler. >> feeling lost. >> >> kind regards >> Dag >> > > The "Printing" example project is in english, but it has no comment > inside. Does it help you anyway? What don't you understand? > > In Gambas 3 (copying the way GTK+ and QT actually work), the Printer > is an object that raise an event before printing ('Begin' event), one > for each page that must be printed ('Draw' event) and an event when > everything is finished ('End' event). > > But it can't know how many pages to print by itself, so you have to > tell it in the 'Count' property during the 'Begin' event. > > Then, if you event a clean text print, it's no so simple, as you have > to layout your text carefully before printing to know how many pages > you have to print. > > Finally, actually starting all that process is done by calling the > 'Print' method on the Printer object. > > To see what I mean, just run the 'Printing' example step by step using > the debugger. > > Regards, > -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] languages
hello Benoit I looked at it. and now I now what is wrong, say know what i do ot really understand. the text molly-mallone seems to me like normal utf-8, describing a html. I just changed in load to a text which i generated from my programm. pure text what happens, is: i get a lot of %, f.exs. %253. did i save in the wrong format? in gedit it is normal. execpt another file i did not change anyting in the programm for me this looks like a newbie mistake... (i am) kind regards Dag Am 31.03.2016 um 18:30 schrieb Benoît Minisini: > Le 31/03/2016 18:19, Dag Jarle Nerland Johansen a écrit : >> hello Benoit >> >> it is a big pity that people are using very much their native languages >> in the forums. if i try to get simple examples (and i mean simple), the >> are mostly in french or spanish, so i cannot understand the >> explanations. f.exs. the printer example goes over my horizon, perhaps i >> get silly on my old days. the same for report. i just want to print a >> pure textfile, and have no chanse zo achive that with the samples on the >> softwarefarm. i struggled now since 2 days and give it up. >> >> sorry to say, the structures are not to overlook for me, where to find >> what. >> i am and old-fashioned line-by-line programmer, understand of course >> event-programming. but many of the properties are explained so poor - >> the say nothing at all. many times only one line, where are useful >> examples? not page by page, only one simple example to describe the >> function. not everyone is, like you, capebal to write an compiler. >> feeling lost. >> >> kind regards >> Dag >> > > The "Printing" example project is in english, but it has no comment > inside. Does it help you anyway? What don't you understand? > > In Gambas 3 (copying the way GTK+ and QT actually work), the Printer > is an object that raise an event before printing ('Begin' event), one > for each page that must be printed ('Draw' event) and an event when > everything is finished ('End' event). > > But it can't know how many pages to print by itself, so you have to > tell it in the 'Count' property during the 'Begin' event. > > Then, if you event a clean text print, it's no so simple, as you have > to layout your text carefully before printing to know how many pages > you have to print. > > Finally, actually starting all that process is done by calling the > 'Print' method on the Printer object. > > To see what I mean, just run the 'Printing' example step by step using > the debugger. > > Regards, > -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] languages
wow, Benoit thank you for your very fast answer, i am impressed. i will do as you told me. i am sorry, but i am very impatient, for all with my self about the languages: surely not your fault, or anyone in the team. and not your fault that so many spanish like Gambas, in fact i find it good. i will give you (a short) message when i am through. kind regards Dag Am 31.03.2016 um 18:30 schrieb Benoît Minisini: > Le 31/03/2016 18:19, Dag Jarle Nerland Johansen a écrit : >> hello Benoit >> >> it is a big pity that people are using very much their native languages >> in the forums. if i try to get simple examples (and i mean simple), the >> are mostly in french or spanish, so i cannot understand the >> explanations. f.exs. the printer example goes over my horizon, perhaps i >> get silly on my old days. the same for report. i just want to print a >> pure textfile, and have no chanse zo achive that with the samples on the >> softwarefarm. i struggled now since 2 days and give it up. >> >> sorry to say, the structures are not to overlook for me, where to find >> what. >> i am and old-fashioned line-by-line programmer, understand of course >> event-programming. but many of the properties are explained so poor - >> the say nothing at all. many times only one line, where are useful >> examples? not page by page, only one simple example to describe the >> function. not everyone is, like you, capebal to write an compiler. >> feeling lost. >> >> kind regards >> Dag >> > > The "Printing" example project is in english, but it has no comment > inside. Does it help you anyway? What don't you understand? > > In Gambas 3 (copying the way GTK+ and QT actually work), the Printer > is an object that raise an event before printing ('Begin' event), one > for each page that must be printed ('Draw' event) and an event when > everything is finished ('End' event). > > But it can't know how many pages to print by itself, so you have to > tell it in the 'Count' property during the 'Begin' event. > > Then, if you event a clean text print, it's no so simple, as you have > to layout your text carefully before printing to know how many pages > you have to print. > > Finally, actually starting all that process is done by calling the > 'Print' method on the Printer object. > > To see what I mean, just run the 'Printing' example step by step using > the debugger. > > Regards, > -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] languages
Le 31/03/2016 18:19, Dag Jarle Nerland Johansen a écrit : > hello Benoit > > it is a big pity that people are using very much their native languages > in the forums. if i try to get simple examples (and i mean simple), the > are mostly in french or spanish, so i cannot understand the > explanations. f.exs. the printer example goes over my horizon, perhaps i > get silly on my old days. the same for report. i just want to print a > pure textfile, and have no chanse zo achive that with the samples on the > softwarefarm. i struggled now since 2 days and give it up. > > sorry to say, the structures are not to overlook for me, where to find > what. > i am and old-fashioned line-by-line programmer, understand of course > event-programming. but many of the properties are explained so poor - > the say nothing at all. many times only one line, where are useful > examples? not page by page, only one simple example to describe the > function. not everyone is, like you, capebal to write an compiler. > feeling lost. > > kind regards > Dag > The "Printing" example project is in english, but it has no comment inside. Does it help you anyway? What don't you understand? In Gambas 3 (copying the way GTK+ and QT actually work), the Printer is an object that raise an event before printing ('Begin' event), one for each page that must be printed ('Draw' event) and an event when everything is finished ('End' event). But it can't know how many pages to print by itself, so you have to tell it in the 'Count' property during the 'Begin' event. Then, if you event a clean text print, it's no so simple, as you have to layout your text carefully before printing to know how many pages you have to print. Finally, actually starting all that process is done by calling the 'Print' method on the Printer object. To see what I mean, just run the 'Printing' example step by step using the debugger. Regards, -- Benoît Minisini -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Timer Not Work - Trunk 3.8.90 Revision 7690
it's corrected in last svn 2016-03-29 21:09 GMT+02:00 herberth guzman: > Salut Benoit > > I have installed Gambas3 Rev. 7690 > > In my form I have a Timer > Example, shows the time > > Generates the following error: > Mismatch required types: Integer required, obtained FMain instead. > > I compared the .src / FMain.form file with another if it works and found a > change, I hope it helps. > > No Work > { Timer2 Timer > #MoveScaled(27,38) > } > > If you work > { Timer1 #Timer > #MoveScaled(14,0) > } > > Herberth Guzmán > > > [System] > Gambas=3.8.90 > OperatingSystem=Linux > Kernel=4.4.0-15-generic > Architecture=x86_64 > Distribution=Ubuntu Xenial Xerus (development branch) > Desktop=Innova > Theme=Windows > Language=es_GT.UTF-8 > Memory=1982M > > [Libraries] > Cairo=libcairo.so.2.11400.6 > Curl=libcurl.so.4.4.0 > DBus=libdbus-1.so.3.14.6 > GStreamer=libgstreamer-1.0.so.0.791.0 > GTK+2=libgtk-x11-2.0.so.0.2400.30 > GTK+3=libgtk-3.so.0.1800.9 > OpenGL=libGL.so.1.2.0 > Poppler=libpoppler.so.58.0.0 > QT4=libQtCore.so.4.8.7 > QT5=libQt5Core.so.5.5.1 > SDL=libSDL-1.2.so.0.11.4 > > [Environment] > DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-g2EXEu35O0,guid=59f104e05eb1cef99a0bf66856faaeee > DEFAULTS_PATH=/usr/share/gconf/Innova.default.path > DESKTOP_SESSION=Innova > DISPLAY=:0 > GB_GUI=gb.qt4 > GDMSESSION=Innova > GDM_LANG=es_ES > GPG_AGENT_INFO=/tmp/gpg-7VqmSE/S.gpg-agent:10053:1 > GTK2_MODULES=overlay-scrollbar > GTK_MODULES=gail:atk-bridge > HOME= > LANG=es_GT.UTF-8 > LANGUAGE=es_GT:es > LOGNAME= > MANDATORY_PATH=/usr/share/gconf/Innova.mandatory.path > PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games > PWD= > QT_ACCESSIBILITY=1 > QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1 > QT_QPA_PLATFORMTHEME=appmenu-qt5 > SHELL=/bin/bash > SHLVL=0 > SSH_AGENT_PID=10052 > SSH_AUTH_SOCK=/tmp/ssh-s35koUVDWVEu/agent.9992 > TZ=:/etc/localtime > USER= > XAUTHORITY=/.Xauthority > XDG_CONFIG_DIRS=/etc/xdg/xdg-Innova:/etc/xdg > XDG_CURRENT_DESKTOP=Innova > XDG_DATA_DIRS=/usr/share/Innova:/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=Innova > XDG_SESSION_ID=c4 > XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1 > XDG_SESSION_TYPE=x11 > XDG_VTNR=7 > -- > Transform Data into Opportunity. > Accelerate data analysis in your applications with > Intel Data Analytics Acceleration Library. > Click to learn more. > http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140 > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user