From 12ukwn at ...626... Tue Sep 1 01:54:38 2009 From: 12ukwn at ...626... (Jean-Yves F. Barbier) Date: Tue, 01 Sep 2009 01:54:38 +0200 Subject: [Gambas-user] DataBrowser In-Reply-To: <4A9C3983.8060903@...221...> References: <4A9C29FC.8040005@...221...> <1251749485.6475.22.camel@...40...> <4A9C3983.8060903@...221...> Message-ID: <4A9C62BE.6070601@...626...> Mathias Ebermann a ?crit : > No, Charlie, > I didn't mean the headers. I know how to rename them. > > What I meant is: > In my DataSource table I have a field "ProducerID". > That points to another table "Producers" with the key field "id" and the field "Name". > Now I would like to have the Column "Producers.Name" in the list instead of "ProducerID". > I mean the field values of the records, not the headers. I'm afraid you have to use a view, Mathias; but if there's another solution I'm interested in too. JY -- From gambas at ...1... Tue Sep 1 02:07:31 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 1 Sep 2009 02:07:31 +0200 Subject: [Gambas-user] DataBrowser In-Reply-To: <4A9C3983.8060903@...221...> References: <4A9C29FC.8040005@...221...> <1251749485.6475.22.camel@...40...> <4A9C3983.8060903@...221...> Message-ID: <200909010207.31243.gambas@...1...> > No, Charlie, > I didn't mean the headers. I know how to rename them. > > What I meant is: > In my DataSource table I have a field "ProducerID". > That points to another table "Producers" with the key field "id" and the > field "Name". Now I would like to have the Column "Producers.Name" in the > list instead of "ProducerID". I mean the field values of the records, not > the headers. > In Gambas 3, the Table property of a DataSource can be any SQL request. In Gambas 2, I'm afraid there is no simple solution. But try this: use your own DataView control, and create an Observer on the GridView of the DataView control - you get it with the DataView.GridView property. Then catch the Data event with the Observer: by using the Row property, you will know if you are in the ProducerID column, and then you can replace the displayed data with the name of the producer by setting the GridView.Data.Text property. Regards, -- Beno?t From gambas at ...1... Tue Sep 1 02:17:30 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 1 Sep 2009 02:17:30 +0200 Subject: [Gambas-user] DataBrowser In-Reply-To: <200909010207.31243.gambas@...1...> References: <4A9C29FC.8040005@...221...> <4A9C3983.8060903@...221...> <200909010207.31243.gambas@...1...> Message-ID: <200909010217.30233.gambas@...1...> > > No, Charlie, > > I didn't mean the headers. I know how to rename them. > > > > What I meant is: > > In my DataSource table I have a field "ProducerID". > > That points to another table "Producers" with the key field "id" and the > > field "Name". Now I would like to have the Column "Producers.Name" in the > > list instead of "ProducerID". I mean the field values of the records, not > > the headers. > > In Gambas 3, the Table property of a DataSource can be any SQL request. > > In Gambas 2, I'm afraid there is no simple solution. But try this: use your > own DataView control, and create an Observer on the GridView of the > DataView control - you get it with the DataView.GridView property. Then > catch the Data event with the Observer: by using the Row property, you will . /|\ | Read 'Column' instead -----------------------------------' > know if you are in the ProducerID column, and then you can replace the > displayed data with the name of the producer by setting the > GridView.Data.Text property. > > Regards, -- Beno?t From rterry at ...1946... Tue Sep 1 06:14:52 2009 From: rterry at ...1946... (richard terry) Date: Tue, 1 Sep 2009 14:14:52 +1000 Subject: [Gambas-user] TextEdit example _Link(Path as string) Message-ID: <200909011414.52448.rterry@...1946...> Public Sub TextEdit1_Link(Path As String) Message("You have clicked on:\n\n" & Path) End This dosn't seem to activate, andt there seems no help in the gambas help either for this ?not activated? /comp/gb.qt.ext/textedit/.link Richard From rterry at ...1946... Tue Sep 1 06:27:00 2009 From: rterry at ...1946... (richard terry) Date: Tue, 1 Sep 2009 14:27:00 +1000 Subject: [Gambas-user] Example program scripting dosn't run (kde4.3) Message-ID: <200909011427.00095.rterry@...1946...> Not important but I was just browsing, the error message is "can't find kdesktop'. Regards richard From lordheavym at ...626... Tue Sep 1 09:29:44 2009 From: lordheavym at ...626... (Laurent Carlier) Date: Tue, 1 Sep 2009 09:29:44 +0200 Subject: [Gambas-user] Image api changed in gambas 3 Message-ID: <200909010929.45031.lordheavym@...626...> Since svn commit #2294, image api as changed: - MakeTransparent() and MakeGray() are renammed to Transparent() and Gray() - All Methods are applying the effect on the image itself, not to a returned copy ! If you need to apply the effect, do a copy before with the Copy() method. The benefict effect is that now you can easily chain effects: Image.Load($mypic &/ ".jpg")..Mirror(True, True).Colorize(Color.Blue).Gray().Resize(100, 100).save($mypic & "new.jpg") Currently some api are not yet changed, but should be in future (some gb.qt4, gb.qt, gb.gtk). Have fun ! From lordheavym at ...626... Tue Sep 1 09:40:08 2009 From: lordheavym at ...626... (Laurent Carlier) Date: Tue, 1 Sep 2009 09:40:08 +0200 Subject: [Gambas-user] Would you like to see Gambas 3 as default setup in Ubuntu ? Message-ID: <200909010940.08290.lordheavym@...626...> Daif post this link on irc (gambas @ irc.freenodre.net, but here everybody knows :-p) : http://brainstorm.ubuntu.com/idea/6462/ Promote doesn't seem to be hard : Vote , or Promote this idea by adding a banner on your web page. Regards From shordi at ...626... Tue Sep 1 10:14:06 2009 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Tue, 1 Sep 2009 10:14:06 +0200 Subject: [Gambas-user] Would you like to see Gambas 3 as default setup in Ubuntu ? In-Reply-To: <200909010940.08290.lordheavym@...626...> References: <200909010940.08290.lordheavym@...626...> Message-ID: I have put my vote. I think it's a fine Idea. Regards 2009/9/1 Laurent Carlier > Daif post this link on irc (gambas @ irc.freenodre.net, but here everybody > knows :-p) : http://brainstorm.ubuntu.com/idea/6462/ > > Promote doesn't seem to be hard : Vote , or Promote this idea by adding a > banner on your web page. > > Regards > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Tue Sep 1 10:28:25 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 1 Sep 2009 10:28:25 +0200 Subject: [Gambas-user] menu action In-Reply-To: <200908311228.13468.aleks.l@...1865...> References: <200908311228.13468.aleks.l@...1865...> Message-ID: <200909011028.25918.gambas@...1...> > Hi Gambas users. > Is it possible to assign some action to a menu directly (this menu has just > one item and it is silly to click first on a menu and then on the only > item) Alternatively, Is it possible to place a simple button on a menu line > of the form? > Also is there any way (I cannot find it, sorry) to change menu color like > it is possible for the form background? > Aleks > No, no, no. 1) A menu title cannot act like a button. 2) You can only put menu title in the menu bar. 3) The menu background color is controled by the underlying widget style, and does not care most of the time with the background color you want. Sorry! -- Beno?t From gambas at ...1... Tue Sep 1 10:34:03 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 1 Sep 2009 10:34:03 +0200 Subject: [Gambas-user] What happens on a form close event In-Reply-To: <200908312040.06827.rterry@...1946...> References: <200908312040.06827.rterry@...1946...> Message-ID: <200909011034.03573.gambas@...1...> > I was just doing some work where I wanted to get access to the tag: > > > me.parent.parent > > and found that though, at the start of loading the form that it exists > (obviously) but that as soon as Form_close() is called that whearas the > object me still exists until the form actually is destroyed, that > me.parent = null. (hence no parent.parent) > > Can anyone explain the closing sequence, and can one get to the bit of data > I want, from within form_close but before thet data is destroyed? > > Regards > > Richard > On real top-level windows, the Close event is raised when you call the Close method or when you click on the window manager close button. The window fully exists at the moment. On embedded top-level windows, the Close event is called when the window is destroyed. Then you may have problems, as there is no way to know precisely when it happens - It depends on the toolkit. The window still exists, but its children or parents may not, depending on what indirectly is responsible of the closing. I have just fixed a bug in Gambas 3 that made things crash in that last case. I'm not sure for Gambas 2, and I'm not sure everything is safe in Gambas 3 now. The reason is the following: Qt destroys the children of a parent widget (a container) *before* Gambas can see it. And the Close event of embedded windows is called when they are destroyed. So there is a moment when the situation is not coherent: Gambas think the widget exists whereas it does not. That can lead to crashes... Regards, -- Beno?t From ulusoyab at ...43... Tue Sep 1 11:04:18 2009 From: ulusoyab at ...43... (abdurrahman ulusoy) Date: Tue, 1 Sep 2009 02:04:18 -0700 (PDT) Subject: [Gambas-user] menu action In-Reply-To: <200909011028.25918.gambas@...1...> Message-ID: <982067.8971.qm@...2264...> (if i right understand your question)maybe use a panel and put some buttons and panel background color changed what you want.right click show panel then hide again.? i use like this menu .?see : http://cadcizim.googlepages.com/out.ogv --- 01/09/09 Sal tarihinde Beno?t Minisini ??yle yaz?yor: Kimden: Beno?t Minisini Konu: Re: [Gambas-user] menu action Kime: "mailing list for gambas users" Tarihi: 1 Eyl?l 2009 Sal?, 11:28 > Hi Gambas users. > Is it possible to assign some action to a menu directly (this menu has just > one item and it is silly to click first on a menu and then on the only > item) Alternatively, Is it possible to place a simple button on a menu line > of the form? > Also is there any way (I cannot find it, sorry) to change? menu color like > it is possible for the form background? > Aleks > No, no, no. 1) A menu title cannot act like a button. 2) You can only put menu title in the menu bar. 3) The menu background color is controled by the underlying widget style, and does not care most of the time with the background color you want. Sorry! -- Beno?t ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now.? http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user ___________________________________________________________________ Yahoo! T?rkiye a??ld?! http://yahoo.com.tr ?nternet ?zerindeki en iyi i?eri?i Yahoo! T?rkiye sizlere sunuyor! From Karl.Reinl at ...9... Tue Sep 1 11:17:35 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Tue, 01 Sep 2009 11:17:35 +0200 Subject: [Gambas-user] menu action In-Reply-To: <200909011028.25918.gambas@...1...> References: <200908311228.13468.aleks.l@...1865...> <200909011028.25918.gambas@...1...> Message-ID: <1251796655.7186.6.camel@...40...> Am Dienstag, den 01.09.2009, 10:28 +0200 schrieb Beno?t Minisini: > > Hi Gambas users. > > Is it possible to assign some action to a menu directly (this menu has just > > one item and it is silly to click first on a menu and then on the only > > item) Alternatively, Is it possible to place a simple button on a menu line > > of the form? > > Also is there any way (I cannot find it, sorry) to change menu color like > > it is possible for the form background? > > Aleks > > > > No, no, no. > > 1) A menu title cannot act like a button. > > 2) You can only put menu title in the menu bar. > > 3) The menu background color is controled by the underlying widget style, and > does not care most of the time with the background color you want. > > Sorry! > Salut, but wouldn't it be nice, if controls could be embedded ? Charlie From arosa at ...2015... Tue Sep 1 03:03:42 2009 From: arosa at ...2015... (Toni) Date: Tue, 01 Sep 2009 02:03:42 +0100 Subject: [Gambas-user] Gambas 3 ERROR: #2: Cannot load class 'Action' In-Reply-To: <200909010207.31243.gambas@...1...> References: <4A9C29FC.8040005@...221...> <1251749485.6475.22.camel@...40...> <4A9C3983.8060903@...221...> <200909010207.31243.gambas@...1...> Message-ID: <4A9C72EE.7050500@...2015...> Hi, I have downloaded and compiled the latest version of gambas3 from the svn with no problem in my Ubuntu 8.10 64bits, but when I try to execute it I get this error: ERROR: #2: Cannot load class 'Action': Version too old. Please recompile the project The latest svn version of gambas 2 works flawless in the same system. Any tip to get it working? Thanks Toni From gambas at ...1... Tue Sep 1 12:02:29 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 1 Sep 2009 12:02:29 +0200 Subject: [Gambas-user] Example program scripting dosn't run (kde4.3) In-Reply-To: <200909011427.00095.rterry@...1946...> References: <200909011427.00095.rterry@...1946...> Message-ID: <200909011202.29203.gambas@...1...> > Not important but I was just browsing, the error message is "can't find > kdesktop'. > > Regards > > richard > kdesktop is a KDE 3 program. -- Beno?t From gambas at ...1... Tue Sep 1 12:04:28 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 1 Sep 2009 12:04:28 +0200 Subject: [Gambas-user] gambas3 changelog page In-Reply-To: <1251719747.4a9bba4321ec8@...1825...> References: <1251719747.4a9bba4321ec8@...1825...> Message-ID: <200909011204.28609.gambas@...1...> > Hi Benoit! > > Why dont have one changelog gambas page for svn version? And the README is > out date in gambas3. I removed the ChangeLog. You must use the "svn log" to do that, or subscribe to the svn-devel mailing-list. > New library as add (dbus and others). > When i complile the svn gambas3 the gb.sdbu and gb.IMAGE.xxx as disabled) > You must install the development packages of the requested libraries (dbus, imlib2, gdk-pixbuf-2) Regards, -- Beno?t From gambas at ...1... Tue Sep 1 12:08:39 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 1 Sep 2009 12:08:39 +0200 Subject: [Gambas-user] DataCombo doesn't work In-Reply-To: <4A9ACACB.7040409@...221...> References: <4A9ACACB.7040409@...221...> Message-ID: <200909011208.40026.gambas@...1...> > Hi, > I'm experimenting with a DataCombo. Maybe I'm wrong again, but as I > understand, it should work like this: > > Let's say I have a movie database. > The table "movie" is in my DataSource. > In this table is a field "Directors_ID", the directors are stored in the > table "directors", where there is a field "Name". Then I would put a > DataCombo in my DataSource with the properties: Field = "Directors_ID" > Table = "directors" > Display = "Name" > > But all I get is "Query failed: SQL error or missing database". > (the database is sqlite, but that shouldn't matter?) > When I test it with Field = "id", I get a greyed DataCombo with a name, but > of course with the wrong index. > > What am I doing wrong or thinking wrong? > If I remember, DataCombo only works if the primary key of the "directors" table is "Directors_ID", with the same field name. Is it the case? > Of course, I can use code and fill a TextBox or ComboBox with the names, > but - would be nice without, and > - what would be the event to react to, if the record is changed? In VB this > was some "RecordChanged" or so event, easy to use, but here I can't find > anything. There is no such event. I agree it may be useful, so I will add it in Gambas 3. Regards, -- Beno?t From jussi.lahtinen at ...626... Tue Sep 1 15:57:47 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 1 Sep 2009 16:57:47 +0300 Subject: [Gambas-user] Would you like to see Gambas 3 as default setup in Ubuntu ? In-Reply-To: References: <200909010940.08290.lordheavym@...626...> Message-ID: <384d3900909010657v3d3259c9m4f04e516bfa1907c@...627...> Gambas 3? I think you mean Gambas 2 or generally Gambas... but you got my vote! Please people vote! Jussi 2009/9/1 Jorge Carri?n : > I have put my vote. I think it's a fine Idea. > > Regards > > 2009/9/1 Laurent Carlier > >> Daif post this link on irc (gambas @ irc.freenodre.net, but here everybody >> knows :-p) : http://brainstorm.ubuntu.com/idea/6462/ >> >> Promote doesn't seem to be hard : Vote , or Promote this idea by adding a >> banner on your web page. >> >> Regards >> >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> trial. Simplify your report design, integration and deployment - and focus >> on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. ?http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From rospolosco at ...152... Tue Sep 1 17:39:28 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Tue, 1 Sep 2009 17:39:28 +0200 Subject: [Gambas-user] menu action In-Reply-To: <200909011028.25918.gambas@...1...> References: <200908311228.13468.aleks.l@...1865...> <200909011028.25918.gambas@...1...> Message-ID: <200909011739.28545.rospolosco@...152...> Il marted? 1 settembre 2009 10:28:25 Beno?t Minisini ha scritto: > > Hi Gambas users. > > Is it possible to assign some action to a menu directly (this menu has > > just one item and it is silly to click first on a menu and then on the > > only item) Alternatively, Is it possible to place a simple button on a > > menu line of the form? > > Also is there any way (I cannot find it, sorry) to change menu color > > like it is possible for the form background? > > Aleks > > No, no, no. > > 1) A menu title cannot act like a button. > Yes, it can ;-) I've attached an example. Just click on the menu title and you throw two dices. It uses the Show event. Not clean but it works. Saluti, Stefano > 2) You can only put menu title in the menu bar. > > 3) The menu background color is controled by the underlying widget style, > and does not care most of the time with the background color you want. > > Sorry! -------------- next part -------------- A non-text attachment was scrubbed... Name: one-item-menu-0.0.1.tar.gz Type: application/x-tgz Size: 7798 bytes Desc: not available URL: From gambas at ...1... Tue Sep 1 17:45:11 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 1 Sep 2009 17:45:11 +0200 Subject: [Gambas-user] menu action In-Reply-To: <200909011739.28545.rospolosco@...152...> References: <200908311228.13468.aleks.l@...1865...> <200909011028.25918.gambas@...1...> <200909011739.28545.rospolosco@...152...> Message-ID: <200909011745.11922.gambas@...1...> > Il marted? 1 settembre 2009 10:28:25 Beno?t Minisini ha scritto: > > > Hi Gambas users. > > > Is it possible to assign some action to a menu directly (this menu has > > > just one item and it is silly to click first on a menu and then on the > > > only item) Alternatively, Is it possible to place a simple button on a > > > menu line of the form? > > > Also is there any way (I cannot find it, sorry) to change menu color > > > like it is possible for the form background? > > > Aleks > > > > No, no, no. > > > > 1) A menu title cannot act like a button. > > Yes, it can ;-) > > I've attached an example. > Just click on the menu title and you throw two dices. > It uses the Show event. Not clean but it works. > > Saluti, > > Stefano > But it may not work anymore on another toolkit or in the future! -- Beno?t From math.eber at ...221... Tue Sep 1 20:13:54 2009 From: math.eber at ...221... (Matti) Date: Tue, 01 Sep 2009 20:13:54 +0200 Subject: [Gambas-user] DataCombo doesn't work In-Reply-To: <200909011208.40026.gambas@...1...> References: <4A9ACACB.7040409@...221...> <200909011208.40026.gambas@...1...> Message-ID: <4A9D6462.6060604@...221...> Beno?t Minisini schrieb: > If I remember, DataCombo only works if the primary key of the "directors" > table is "Directors_ID", with the same field name. Is it the case? Too bad. If I rename the primary key field of the lookup table to the same field name, I get the error "Cannot find 'Directors.id'". So the primary key has to be "id". And if I rename it to "id" (as it was before), I get this "Query failed" error. Really funny. >> - what would be the event to react to, if the record is changed? In VB this >> was some "RecordChanged" or so event, easy to use, but here I can't find >> anything. > > There is no such event. I agree it may be useful, so I will add it in Gambas > 3. Fine. From aleks.l at ...1865... Wed Sep 2 14:26:12 2009 From: aleks.l at ...1865... (Aleksandrs Livshics) Date: Wed, 2 Sep 2009 15:26:12 +0300 Subject: [Gambas-user] Value box for numeric values Message-ID: <200909021526.12829.aleks.l@...1865...> Hi gambas users. It seems to me that it is impossible to enter a number in scientific notation in a value box. It does not accept "E" or "D" letters which are used to separate exponent. So value as 1.0E-1 is illegal. If it is so, it must be treated as a bug ! Or am I doing something wrongly ? Alex From almanova at ...1228... Thu Sep 3 08:41:28 2009 From: almanova at ...1228... (Almanova Sistemi) Date: Thu, 03 Sep 2009 08:41:28 +0200 Subject: [Gambas-user] Problem to play flash (svf) movie In-Reply-To: <1239291543.5859.12.camel@...2104...> References: <1239291543.5859.12.camel@...2104...> Message-ID: <4A9F6518.6080605@...1228...> Hello to everyone. I'm writing an application in gambas2 for play various movies files. I don't have any problems with mplayer that works very well but I can't play flash movies. I use gnash for this. My code: PUBLIC SUB Play() DIM aHandle AS NEW Pointer[] SELECT CASE LCase(Right(NumImmagini[Cont], 3)) CASE "avi", "mov", "vob", "swf" Timer1.Enabled = FALSE dwgMovie = NEW DrawingArea(FInput) dwgMovie.Height = dwgImage.Height '455 dwgMovie.Width = dwgImage.Width '651 dwgMovie.X = dwgImage.X '182 dwgMovie.Y = dwgImage.Y '203 Filmato = (sWorkDir &/ "Immagini" &/ NumImmagini[Cont]) IF LCase(Right(NumImmagini[Cont], 3)) = "swf" THEN $hProcess = EXEC ["gnash", "-1", "-x", dwgMovie.Handle, Filmato] FOR INPUT OUTPUT AS "$hProcess" ELSE $hProcess = EXEC ["mplayer", "-vo", "xv", "-nortc", "-framedrop", "-fs", "-quiet", "-wid", dwgMovie.Handle, Filmato, "-ss", "1.19", "-vf", "blackframe=100:32,scale=480:640"] FOR INPUT OUTPUT AS "$hProcess" ENDIF END SELECT END Can anyone help me? Regards. Massimo From ronstk at ...239... Thu Sep 3 11:59:37 2009 From: ronstk at ...239... (Ron_1st) Date: Thu, 3 Sep 2009 11:59:37 +0200 Subject: [Gambas-user] Problem to play flash (svf) movie In-Reply-To: <4A9F6518.6080605@...1228...> References: <1239291543.5859.12.camel@...2104...> <4A9F6518.6080605@...1228...> Message-ID: <200909031159.38594.ronstk@...239...> On Thursday 03 September 2009, Almanova Sistemi wrote: > Hello to everyone. > > I'm writing an application in gambas2 for play various movies files. > > I don't have any problems with mplayer that works very well but I can't > play flash movies. > > I use gnash for this. > > My code: > > PUBLIC SUB Play() > DIM aHandle AS NEW Pointer[] > SELECT CASE LCase(Right(NumImmagini[Cont], 3)) > CASE "avi", "mov", "vob", "swf" > Timer1.Enabled = FALSE > dwgMovie = NEW DrawingArea(FInput) > dwgMovie.Height = dwgImage.Height '455 > dwgMovie.Width = dwgImage.Width '651 > dwgMovie.X = dwgImage.X '182 > dwgMovie.Y = dwgImage.Y '203 > Filmato = (sWorkDir &/ "Immagini" &/ NumImmagini[Cont]) > IF LCase(Right(NumImmagini[Cont], 3)) = "swf" THEN > $hProcess = EXEC ["gnash", "-1", "-x", dwgMovie.Handle, Filmato] > FOR INPUT OUTPUT AS "$hProcess" > ELSE > $hProcess = EXEC ["mplayer", "-vo", "xv", "-nortc", > "-framedrop", "-fs", "-quiet", "-wid", dwgMovie.Handle, Filmato, "-ss", > "1.19", "-vf", "blackframe=100:32,scale=480:640"] FOR INPUT OUTPUT AS > "$hProcess" > ENDIF > END SELECT > > END > > Can anyone help me? > > Regards. > Massimo Be carefull, 'swf' is more a container and moving objects are called movie. This does not mean it is a 'film' movie. That are 'flv' as seen on youtube. It is posible to let swf show a 'film' movie by embed in the swf but not every swf is therfore a movie. Best regards, Ron_1st -- From aleks.l at ...1865... Thu Sep 3 13:04:44 2009 From: aleks.l at ...1865... (Aleksandrs Livshics) Date: Thu, 3 Sep 2009 14:04:44 +0300 Subject: [Gambas-user] Selection from a list Message-ID: <200909031404.44848.aleks.l@...1865...> Hallo to everyone. Can anyone tell me whether a ListBox can be used to display a list with several items preselected and then to allow a user to change some part of this selection? I think mode "multiple" must allow to do this. However I do not understand how to preselect more than one item and how to get the indexes of the finally selected items, if there are more then one of them. My difficulty is due to the fact that if I want to set some item as "selected=TRUE" I have to make it "current" by specifying the "index". But by doing this I change the status of the item which was "current" before... It does not remain "selected=TRUE" , does it? I probably do not understand something. Alex From shordi at ...626... Thu Sep 3 13:42:19 2009 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Thu, 3 Sep 2009 13:42:19 +0200 Subject: [Gambas-user] Selection from a list In-Reply-To: <200909031404.44848.aleks.l@...1865...> References: <200909031404.44848.aleks.l@...1865...> Message-ID: Try to ctrl+click or Shift+click to select more than one item. Regards 2009/9/3 Aleksandrs Livshics > Hallo to everyone. > Can anyone tell me whether a ListBox can be used to > display a list with several items preselected and then > to allow a user to change some part of this selection? > I think mode "multiple" must allow to do this. However > I do not understand how to preselect more than one item > and how to get the indexes of the finally selected items, > if there are more then one of them. > My difficulty is due to the fact that if I want to set some > item as "selected=TRUE" I have to make it "current" by > specifying the "index". But by doing this I change the status > of the item which was "current" before... It does not remain > "selected=TRUE" , does it? > I probably do not understand something. > Alex > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Thu Sep 3 13:43:54 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Thu, 3 Sep 2009 14:43:54 +0300 Subject: [Gambas-user] Selection from a list In-Reply-To: <200909031404.44848.aleks.l@...1865...> References: <200909031404.44848.aleks.l@...1865...> Message-ID: <384d3900909030443l2aa77d30k303cf955e748b954@...627...> This code selects all items, when mode is multiple. Dim ii As Integer For ii = 0 To ListBox1.Count - 1 ListBox1[ii].Selected = True Next But I think I didn't understand your problem correctly... What do you mean by " I have to make it "current" by specifying the "index". " ? How do you do that? Please attach your code / part of it. Jussi On Thu, Sep 3, 2009 at 14:04, Aleksandrs Livshics wrote: > Hallo to everyone. > Can anyone tell me whether a ListBox can be used to > display a list with several items preselected and then > to allow a user to change some part of this selection? > I think mode "multiple" must allow to do this. However > I do not understand how to preselect more than one item > and how to get the indexes of the finally selected items, > if there are more then one of them. > My difficulty is due to the fact that if I want to set some > item as "selected=TRUE" I have to make it "current" by > specifying the "index". But by doing this I change the status > of the item which was "current" before... It does not remain > "selected=TRUE" , does it? > I probably do not understand something. > Alex > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From dosida at ...626... Thu Sep 3 13:50:53 2009 From: dosida at ...626... (Dimitris Anogiatis) Date: Thu, 3 Sep 2009 05:50:53 -0600 Subject: [Gambas-user] Selection from a list In-Reply-To: <200909031404.44848.aleks.l@...1865...> References: <200909031404.44848.aleks.l@...1865...> Message-ID: <82bffccf0909030450n4622950fv5342c88bcdccaad3@...627...> Alex, Setting the mode to Multiple does allow that... if for example you have 6 items on your listbox if you execute these 2 lines the 1st & the 4th item will be selected listbox1[0].Selected = TRUE listbox1[3].Selected = TRUE (in Gambas 2.14 on my Debian Lenny it works as described) If the user wants to change the selection, in order for them not to lose the previous selection, they have to press CTRL before they click on a new item or deselect one of the already selected. Now to check which items are selected on your listbox... Unless I'm also missing some other easier way... I would suggest a function like this PUBLIC FUNCTION multipleSelections(targetLB AS ListBox) AS String DIM targetCount AS Integer DIM foundSelected AS Integer DIM Res AS String targetCount = 0 foundSelected = 0 DO WHILE targetCount < targetLB.Count IF targetLB[targetCount].selected = TRUE THEN Res &= targetLB[targetCount].Text & "|" INC foundSelected ENDIF INC targetCount LOOP IF foundSelected = 0 THEN RETURN "Nothing found" ELSE RETURN Left(Res, Len(Res) - 1) ENDIF END You could use it like this: Print multipleSelections(listbox1) and as a result you would get this Item 1|Item 4 (that's the text of the selected items) if you want their indices you could modify it so you could get the selected item indices in the same way I hope this helps Regards, Dimitris On Thu, Sep 3, 2009 at 5:04 AM, Aleksandrs Livshics wrote: > Hallo to everyone. > Can anyone tell me whether a ListBox can be used to > display a list with several items preselected and then > to allow a user to change some part of this selection? > I think mode "multiple" must allow to do this. However > I do not understand how to preselect more than one item > and how to get the indexes of the finally selected items, > if there are more then one of them. > My difficulty is due to the fact that if I want to set some > item as "selected=TRUE" I have to make it "current" by > specifying the "index". But by doing this I change the status > of the item which was "current" before... It does not remain > "selected=TRUE" , does it? > I probably do not understand something. > Alex > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From aleks.l at ...1865... Thu Sep 3 15:10:05 2009 From: aleks.l at ...1865... (Aleksandrs Livshics) Date: Thu, 3 Sep 2009 16:10:05 +0300 Subject: [Gambas-user] Selection from a list In-Reply-To: <82bffccf0909030450n4622950fv5342c88bcdccaad3@...627...> References: <200909031404.44848.aleks.l@...1865...> <82bffccf0909030450n4622950fv5342c88bcdccaad3@...627...> Message-ID: <200909031610.05316.aleks.l@...1865...> Thanks to everyone. I just had some syntax problem which you have explained. Alex On Thursday 03 September 2009 14:50:53 Dimitris Anogiatis wrote: > Alex, > > Setting the mode to Multiple does allow that... > > if for example you have 6 items on your listbox > if you execute these 2 lines the 1st & the 4th item > will be selected > > listbox1[0].Selected = TRUE > listbox1[3].Selected = TRUE > > (in Gambas 2.14 on my Debian Lenny it works as described) > > If the user wants to change the selection, in order for them > not to lose the previous selection, they have to press CTRL > before they click on a new item or deselect one of the already > selected. > > Now to check which items are selected on your listbox... Unless > I'm also missing some other easier way... I would suggest a function like > this > > PUBLIC FUNCTION multipleSelections(targetLB AS ListBox) AS String > DIM targetCount AS Integer > DIM foundSelected AS Integer > DIM Res AS String > > targetCount = 0 > foundSelected = 0 > DO WHILE targetCount < targetLB.Count > IF targetLB[targetCount].selected = TRUE THEN > Res &= targetLB[targetCount].Text & "|" > INC foundSelected > ENDIF > INC targetCount > LOOP > > IF foundSelected = 0 THEN > RETURN "Nothing found" > ELSE > RETURN Left(Res, Len(Res) - 1) > ENDIF > > END > > > You could use it like this: > > Print multipleSelections(listbox1) > > and as a result you would get this > > Item 1|Item 4 > > (that's the text of the selected items) > > if you want their indices you could modify it so you could > get the selected item indices in the same way > > I hope this helps > > Regards, > Dimitris > > On Thu, Sep 3, 2009 at 5:04 AM, Aleksandrs Livshics wrote: > > Hallo to everyone. > > Can anyone tell me whether a ListBox can be used to > > display a list with several items preselected and then > > to allow a user to change some part of this selection? > > I think mode "multiple" must allow to do this. However > > I do not understand how to preselect more than one item > > and how to get the indexes of the finally selected items, > > if there are more then one of them. > > My difficulty is due to the fact that if I want to set some > > item as "selected=TRUE" I have to make it "current" by > > specifying the "index". But by doing this I change the status > > of the item which was "current" before... It does not remain > > "selected=TRUE" , does it? > > I probably do not understand something. > > Alex > > > > > > ------------------------------------------------------------------------- > >----- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > > 30-Day trial. Simplify your report design, integration and deployment - > > and focus on > > what you do best, core application coding. Discover what's new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > --------------------------------------------------------------------------- >--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day trial. Simplify your report design, integration and deployment - and > focus on what you do best, core application coding. Discover what's new > with Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From gambasforum at ...2019... Thu Sep 3 14:24:23 2009 From: gambasforum at ...2019... (Lars Hoeger) Date: Thu, 03 Sep 2009 14:24:23 +0200 Subject: [Gambas-user] ftp Client Message-ID: <4A9FB577.3030601@...2019...> Hello, I would like to use the ftpclient component, but there is no documentation. Has anyone some code-examples? Thanks, Lars gambas 2.15 From ron at ...1740... Thu Sep 3 15:30:45 2009 From: ron at ...1740... (Ron) Date: Thu, 03 Sep 2009 15:30:45 +0200 Subject: [Gambas-user] Databrowser/Gridview events? In-Reply-To: <4A8D69B3.6070700@...626...> References: <4A8D67B4.1020309@...1740...> <4A8D69B3.6070700@...626...> Message-ID: <4A9FC505.3030500@...1740...> Jean-Yves F. Barbier wrote: > Ron a ?crit : > >> Is it possible to catch events from a DataBrowser object? >> >> Lets say >> PUBLIC SUB DataBrowser1_MouseUp() >> ... >> END >> PUBLIC SUB DataBrowser1_DblClick() >> ... >> END >> >> The docs say those are valid but I cannot get it to work, they dont seem >> to get called, anyone use these? >> >> Gambas 2.15.2, qt. >> > > Wild guess: they're preempted by the sorting command it applies to a column > when you click on its header. > > JY > Ok, found it out myself just now. I wanted to catch a click on a row of a DataBrowsers GridView so I can display an image alongside with the name of the text in column 0 of the row clicked. So I implemented an Observer to peek at the DataBrowser.GridView events, and it worked! Something like this: PRIVATE hObserver AS Observer PUBLIC SUB Form_Open() hObserver = NEW Observer(DataBrowser1.GridView) AS "GridObserver" END PUBLIC SUB GridObserver_Click() DisplayProduct(DataBrowser1.GridView[DataBrowser1.GridView.Row, 0].Text) END I love this language! Regards, Ron_2nd. From math.eber at ...221... Thu Sep 3 21:06:37 2009 From: math.eber at ...221... (Matti) Date: Thu, 03 Sep 2009 21:06:37 +0200 Subject: [Gambas-user] DataCombo doesn't work In-Reply-To: <4A9D6462.6060604@...221...> References: <4A9ACACB.7040409@...221...> <200909011208.40026.gambas@...1...> <4A9D6462.6060604@...221...> Message-ID: <4AA013BD.1010801@...221...> I now managed to install Gambas3 sucessfully. (Looks very good, waiting for the final version!) But the error situation about DataCombo ist the same as in Gambas2. Is there any way to see the SQL query the DataCombo produces? Would help to find out who's wrong, me or Gambas. Matti Matti schrieb: > Beno?t Minisini schrieb: > >> If I remember, DataCombo only works if the the primary key of the "directors" >> table is "Directors_ID", with the same field name. Is it the case? > > Too bad. > If I rename the primary key field of the lookup table to the same field name, I get the error "Cannot find 'Directors.id'". > So the primary key has to be "id". > And if I rename it to "id" (as it was before), I get this "Query failed" error. Really funny. From math.eber at ...221... Thu Sep 3 21:34:45 2009 From: math.eber at ...221... (Matti) Date: Thu, 03 Sep 2009 21:34:45 +0200 Subject: [Gambas-user] Gambas3 and database components Message-ID: <4AA01A55.3070205@...221...> Hi, this database stuff looks very very good now. Very easy to use. Chapeau! Two questions after first testing: 1st: What happend to DataBrowser1.GridView? This property is still in the docs, but unusable. Every attempt to resize the columns, rename a column header or select a row produces an error. 2nd: As Benoit said, it should be possible now to define a SQL query as a "table" for a DataSource. I tried that. In "Connections/Connection1" I can see my tables, they are correctly displayed, I can modify them. When I insert a SQL query and run it, the result is just as I wanted it. Now I think I should save this query somewhere to use it later. But nothing happens with the "Save" button or the "Export" button. In the "Connection" tab the connection is marked "read only". (but I have all the rights and can write to the database in the app) Regards, Matti From gambas at ...1... Thu Sep 3 21:49:21 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 3 Sep 2009 21:49:21 +0200 Subject: [Gambas-user] DataCombo doesn't work In-Reply-To: <4AA013BD.1010801@...221...> References: <4A9ACACB.7040409@...221...> <4A9D6462.6060604@...221...> <4AA013BD.1010801@...221...> Message-ID: <200909032149.21522.gambas@...1...> > I now managed to install Gambas3 sucessfully. (Looks very good, waiting for > the final version!) > > But the error situation about DataCombo ist the same as in Gambas2. > Maybe if I see your code and your SQL schema, I could tell. > Is there any way to see the SQL query the DataCombo produces? > Would help to find out who's wrong, me or Gambas. DB.Debug = TRUE, and all SQL request sent to the database driver are print on the standard error. Regards, -- Beno?t From gambas at ...1... Thu Sep 3 21:52:51 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 3 Sep 2009 21:52:51 +0200 Subject: [Gambas-user] Gambas3 and database components In-Reply-To: <4AA01A55.3070205@...221...> References: <4AA01A55.3070205@...221...> Message-ID: <200909032152.51077.gambas@...1...> > Hi, > > this database stuff looks very very good now. Very easy to use. Chapeau! > > Two questions after first testing: > > 1st: What happend to DataBrowser1.GridView? This property is still in the > docs, but unusable. Every attempt to resize the columns, rename a column > header or select a row produces an error. The GridView property has been replaced by the View property (the view may not be a GridView after all). > > 2nd: As Benoit said, it should be possible now to define a SQL query as a > "table" for a DataSource. I tried that. In "Connections/Connection1" I can > see my tables, they are correctly displayed, I can modify them. When I > insert a SQL query and run it, the result is just as I wanted it. Now I > think I should save this query somewhere to use it later. > But nothing happens with the "Save" button or the "Export" button. This is not done yet. > In the "Connection" tab the connection is marked "read only". (but I have > all the rights and can write to the database in the app) This a problem with the IDE logic: the Connection object is read-only, but not the data you are connected too. Displaying the "read-only" flag is stupid then, I admit! Regards, -- Beno?t From math.eber at ...221... Thu Sep 3 23:23:55 2009 From: math.eber at ...221... (Matti) Date: Thu, 03 Sep 2009 23:23:55 +0200 Subject: [Gambas-user] DataCombo doesn't work In-Reply-To: <200909032149.21522.gambas@...1...> References: <4A9ACACB.7040409@...221...> <4A9D6462.6060604@...221...> <4AA013BD.1010801@...221...> <200909032149.21522.gambas@...1...> Message-ID: <4AA033EB.3050807@...221...> Beno?t Minisini schrieb: > DB.Debug = TRUE, and all SQL request sent to the database driver are print on > the standard error. DB.Debug = TRUE is fine, but doesn't display this error. Try this tiny silly test file (never did tar.gz before, hope it works) If you can use it: Set these properties: DataCombo1.Table = Metzger .Field = MetzID .Display = Name -------------- next part -------------- A non-text attachment was scrubbed... Name: testDB1.tar.gz Type: application/x-gzip Size: 10744 bytes Desc: not available URL: From math.eber at ...221... Thu Sep 3 22:33:15 2009 From: math.eber at ...221... (Matti) Date: Thu, 03 Sep 2009 22:33:15 +0200 Subject: [Gambas-user] Gambas3 and database components In-Reply-To: <200909032152.51077.gambas@...1...> References: <4AA01A55.3070205@...221...> <200909032152.51077.gambas@...1...> Message-ID: <4AA0280B.4060104@...221...> Beno?t Minisini schrieb: > > The GridView property has been replaced by the View property (the view may not > be a GridView after all). ok, thanks, works. > > This is not done yet. ok, will wait. > This a problem with the IDE logic: the Connection object is read-only, but not > the data you are connected too. Displaying the "read-only" flag is stupid > then, I admit! yes, this only leads to misunderstandings. The user thinks it's the reason why things don't work. Matti From jussi.lahtinen at ...626... Sat Sep 5 01:33:38 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 5 Sep 2009 02:33:38 +0300 Subject: [Gambas-user] Qt4 and Scaled property Message-ID: <384d3900909041633s3a676f40s9fe6730569f13c48@...627...> Hi! I just updated Gambas3 to revision 2310 (BTW. What is gb.image.imlib? [it's disabled]). So I just moved from Qt3 to Qt4, and now I have problems with couple of forms. They are much bigger than with old Qt3, they don't even fit to my screen! Problem forms had property Scaled = True. So, where is determined size of default font? Default font of project, desktop or ..? I don't remember touching to anything like that... Is there bug with Qt4? Jussi From gambas at ...1... Sat Sep 5 01:42:53 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 5 Sep 2009 01:42:53 +0200 Subject: [Gambas-user] Qt4 and Scaled property In-Reply-To: <384d3900909041633s3a676f40s9fe6730569f13c48@...627...> References: <384d3900909041633s3a676f40s9fe6730569f13c48@...627...> Message-ID: <200909050142.53909.gambas@...1...> > Hi! > I just updated Gambas3 to revision 2310 (BTW. What is gb.image.imlib? > [it's disabled]). > So I just moved from Qt3 to Qt4, and now I have problems with couple of > forms. They are much bigger than with old Qt3, they don't even fit to my > screen! Problem forms had property Scaled = True. > So, where is determined size of default font? > Default font of project, desktop or ..? > I don't remember touching to anything like that... > Is there bug with Qt4? > > > Jussi > Did you run the "update forms" menu entry in the IDE after opening your project? -- Beno?t From gambas at ...1... Sat Sep 5 01:45:02 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 5 Sep 2009 01:45:02 +0200 Subject: [Gambas-user] Value box for numeric values In-Reply-To: <200909021526.12829.aleks.l@...1865...> References: <200909021526.12829.aleks.l@...1865...> Message-ID: <200909050145.02546.gambas@...1...> > Hi gambas users. > It seems to me that it is impossible to enter a number in > scientific notation in a value box. It does not accept > "E" or "D" letters which are used to separate exponent. > So value as 1.0E-1 is illegal. If it is so, it must be treated as a bug ! > Or am I doing something wrongly ? > Alex > I don't know if "Number" should accept scientic notation, or if I should better create a new ValueBox Type (for example "Scientific"). And where did you see that "D" is an exponent separator? -- Beno?t From math.eber at ...221... Tue Sep 1 06:51:41 2009 From: math.eber at ...221... (Mathias Ebermann) Date: Tue, 01 Sep 2009 06:51:41 +0200 Subject: [Gambas-user] DataBrowser In-Reply-To: <200909010217.30233.gambas@...1...> References: <4A9C29FC.8040005@...221...> <4A9C3983.8060903@...221...> <200909010207.31243.gambas@...1...> <200909010217.30233.gambas@...1...> Message-ID: <4A9CA85D.7070809@...221...> Yes, I remember the old days in VB. It was very simple, when you used the result of a SQL query as DataSource. I will install Gambas3. Thanks. Beno?t Minisini schrieb: >>> No, Charlie, >>> I didn't mean the headers. I know how to rename them. >>> >>> What I meant is: >>> In my DataSource table I have a field "ProducerID". >>> That points to another table "Producers" with the key field "id" and the >>> field "Name". Now I would like to have the Column "Producers.Name" in the >>> list instead of "ProducerID". I mean the field values of the records, not >>> the headers. >> In Gambas 3, the Table property of a DataSource can be any SQL request. >> >> In Gambas 2, I'm afraid there is no simple solution. But try this: use your >> own DataView control, and create an Observer on the GridView of the >> DataView control - you get it with the DataView.GridView property. Then >> catch the Data event with the Observer: by using the Row property, you will > . > /|\ > | > Read 'Column' instead -----------------------------------' > >> know if you are in the ProducerID column, and then you can replace the >> displayed data with the name of the producer by setting the >> GridView.Data.Text property. >> >> Regards, > > > From Gambas at ...1950... Sat Sep 5 10:21:37 2009 From: Gambas at ...1950... (Caveat) Date: Sat, 05 Sep 2009 10:21:37 +0200 Subject: [Gambas-user] ftp Client In-Reply-To: <4A9FB577.3030601@...2019...> References: <4A9FB577.3030601@...2019...> Message-ID: <1252138897.9533.26.camel@...1951...> Hi Lars, Here's some code that should be enough to get you started. The code is from a Gambas class which I called RequestManager. I have cut out some of the code out as it wasn't relevant to FTP (there was stuff for doing an HTTP GET and some code for querying services on a particular port). ISTR there was some flakiness with the FTP client where it bombs out if you send a blank (empty string) password, so if your FTP server doesn't require one, just set the FTP client's password to "dummy" or something and your FTP server *should* ignore it... failing that, you may have to set a dummy password. Note the difference between the local file name and the name of the file you want to get off the server. The name of the file on the server is normally included in the url set on FTPClient.URL (see the calling instructions) and the name of the file on your local machine is passed to the FTPClient.get method. If you want to PUT files on the FTP server instead of GETting them, I'm sure you can adapt the code. Bear in mind that getting a huge binary file as a string is probably not a great idea. My getFileAsString method is really designed to work for a small textual line-based file. You'll just need to wrap getFileByFTP in a different way if you want to deal with binary or larger files. Give me a shout if you get stuck or something is not clear. Enough rambling... to use the code, just instantiate a new RequestManager (or whatever you call the class) and use it as follows: PRIVATE myRequestManager AS NEW RequestManager ... DIM allData AS String allData = myRequestManager.getFileAsString("192.168.1.2//var/share/dvb2001/services.dat", "root", "password") Now here follows (some of) the code for the RequestManager class itself: ' Gambas class file PRIVATE theFTPClient AS NEW FtpClient PRIVATE eggTimer AS NEW Timer PRIVATE timedOut AS Boolean PRIVATE busy AS Boolean PRIVATE allStates AS Collection PRIVATE SUB getFileByFTP(url AS String, userName AS String, password AS String, localFile AS String) DIM fileName AS String theFTPClient.URL = url theFTPClient.User = userName theFTPClient.Password = password secondsBeforeTimeout(10) theFTPClient.get(localFile) DO UNTIL theFTPClient.Status <= 0 OR timedOut = TRUE Logger.logMessage("RequestManager.getFileByFTP() status: " & theFTPClient.Status, FALSE) WAIT 0.01 LOOP IF theFTPClient.Status <> 0 THEN message("Error in FTP call! Check password?") END IF busy = FALSE CATCH Logger.logMessage("getFileByFTP: " & Error.Text & " @ " & Error.Where, TRUE) END PUBLIC FUNCTION getFileAsString(url AS String, userName AS String, password AS String, tmpDir AS String) AS String DIM result AS String DIM fileName AS String DIM hFile AS File DIM aLine AS String fileName = tmpDir &/ "drag_cont_tmp_" & userName & ".tmp" Logger.logMessage("RequestManager.getFileAsString() fileName: " & fileName, FALSE) getFileByFTP(url, userName, password, fileName) result = "" OPEN fileName FOR READ AS #hFile WHILE NOT Eof(hFile) LINE INPUT #hFile, aLine IF aLine <> NULL THEN result = result & aLine & gb.NewLine END IF WEND CLOSE #hFile RETURN result CATCH Logger.logMessage("getFileByFTPAsString: " & Error.Text & " @ " & Error.Where, TRUE) END PUBLIC SUB eggTimer_Timer() eggTimer.Enabled = FALSE timedOut = TRUE Object.Detach(eggTimer) END PUBLIC FUNCTION isBusy() AS Boolean Logger.logMessage("RequestManager checked for busy state and was: " & booleanToString(busy), FALSE) RETURN busy END PRIVATE SUB secondsBeforeTimeout(seconds AS Integer) Object.Attach(eggTimer, ME, "eggTimer") timedOut = FALSE eggTimer.Delay = seconds * 1000 busy = TRUE eggTimer.Enabled = TRUE END PRIVATE FUNCTION booleanToString(value AS Boolean) AS String IF value THEN RETURN "TRUE" ELSE RETURN "FALSE" END IF END PRIVATE FUNCTION getState(aState AS Integer) AS String RETURN getAllStates()[aState] END PRIVATE FUNCTION getAllStates() AS Collection IF allStates = NULL THEN allStates = NEW Collection allStates.Add("Accepting", Net.Accepting) allStates.Add("Active", Net.Active) allStates.Add("CannotBindSocket", Net.CannotBindSocket) allStates.Add("CannotCreateSocket", Net.CannotCreateSocket) allStates.Add("CannotListen", Net.CannotListen) allStates.Add("CannotRead", Net.CannotRead) allStates.Add("CannotWrite", Net.CannotWrite) allStates.Add("Connected", Net.Connected) allStates.Add("Connecting", Net.Connecting) allStates.Add("ConnectionRefused", Net.ConnectionRefused) allStates.Add("HostNotFound", Net.HostNotFound) allStates.Add("Inactive", Net.Inactive) allStates.Add("Internet", Net.Internet) allStates.Add("IPv4", Net.IPv4) allStates.Add("Local", Net.Local) allStates.Add("Pending", Net.Pending) allStates.Add("ReceivingData", Net.ReceivingData) allStates.Add("Searching", Net.Searching) allStates.Add("Unix", Net.Unix) END IF RETURN allStates END On Thu, 2009-09-03 at 14:24 +0200, Lars Hoeger wrote: > Hello, > > I would like to use the ftpclient component, but there is no documentation. Has anyone some code-examples? > > Thanks, > Lars > gambas 2.15 > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From doriano.blengino at ...1909... Sat Sep 5 10:41:42 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sat, 05 Sep 2009 10:41:42 +0200 Subject: [Gambas-user] Value box for numeric values In-Reply-To: <200909050145.02546.gambas@...1...> References: <200909021526.12829.aleks.l@...1865...> <200909050145.02546.gambas@...1...> Message-ID: <4AA22446.1000305@...1909...> Beno?t Minisini ha scritto: >> Hi gambas users. >> It seems to me that it is impossible to enter a number in >> scientific notation in a value box. It does not accept >> "E" or "D" letters which are used to separate exponent. >> So value as 1.0E-1 is illegal. If it is so, it must be treated as a bug ! >> Or am I doing something wrongly ? >> Alex >> >> > > I don't know if "Number" should accept scientic notation, or if I should > better create a new ValueBox Type (for example "Scientific"). > > And where did you see that "D" is an exponent separator? > I too vaguely remember the "D" letter, probably it means "double precision" in C or Fortran. -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From Gambas at ...1950... Sat Sep 5 10:52:01 2009 From: Gambas at ...1950... (Caveat) Date: Sat, 05 Sep 2009 10:52:01 +0200 Subject: [Gambas-user] ftp Client (correction) In-Reply-To: <1252138897.9533.26.camel@...1951...> References: <4A9FB577.3030601@...2019...> <1252138897.9533.26.camel@...1951...> Message-ID: <1252140721.9533.52.camel@...1951...> Sorry Lars, a couple of errors got introduced into my mail just after I hit the "Send" button ;-) Obviously, you need a 4th param on the call to getFileAsString, which is the name of a temporary dir to use (so something like /tmp), thus: allData = myRequestManager.getFileAsString("192.168.1.2//var/share/dvb2001/services.dat", "root", "password", "/tmp") In the getFileAsString function, the line: fileName = tmpDir &/ "drag_cont_tmp_" & userName & ".tmp" constructs a path to a temporary file, which in your case (if you use "/tmp" as the temporary dir, and root as the user) would be: /tmp/drag_cont_tmp_root.tmp This may not be what you want, so feel free to change this line to suit your needs (drag_cont comes from the program this class is used in: DragonController). And in the CATCH at the end of getFileAsString, the call to my logging function should read: Logger.logMessage("getFileAsString: " & Error.Text & " @ " & Error.Where, TRUE) In the end, you may not need getFileAsString at all, as getFileByFTP is all you need to actually get a file off of an FTP server and onto your local machine, so you could just make that a PUBLIC SUB and call it directly. Regards, Caveat P.S. In case you're interested, as a free bonus, here's also the code for my logging module: ' Gambas module file PRIVATE debugMode AS Integer PRIVATE logIndex AS Integer PRIVATE logLines AS Collection PUBLIC CONST NO_DEBUG AS Integer = 0 PUBLIC CONST DEBUG_LOG_ONLY AS Integer = 1 PUBLIC CONST DEBUG_LOG_AND_PRINT AS Integer = 2 PUBLIC CONST DEBUG_MESSAGE_LOG_AND_PRINT AS Integer = 3 PUBLIC SUB setDebugMode(newMode AS Integer) debugMode = newMode END PUBLIC SUB logMessage(msgText AS String, showAsError AS Boolean) IF debugMode = NO_DEBUG THEN RETURN END IF getLogLines().add(msgText, logIndex) logIndex = logIndex + 1 IF debugMode = DEBUG_LOG_AND_PRINT THEN PRINT msgText ELSE IF debugMode = DEBUG_MESSAGE_LOG_AND_PRINT THEN message(msgText) PRINT msgText END IF IF showAsError THEN message(msgText) END IF END PUBLIC FUNCTION getLogLines() AS Collection IF logLines = NULL THEN logLines = NEW Collection END IF RETURN logLines END PUBLIC SUB displayLogLines() DIM aLogLine AS String FOR EACH aLogLine IN logLines PRINT aLogLine NEXT END On Sat, 2009-09-05 at 10:21 +0200, Caveat wrote: > Hi Lars, > > Here's some code that should be enough to get you started. The code is > from a Gambas class which I called RequestManager. I have cut out some > of the code out as it wasn't relevant to FTP (there was stuff for doing > an HTTP GET and some code for querying services on a particular port). > > ISTR there was some flakiness with the FTP client where it bombs out if > you send a blank (empty string) password, so if your FTP server doesn't > require one, just set the FTP client's password to "dummy" or something > and your FTP server *should* ignore it... failing that, you may have to > set a dummy password. > > Note the difference between the local file name and the name of the file > you want to get off the server. The name of the file on the server is > normally included in the url set on FTPClient.URL (see the calling > instructions) and the name of the file on your local machine is passedc > to the FTPClient.get method. If you want to PUT files on the FTP server > instead of GETting them, I'm sure you can adapt the code. > > Bear in mind that getting a huge binary file as a string is probably not > a great idea. My getFileAsString method is really designed to work for > a small textual line-based file. You'll just need to wrap getFileByFTP > in a different way if you want to deal with binary or larger files. > Give me a shout if you get stuck or something is not clear. > > Enough rambling... to use the code, just instantiate a new > RequestManager (or whatever you call the class) and use it as follows: > > PRIVATE myRequestManager AS NEW RequestManager > > ... > DIM allData AS String > allData = > myRequestManager.getFileAsString("192.168.1.2//var/share/dvb2001/services.dat", "root", "password") > > > Now here follows (some of) the code for the RequestManager class itself: > > ' Gambas class file > PRIVATE theFTPClient AS NEW FtpClient > PRIVATE eggTimer AS NEW Timer > PRIVATE timedOut AS Boolean > PRIVATE busy AS Boolean > PRIVATE allStates AS Collection > > PRIVATE SUB getFileByFTP(url AS String, userName AS String, password AS > String, localFile AS String) > > DIM fileName AS String > > theFTPClient.URL = url > theFTPClient.User = userName > theFTPClient.Password = password > secondsBeforeTimeout(10) > theFTPClient.get(localFile) > DO UNTIL theFTPClient.Status <= 0 OR timedOut = TRUE > Logger.logMessage("Requ Logger.logMessage("getFileByFTPAsString: " & Error.Text & " @ " & > Error.Where, TRUE) > estManager.getFileByFTP() status: " & > theFTPClient.Status, FALSE) > WAIT 0.01 > LOOP > IF theFTPClient.Status <> 0 THEN > message("Error in FTP call! Check password?") > END IF > busy = FALSE > CATCH > Logger.logMessage("getFileByFTP: " & Error.Text & " @ " & Error.Where, > TRUE) > END > > PUBLIC FUNCTION getFileAsString(url AS String, userName AS String, > password AS String, tmpDir AS String) AS String > > DIM result AS String > DIM fileName AS String > DIM hFile AS File > DIM aLine AS String > fileName = tmpDir &/ "drag_cont_tmp_" & userName & ".tmp" > Logger.logMessage("RequestManager.getFileAsString() fileName: " & > fileName, FALSE) > getFileByFTP(url, userName, password, fileName) > result = "" > OPEN fileName FOR READ AS #hFile > WHILE NOT Eof(hFile) > LINE INPUT #hFile, aLine > IF aLine <> NULL THEN > result = result & aLine & gb.NewLine > END IF > WEND > CLOSE #hFile > RETURN result > CATCH > Logger.logMessage("getFileByFTPAsString: " & Error.Text & " @ " & > Error.Where, TRUE) > END > > > PUBLIC SUB eggTimer_Timer() > > eggTimer.Enabled = FALSE > timedOut = TRUE > Object.Detach(eggTimer) > > END > > PUBLIC FUNCTION isBusy() AS Boolean > > Logger.logMessage("RequestManager checked for busy state and was: " & > booleanToString(busy), FALSE) > RETURN busy > > END > > PRIVATE SUB secondsBeforeTimeout(seconds AS Integer) > > Object.Attach(eggTimer, ME, "eggTimer") > timedOut = FALSE > eggTimer.Delay = seconds * 1000 > busy = TRUE > eggTimer.Enabled = TRUE > > END > > PRIVATE FUNCTION booleanToString(value AS Boolean) AS String > > IF value THEN > RETURN "TRUE" > ELSE > RETURN "FALSE" > END IF > > END > > PRIVATE FUNCTION getState(aState AS Integer) AS String > > RETURN getAllStates()[aState] > > END > > PRIVATE FUNCTION getAllStates() AS Collection > > IF allStates = NULL THEN > allStates = NEW Collection > allStates.Add("Accepting", Net.Accepting) > allStates.Add("Active", Net.Active) > allStates.Add("CannotBindSocket", Net.CannotBindSocket) > allStates.Add("CannotCreateSocket", Net.CannotCreateSocket) > allStates.Add("CannotListen", Net.CannotListen) > allStates.Add("CannotRead", Net.CannotRead) > allStates.Add("CannotWrite", Net.CannotWrite) > allStates.Add("Connected", Net.Connected) > allStates.Add("Connecting", Net.Connecting) > allStates.Add("ConnectionRefused", Net.ConnectionRefused) > allStates.Add("HostNotFound", Net.HostNotFound) > allStates.Add("Inactive", Net.Inactive) > allStates.Add("Internet", Net.Internet) > allStates.Add("IPv4", Net.IPv4) > allStates.Add("Local", Net.Local) > allStates.Add("Pending", Net.Pending) > allStates.Add("ReceivingData", Net.ReceivingData) > allStates.Add("Searching", Net.Searching) > allStates.Add("Unix", Net.Unix) > END IF > RETURN allStates > > END > > On Thu, 2009-09-03 at 14:24 +0200, Lars Hoeger wrote: > > Hello, > > > > I would like to use the ftpclient component, but there is no documentation. Has anyone some code-examples? > > > > Thanks, > > Lars > > gambas 2.15 > > > > > > ------------------------------------------------------------------------------ > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > > trial. Simplify your report design, integration and deployment - and focus on > > what you do best, core application coding. Discover what's new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From aleks.l at ...1865... Sat Sep 5 11:57:08 2009 From: aleks.l at ...1865... (Aleksandrs Livshics) Date: Sat, 5 Sep 2009 12:57:08 +0300 Subject: [Gambas-user] Value box for numeric values In-Reply-To: <4AA22446.1000305@...1909...> References: <200909021526.12829.aleks.l@...1865...> <200909050145.02546.gambas@...1...> <4AA22446.1000305@...1909...> Message-ID: <200909051257.08489.aleks.l@...1865...> On Saturday 05 September 2009 11:41:42 Doriano Blengino wrote: > Beno?t Minisini ha scritto: > >> Hi gambas users. > >> It seems to me that it is impossible to enter a number in > >> scientific notation in a value box. It does not accept > >> "E" or "D" letters which are used to separate exponent. > >> So value as 1.0E-1 is illegal. If it is so, it must be treated as a bug > >> ! Or am I doing something wrongly ? > >> Alex > > > > I don't know if "Number" should accept scientic notation, or if I should > > better create a new ValueBox Type (for example "Scientific"). > > > > And where did you see that "D" is an exponent separator? > > I too vaguely remember the "D" letter, probably it means "double > precision" in C or Fortran. Exactly . This was an old fortran convention that the number should be treated as "double precision". In modern Fortran there are other means to tell that. Alex From aleks.l at ...1865... Sat Sep 5 12:14:55 2009 From: aleks.l at ...1865... (Aleksandrs Livshics) Date: Sat, 5 Sep 2009 13:14:55 +0300 Subject: [Gambas-user] Value box for numeric values In-Reply-To: <200909051257.08489.aleks.l@...1865...> References: <200909021526.12829.aleks.l@...1865...> <4AA22446.1000305@...1909...> <200909051257.08489.aleks.l@...1865...> Message-ID: <200909051314.55767.aleks.l@...1865...> On Saturday 05 September 2009 12:57:08 Aleksandrs Livshics wrote: > On Saturday 05 September 2009 11:41:42 Doriano Blengino wrote: > > Beno?t Minisini ha scritto: > > >> Hi gambas users. > > >> It seems to me that it is impossible to enter a number in > > >> scientific notation in a value box. It does not accept > > >> "E" or "D" letters which are used to separate exponent. > > >> So value as 1.0E-1 is illegal. If it is so, it must be treated as a > > >> bug ! Or am I doing something wrongly ? > > >> Alex > > > > > > I don't know if "Number" should accept scientic notation, or if I > > > should better create a new ValueBox Type (for example "Scientific"). > > > > > > And where did you see that "D" is an exponent separator? > > > > I too vaguely remember the "D" letter, probably it means "double > > precision" in C or Fortran. > > Exactly . This was an old fortran convention that the number should be > treated as "double precision". In modern Fortran there are other means to > tell that. > Alex > P.S. It would be nice to have a general "Numbr" and also special ones for Integer only and Float only. The latter should accept scientific notation. The general Number in this case may be left as it is now: without "E". This is because these 3 boxes would be used by different people with different cultural background and for different purposes. > --------------------------------------------------------------------------- >--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day trial. Simplify your report design, integration and deployment - and > focus on what you do best, core application coding. Discover what's new > with Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From jussi.lahtinen at ...626... Sat Sep 5 15:41:02 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 5 Sep 2009 16:41:02 +0300 Subject: [Gambas-user] Qt4 and Scaled property In-Reply-To: <200909050142.53909.gambas@...1...> References: <384d3900909041633s3a676f40s9fe6730569f13c48@...627...> <200909050142.53909.gambas@...1...> Message-ID: <384d3900909050641mfa47fdfof9c9232a87fb479f@...627...> Hmmm... I think I tried to run it first... big mistake? Atleast now "update forms" don't help... Jussi 2009/9/5 Beno?t Minisini : >> Hi! >> I just updated Gambas3 to revision 2310 (BTW. What is gb.image.imlib? >> [it's disabled]). >> So I just moved from Qt3 to Qt4, and now I have problems with couple of >> forms. They are much bigger than with old Qt3, they don't even fit to my >> screen! Problem forms had property Scaled = True. >> So, where is determined size of default font? >> Default font of project, desktop or ..? >> I don't remember touching to anything like that... >> Is there bug with Qt4? >> >> >> Jussi >> > > Did you run the "update forms" menu entry in the IDE after opening your > project? > > -- > Beno?t > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Sat Sep 5 15:57:12 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 5 Sep 2009 16:57:12 +0300 Subject: [Gambas-user] Qt4 and Scaled property In-Reply-To: <384d3900909050641mfa47fdfof9c9232a87fb479f@...627...> References: <384d3900909041633s3a676f40s9fe6730569f13c48@...627...> <200909050142.53909.gambas@...1...> <384d3900909050641mfa47fdfof9c9232a87fb479f@...627...> Message-ID: <384d3900909050657n145c19e7h18554e25ffceb132@...627...> I have backups.. so maybe I try to restore those forms. Jussi On Sat, Sep 5, 2009 at 16:41, Jussi Lahtinen wrote: > Hmmm... I think I tried to run it first... big mistake? > Atleast now "update forms" don't help... > > Jussi > > > 2009/9/5 Beno?t Minisini : >>> Hi! >>> I just updated Gambas3 to revision 2310 (BTW. What is gb.image.imlib? >>> [it's disabled]). >>> So I just moved from Qt3 to Qt4, and now I have problems with couple of >>> forms. They are much bigger than with old Qt3, they don't even fit to my >>> screen! Problem forms had property Scaled = True. >>> So, where is determined size of default font? >>> Default font of project, desktop or ..? >>> I don't remember touching to anything like that... >>> Is there bug with Qt4? >>> >>> >>> Jussi >>> >> >> Did you run the "update forms" menu entry in the IDE after opening your >> project? >> >> -- >> Beno?t >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> trial. Simplify your report design, integration and deployment - and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. ?http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > From gambas at ...1... Sat Sep 5 16:12:54 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 5 Sep 2009 16:12:54 +0200 Subject: [Gambas-user] Qt4 and Scaled property In-Reply-To: <384d3900909050657n145c19e7h18554e25ffceb132@...627...> References: <384d3900909041633s3a676f40s9fe6730569f13c48@...627...> <384d3900909050641mfa47fdfof9c9232a87fb479f@...627...> <384d3900909050657n145c19e7h18554e25ffceb132@...627...> Message-ID: <200909051612.54498.gambas@...1...> > I have backups.. so maybe I try to restore those forms. > > Jussi > Anyway, Desktop.Scale in Qt4 is normally *lower* than in Qt3, as it is computed differently. So your forms should be smaller, not bigger! Please give the value of Desktop.Scale and Application.Font.Size in the Qt3 version of your project, and in the Qt4 version. Regards, -- Beno?t From jussi.lahtinen at ...626... Sat Sep 5 16:46:56 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 5 Sep 2009 17:46:56 +0300 Subject: [Gambas-user] Qt4 and Scaled property In-Reply-To: <200909051612.54498.gambas@...1...> References: <384d3900909041633s3a676f40s9fe6730569f13c48@...627...> <384d3900909050641mfa47fdfof9c9232a87fb479f@...627...> <384d3900909050657n145c19e7h18554e25ffceb132@...627...> <200909051612.54498.gambas@...1...> Message-ID: <384d3900909050746y7bbde335v46a9e38aa037c6a8@...627...> > Please give the value of Desktop.Scale and Application.Font.Size in the Qt3 > version of your project, and in the Qt4 version. Argh... I mixed up things. I thought that Qt3 is automatically changed to Qt4 with new revision. That's why I didn't update Gambas3 revision earlier. But OK, so the real problem is that I updated Gambas3, and now my forms got bigger (still with Qt3). In fact I think they all get bigger, but it's problem just with couple of forms (don't fit to screen or dimensions are skewed related to graphics). My earlier Gambas3 revision was OLD, I don't remember what it was... Jussi From jussi.lahtinen at ...626... Sun Sep 6 01:06:54 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sun, 6 Sep 2009 02:06:54 +0300 Subject: [Gambas-user] Qt4 and Scaled property In-Reply-To: <384d3900909050746y7bbde335v46a9e38aa037c6a8@...627...> References: <384d3900909041633s3a676f40s9fe6730569f13c48@...627...> <384d3900909050641mfa47fdfof9c9232a87fb479f@...627...> <384d3900909050657n145c19e7h18554e25ffceb132@...627...> <200909051612.54498.gambas@...1...> <384d3900909050746y7bbde335v46a9e38aa037c6a8@...627...> Message-ID: <384d3900909051606q4f39c832i3c092bede9e7bedc@...627...> If I import Gambas2 project to Gambas3, form sizes are what is expected. So the problem is only with projects started (or converted long time ago) with old revision of Gambas3. I wish there are easy fix for that! Also I noticed bug from Gambas3 revision 2310 (or something with my system). If you change editor font (with me default was "-1 monospace") to "monospace". Cursor (text cursor, not mouse) in console doesn't keep up with text. Meaning, when I type "1234" to console, cursor blinks over "4", not after it. And it gets even worst when you keep on typing text. Strangely when I change font size to 10, console works as expected. I assume that "-1 monospace" is relative size and size 9 absolute size..? Jussi On Sat, Sep 5, 2009 at 17:46, Jussi Lahtinen wrote: >> Please give the value of Desktop.Scale and Application.Font.Size in the Qt3 >> version of your project, and in the Qt4 version. > > Argh... I mixed up things. I thought that Qt3 is automatically changed > to Qt4 with new revision. > That's why I didn't update Gambas3 revision earlier. > > But OK, so the real problem is that I updated Gambas3, and now my > forms got bigger (still with Qt3). > In fact I think they all get bigger, but it's problem just with couple of forms > (don't fit to screen or dimensions are skewed related to graphics). > My earlier Gambas3 revision was OLD, I don't remember what it was... > > > Jussi > From gambas at ...1... Sun Sep 6 12:16:05 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 6 Sep 2009 12:16:05 +0200 Subject: [Gambas-user] DataCombo doesn't work In-Reply-To: <4AA033EB.3050807@...221...> References: <4A9ACACB.7040409@...221...> <200909032149.21522.gambas@...1...> <4AA033EB.3050807@...221...> Message-ID: <200909061216.05978.gambas@...1...> > Beno?t Minisini schrieb: > > DB.Debug = TRUE, and all SQL request sent to the database driver are > > print on the standard error. > > DB.Debug = TRUE is fine, but doesn't display this error. > > Try this tiny silly test file (never did tar.gz before, hope it works) > If you can use it: > Set these properties: > DataCombo1.Table = Metzger > .Field = MetzID > .Display = Name DataCombo works, but the name of the field in the main table and the name of the other table primary key must be the same. In other words, replace Metzger.id by Metzger.MetzID, set the Table property of the DataCombo, and everything is fine. Not using the same name for common keys is a very bad practise in SQL. But I admit there are some case where it is not possible, and I should add a property in DataCombo to specify the table key field. Regards, -- Beno?t From pinozollo at ...626... Sun Sep 6 14:05:43 2009 From: pinozollo at ...626... (Pino Zollo) Date: Sun, 6 Sep 2009 08:05:43 -0400 Subject: [Gambas-user] Help DataSource, DataBrowse Message-ID: <200909060805.43582.pinozollo@...626...> Hi , Please an help....I am practising with DataSorce using into my project the same form and class of the "database" example: in particular Ftest.class and Ftest.form. In my project I get the error: Null Object DataSource.MoveFirst.173 I guess that DataSource can not find my Connection to the database ... How can I tell to DataSource which is the Connection to use ? Is there a property of DataSource to set ? I make the connection in Mglobal.module with the following code: ----- PUBLIC FUNCTION conn(dbtype AS String, host AS String, lgn AS String, pass AS String) AS Boolean TRY $hConn.close $hConn.Type = dbtype ' "postgresql" $hConn.Host = host $hConn.Login = lgn $hConn.Password = pass $hConn.Open RETURN TRUE CATCH Message.error("conn", Error.Where & "\n" & Error.text) RETURN FALSE END ------- Where PUBLIC $hConn AS NEW Connection ..... Many thanks Pino -- Key ID: 0xF6768208 Key fingerprint = B16D 0A7C 5B29 A334 CE6A 71F6 EAF8 3D88 F676 8208 Key server: hkp://wwwkeys.eu.pgp.net From gambas at ...1... Sun Sep 6 14:21:23 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 6 Sep 2009 14:21:23 +0200 Subject: [Gambas-user] Help DataSource, DataBrowse In-Reply-To: <200909060805.43582.pinozollo@...626...> References: <200909060805.43582.pinozollo@...626...> Message-ID: <200909061421.23368.gambas@...1...> > Hi , > Please an help....I am practising with DataSorce using into my project the > same form and class of the "database" example: in particular Ftest.class > and Ftest.form. > > In my project I get the error: > > Null Object DataSource.MoveFirst.173 > > I guess that DataSource can not find my Connection to the database ... > > How can I tell to DataSource which is the Connection to use ? > Is there a property of DataSource to set ? > > I make the connection in Mglobal.module with the following code: > ----- > PUBLIC FUNCTION conn(dbtype AS String, host AS String, lgn AS String, pass > AS String) AS Boolean > > TRY $hConn.close > $hConn.Type = dbtype ' "postgresql" > $hConn.Host = host > $hConn.Login = lgn > $hConn.Password = pass > $hConn.Open > RETURN TRUE > CATCH > Message.error("conn", Error.Where & "\n" & Error.text) > RETURN FALSE > END > ------- > Where > PUBLIC $hConn AS NEW Connection > ..... > > Many thanks > > Pino You must open your connection before showing the form having the DataSource. And in Gambas 3, you can specify explicitely a DataSource Connection object. Regards, -- Beno?t From demosthenesk at ...626... Sun Sep 6 15:12:31 2009 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Sun, 6 Sep 2009 16:12:31 +0300 Subject: [Gambas-user] Compiling Gambas 2 on recent Ubuntu systems (and maybe others) In-Reply-To: <1251666718.6407.13.camel@...40...> References: <200908301836.27088.gambas@...1...> <1251666718.6407.13.camel@...40...> Message-ID: What a surprise! i came back from my summer vacation and i installed rev 2316 on Ubuntu 9.04. It works! Thanks a lot. I think this fix had to be a long time ago cause ubuntu gambas was 2.8! On Mon, Aug 31, 2009 at 12:11 AM, Charlie Reinl wrote: > Am Sonntag, den 30.08.2009, 18:36 +0200 schrieb Beno?t Minisini: >> Hi, >> >> I backported from Gambas 3 the fixes that made it compile on Ubuntu 9.04. >> >> Can those who had problems with compiling Gambas 2 try the revision #2287 and >> tell me if things go better? >> >> Thanks in advance! >> > > Salut Benoit, > > after making a backup, Updated to 2285 and remade a backup, I compiled > gambas2 rev 2287 in a new dir. > > And what a surprise it works on my Ubuntu 8.04.3 LTS , > ltmain.sh (GNU libtool) 1.5.26 Debian 1.5.26-1ubuntu1 (1.1220.2.493 > 2008/02/01 16:58:18) > > > > > -- > Amicalment > Charlie > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From jussi.lahtinen at ...626... Sun Sep 6 15:26:35 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sun, 6 Sep 2009 16:26:35 +0300 Subject: [Gambas-user] Qt4 and Scaled property In-Reply-To: <384d3900909051606q4f39c832i3c092bede9e7bedc@...627...> References: <384d3900909041633s3a676f40s9fe6730569f13c48@...627...> <384d3900909050641mfa47fdfof9c9232a87fb479f@...627...> <384d3900909050657n145c19e7h18554e25ffceb132@...627...> <200909051612.54498.gambas@...1...> <384d3900909050746y7bbde335v46a9e38aa037c6a8@...627...> <384d3900909051606q4f39c832i3c092bede9e7bedc@...627...> Message-ID: <384d3900909060626w57f301c2j31cb490311d0239f@...627...> Hi again! I have done some testing. There is some problems with Gambas3 revision 2310 on Ubuntu 9.04 64bit. My default font size for applications and desktop is 10. Gambas tells that desktop.scale is 7 and application.font.size is 10. When I change those font sizes to 8, Gambas gives desktop.scale 6 and application.font.size 8. But it doesn't have effect on forms size! I can even change font sizes so small I can't even read them, still forms size are same. Form property Scaled is true. Jussi On Sun, Sep 6, 2009 at 02:06, Jussi Lahtinen wrote: > If I import Gambas2 project to Gambas3, form sizes are what is expected. > So the problem is only with projects started (or converted long time > ago) with old revision of Gambas3. > I wish there are easy fix for that! > > Also I noticed bug from Gambas3 revision 2310 (or something with my system). > If you change editor font (with me default was "-1 monospace") to "monospace". > Cursor (text cursor, not mouse) in console doesn't keep up with text. > Meaning, when I type "1234" to console, cursor blinks over "4", not after it. > And it gets even worst when you keep on typing text. > Strangely when I change font size to 10, console works as expected. > I assume that "-1 monospace" is relative size and size 9 absolute size..? > > Jussi > > > On Sat, Sep 5, 2009 at 17:46, Jussi Lahtinen wrote: >>> Please give the value of Desktop.Scale and Application.Font.Size in the Qt3 >>> version of your project, and in the Qt4 version. >> >> Argh... I mixed up things. I thought that Qt3 is automatically changed >> to Qt4 with new revision. >> That's why I didn't update Gambas3 revision earlier. >> >> But OK, so the real problem is that I updated Gambas3, and now my >> forms got bigger (still with Qt3). >> In fact I think they all get bigger, but it's problem just with couple of forms >> (don't fit to screen or dimensions are skewed related to graphics). >> My earlier Gambas3 revision was OLD, I don't remember what it was... >> >> >> Jussi >> > From gambas at ...1... Sun Sep 6 17:21:05 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 6 Sep 2009 17:21:05 +0200 Subject: [Gambas-user] Qt4 and Scaled property In-Reply-To: <384d3900909060626w57f301c2j31cb490311d0239f@...627...> References: <384d3900909041633s3a676f40s9fe6730569f13c48@...627...> <384d3900909051606q4f39c832i3c092bede9e7bedc@...627...> <384d3900909060626w57f301c2j31cb490311d0239f@...627...> Message-ID: <200909061721.06024.gambas@...1...> > Hi again! > I have done some testing. > There is some problems with Gambas3 revision 2310 on Ubuntu 9.04 64bit. > My default font size for applications and desktop is 10. > Gambas tells that desktop.scale is 7 and application.font.size is 10. > When I change those font sizes to 8, Gambas gives desktop.scale 6 > and application.font.size 8. > But it doesn't have effect on forms size! > I can even change font sizes so small I can't even read them, still > forms size are same. > Form property Scaled is true. > > Jussi > It works as expected there. Beware that Desktop.Scale is taken into account when creating the form. Once the form is created, changing Desktop.Scale has no effect. -- Beno?t From jussi.lahtinen at ...626... Sun Sep 6 20:58:36 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sun, 6 Sep 2009 21:58:36 +0300 Subject: [Gambas-user] Minor graphical bug in Gambas3 revision 2310. Message-ID: <384d3900909061158w4f8ebda3u56013ff7cce330be@...627...> Hi! Balloon popup is little buggy (sometimes). Screenshot tells it all. @Ubuntu 9.04 64bit. Jussi -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot.png Type: image/png Size: 9597 bytes Desc: not available URL: From gambas at ...1... Sun Sep 6 21:12:43 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 6 Sep 2009 21:12:43 +0200 Subject: [Gambas-user] Minor graphical bug in Gambas3 revision 2310. In-Reply-To: <384d3900909061158w4f8ebda3u56013ff7cce330be@...627...> References: <384d3900909061158w4f8ebda3u56013ff7cce330be@...627...> Message-ID: <200909062112.43662.gambas@...1...> > Hi! > Balloon popup is little buggy (sometimes). > Screenshot tells it all. > > @Ubuntu 9.04 64bit. > > Jussi > Upgrade to the latest revision. Regards, -- Beno?t From Karl.Reinl at ...9... Sun Sep 6 22:33:57 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Sun, 06 Sep 2009 22:33:57 +0200 Subject: [Gambas-user] ReturnValue Message-ID: <1252269238.6409.47.camel@...40...> Salut, how can I have a returned Value from a gambas-program? Something like a Filename. I mean a can a gambas-program which closes returns a value. -- Charlie From dosida at ...626... Mon Sep 7 00:10:33 2009 From: dosida at ...626... (Dimitris Anogiatis) Date: Sun, 6 Sep 2009 16:10:33 -0600 Subject: [Gambas-user] ReturnValue In-Reply-To: <1252269238.6409.47.camel@...40...> References: <1252269238.6409.47.camel@...40...> Message-ID: <82bffccf0909061510s7896962ev565d879ae546acf0@...627...> hey charlie, Are you talking about return values on a console-type? I think all you have to do is use Print. It will also work on a gui-program if you run it through a terminal. I hope it helps (unless I missed something) Regards, Dimitris On Sun, Sep 6, 2009 at 2:33 PM, Charlie Reinl wrote: > Salut, > > how can I have a returned Value from a gambas-program? > Something like a Filename. > > I mean a can a gambas-program which closes returns a value. > > -- > Charlie > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From Karl.Reinl at ...9... Mon Sep 7 10:19:40 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Mon, 07 Sep 2009 10:19:40 +0200 Subject: [Gambas-user] ReturnValue In-Reply-To: <82bffccf0909061510s7896962ev565d879ae546acf0@...627...> References: <1252269238.6409.47.camel@...40...> <82bffccf0909061510s7896962ev565d879ae546acf0@...627...> Message-ID: <1252311580.6442.24.camel@...40...> Am Sonntag, den 06.09.2009, 16:10 -0600 schrieb Dimitris Anogiatis: > hey charlie, > > Are you talking about return values on a console-type? > I think all you have to do is use Print. > > It will also work on a gui-program if you run it through a terminal. > > I hope it helps (unless I missed something) > > Regards, > Dimitris > > On Sun, Sep 6, 2009 at 2:33 PM, Charlie Reinl wrote: > > > Salut, > > > > how can I have a returned Value from a gambas-program? > > Something like a Filename. > > > > I mean a can a gambas-program which closes returns a value. > > > > -- > > Charlie > > Salut Dimitris, yes I talk about gui-program. I tried a simple RETURN , but gambas2 had no idea to handle that. I asked for that, because I need a management for a program which stores his results in files on the disk. First I thouoght to call it with exec, so I can pass the File as argument, but I had no return if changes where made or the file saved under new name, or wich name if it is a new one. Now I will try to use the program as a component, I embed it into a form of the new management part, I can't pass the file as argu, but between NEW and Open I can pass the files name. So I will do for the return. Thanks anyway Charlie From lordheavym at ...626... Mon Sep 7 11:13:21 2009 From: lordheavym at ...626... (Laurent Carlier) Date: Mon, 7 Sep 2009 11:13:21 +0200 Subject: [Gambas-user] ReturnValue In-Reply-To: <1252311580.6442.24.camel@...40...> References: <1252269238.6409.47.camel@...40...> <82bffccf0909061510s7896962ev565d879ae546acf0@...627...> <1252311580.6442.24.camel@...40...> Message-ID: <200909071113.21262.lordheavym@...626...> Le lundi 07 septembre 2009 10:19:40 Charlie Reinl, vous avez ?crit : > Am Sonntag, den 06.09.2009, 16:10 -0600 schrieb Dimitris Anogiatis: > > hey charlie, > > > > Are you talking about return values on a console-type? > > I think all you have to do is use Print. > > > > It will also work on a gui-program if you run it through a terminal. > > > > I hope it helps (unless I missed something) > > > > Regards, > > Dimitris > > > > On Sun, Sep 6, 2009 at 2:33 PM, Charlie Reinl wrote: > > > Salut, > > > > > > how can I have a returned Value from a gambas-program? > > > Something like a Filename. > > > > > > I mean a can a gambas-program which closes returns a value. > > > > > > -- > > > Charlie > > Salut Dimitris, > > yes I talk about gui-program. > I tried a simple RETURN , but gambas2 had no idea to handle > that. > > I asked for that, because I need a management for a program which stores > his results in files on the disk. > > First I thouoght to call it with exec, so I can pass the File as > argument, but I had no return if changes where made or the file saved > under new name, or wich name if it is a new one. > > Now I will try to use the program as a component, I embed it into a form > of the new management part, I can't pass the file as argu, but between > NEW and Open I can pass the files name. > So I will do for the return. > > Thanks anyway > Charlie > http://64.128.110.55/help/comp/gb/application/return Application.Return = 1 ++ From bleketux at ...626... Mon Sep 7 11:26:20 2009 From: bleketux at ...626... (MSulchan Darmawan) Date: Mon, 7 Sep 2009 16:26:20 +0700 Subject: [Gambas-user] too many operands Message-ID: <20090907162620.4b507875@...2286...> Dear all, Any suggestion to simplify this code ? I had "Expression too complex, too many operands" warning :D I have 36 fields data to insert. sSql = "INSERT INTO refpos (id, idpos, year, month, day, " & "r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, " & "r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, " & "r21, r22, r23, r24, r25, r26, r27, r28, r29, r30, r31" & ") VALUES " & "('" & hRes!iddata & "', '" & hRes!idpos & "', '" & hRes!yr & "', '" & hRes!mn & "', '" & hRes!dt & "', '" & hRes!r1 & "', '" & hRes!r2 & "', '" & hRes!r3 & "', '" & hRes!r4 & "', '" & hRes!r5 & "', '" & hRes!r6 & "', '" & hRes!r7 & "', '" & hRes!r8 & "', '" & hRes!r9 & "', '" & hRes!r10 & "', '" & hRes!r11 & "', '" & hRes!r12 & "', '" & hRes!r13 & "', '" & hRes!r14 & "', '" & hRes!r15 & "', '" & hRes!r16 & "', '" & hRes!r17 & "', '" & hRes!r18 & "', '" & hRes!r19 & "', '" & hRes!r20 & "', '" & hRes!r21 & "', '" & hRes!r22 & "', '" & hRes!r23 & "', '" & hRes!r24 & "', '" & hRes!r25 & "', '" & hRes!r26 & "', '" & hRes!r27 & "', '" & hRes!r28 & "', '" & hRes!r29 & "', '" & hRes!r30 & "', '" & hRes!r31 & "')" Thanks for your valuable suggest, -- Cheers, [-Sulchan-] -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From dosida at ...626... Mon Sep 7 11:41:35 2009 From: dosida at ...626... (Dimitris Anogiatis) Date: Mon, 7 Sep 2009 03:41:35 -0600 Subject: [Gambas-user] too many operands In-Reply-To: <20090907162620.4b507875@...2286...> References: <20090907162620.4b507875@...2286...> Message-ID: <82bffccf0909070241r5b82ea44ud4ba1d8d53f32468@...627...> MSulchan, Where is this coming from? Gambas or mysql? can you try and do this insert in mysql in a terminal window? if mysql doesn't return an error and accepts the insert command then you might want to break the sql string like this sSql = "INSERT INTO refPos(id,idpos,year,month,day, " sSql &= "r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, " sSql &= "r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, " sSql &= "r21, r22, r23, r24, r25, r26, r27, r28, r29, r30, r31" sSql &= ") VALUES " sSql &= "('" & hRes!iddata & "', '" & hRes!idpos & "', '" & hRes!yr & "', '" & hRes!mn & "', '" & hRes!dt & "', '" sSql &= hRes!r1 & "', '" & hRes!r2 & "', '" & hRes!r3 & "', '" & hRes!r4 & "', '" & hRes!r5 & "', '" & hRes!r6 & "', '" & hRes!r7 & "', '" sSql &= hRes!r8 & "', '" & hRes!r9 & "', '" & hRes!r10 & "', '" sSql &= hRes!r11 & "', '" & hRes!r12 & "', '" & hRes!r13 & "', '" & hRes!r14 & "', '" & hRes!r15 & "', '" & hRes!r16 & "', '" & hRes!r17 sSql &= "', '" & hRes!r18 & "', '" & hRes!r19 & "', '" & hRes!r20 & "', '" sSql &= hRes!r21 & "', '" & hRes!r22 & "', '" & hRes!r23 & "', '" & hRes!r24 & "', '" & hRes!r25 & "', '" & hRes!r26 & "', '" & hRes!r27 sSql &= "', '" & hRes!r28 & "', '" & hRes!r29 & "', '" & hRes!r30 & "', '" & hRes!r31 & "')" I hope this helps Keep up the good work Regards, Dimitris 2009/9/7 MSulchan Darmawan > Dear all, > > Any suggestion to simplify this code ? I had "Expression too complex, > too many operands" warning :D > I have 36 fields data to insert. > > sSql = "INSERT INTO refpos (id, idpos, year, month, day, " & > "r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, " & > "r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, " & > "r21, r22, r23, r24, r25, r26, r27, r28, r29, r30, r31" & > ") VALUES " & > "('" & hRes!iddata & "', '" & hRes!idpos & "', '" & hRes!yr & "', > '" & hRes!mn & "', '" & hRes!dt & "', '" & > hRes!r1 & "', '" & hRes!r2 & "', '" & hRes!r3 & "', '" & hRes!r4 > & "', '" & hRes!r5 & "', '" & hRes!r6 & "', '" & hRes!r7 & "', '" & hRes!r8 > & "', '" & hRes!r9 & "', '" & hRes!r10 & "', '" & > hRes!r11 & "', '" & hRes!r12 & "', '" & hRes!r13 & "', '" & > hRes!r14 & "', '" & hRes!r15 & "', '" & hRes!r16 & "', '" & hRes!r17 & "', > '" & hRes!r18 & "', '" & hRes!r19 & "', '" & hRes!r20 & "', '" & > hRes!r21 & "', '" & hRes!r22 & "', '" & hRes!r23 & "', '" & > hRes!r24 & "', '" & hRes!r25 & "', '" & hRes!r26 & "', '" & hRes!r27 & "', > '" & hRes!r28 & "', '" & hRes!r29 & "', '" & hRes!r30 & "', '" & hRes!r31 & > "')" > > Thanks for your valuable suggest, > > -- > Cheers, > [-Sulchan-] > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From dosida at ...626... Mon Sep 7 11:44:48 2009 From: dosida at ...626... (Dimitris Anogiatis) Date: Mon, 7 Sep 2009 03:44:48 -0600 Subject: [Gambas-user] ReturnValue In-Reply-To: <200909071113.21262.lordheavym@...626...> References: <1252269238.6409.47.camel@...40...> <82bffccf0909061510s7896962ev565d879ae546acf0@...627...> <1252311580.6442.24.camel@...40...> <200909071113.21262.lordheavym@...626...> Message-ID: <82bffccf0909070244r738ac684y8c8b81ef5b47fe6a@...627...> Laurent, How can someone detect the return value from an application that's terminating, (either in gambas or bash) Thank you in advance Regards, Dimitris On Mon, Sep 7, 2009 at 3:13 AM, Laurent Carlier wrote: > Le lundi 07 septembre 2009 10:19:40 Charlie Reinl, vous avez ?crit : > > Am Sonntag, den 06.09.2009, 16:10 -0600 schrieb Dimitris Anogiatis: > > > hey charlie, > > > > > > Are you talking about return values on a console-type? > > > I think all you have to do is use Print. > > > > > > It will also work on a gui-program if you run it through a terminal. > > > > > > I hope it helps (unless I missed something) > > > > > > Regards, > > > Dimitris > > > > > > On Sun, Sep 6, 2009 at 2:33 PM, Charlie Reinl > wrote: > > > > Salut, > > > > > > > > how can I have a returned Value from a gambas-program? > > > > Something like a Filename. > > > > > > > > I mean a can a gambas-program which closes returns a value. > > > > > > > > -- > > > > Charlie > > > > Salut Dimitris, > > > > yes I talk about gui-program. > > I tried a simple RETURN , but gambas2 had no idea to handle > > that. > > > > I asked for that, because I need a management for a program which stores > > his results in files on the disk. > > > > First I thouoght to call it with exec, so I can pass the File as > > argument, but I had no return if changes where made or the file saved > > under new name, or wich name if it is a new one. > > > > Now I will try to use the program as a component, I embed it into a form > > of the new management part, I can't pass the file as argu, but between > > NEW and Open I can pass the files name. > > So I will do for the return. > > > > Thanks anyway > > Charlie > > > > http://64.128.110.55/help/comp/gb/application/return > > Application.Return = 1 > > ++ > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From bleketux at ...626... Mon Sep 7 11:54:01 2009 From: bleketux at ...626... (MSulchan Darmawan) Date: Mon, 7 Sep 2009 16:54:01 +0700 Subject: [Gambas-user] too many operands In-Reply-To: <82bffccf0909070241r5b82ea44ud4ba1d8d53f32468@...627...> References: <20090907162620.4b507875@...2286...> <82bffccf0909070241r5b82ea44ud4ba1d8d53f32468@...627...> Message-ID: <20090907165401.7355196f@...2286...> Pada Mon, 7 Sep 2009 03:41:35 -0600 Dimitris Anogiatis menulis: > Where is this coming from? Gambas or mysql? Gambas. > if mysql doesn't return an error and accepts the insert command then > you might want to break the sql string like this Thanks Dimitris, it work ! Well, at least it pass the F5. I didn't know how to break a long string into several lines before, so I use visualbasic style :D Thanks... -- Cheers, [-Sulchan-] Terbang dengan claws-mail 3.7.2 Mendarat di hardy heron 8.04.3 LTS -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From dosida at ...626... Mon Sep 7 11:59:10 2009 From: dosida at ...626... (Dimitris Anogiatis) Date: Mon, 7 Sep 2009 03:59:10 -0600 Subject: [Gambas-user] too many operands In-Reply-To: <20090907165401.7355196f@...2286...> References: <20090907162620.4b507875@...2286...> <82bffccf0909070241r5b82ea44ud4ba1d8d53f32468@...627...> <20090907165401.7355196f@...2286...> Message-ID: <82bffccf0909070259y775f0b71lef4df44a060633f0@...627...> I'm glad it worked MSulchan, That's why I love gambas cause it makes things so much easier :) even more than VB6 ever would :) Keep up the good work Regards, Dimitris On Mon, Sep 7, 2009 at 3:54 AM, MSulchan Darmawan wrote: > Pada Mon, 7 Sep 2009 03:41:35 -0600 > Dimitris Anogiatis menulis: > > > Where is this coming from? Gambas or mysql? > > Gambas. > > > if mysql doesn't return an error and accepts the insert command then > > you might want to break the sql string like this > > Thanks Dimitris, it work ! Well, at least it pass the F5. > I didn't know how to break a long string into several lines before, so I > use visualbasic style :D > > Thanks... > -- > Cheers, > [-Sulchan-] > Terbang dengan claws-mail 3.7.2 > Mendarat di hardy heron 8.04.3 LTS > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From demosthenesk at ...626... Mon Sep 7 12:17:42 2009 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Mon, 7 Sep 2009 13:17:42 +0300 Subject: [Gambas-user] How to get listbox selection? Message-ID: Hi to all, how can we get the selection of a multiple mode listbox? return an array of selected items or something? -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From dosida at ...626... Mon Sep 7 12:31:36 2009 From: dosida at ...626... (Dimitris Anogiatis) Date: Mon, 7 Sep 2009 04:31:36 -0600 Subject: [Gambas-user] How to get listbox selection? In-Reply-To: References: Message-ID: <82bffccf0909070331y6ff1149ev8db05d66ad221c19@...627...> Demostheni, An katalava kala thes na vlepeis oles tis epiloges pou exeis kanei sto listbox se multiple mode, etsi? Exo ftiaxei mia synartisi pou kanei akrivos afto to pragma. '-------------------------------------------------------------------------------------------------------- PUBLIC FUNCTION multipleSelections(targetLB AS ListBox) AS String DIM targetCount AS Integer DIM foundSelected AS Integer DIM Res AS String targetCount = 0 foundSelected = 0 DO WHILE targetCount < targetLB.Count IF targetLB[targetCount].selected = TRUE THEN Res &= targetLB[targetCount].Text & "|" INC foundSelected ENDIF INC targetCount LOOP IF foundSelected = 0 THEN RETURN "Nothing found" ELSE RETURN Left(Res, Len(Res) - 1) ENDIF END '-------------------------------------------------------------------------------------------------------- gia na tin xrisimopoihseis tin kaleis me to parakato styl tmpStr = multipleSelections(myListbox) kai tha sou vgalei san apotelesma to exeis "Item1|Item3|item5" Pou einai ta onomata twn stoixeiwn pou dialexes sto listbox. an xreiazesai to index tou kathe stoixeiou prepei na kaneis allages stin synartisi. Elpizo na voithisa, kai oti allo xreiazetai pes mou. Regards, Dimitris 2009/9/7 Demosthenes Koptsis > Hi to all, > > how can we get the selection of a multiple mode listbox? > > return an array of selected items or something? > > -- > > ???? ???? ?? ?????!!! > > Regards, > > Demosthenes Koptsis > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From tomascostarivas at ...626... Mon Sep 7 12:51:42 2009 From: tomascostarivas at ...626... (Tomas Costa rivas) Date: Mon, 7 Sep 2009 12:51:42 +0200 Subject: [Gambas-user] tableview edit Message-ID: <94a144920909070351l410e4e5ev6003f2ea95b15541@...627...> I have a problem in a tableview I try to edit a cell in a tableview as a comboview. I write: Public sub mitabla_change() DIM xArray AS NEW String[3] xArray = ["prueba1", "prueba2", "prueba3"] IF mitabla.Column = 0 THEN subventas.Edit(xArray, TRUE) ' here is the problem ENDIF END I get a error ("Null object"), but xArray is not null. Does anyone help me?, Where is the problem? From doriano.blengino at ...1909... Mon Sep 7 13:11:56 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Mon, 07 Sep 2009 13:11:56 +0200 Subject: [Gambas-user] too many operands In-Reply-To: <20090907162620.4b507875@...2286...> References: <20090907162620.4b507875@...2286...> Message-ID: <4AA4EA7C.7080503@...1909...> MSulchan Darmawan ha scritto: > Dear all, > > Any suggestion to simplify this code ? I had "Expression too complex, > too many operands" warning :D > I have 36 fields data to insert. > > sSql = "INSERT INTO refpos (id, idpos, year, month, day, " & > "r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, " & > "r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, " & > "r21, r22, r23, r24, r25, r26, r27, r28, r29, r30, r31" & > ") VALUES " & > "('" & hRes!iddata & "', '" & hRes!idpos & "', '" & hRes!yr & "', '" & hRes!mn & "', '" & hRes!dt & "', '" & > hRes!r1 & "', '" & hRes!r2 & "', '" & hRes!r3 & "', '" & hRes!r4 & "', '" & hRes!r5 & "', '" & hRes!r6 & "', '" & hRes!r7 & "', '" & hRes!r8 & "', '" & hRes!r9 & "', '" & hRes!r10 & "', '" & > hRes!r11 & "', '" & hRes!r12 & "', '" & hRes!r13 & "', '" & hRes!r14 & "', '" & hRes!r15 & "', '" & hRes!r16 & "', '" & hRes!r17 & "', '" & hRes!r18 & "', '" & hRes!r19 & "', '" & hRes!r20 & "', '" & > hRes!r21 & "', '" & hRes!r22 & "', '" & hRes!r23 & "', '" & hRes!r24 & "', '" & hRes!r25 & "', '" & hRes!r26 & "', '" & hRes!r27 & "', '" & hRes!r28 & "', '" & hRes!r29 & "', '" & hRes!r30 & "', '" & hRes!r31 & > "')" > I think the most correct way to do this is something like this (don't mind the field names - they are from my program): res = db.Create("refpos") ' append record in table named refpos res!datain = edData.Text ' set field by field res!tcaus = 2 res!cer = st IF ckEsente.Value = TRUE THEN ' you can do calculations in between res!statofisico = 1 ELSE res!statofisico = 0 ENDIF res!clifor = edConf.Text res!qtaton = utils.formatted2float(tvRighi[i, 3].text) ' qta res.Update ' ^^^^^ don't forget to update... Regards, Doriano From doriano.blengino at ...1909... Mon Sep 7 13:19:32 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Mon, 07 Sep 2009 13:19:32 +0200 Subject: [Gambas-user] too many operands In-Reply-To: <20090907162620.4b507875@...2286...> References: <20090907162620.4b507875@...2286...> Message-ID: <4AA4EC44.8050505@...1909...> MSulchan Darmawan ha scritto: > Dear all, > > Any suggestion to simplify this code ? I had "Expression too complex, > too many operands" warning :D > I have 36 fields data to insert. > > sSql = "INSERT INTO refpos (id, idpos, year, month, day, " & > "r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, " & > "r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, " & > "r21, r22, r23, r24, r25, r26, r27, r28, r29, r30, r31" & > ") VALUES " & > "('" & hRes!iddata & "', '" & hRes!idpos & "', '" & hRes!yr & "', '" & hRes!mn & "', '" & hRes!dt & "', '" & > hRes!r1 & "', '" & hRes!r2 & "', '" & hRes!r3 & "', '" & hRes!r4 & "', '" & hRes!r5 & "', '" & hRes!r6 & "', '" & hRes!r7 & "', '" & hRes!r8 & "', '" & hRes!r9 & "', '" & hRes!r10 & "', '" & > hRes!r11 & "', '" & hRes!r12 & "', '" & hRes!r13 & "', '" & hRes!r14 & "', '" & hRes!r15 & "', '" & hRes!r16 & "', '" & hRes!r17 & "', '" & hRes!r18 & "', '" & hRes!r19 & "', '" & hRes!r20 & "', '" & > hRes!r21 & "', '" & hRes!r22 & "', '" & hRes!r23 & "', '" & hRes!r24 & "', '" & hRes!r25 & "', '" & hRes!r26 & "', '" & hRes!r27 & "', '" & hRes!r28 & "', '" & hRes!r29 & "', '" & hRes!r30 & "', '" & hRes!r31 & > "')" > ...forgot an important thing: res = db.Create("refpos") ' append record in table named refpos for i = 1 to 31 res["Res" & i] = ... next I don't understand if you want to duplicate a record or whatever, but you can use two different Result (or hResult); anyway, writing things that way ("insert into ...") is a pain: you write a lot, you easily loose connection between field names and field values, and to mantain such code is a pain... :-) Regards, Doriano From doriano.blengino at ...1909... Mon Sep 7 13:28:32 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Mon, 07 Sep 2009 13:28:32 +0200 Subject: [Gambas-user] ReturnValue In-Reply-To: <82bffccf0909070244r738ac684y8c8b81ef5b47fe6a@...627...> References: <1252269238.6409.47.camel@...40...> <82bffccf0909061510s7896962ev565d879ae546acf0@...627...> <1252311580.6442.24.camel@...40...> <200909071113.21262.lordheavym@...626...> <82bffccf0909070244r738ac684y8c8b81ef5b47fe6a@...627...> Message-ID: <4AA4EE60.6040004@...1909...> Dimitris Anogiatis ha scritto: > Laurent, > > How can someone detect the return value from an application that's > terminating, > (either in gambas or bash) > It depends on what we are talking about. Under Unix (and Dos, and winslow) any program can return an integer value. The process sets the value, and the parent process retrieves it. In gambas you set the value with Application.Return = xxx ' <- integer value if Charlie is not wrong. You can test the exit code with "$?" in bash, and hProcess.Value in gambas. But in this thread I saw you talked about file names; you can't return other data than a simple integer; if you need to return a string, or something else, you must find another way. The most easy one is to write to standard output or standard error, and read that stream from the parent process. Then one can also use some well-known file in /tmp (say, /tmp/my-program-data.tmp). There other methods too, but more complicated. Regards, Doriano > Thank you in advance > > Regards, > Dimitris > > On Mon, Sep 7, 2009 at 3:13 AM, Laurent Carlier wrote: > > >> Le lundi 07 septembre 2009 10:19:40 Charlie Reinl, vous avez ?crit : >> >>> Am Sonntag, den 06.09.2009, 16:10 -0600 schrieb Dimitris Anogiatis: >>> >>>> hey charlie, >>>> >>>> Are you talking about return values on a console-type? >>>> I think all you have to do is use Print. >>>> >>>> It will also work on a gui-program if you run it through a terminal. >>>> >>>> I hope it helps (unless I missed something) >>>> >>>> Regards, >>>> Dimitris >>>> >>>> On Sun, Sep 6, 2009 at 2:33 PM, Charlie Reinl >>>> >> wrote: >> >>>>> Salut, >>>>> >>>>> how can I have a returned Value from a gambas-program? >>>>> Something like a Filename. >>>>> >>>>> I mean a can a gambas-program which closes returns a value. >>>>> >>>>> -- >>>>> Charlie >>>>> >>> Salut Dimitris, >>> >>> yes I talk about gui-program. >>> I tried a simple RETURN , but gambas2 had no idea to handle >>> that. >>> >>> I asked for that, because I need a management for a program which stores >>> his results in files on the disk. >>> >>> First I thouoght to call it with exec, so I can pass the File as >>> argument, but I had no return if changes where made or the file saved >>> under new name, or wich name if it is a new one. >>> >>> Now I will try to use the program as a component, I embed it into a form >>> of the new management part, I can't pass the file as argu, but between >>> NEW and Open I can pass the files name. >>> So I will do for the return. >>> >>> Thanks anyway >>> Charlie >>> >>> >> http://64.128.110.55/help/comp/gb/application/return >> >> Application.Return = 1 >> >> ++ >> >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> trial. Simplify your report design, integration and deployment - and focus >> on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From pinozollo at ...626... Mon Sep 7 14:41:05 2009 From: pinozollo at ...626... (Pino Zollo) Date: Mon, 7 Sep 2009 08:41:05 -0400 Subject: [Gambas-user] Balloon Message-ID: <200909070841.05680.pinozollo@...626...> Hi! >Balloon popup is little buggy (sometimes). >Screenshot tells it all. For me (Gambas 2.15) the delay is not actuated: Balloon.Delay = 20000 shows for a small second.... Pino -- Key ID: 0xF6768208 Key fingerprint = B16D 0A7C 5B29 A334 CE6A 71F6 EAF8 3D88 F676 8208 Key server: hkp://wwwkeys.eu.pgp.net From pinozollo at ...626... Mon Sep 7 14:42:17 2009 From: pinozollo at ...626... (Pino Zollo) Date: Mon, 7 Sep 2009 08:42:17 -0400 Subject: [Gambas-user] Fwd: Re: Help DataSource, DataBrowse Message-ID: <200909070842.18078.pinozollo@...626...> ---------- Messaggio inoltrato ---------- Subject: Re: [Gambas-user] Help DataSource, DataBrowse Date: 11:16, domenica 6 settembre 2009 From: Pino Zollo To: Beno?t Minisini Alle 08:21, domenica 6 settembre 2009, hai scritto: > > Hi , > > Please an help....I am practising with DataSorce using into my project > > the same form and class of the "database" example: in particular > > Ftest.class and Ftest.form. > > > > In my project I get the error: > > > > Null Object DataSource.MoveFirst.173 > > > > I guess that DataSource can not find my Connection to the database ... > > > > How can I tell to DataSource which is the Connection to use ? > > Is there a property of DataSource to set ? > > > > I make the connection in Mglobal.module with the following code: > > ----- > > PUBLIC FUNCTION conn(dbtype AS String, host AS String, lgn AS String, > > pass AS String) AS Boolean > > > > TRY $hConn.close > > $hConn.Type = dbtype ' "postgresql" > > $hConn.Host = host > > $hConn.Login = lgn > > $hConn.Password = pass > > $hConn.Open > > RETURN TRUE > > CATCH > > Message.error("conn", Error.Where & "\n" & Error.text) > > RETURN FALSE > > END > > ------- > > Where > > PUBLIC $hConn AS NEW Connection > > ..... > > > > Many thanks > > > > Pino > > You must open your connection before showing the form having the > DataSource. Thanks Beno?t, but the connection is already opened when I show the form so the problem must be elsewhere. > And in Gambas 3, you can specify explicitely a DataSource Connection > object. Good ! looking forward for the official release of Gambas 3. Any chance to have it also on GAMBAS 2 ? A bien tot Pino -- Key ID: 0xF6768208 Key fingerprint = B16D 0A7C 5B29 A334 CE6A 71F6 EAF8 3D88 F676 8208 Key server: hkp://wwwkeys.eu.pgp.net ------------------------------------------------------- -- Key ID: 0xF6768208 Key fingerprint = B16D 0A7C 5B29 A334 CE6A 71F6 EAF8 3D88 F676 8208 Key server: hkp://wwwkeys.eu.pgp.net From ron at ...1740... Mon Sep 7 15:08:11 2009 From: ron at ...1740... (Ron) Date: Mon, 07 Sep 2009 15:08:11 +0200 Subject: [Gambas-user] Array decalarion Message-ID: <4AA505BB.8040903@...1740...> Hi, Why is method 1 of defining an array not allowed? Method 2 is the only one working, but looks clumsy when you have a lot of bytes. 1) DIM b AS Byte[] = [&HF0, &H30, &HF0, &H30] The error is "Type mismatch: wanted Byte[], got Integer[] instead" 2) DIM b AS Byte[4] b[0] = &HF0 b[1] = &H30 b[2] = &HF0 b[3] = &H30 Gambas 2.16.0 Regards, Ron_2nd. From gambas at ...1... Mon Sep 7 16:19:13 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 7 Sep 2009 16:19:13 +0200 Subject: [Gambas-user] tableview edit In-Reply-To: <94a144920909070351l410e4e5ev6003f2ea95b15541@...627...> References: <94a144920909070351l410e4e5ev6003f2ea95b15541@...627...> Message-ID: <200909071619.13974.gambas@...1...> > I have a problem in a tableview > > I try to edit a cell in a tableview as a comboview. > I write: > > Public sub mitabla_change() > DIM xArray AS NEW String[3] As you assign xArray a new array, you don't have to initialize it with a void one. Just do: DIM xArray AS String[] > xArray = ["prueba1", "prueba2", "prueba3"] > IF mitabla.Column = 0 THEN > subventas.Edit(xArray, TRUE) ' here is the problem > ENDIF > END > I get a error ("Null object"), but xArray is not null. > Does anyone help me?, Where is the problem? > Can you give the full error message? -- Beno?t From gambas at ...1... Mon Sep 7 16:28:01 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 7 Sep 2009 16:28:01 +0200 Subject: [Gambas-user] Array decalarion In-Reply-To: <4AA505BB.8040903@...1740...> References: <4AA505BB.8040903@...1740...> Message-ID: <200909071628.01670.gambas@...1...> > Hi, > > Why is method 1 of defining an array not allowed? > Method 2 is the only one working, but looks clumsy when you have a lot > of bytes. > > 1) > DIM b AS Byte[] = [&HF0, &H30, &HF0, &H30] > > The error is "Type mismatch: wanted Byte[], got Integer[] instead" > &HF0 is not a Byte, it is an Integer. You must do: DIM b AS Byte[] = [CByte(&HF0), &H30, &HF0, &H30] The type of the array created by the [ ... ] function is the type of the first element. -- Beno?t From ron at ...1740... Mon Sep 7 16:48:14 2009 From: ron at ...1740... (Ron) Date: Mon, 07 Sep 2009 16:48:14 +0200 Subject: [Gambas-user] Array decalarion In-Reply-To: <200909071628.01670.gambas@...1...> References: <4AA505BB.8040903@...1740...> <200909071628.01670.gambas@...1...> Message-ID: <4AA51D2E.7040509@...1740...> Beno?t Minisini wrote: >> Hi, >> >> Why is method 1 of defining an array not allowed? >> Method 2 is the only one working, but looks clumsy when you have a lot >> of bytes. >> >> 1) >> DIM b AS Byte[] = [&HF0, &H30, &HF0, &H30] >> >> The error is "Type mismatch: wanted Byte[], got Integer[] instead" >> >> > > &HF0 is not a Byte, it is an Integer. You must do: > > DIM b AS Byte[] = [CByte(&HF0), &H30, &HF0, &H30] > > The type of the array created by the [ ... ] function is the type of the first > element. > > That syntax gives the following.... Type mismatch: wanted Byte[], got Variant[] Only this seems to work... DIM b AS Byte[] = [CByte(&HF0), CByte(&H30), CByte(&HF0), CByte(&H30)] But that even more code, than method 2. [OperatingSystem] OperatingSystem=Linux KernelRelease=2.6.28-15-generic CPUArchitecture=x86_64 DistributionVendor=ubuntu DistributionRelease="Ubuntu 9.04" [Gambas] Gambas1=Not Installed Gambas2=2.16.0 Gambas2Path=/usr/local/bin/gbx2 Gambas3=Not Installed Regards, Ron_2nd. From gambas at ...1... Mon Sep 7 17:04:27 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 7 Sep 2009 17:04:27 +0200 Subject: [Gambas-user] Array decalarion In-Reply-To: <4AA51D2E.7040509@...1740...> References: <4AA505BB.8040903@...1740...> <200909071628.01670.gambas@...1...> <4AA51D2E.7040509@...1740...> Message-ID: <200909071704.27471.gambas@...1...> > Beno?t Minisini wrote: > >> Hi, > >> > >> Why is method 1 of defining an array not allowed? > >> Method 2 is the only one working, but looks clumsy when you have a lot > >> of bytes. > >> > >> 1) > >> DIM b AS Byte[] = [&HF0, &H30, &HF0, &H30] > >> > >> The error is "Type mismatch: wanted Byte[], got Integer[] instead" > > > > &HF0 is not a Byte, it is an Integer. You must do: > > > > DIM b AS Byte[] = [CByte(&HF0), &H30, &HF0, &H30] > > > > The type of the array created by the [ ... ] function is the type of the > > first element. > > That syntax gives the following.... > Type mismatch: wanted Byte[], got Variant[] > > Only this seems to work... > DIM b AS Byte[] = [CByte(&HF0), CByte(&H30), CByte(&HF0), CByte(&H30)] > > But that even more code, than method 2. > > [OperatingSystem] > OperatingSystem=Linux > KernelRelease=2.6.28-15-generic > CPUArchitecture=x86_64 > DistributionVendor=ubuntu > DistributionRelease="Ubuntu 9.04" > > [Gambas] > Gambas1=Not Installed > Gambas2=2.16.0 > Gambas2Path=/usr/local/bin/gbx2 > Gambas3=Not Installed > > > Regards, > Ron_2nd. > Sorry, the type of the array is given by the two first elements. If they are different, a Variant[] is returned. Regards, -- Beno?t From ron at ...1740... Mon Sep 7 17:12:55 2009 From: ron at ...1740... (Ron) Date: Mon, 07 Sep 2009 17:12:55 +0200 Subject: [Gambas-user] Array decalarion In-Reply-To: <200909071704.27471.gambas@...1...> References: <4AA505BB.8040903@...1740...> <200909071628.01670.gambas@...1...> <4AA51D2E.7040509@...1740...> <200909071704.27471.gambas@...1...> Message-ID: <4AA522F7.2090703@...1740...> Beno?t Minisini wrote: >> Beno?t Minisini wrote: >> >>>> Hi, >>>> >>>> Why is method 1 of defining an array not allowed? >>>> Method 2 is the only one working, but looks clumsy when you have a lot >>>> of bytes. >>>> >>>> 1) >>>> DIM b AS Byte[] = [&HF0, &H30, &HF0, &H30] >>>> >>>> The error is "Type mismatch: wanted Byte[], got Integer[] instead" >>>> >>> &HF0 is not a Byte, it is an Integer. You must do: >>> >>> DIM b AS Byte[] = [CByte(&HF0), &H30, &HF0, &H30] >>> >>> The type of the array created by the [ ... ] function is the type of the >>> first element. >>> >> That syntax gives the following.... >> Type mismatch: wanted Byte[], got Variant[] >> >> Only this seems to work... >> DIM b AS Byte[] = [CByte(&HF0), CByte(&H30), CByte(&HF0), CByte(&H30)] >> >> But that even more code, than method 2. >> >> >> > > Sorry, the type of the array is given by the two first elements. If they are > different, a Variant[] is returned. > > Yep that works. Thanks. Ron. From tomascostarivas at ...626... Mon Sep 7 17:13:14 2009 From: tomascostarivas at ...626... (Tomas Costa rivas) Date: Mon, 7 Sep 2009 17:13:14 +0200 Subject: [Gambas-user] tableview edit In-Reply-To: <200909071619.13974.gambas@...1...> References: <94a144920909070351l410e4e5ev6003f2ea95b15541@...627...> <200909071619.13974.gambas@...1...> Message-ID: <94a144920909070813o508bd00eoc8780f505725d9@...627...> Ok I change the sentence, like this: PUBLIC SUB mitabla_Change() DIM xArray AS String[] xArray = ["Proba1", "proba2", "proba3"] IF mitabla.Column = 0 THEN mitabla.Edit(xArray, TRUE) ENDIF END And the error is the same: "Null object". (It's the full error message) Thanks for your help Tomas 2009/9/7, Beno?t Minisini : >> I have a problem in a tableview >> >> I try to edit a cell in a tableview as a comboview. >> I write: >> >> Public sub mitabla_change() >> DIM xArray AS NEW String[3] > > As you assign xArray a new array, you don't have to initialize it with a > void > one. Just do: DIM xArray AS String[] > >> xArray = ["prueba1", "prueba2", "prueba3"] >> IF mitabla.Column = 0 THEN >> subventas.Edit(xArray, TRUE) ' here is the problem >> ENDIF >> END >> I get a error ("Null object"), but xArray is not null. >> Does anyone help me?, Where is the problem? >> > > Can you give the full error message? > > -- > Beno?t > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Mon Sep 7 17:17:48 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 7 Sep 2009 17:17:48 +0200 Subject: [Gambas-user] tableview edit In-Reply-To: <94a144920909070813o508bd00eoc8780f505725d9@...627...> References: <94a144920909070351l410e4e5ev6003f2ea95b15541@...627...> <200909071619.13974.gambas@...1...> <94a144920909070813o508bd00eoc8780f505725d9@...627...> Message-ID: <200909071717.48775.gambas@...1...> > Ok I change the sentence, like this: > > PUBLIC SUB mitabla_Change() > DIM xArray AS String[] > xArray = ["Proba1", "proba2", "proba3"] > IF mitabla.Column = 0 THEN > mitabla.Edit(xArray, TRUE) > ENDIF > END > And the error is the same: "Null object". > (It's the full error message) > > Thanks for your help > Tomas > So you don't have any class name nor any line number in the error message? -- Beno?t From tomascostarivas at ...626... Mon Sep 7 17:54:12 2009 From: tomascostarivas at ...626... (Tomas Costa rivas) Date: Mon, 7 Sep 2009 17:54:12 +0200 Subject: [Gambas-user] tableview edit In-Reply-To: <200909071717.48775.gambas@...1...> References: <94a144920909070351l410e4e5ev6003f2ea95b15541@...627...> <200909071619.13974.gambas@...1...> <94a144920909070813o508bd00eoc8780f505725d9@...627...> <200909071717.48775.gambas@...1...> Message-ID: <94a144920909070854y13bc5508o3ad7dd7447729a8d@...627...> No. Error.code=13 Error.text="Null object" 2009/9/7 Beno?t Minisini > > Ok I change the sentence, like this: > > > > PUBLIC SUB mitabla_Change() > > DIM xArray AS String[] > > xArray = ["Proba1", "proba2", "proba3"] > > IF mitabla.Column = 0 THEN > > mitabla.Edit(xArray, TRUE) > > ENDIF > > END > > And the error is the same: "Null object". > > (It's the full error message) > > > > Thanks for your help > > Tomas > > > > So you don't have any class name nor any line number in the error message? > > -- > Beno?t > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Mon Sep 7 17:57:46 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 7 Sep 2009 17:57:46 +0200 Subject: [Gambas-user] tableview edit In-Reply-To: <94a144920909070854y13bc5508o3ad7dd7447729a8d@...627...> References: <94a144920909070351l410e4e5ev6003f2ea95b15541@...627...> <200909071717.48775.gambas@...1...> <94a144920909070854y13bc5508o3ad7dd7447729a8d@...627...> Message-ID: <200909071757.46103.gambas@...1...> > No. > Error.code=13 > Error.text="Null object" > All error message have a class name and a line number (in Error.Where). Please send your full project. -- Beno?t From gambas at ...1... Mon Sep 7 17:58:12 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 7 Sep 2009 17:58:12 +0200 Subject: [Gambas-user] Balloon In-Reply-To: <200909070841.05680.pinozollo@...626...> References: <200909070841.05680.pinozollo@...626...> Message-ID: <200909071758.12670.gambas@...1...> > Hi! > > >Balloon popup is little buggy (sometimes). > >Screenshot tells it all. > > For me (Gambas 2.15) the delay is not actuated: > > Balloon.Delay = 20000 > > shows for a small second.... > > Pino > It works there... I think the problem comes from the window manager: which one do you use? -- Beno?t From tomascostarivas at ...626... Mon Sep 7 20:15:50 2009 From: tomascostarivas at ...626... (Tomas Costa rivas) Date: Mon, 7 Sep 2009 20:15:50 +0200 Subject: [Gambas-user] tableview edit In-Reply-To: <200909071757.46103.gambas@...1...> References: <94a144920909070351l410e4e5ev6003f2ea95b15541@...627...> <200909071717.48775.gambas@...1...> <94a144920909070854y13bc5508o3ad7dd7447729a8d@...627...> <200909071757.46103.gambas@...1...> Message-ID: <94a144920909071115s79cfb52egc53104932847af57@...627...> The project is incomplete. It's a shop management project built in Microsoft Office (Windows) and we're trying to make it in Linux(gambas) and Postgresql. We don't know much about gambas. It's a form called 'pendentes' whith a tableview called 'subventas' apart more controls (textbox, buttons, ...) Can I send you only this form code? (pendentes.class and pendentes.form) . By the way: Err.Where: (null).subventas_change.0 2009/9/7 Beno?t Minisini > > No. > > Error.code=13 > > Error.text="Null object" > > > > All error message have a class name and a line number (in Error.Where). > Please > send your full project. > > -- > Beno?t > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -------------- next part -------------- A non-text attachment was scrubbed... Name: pendentes.form Type: application/octet-stream Size: 2702 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pendentes.class Type: application/octet-stream Size: 12488 bytes Desc: not available URL: From gambas at ...1... Mon Sep 7 20:41:56 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 7 Sep 2009 20:41:56 +0200 Subject: [Gambas-user] tableview edit In-Reply-To: <94a144920909071115s79cfb52egc53104932847af57@...627...> References: <94a144920909070351l410e4e5ev6003f2ea95b15541@...627...> <200909071757.46103.gambas@...1...> <94a144920909071115s79cfb52egc53104932847af57@...627...> Message-ID: <200909072041.56580.gambas@...1...> > The project is incomplete. It's a shop management project built in > Microsoft Office (Windows) and we're trying to make it in Linux(gambas) > and > Postgresql. We don't know much about gambas. > It's a form called 'pendentes' whith a tableview called 'subventas' apart > more controls (textbox, buttons, ...) > Can I send you only this form code? (pendentes.class and pendentes.form) . > > By the way: Err.Where: (null).subventas_change.0 > I need your project, your data, and a way to reproduce the error. Regards, -- Beno?t From rterry at ...1946... Mon Sep 7 23:33:57 2009 From: rterry at ...1946... (richard terry) Date: Tue, 8 Sep 2009 07:33:57 +1000 Subject: [Gambas-user] simple postgres create user question Message-ID: <200909080733.57655.rterry@...1946...> Something simple - I can do the equivalent of this this in a pgadmin window: CREATE USER "FRED"' PASSWORD 'password' in ROLE whatever; and it keeps the caps of FRED I alwasy end up with lower case letters for the user name when I pass the query to postgres even if the logon_name here is "FRED" it > lower case and if I enclose in ' ' or $$ characters etc bombs sql = "CREATE USER " & staff!logon_name & " PASSWORD $$" & staff!password & "$$ IN ROLE " & role Any help appreciated. richard From bleketux at ...626... Tue Sep 8 03:35:23 2009 From: bleketux at ...626... (MSulchan Darmawan) Date: Tue, 8 Sep 2009 08:35:23 +0700 Subject: [Gambas-user] too many operands In-Reply-To: <4AA4EC44.8050505@...1909...> References: <20090907162620.4b507875@...2286...> <4AA4EC44.8050505@...1909...> Message-ID: <20090908083523.7da3a066@...2286...> Pada Mon, 07 Sep 2009 13:19:32 +0200 Doriano Blengino menulis: > res = db.Create("refpos") ' append record in table named > refpos for i = 1 to 31 > res["Res" & i] = ... > next Does this means the field name is Res1, Res2, ..., Res31 ??? If so, wow this is great, I didn't know that variable names can be iterated. Thank you Doriano. I'll try this method. -- Cheers, [-Sulchan-] -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From doriano.blengino at ...1909... Tue Sep 8 08:44:11 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Tue, 08 Sep 2009 08:44:11 +0200 Subject: [Gambas-user] too many operands In-Reply-To: <20090908083523.7da3a066@...2286...> References: <20090907162620.4b507875@...2286...> <4AA4EC44.8050505@...1909...> <20090908083523.7da3a066@...2286...> Message-ID: <4AA5FD3B.2050001@...1909...> MSulchan Darmawan ha scritto: > Pada Mon, 07 Sep 2009 13:19:32 +0200 > Doriano Blengino menulis: > > >> res = db.Create("refpos") ' append record in table named >> refpos for i = 1 to 31 >> res["Res" & i] = ... >> next >> > > Does this means the field name is Res1, Res2, ..., Res31 ??? > If so, wow this is great, I didn't know that variable names can be > iterated. > Res1, Res2... are *not* variables (or variable names), they are fields of a database record. The Result object takes care of getting the index between square brackets, which can be an arbitrary string, even a string expression, and operate on the corresponding record field. This is why I omitted the right part of the assignment ("..."); in that place you can not do the same trick: but of course you can if you use there some object like another Result[] or Settings[] or objects like those, which can be indexed by mean of string expression. Regards, Doriano From rolf.frogs at ...221... Tue Sep 8 10:11:20 2009 From: rolf.frogs at ...221... (Rolf Schmidt) Date: Tue, 8 Sep 2009 10:11:20 +0200 Subject: [Gambas-user] How to get listbox selection? In-Reply-To: <82bffccf0909070331y6ff1149ev8db05d66ad221c19@...627...> References: <82bffccf0909070331y6ff1149ev8db05d66ad221c19@...627...> Message-ID: <200909081011.23727.rolf.frogs@...221...> Hallo Dimitris deine Mail ist sehr interessant, doch leider kann ich sie nicht lesen - komischer englischer Dialekt. Gru? Rolf PS: If you like to answer in a different language then english, the language of this list, do it as PM. > > An katalava kala thes na vlepeis oles tis epiloges pou exeis kanei > sto listbox se multiple mode, etsi? > > Exo ftiaxei mia synartisi pou kanei akrivos afto to pragma. > > '-------------------------------------------------------------------------- >------------------------------ PUBLIC FUNCTION multipleSelections(targetLB > AS ListBox) AS String > DIM targetCount AS Integer > DIM foundSelected AS Integer > DIM Res AS String > > targetCount = 0 > foundSelected = 0 > DO WHILE targetCount < targetLB.Count > IF targetLB[targetCount].selected = TRUE THEN > Res &= targetLB[targetCount].Text & "|" > INC foundSelected > ENDIF > INC targetCount > LOOP > > IF foundSelected = 0 THEN > RETURN "Nothing found" > ELSE > RETURN Left(Res, Len(Res) - 1) > ENDIF > > END > '-------------------------------------------------------------------------- >------------------------------ > > gia na tin xrisimopoihseis tin kaleis me to parakato styl > > tmpStr = multipleSelections(myListbox) > > kai tha sou vgalei san apotelesma to exeis > > "Item1|Item3|item5" > > Pou einai ta onomata twn stoixeiwn pou dialexes sto listbox. > > an xreiazesai to index tou kathe stoixeiou prepei na kaneis allages stin > synartisi. > > Elpizo na voithisa, kai oti allo xreiazetai pes mou. > > Regards, > Dimitris > > 2009/9/7 Demosthenes Koptsis > > > Hi to all, > > > > how can we get the selection of a multiple mode listbox? > > > > return an array of selected items or something? > > > > -- > > > > ???? ???? ?? ?????!!! > > > > Regards, > > > > Demosthenes Koptsis > > > > > > ------------------------------------------------------------------------- > >----- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > > 30-Day trial. Simplify your report design, integration and deployment - > > and focus on > > what you do best, core application coding. Discover what's new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > --------------------------------------------------------------------------- >--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day trial. Simplify your report design, integration and deployment - and > focus on what you do best, core application coding. Discover what's new > with Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. URL: From dosida at ...626... Tue Sep 8 10:29:18 2009 From: dosida at ...626... (Dimitris Anogiatis) Date: Tue, 8 Sep 2009 02:29:18 -0600 Subject: [Gambas-user] How to get listbox selection? In-Reply-To: <200909081011.23727.rolf.frogs@...221...> References: <82bffccf0909070331y6ff1149ev8db05d66ad221c19@...627...> <200909081011.23727.rolf.frogs@...221...> Message-ID: <82bffccf0909080129x2e4cbb06p47f012036d28a6d1@...627...> Sorry Rolf, It won't happen again, I just thought that since the question has already been answered for another user in English that it wouldn't be a problem to just repeat the same solution in a different language as a courtesy for a fellow countryman; Regards Dimitris On Tue, Sep 8, 2009 at 2:11 AM, Rolf Schmidt wrote: > Hallo Dimitris > > deine Mail ist sehr interessant, doch leider kann ich sie nicht lesen - > komischer englischer Dialekt. > > Gru? > Rolf > > PS: If you like to answer in a different language then english, the > language > of this list, do it as PM. > > > > > An katalava kala thes na vlepeis oles tis epiloges pou exeis kanei > > sto listbox se multiple mode, etsi? > > > > Exo ftiaxei mia synartisi pou kanei akrivos afto to pragma. > > > > > '-------------------------------------------------------------------------- > >------------------------------ PUBLIC FUNCTION multipleSelections(targetLB > > AS ListBox) AS String > > DIM targetCount AS Integer > > DIM foundSelected AS Integer > > DIM Res AS String > > > > targetCount = 0 > > foundSelected = 0 > > DO WHILE targetCount < targetLB.Count > > IF targetLB[targetCount].selected = TRUE THEN > > Res &= targetLB[targetCount].Text & "|" > > INC foundSelected > > ENDIF > > INC targetCount > > LOOP > > > > IF foundSelected = 0 THEN > > RETURN "Nothing found" > > ELSE > > RETURN Left(Res, Len(Res) - 1) > > ENDIF > > > > END > > > '-------------------------------------------------------------------------- > >------------------------------ > > > > gia na tin xrisimopoihseis tin kaleis me to parakato styl > > > > tmpStr = multipleSelections(myListbox) > > > > kai tha sou vgalei san apotelesma to exeis > > > > "Item1|Item3|item5" > > > > Pou einai ta onomata twn stoixeiwn pou dialexes sto listbox. > > > > an xreiazesai to index tou kathe stoixeiou prepei na kaneis allages stin > > synartisi. > > > > Elpizo na voithisa, kai oti allo xreiazetai pes mou. > > > > Regards, > > Dimitris > > > > 2009/9/7 Demosthenes Koptsis > > > > > Hi to all, > > > > > > how can we get the selection of a multiple mode listbox? > > > > > > return an array of selected items or something? > > > > > > -- > > > > > > ???? ???? ?? ?????!!! > > > > > > Regards, > > > > > > Demosthenes Koptsis > > > > > > > > > > ------------------------------------------------------------------------- > > >----- Let Crystal Reports handle the reporting - Free Crystal Reports > 2008 > > > 30-Day trial. Simplify your report design, integration and deployment - > > > and focus on > > > what you do best, core application coding. Discover what's new with > > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > --------------------------------------------------------------------------- > >--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > > 30-Day trial. Simplify your report design, integration and deployment - > and > > focus on what you do best, core application coding. Discover what's new > > with Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From wdahn at ...1000... Tue Sep 8 11:18:41 2009 From: wdahn at ...1000... (Werner) Date: Tue, 08 Sep 2009 17:18:41 +0800 Subject: [Gambas-user] How to get listbox selection? In-Reply-To: <200909081011.23727.rolf.frogs@...221...> References: <82bffccf0909070331y6ff1149ev8db05d66ad221c19@...627...> <200909081011.23727.rolf.frogs@...221...> Message-ID: <4AA62171.6060405@...1000...> Rolf Schmidt wrote: > Hallo Dimitris > > deine Mail ist sehr interessant, doch leider kann ich sie nicht lesen - > komischer englischer Dialekt. > > Gru? > Rolf > > PS: If you like to answer in a different language then english, the language > of this list, do it as PM. > > >> An katalava kala thes na vlepeis oles tis epiloges pou exeis kanei >> sto listbox se multiple mode, etsi? >> >> Exo ftiaxei mia synartisi pou kanei akrivos afto to pragma. >> >> '-------------------------------------------------------------------------- >> ------------------------------ PUBLIC FUNCTION multipleSelections(targetLB >> AS ListBox) AS String >> DIM targetCount AS Integer >> DIM foundSelected AS Integer >> DIM Res AS String >> >> targetCount = 0 >> foundSelected = 0 >> DO WHILE targetCount < targetLB.Count >> IF targetLB[targetCount].selected = TRUE THEN >> Res &= targetLB[targetCount].Text & "|" >> INC foundSelected >> ENDIF >> INC targetCount >> LOOP >> >> IF foundSelected = 0 THEN >> RETURN "Nothing found" >> ELSE >> RETURN Left(Res, Len(Res) - 1) >> ENDIF >> >> END >> '-------------------------------------------------------------------------- >> ------------------------------ >> >> gia na tin xrisimopoihseis tin kaleis me to parakato styl >> >> tmpStr = multipleSelections(myListbox) >> >> kai tha sou vgalei san apotelesma to exeis >> >> "Item1|Item3|item5" >> >> Pou einai ta onomata twn stoixeiwn pou dialexes sto listbox. >> >> an xreiazesai to index tou kathe stoixeiou prepei na kaneis allages stin >> synartisi. >> >> Elpizo na voithisa, kai oti allo xreiazetai pes mou. >> >> Regards, >> Dimitris >> >> 2009/9/7 Demosthenes Koptsis >> >> >>> Hi to all, >>> >>> how can we get the selection of a multiple mode listbox? >>> >>> return an array of selected items or something? >>> >>> -- >>> >>> ???? ???? ?? ?????!!! >>> >>> Regards, >>> >>> Demosthenes Koptsis >>> >>> Another way to skin the cat: PUBLIC FUNCTION GetListBoxSelection(theBox AS ListBox) AS Collection DIM selection AS NEW Collection[] DIM i AS Integer FOR i = 0 TO theBox.Count - 1 IF theBox[i].Selected THEN selection.Add(theBox[i].Text, i) NEXT RETURN selection END From ron at ...1740... Tue Sep 8 14:11:06 2009 From: ron at ...1740... (Ron) Date: Tue, 08 Sep 2009 14:11:06 +0200 Subject: [Gambas-user] TAB order of controls Message-ID: <4AA649DA.8050201@...1740...> Is there a way to change the order in which controls are looped through if you press tab and have a few in a form? I can't seem to find it. What is the key in this? I have some datacontrol fields, but it goes from the first to the third back to the second... Regards, Ron_2nd. From demosthenesk at ...626... Tue Sep 8 14:38:30 2009 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Tue, 8 Sep 2009 15:38:30 +0300 Subject: [Gambas-user] TAB order of controls In-Reply-To: <4AA649DA.8050201@...1740...> References: <4AA649DA.8050201@...1740...> Message-ID: Yes you can change TAB order from Hierarchy, move up/down controls sets TAB order. On Tue, Sep 8, 2009 at 3:11 PM, Ron wrote: > > Is there a way to change the order in which controls are looped through > if you press tab and have a few in a form? > > I can't seem to find it. > What is the key in this? > > I have some datacontrol fields, but it goes from the first to the third > back to the second... > > Regards, > Ron_2nd. > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From demosthenesk at ...626... Tue Sep 8 14:42:43 2009 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Tue, 8 Sep 2009 15:42:43 +0300 Subject: [Gambas-user] How to get listbox selection? In-Reply-To: <4AA62171.6060405@...1000...> References: <82bffccf0909070331y6ff1149ev8db05d66ad221c19@...627...> <200909081011.23727.rolf.frogs@...221...> <4AA62171.6060405@...1000...> Message-ID: Thanks all for your help. I couldn't find the selected property in help files. Now everything is ok. Thanks again. On Tue, Sep 8, 2009 at 12:18 PM, Werner wrote: > Rolf Schmidt wrote: >> Hallo Dimitris >> >> deine Mail ist sehr interessant, doch leider kann ich sie nicht lesen - >> komischer englischer Dialekt. >> >> Gru? >> Rolf >> >> PS: If you like to answer in a different language then english, the language >> of this list, do it as PM. >> >> >>> An katalava kala thes na vlepeis oles tis epiloges pou exeis kanei >>> sto listbox se multiple mode, etsi? >>> >>> Exo ftiaxei mia synartisi pou kanei akrivos afto to pragma. >>> >>> '-------------------------------------------------------------------------- >>> ------------------------------ PUBLIC FUNCTION multipleSelections(targetLB >>> AS ListBox) AS String >>> ? DIM targetCount AS Integer >>> ? DIM foundSelected AS Integer >>> ? DIM Res AS String >>> >>> ? targetCount = 0 >>> ? foundSelected = 0 >>> ? DO WHILE targetCount < targetLB.Count >>> ? ?IF targetLB[targetCount].selected = TRUE THEN >>> ? ? Res &= targetLB[targetCount].Text & "|" >>> ? ? INC foundSelected >>> ? ?ENDIF >>> ? INC targetCount >>> ? LOOP >>> >>> IF foundSelected = 0 THEN >>> ? ? RETURN "Nothing found" >>> ? ELSE >>> ? ? RETURN Left(Res, Len(Res) - 1) >>> ENDIF >>> >>> END >>> '-------------------------------------------------------------------------- >>> ------------------------------ >>> >>> gia na tin xrisimopoihseis tin kaleis me to parakato styl >>> >>> tmpStr = multipleSelections(myListbox) >>> >>> kai tha sou vgalei san apotelesma to exeis >>> >>> "Item1|Item3|item5" >>> >>> Pou einai ta onomata twn stoixeiwn pou dialexes sto listbox. >>> >>> an xreiazesai to index tou kathe stoixeiou prepei na kaneis allages stin >>> synartisi. >>> >>> Elpizo na voithisa, kai oti allo xreiazetai pes mou. >>> >>> Regards, >>> Dimitris >>> >>> 2009/9/7 Demosthenes Koptsis >>> >>> >>>> Hi to all, >>>> >>>> how can we get the selection of a multiple mode listbox? >>>> >>>> return an array of selected items or something? >>>> >>>> -- >>>> >>>> ???? ???? ?? ?????!!! >>>> >>>> Regards, >>>> >>>> Demosthenes Koptsis >>>> >>>> > Another way to skin the cat: > > PUBLIC FUNCTION GetListBoxSelection(theBox AS ListBox) AS Collection > DIM selection AS NEW Collection[] > DIM i AS Integer > > FOR i = 0 TO theBox.Count - 1 > IF theBox[i].Selected THEN selection.Add(theBox[i].Text, i) > NEXT > RETURN selection > END > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From demosthenesk at ...626... Tue Sep 8 14:46:31 2009 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Tue, 8 Sep 2009 15:46:31 +0300 Subject: [Gambas-user] gambas-mysqladmin Message-ID: Hi to all. I wrote a very nice program called gambas-mysqladmin. It is a mysql administration tool, maybe you like to see it. Check below link: http://sourceforge.net/projects/gambas-mysqladm/ -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From gambas at ...1... Tue Sep 8 14:19:05 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 8 Sep 2009 14:19:05 +0200 Subject: [Gambas-user] TAB order of controls In-Reply-To: <4AA649DA.8050201@...1740...> References: <4AA649DA.8050201@...1740...> Message-ID: <200909081419.05708.gambas@...1...> > Is there a way to change the order in which controls are looped through > if you press tab and have a few in a form? > > I can't seem to find it. > What is the key in this? > > I have some datacontrol fields, but it goes from the first to the third > back to the second... > > Regards, > Ron_2nd. > In Gambas the "Tab order" is the Z-order. The lower control has the focus first. Beware that container whose Arrangement property is set, or implicit, force the z-order of their children. Regards, -- Beno?t From surfzoid at ...626... Tue Sep 8 15:21:04 2009 From: surfzoid at ...626... (Petit Eric) Date: Tue, 8 Sep 2009 15:21:04 +0200 Subject: [Gambas-user] reconf-all script sugestion Message-ID: <84776a970909080621n4b5887b1u4f2f1e83fd43a5b@...627...> Hi I'm trying the svn version of Gambas, so i followed the instruction by started the "./reconf-all" script and wait long time, become surprise to see no output, like a dead program, so i suggest to add the verbosity option to the script, like that : autoreconf -v $@ -- Cordially. Small Eric Quotations of the days: --------------------------------------------------------------------------- I have no special talents. I am only passionately curious From matteo.pasotti at ...626... Tue Sep 8 20:19:05 2009 From: matteo.pasotti at ...626... (Matteo Pasotti) Date: Tue, 08 Sep 2009 20:19:05 +0200 Subject: [Gambas-user] declaring control groups at runtime Message-ID: <4AA6A019.2070201@...626...> Hi, I'm writing an application that once read a configuration file, it creates at runtime some buttons. My problem is represented by the declaration of a unique event for all these buttons with the target of recognizing the caller and change some of its properties. I think it's similar to the Group property but I'm not able of use it at runtime :-( Someone has any idea on what can I do? Regards, Matteo From pinozollo at ...626... Mon Sep 7 18:48:51 2009 From: pinozollo at ...626... (Pino Zollo) Date: Mon, 7 Sep 2009 12:48:51 -0400 Subject: [Gambas-user] Balloon In-Reply-To: <200909071758.12670.gambas@...1...> References: <200909070841.05680.pinozollo@...626...> <200909071758.12670.gambas@...1...> Message-ID: <200909071248.51176.pinozollo@...626...> Alle 11:58, luned? 7 settembre 2009, hai scritto: > > Hi! > > > > >Balloon popup is little buggy (sometimes). > > >Screenshot tells it all. > > > > For me (Gambas 2.15) the delay is not actuated: > > > > Balloon.Delay = 20000 > > > > shows for a small second.... > > > > Pino > > It works there... I think the problem comes from the window manager: which > one do you use? Gambas 2.15, QT, Debian 5.0.1, Gnome...same on Debian 4.0r5 Ciao Pino -- Key ID: 0xF6768208 Key fingerprint = B16D 0A7C 5B29 A334 CE6A 71F6 EAF8 3D88 F676 8208 Key server: hkp://wwwkeys.eu.pgp.net From rterry at ...1946... Wed Sep 9 00:38:57 2009 From: rterry at ...1946... (richard terry) Date: Wed, 9 Sep 2009 08:38:57 +1000 Subject: [Gambas-user] IDE cut/n paste control behaviour Q Message-ID: <200909090838.57957.rterry@...1946...> I've noted that when I cut/n paste a group of multi-selected controls from one container to another, that once pasted, they are no longer selected. This can be really inconvenient because one has to re-selecte them all to say move-them en-masse within the container. Not a problem on a simple gui-but a bit draining when doing alot of repetative design work trying to find the best appearance. Just a suggestion for a feature enhancement. Regards Richard. From dr.diesel at ...626... Wed Sep 9 01:23:44 2009 From: dr.diesel at ...626... (Dr. Diesel) Date: Tue, 8 Sep 2009 19:23:44 -0400 Subject: [Gambas-user] gambas-mysqladmin In-Reply-To: References: Message-ID: <2a28d2ab0909081623v11ac96fw8a7dbde8a6e8b8f0@...627...> Thank you sir for such a nice program! 2009/9/8 Demosthenes Koptsis > Hi to all. > > I wrote a very nice program called gambas-mysqladmin. > > It is a mysql administration tool, maybe you like to see it. > > Check below link: > > http://sourceforge.net/projects/gambas-mysqladm/ > > -- > > ???? ???? ?? ?????!!! > > Regards, > > Demosthenes Koptsis > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- projecthuh.com All of my bits are free, are yours? Fedoraproject.org "I'd rather have dead offenders than repeat offenders" - Ted Nugent From demosthenesk at ...626... Wed Sep 9 11:36:26 2009 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 9 Sep 2009 12:36:26 +0300 Subject: [Gambas-user] gambas-mysqladmin In-Reply-To: <2a28d2ab0909081623v11ac96fw8a7dbde8a6e8b8f0@...627...> References: <2a28d2ab0909081623v11ac96fw8a7dbde8a6e8b8f0@...627...> Message-ID: it is my pleasure to code! I made some changes and bug fixing. Now FBrowse, FUpdate and FInsert forms can manage NULL values. Wait for release 0.1.1. 2009/9/9 Dr. Diesel : > Thank you sir for such a nice program! > > > 2009/9/8 Demosthenes Koptsis > >> Hi to all. >> >> I wrote a very nice program called gambas-mysqladmin. >> >> It is a mysql administration tool, maybe you like to see it. >> >> Check below link: >> >> http://sourceforge.net/projects/gambas-mysqladm/ >> >> -- >> >> ???? ???? ?? ?????!!! >> >> Regards, >> >> Demosthenes Koptsis >> >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> trial. Simplify your report design, integration and deployment - and focus >> on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. ?http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > > > -- > projecthuh.com > All of my bits are free, are yours? ?Fedoraproject.org > "I'd rather have dead offenders than repeat offenders" - Ted Nugent > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From gambas at ...1... Wed Sep 9 12:20:28 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 9 Sep 2009 12:20:28 +0200 Subject: [Gambas-user] IDE cut/n paste control behaviour Q In-Reply-To: <200909090838.57957.rterry@...1946...> References: <200909090838.57957.rterry@...1946...> Message-ID: <200909091220.28162.gambas@...1...> > I've noted that when I cut/n paste a group of multi-selected controls from > one container to another, that once pasted, they are no longer selected. > > This can be really inconvenient because one has to re-selecte them all to > say move-them en-masse within the container. > > Not a problem on a simple gui-but a bit draining when doing alot of > repetative design work trying to find the best appearance. > > Just a suggestion for a feature enhancement. > > Regards > > Richard. > That should be fixed in revision 2320. Regards, -- Beno?t Minisini From gambas at ...1... Wed Sep 9 12:22:11 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 9 Sep 2009 12:22:11 +0200 Subject: [Gambas-user] reconf-all script sugestion In-Reply-To: <84776a970909080621n4b5887b1u4f2f1e83fd43a5b@...627...> References: <84776a970909080621n4b5887b1u4f2f1e83fd43a5b@...627...> Message-ID: <200909091222.12624.gambas@...1...> > Hi > I'm trying the svn version of Gambas, so i followed the instruction > by started the "./reconf-all" script and wait long time, become > surprise to see no output, like a dead program, so i suggest to add > the verbosity option to the script, like that : > autoreconf -v $@ > Done in revision 2321. Regards, -- Beno?t Minisini From Karl.Reinl at ...9... Wed Sep 9 12:32:49 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Wed, 09 Sep 2009 12:32:49 +0200 Subject: [Gambas-user] gambas-mysqladmin In-Reply-To: References: <2a28d2ab0909081623v11ac96fw8a7dbde8a6e8b8f0@...627...> Message-ID: <1252492369.7035.1.camel@...40...> Am Mittwoch, den 09.09.2009, 12:36 +0300 schrieb Demosthenes Koptsis: > it is my pleasure to code! > > I made some changes and bug fixing. Now FBrowse, FUpdate and FInsert > forms can manage NULL values. > > Wait for release 0.1.1. -----------------9<--------------------------------------- Salut, why I see only one record in gridview when browsing the table Charlie From Karl.Reinl at ...9... Wed Sep 9 12:37:13 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Wed, 09 Sep 2009 12:37:13 +0200 Subject: [Gambas-user] reconf-all script sugestion In-Reply-To: <200909091222.12624.gambas@...1...> References: <84776a970909080621n4b5887b1u4f2f1e83fd43a5b@...627...> <200909091222.12624.gambas@...1...> Message-ID: <1252492633.7035.4.camel@...40...> Am Mittwoch, den 09.09.2009, 12:22 +0200 schrieb Beno?t Minisini: > > Hi > > I'm trying the svn version of Gambas, so i followed the instruction > > by started the "./reconf-all" script and wait long time, become > > surprise to see no output, like a dead program, so i suggest to add > > the verbosity option to the script, like that : > > autoreconf -v $@ > > > > Done in revision 2321. > > Regards, > Salut Benoit, do you back port it also to gambas2 ? Charlie From gambas at ...1... Wed Sep 9 12:45:34 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 9 Sep 2009 12:45:34 +0200 Subject: [Gambas-user] reconf-all script sugestion In-Reply-To: <1252492633.7035.4.camel@...40...> References: <84776a970909080621n4b5887b1u4f2f1e83fd43a5b@...627...> <200909091222.12624.gambas@...1...> <1252492633.7035.4.camel@...40...> Message-ID: <200909091245.34952.gambas@...1...> > Am Mittwoch, den 09.09.2009, 12:22 +0200 schrieb Beno?t Minisini: > > > Hi > > > I'm trying the svn version of Gambas, so i followed the instruction > > > by started the "./reconf-all" script and wait long time, become > > > surprise to see no output, like a dead program, so i suggest to add > > > the verbosity option to the script, like that : > > > autoreconf -v $@ > > > > Done in revision 2321. > > > > Regards, > > Salut Benoit, > > do you back port it also to gambas2 ? > > Charlie > Yep, done. -- Beno?t Minisini From Karl.Reinl at ...9... Wed Sep 9 12:48:39 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Wed, 09 Sep 2009 12:48:39 +0200 Subject: [Gambas-user] another IDE cut/n paste behaviour Message-ID: <1252493319.7035.10.camel@...40...> Salut, on gambas2 and gambas3 (since month) in code editor CTRL+C not always works. CTRL+V is OK, CTRL+X (I haven't tested) ContextMenu/Copy works well. Is that a gambas behaviour or Linux/Ubuntu 8.04/Xorg behaviour. Or a problem on my box. -- Amicalment Charlie From Karl.Reinl at ...9... Wed Sep 9 12:52:47 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Wed, 09 Sep 2009 12:52:47 +0200 Subject: [Gambas-user] reconf-all script sugestion In-Reply-To: <200909091245.34952.gambas@...1...> References: <84776a970909080621n4b5887b1u4f2f1e83fd43a5b@...627...> <200909091222.12624.gambas@...1...> <1252492633.7035.4.camel@...40...> <200909091245.34952.gambas@...1...> Message-ID: <1252493567.7035.14.camel@...40...> Am Mittwoch, den 09.09.2009, 12:45 +0200 schrieb Beno?t Minisini: > > Am Mittwoch, den 09.09.2009, 12:22 +0200 schrieb Beno?t Minisini: > > > > Hi > > > > I'm trying the svn version of Gambas, so i followed the instruction > > > > by started the "./reconf-all" script and wait long time, become > > > > surprise to see no output, like a dead program, so i suggest to add > > > > the verbosity option to the script, like that : > > > > autoreconf -v $@ > > > > > > Done in revision 2321. > > > > > > Regards, > > > > Salut Benoit, > > > > do you back port it also to gambas2 ? > > > > Charlie > > > > Yep, done. > Oh, thank you. And I have not yet completed the form. ;-) Charlie From demosthenesk at ...626... Wed Sep 9 12:54:23 2009 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 9 Sep 2009 13:54:23 +0300 Subject: [Gambas-user] gambas-mysqladmin In-Reply-To: <1252492369.7035.1.camel@...40...> References: <2a28d2ab0909081623v11ac96fw8a7dbde8a6e8b8f0@...627...> <1252492369.7035.1.camel@...40...> Message-ID: by default "Number of rows" is one. Increase this value to desired number and you can see as many records you like On Wed, Sep 9, 2009 at 1:32 PM, Charlie Reinl wrote: > Am Mittwoch, den 09.09.2009, 12:36 +0300 schrieb Demosthenes Koptsis: >> it is my pleasure to code! >> >> I made some changes and bug fixing. Now FBrowse, FUpdate and FInsert >> forms can manage NULL values. >> >> Wait for release 0.1.1. > -----------------9<--------------------------------------- > Salut, > > why I see only one record in gridview when browsing the table > > Charlie > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From gambas at ...1... Wed Sep 9 12:58:06 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 9 Sep 2009 12:58:06 +0200 Subject: [Gambas-user] another IDE cut/n paste behaviour In-Reply-To: <1252493319.7035.10.camel@...40...> References: <1252493319.7035.10.camel@...40...> Message-ID: <200909091258.06474.gambas@...1...> > Salut, > > on gambas2 and gambas3 (since month) in code editor CTRL+C not always > works. > CTRL+V is OK, CTRL+X (I haven't tested) > > ContextMenu/Copy works well. > > Is that a gambas behaviour or Linux/Ubuntu 8.04/Xorg behaviour. > Or a problem on my box. > Please give more details on when it does not work. -- Beno?t Minisini From Karl.Reinl at ...9... Wed Sep 9 13:05:45 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Wed, 09 Sep 2009 13:05:45 +0200 Subject: [Gambas-user] gambas-mysqladmin In-Reply-To: References: <2a28d2ab0909081623v11ac96fw8a7dbde8a6e8b8f0@...627...> <1252492369.7035.1.camel@...40...> Message-ID: <1252494345.7035.17.camel@...40...> Am Mittwoch, den 09.09.2009, 13:54 +0300 schrieb Demosthenes Koptsis: > by default "Number of rows" is one. > Increase this value to desired number and you can see as many records you like > > On Wed, Sep 9, 2009 at 1:32 PM, Charlie Reinl wrote: > > Am Mittwoch, den 09.09.2009, 12:36 +0300 schrieb Demosthenes Koptsis: > >> it is my pleasure to code! > >> > >> I made some changes and bug fixing. Now FBrowse, FUpdate and FInsert > >> forms can manage NULL values. > >> > >> Wait for release 0.1.1. > > -----------------9<--------------------------------------- > > Salut, > > > > why I see only one record in gridview when browsing the table > > > > Charlie > > Wonderful, support and program are wonderful suggestion : 0 should mean ALL Thanks From doriano.blengino at ...1909... Wed Sep 9 13:03:33 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Wed, 09 Sep 2009 13:03:33 +0200 Subject: [Gambas-user] declaring control groups at runtime In-Reply-To: <4AA6A019.2070201@...626...> References: <4AA6A019.2070201@...626...> Message-ID: <4AA78B85.3070209@...1909...> Matteo Pasotti ha scritto: > Hi, > I'm writing an application that once read a configuration file, it > creates at runtime some buttons. > My problem is represented by the declaration of a unique event for all > these buttons with the target of recognizing the caller and change some > of its properties. > I think it's similar to the Group property but I'm not able of use it at > runtime :-( > Someone has any idea on what can I do? > Create every button with an event handler associated like this: btAbutton = new Button(me) as "Button1" ' first button btAbutton2 = new Button(me) as "Button1" ' another button btAbutton2.tag = 5 The event handler for click will be: sub Button1_Click() if LAST=btAbutton ... if LAST=btAButton2... if LAST.tag=5 then... ' the same as before So you can: 1. Create buttons, and keep the variable around 2. Create buttons without keep variables around, but setting different TAG properties 3. Noye that you can use other fields other than Tag (for example, Text) 4. You can group all the buttons in the same event handler, as before, or you can use more than one handler Quick response - I hope it is clear. If not, let us know. Regards, Doriano From wdahn at ...1000... Wed Sep 9 13:17:09 2009 From: wdahn at ...1000... (Werner) Date: Wed, 09 Sep 2009 19:17:09 +0800 Subject: [Gambas-user] gambas-mysqladmin In-Reply-To: <1252494345.7035.17.camel@...40...> References: <2a28d2ab0909081623v11ac96fw8a7dbde8a6e8b8f0@...627...> <1252492369.7035.1.camel@...40...> <1252494345.7035.17.camel@...40...> Message-ID: <4AA78EB5.40009@...1000...> > Wonderful, support and program are wonderful > > suggestion : 0 should mean ALL > > Thanks > > > -- maybe -1 should mean all. From demosthenesk at ...626... Wed Sep 9 13:13:43 2009 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 9 Sep 2009 14:13:43 +0300 Subject: [Gambas-user] gambas-mysqladmin In-Reply-To: <1252494345.7035.17.camel@...40...> References: <2a28d2ab0909081623v11ac96fw8a7dbde8a6e8b8f0@...627...> <1252492369.7035.1.camel@...40...> <1252494345.7035.17.camel@...40...> Message-ID: a note. 0.1.0 has a bug with NULL values. Today i fix this bug and i make minor improvements like press Del key to deete a record and so on... In recent future i will make a new release. Please if you see a bug inform me. On Wed, Sep 9, 2009 at 2:05 PM, Charlie Reinl wrote: > Am Mittwoch, den 09.09.2009, 13:54 +0300 schrieb Demosthenes Koptsis: >> by default "Number of rows" is one. >> Increase this value to desired number and you can see as many records you like >> >> On Wed, Sep 9, 2009 at 1:32 PM, Charlie Reinl wrote: >> > Am Mittwoch, den 09.09.2009, 12:36 +0300 schrieb Demosthenes Koptsis: >> >> it is my pleasure to code! >> >> >> >> I made some changes and bug fixing. Now FBrowse, FUpdate and FInsert >> >> forms can manage NULL values. >> >> >> >> Wait for release 0.1.1. >> > -----------------9<--------------------------------------- >> > Salut, >> > >> > why I see only one record in gridview when browsing the table >> > >> > Charlie >> > > Wonderful, support and program are wonderful > > suggestion : 0 should mean ALL > > Thanks > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From Karl.Reinl at ...9... Wed Sep 9 13:20:11 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Wed, 09 Sep 2009 13:20:11 +0200 Subject: [Gambas-user] another IDE cut/n paste behaviour In-Reply-To: <200909091258.06474.gambas@...1...> References: <1252493319.7035.10.camel@...40...> <200909091258.06474.gambas@...1...> Message-ID: <1252495211.7035.27.camel@...40...> Am Mittwoch, den 09.09.2009, 12:58 +0200 schrieb Beno?t Minisini: > > Salut, > > > > on gambas2 and gambas3 (since month) in code editor CTRL+C not always > > works. > > CTRL+V is OK, CTRL+X (I haven't tested) > > > > ContextMenu/Copy works well. > > > > Is that a gambas behaviour or Linux/Ubuntu 8.04/Xorg behaviour. > > Or a problem on my box. > > > > Please give more details on when it does not work. > This behaviour is something on my "White-A4-PalmTop" which I spread today, after read Richards mail. For the details, I have to observer closer. One case I remember, during debugging. Keep it in mind, I set it on the top of my "White-A4-PalmTop", and tell you later. But perhaps there are other around there who remarked that. -- Amicalment Charlie From david_villalobos_c at ...43... Wed Sep 9 16:52:43 2009 From: david_villalobos_c at ...43... (David Villalobos Cambronero) Date: Wed, 9 Sep 2009 07:52:43 -0700 (PDT) Subject: [Gambas-user] Obtain my IP with Gambas Message-ID: <919907.96280.qm@...1656...> Hi, is there an easy way to obtain my IP address? Regards -- David From nando_f at ...951... Wed Sep 9 17:23:55 2009 From: nando_f at ...951... (nando) Date: Wed, 9 Sep 2009 10:23:55 -0500 Subject: [Gambas-user] Obtain my IP with Gambas In-Reply-To: <919907.96280.qm@...1656...> References: <919907.96280.qm@...1656...> Message-ID: <20090909151914.M48386@...951...> The way I do it is by shelling the ip command At the prompt: ip addr | grep -w "inet" I have redirected it to a file and parse items the lines I have used SHELL ".." FOR READ and used PROCESS_READ to parse the lines Somebody may have something much more elegant. -Fernando ---------- Original Message ----------- From: David Villalobos Cambronero To: Gambas Ingl?s Sent: Wed, 9 Sep 2009 07:52:43 -0700 (PDT) Subject: [Gambas-user] Obtain my IP with Gambas > Hi, is there an easy way to obtain my IP address? > > Regards > > -- > David > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From david_villalobos_c at ...43... Wed Sep 9 17:44:07 2009 From: david_villalobos_c at ...43... (David Villalobos Cambronero) Date: Wed, 9 Sep 2009 08:44:07 -0700 (PDT) Subject: [Gambas-user] Obtain my IP with Gambas In-Reply-To: <20090909151914.M48386@...951...> References: <919907.96280.qm@...1656...> <20090909151914.M48386@...951...> Message-ID: <629073.1368.qm@...1670...> mmmm it's OK, I think there must be something like User.IP :) Regards -- David ----- Original Message ---- From: nando To: mailing list for gambas users Sent: Wednesday, September 9, 2009 9:23:55 AM Subject: Re: [Gambas-user] Obtain my IP with Gambas The way I do it is by shelling the ip command At the prompt: ip addr | grep -w "inet" I have redirected it to a file and parse items the lines I have used SHELL ".." FOR READ and used PROCESS_READ to parse the lines Somebody may have something much more elegant. -Fernando ---------- Original Message ----------- From: David Villalobos Cambronero To: Gambas Ingl?s Sent: Wed, 9 Sep 2009 07:52:43 -0700 (PDT) Subject: [Gambas-user] Obtain my IP with Gambas > Hi, is there an easy way to obtain my IP address? > > Regards > > -- > David > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From 12ukwn at ...626... Wed Sep 9 17:44:14 2009 From: 12ukwn at ...626... (Jean-Yves F. Barbier) Date: Wed, 09 Sep 2009 17:44:14 +0200 Subject: [Gambas-user] Obtain my IP with Gambas In-Reply-To: <919907.96280.qm@...1656...> References: <919907.96280.qm@...1656...> Message-ID: <4AA7CD4E.2060304@...626...> David Villalobos Cambronero a ?crit : > Hi, is there an easy way to obtain my IP address? by shell, I use: ifconfig | grep inet | cut -d: -f2 | cut -d' ' -f1 | grep -v 127 if you have multiple interfaces, you must add (for each unwanted): | grep -v nnn.nnn.nnn.nnn at the end HTH JY -- I don't mind what Congress does, as long as they don't do it in the streets and frighten the horses. -- Victor Hugo From gambas at ...1... Wed Sep 9 17:50:34 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 9 Sep 2009 17:50:34 +0200 Subject: [Gambas-user] Obtain my IP with Gambas In-Reply-To: <629073.1368.qm@...1670...> References: <919907.96280.qm@...1656...> <20090909151914.M48386@...951...> <629073.1368.qm@...1670...> Message-ID: <200909091750.34223.gambas@...1...> > mmmm it's OK, I think there must be something like User.IP :) > > Regards > > > -- > David > The IP address is not related to the user at all. -- Beno?t Minisini From david_villalobos_c at ...43... Wed Sep 9 18:00:00 2009 From: david_villalobos_c at ...43... (David Villalobos Cambronero) Date: Wed, 9 Sep 2009 09:00:00 -0700 (PDT) Subject: [Gambas-user] Obtain my IP with Gambas In-Reply-To: <4AA7CD4E.2060304@...626...> References: <919907.96280.qm@...1656...> <4AA7CD4E.2060304@...626...> Message-ID: <807641.30244.qm@...1656...> Hi, It works just fine. Thanks Jean-Yves Regards -- David ----- Original Message ---- From: Jean-Yves F. Barbier <12ukwn at ...626...> To: mailing list for gambas users Sent: Wednesday, September 9, 2009 9:44:14 AM Subject: Re: [Gambas-user] Obtain my IP with Gambas David Villalobos Cambronero a ?crit : > Hi, is there an easy way to obtain my IP address? by shell, I use: ifconfig | grep inet | cut -d: -f2 | cut -d' ' -f1 | grep -v 127 if you have multiple interfaces, you must add (for each unwanted): | grep -v nnn.nnn.nnn.nnn at the end HTH JY -- I don't mind what Congress does, as long as they don't do it in the streets and frighten the horses. -- Victor Hugo ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From matteo.pasotti at ...626... Wed Sep 9 18:32:05 2009 From: matteo.pasotti at ...626... (Matteo Pasotti) Date: Wed, 09 Sep 2009 18:32:05 +0200 Subject: [Gambas-user] declaring control groups at runtime In-Reply-To: <4AA78B85.3070209@...1909...> References: <4AA6A019.2070201@...626...> <4AA78B85.3070209@...1909...> Message-ID: <4AA7D885.3070301@...626...> Thanks Doriano, it's clear and it works perfectly :-) Regards, Matteo Doriano Blengino ha scritto: > Matteo Pasotti ha scritto: > >> Hi, >> I'm writing an application that once read a configuration file, it >> creates at runtime some buttons. >> My problem is represented by the declaration of a unique event for all >> these buttons with the target of recognizing the caller and change some >> of its properties. >> I think it's similar to the Group property but I'm not able of use it at >> runtime :-( >> Someone has any idea on what can I do? >> >> > Create every button with an event handler associated like this: > > btAbutton = new Button(me) as "Button1" ' first button > btAbutton2 = new Button(me) as "Button1" ' another button > btAbutton2.tag = 5 > > The event handler for click will be: > > sub Button1_Click() > if LAST=btAbutton ... > if LAST=btAButton2... > if LAST.tag=5 then... ' the same as before > > So you can: > 1. Create buttons, and keep the variable around > 2. Create buttons without keep variables around, but setting > different TAG properties > 3. Noye that you can use other fields other than Tag (for example, Text) > 4. You can group all the buttons in the same event handler, as > before, or you can use more than one handler > > > Quick response - I hope it is clear. If not, let us know. > > Regards, > Doriano > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From ronstk at ...239... Wed Sep 9 18:44:55 2009 From: ronstk at ...239... (Ron_1st) Date: Wed, 9 Sep 2009 18:44:55 +0200 Subject: [Gambas-user] Obtain my IP with Gambas In-Reply-To: <200909091750.34223.gambas@...1...> References: <919907.96280.qm@...1656...> <629073.1368.qm@...1670...> <200909091750.34223.gambas@...1...> Message-ID: <200909091844.56037.ronstk@...239...> On Wednesday 09 September 2009, Beno?t Minisini wrote: > > mmmm it's OK, I think there must be something like User.IP :) > > > > Regards > > > > > > -- > > David > > > > The IP address is not related to the user at all. > How about System.IP? However David Villalobos did not tell which IP he wants. I do have a IP at the incomming connection of my building. For me known as WAN and a IP at the box, known to me as LAN. http://www.myipaddress.com for your WAN IP address :) Best regards, Ron_1st -- From gambas at ...1... Wed Sep 9 18:57:20 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 9 Sep 2009 18:57:20 +0200 Subject: [Gambas-user] Obtain my IP with Gambas In-Reply-To: <200909091844.56037.ronstk@...239...> References: <919907.96280.qm@...1656...> <200909091750.34223.gambas@...1...> <200909091844.56037.ronstk@...239...> Message-ID: <200909091857.20339.gambas@...1...> > On Wednesday 09 September 2009, Beno?t Minisini wrote: > > > mmmm it's OK, I think there must be something like User.IP :) > > > > > > Regards > > > > > > > > > -- > > > David > > > > The IP address is not related to the user at all. > > How about System.IP? > > > However David Villalobos did not tell which IP he wants. > I do have a IP at the incomming connection of my building. > For me known as WAN and a IP at the box, known to me as LAN. > > http://www.myipaddress.com for your WAN IP address :) > > Best regards, > > Ron_1st > IP address are attached to network interfaces, and I'm not sure that a network interface could not have several IP, and different types of IPs. Instead of adding thousands lines of code to the interpreter, I think the better is parsing the output of the ifconfig command. -- Beno?t Minisini From 12ukwn at ...626... Wed Sep 9 19:12:13 2009 From: 12ukwn at ...626... (Jean-Yves F. Barbier) Date: Wed, 09 Sep 2009 19:12:13 +0200 Subject: [Gambas-user] Obtain my IP with Gambas In-Reply-To: <200909091857.20339.gambas@...1...> References: <919907.96280.qm@...1656...> <200909091750.34223.gambas@...1...> <200909091844.56037.ronstk@...239...> <200909091857.20339.gambas@...1...> Message-ID: <4AA7E1ED.6090100@...626...> Beno?t Minisini a ?crit : >> On Wednesday 09 September 2009, Beno?t Minisini wrote: >>>> mmmm it's OK, I think there must be something like User.IP :) >>>> >>>> Regards >>>> >>>> >>>> -- >>>> David >>> The IP address is not related to the user at all. >> How about System.IP? >> >> >> However David Villalobos did not tell which IP he wants. >> I do have a IP at the incomming connection of my building. >> For me known as WAN and a IP at the box, known to me as LAN. >> >> http://www.myipaddress.com for your WAN IP address :) >> >> Best regards, >> >> Ron_1st >> > > IP address are attached to network interfaces, and I'm not sure that a network > interface could not have several IP, and different types of IPs. yep, that's right. ie: you can easily attach multiple IP adresses to an Ethernet interface as aliases, thus having one ethernet HW I/F that have 10 different IP addresses. > Instead of adding thousands lines of code to the interpreter, I think the > better is parsing the output of the ifconfig command. that's right too, many programs/scripts return different strings, obliging the dev to consider each possible return JY -- I'm rated PG-34!! From ronstk at ...239... Wed Sep 9 20:27:39 2009 From: ronstk at ...239... (Ron_1st) Date: Wed, 9 Sep 2009 20:27:39 +0200 Subject: [Gambas-user] Obtain my IP with Gambas In-Reply-To: <200909091857.20339.gambas@...1...> References: <919907.96280.qm@...1656...> <200909091844.56037.ronstk@...239...> <200909091857.20339.gambas@...1...> Message-ID: <200909092027.39995.ronstk@...239...> On Wednesday 09 September 2009, Beno?t Minisini wrote: > IP address are attached to network interfaces, and I'm not sure that a network > interface could not have several IP, and different types of IPs. > Yes it can be done. More IP at one interface. I have a remote sites IP addres as second IP on my card. This way I can develop local a page with embeded IP's in code and test on my ownbox before upload to the real site. Very handy to test flash objects that are only allowed to get data from fixed IP. In ifconfig: eth0 Link encap:Ethernet HWaddr 00:e0:18:f8:37:7e inet addr:192.168.1.33 Bcast:192.168.1.255 Mask:255.255.255.0 ... eth0:0 Link encap:Ethernet HWaddr 00:e0:18:f8:37:7e inet addr:10.0.0.128 Bcast:10.0.0.255 Mask:255.255.255.0 ... eth0:1 Link encap:Ethernet HWaddr 00:e0:18:f8:37:7e inet addr:212.16.xxx.xxx Bcast:212.16.xxx.255 Mask:255.255.255.0 ... This an be done by: ifconfig eth0:0 xx.xx.xx.xx netmask yy.yy.yy.yy up where eth0 is your primary interface and eth0:0 is a virtual one > Instead of adding thousands lines of code to the interpreter, I think the > better is parsing the output of the ifconfig command. > > -- >Beno?t Minisini ps Also on windows :) http://www.metacafe.com/watch/331275/multiple_ip_address_on_same_network_card_windows/ http://www.pc1news.com/how-to-bind-multiple-ip-address-to-a-single-network-card-796.html Best regards, Ron_1st -- From aleks.l at ...1865... Wed Sep 9 20:31:19 2009 From: aleks.l at ...1865... (Aleksandrs Livshics) Date: Wed, 9 Sep 2009 21:31:19 +0300 Subject: [Gambas-user] Selection from GridView Message-ID: <200909092131.19522.aleks.l@...1865...> Hi Gambas users. I cannot fond how to select several rows from a GridView. The difficulty happens only if the rows to select are not consequent. If there is a simple interval of rows, then selection works well, but if I want to select, say, row1 and row5 ? Also how can a row selection be canceled without selecting of another row? Just mouse click on the selected row does not cancel the selection... My version is 2.7. Aleks From gambas at ...1... Thu Sep 10 01:05:16 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 10 Sep 2009 01:05:16 +0200 Subject: [Gambas-user] Release of Gambas 2.16 Message-ID: <200909100105.16510.gambas@...1...> Hi, This new release includes the main following changes: - Gambas now compiles with libtool 2.x on recent Ubuntu versions. - CTRL+PageUp and CTRL+PageDown now switch between tabs in the IDE. - Shortcuts are correctly saved in all cases in the IDE menu editor. - The READ instruction has been fixed on 64 bits systems. - gb.pdf now compiles with recent poppler versions. The full ChangeLog is: ------------------------------------------------------------------------------- [CONFIGURATION] * BUG: Try to fix building with Autoconf 2.64 * NEW: Put custom autoconf macros in the "m4" directory. * NEW: Drop libltdl. * NEW: Use a recent libtool. * NEW: Make the ./reconf script verbose. [DEVELOPMENT ENVIRONMENT] * BUG: Clear the breakpoint list when opening a new project. * BUG: In the menu editor, shortcuts are now correctly saved in all cases. * BUG: Do not fail to load a project when a component is not installed. * BUG: In the "Requires" tab of the project property dialog, requirements are not incorrectly converted to lower case anymore. * BUG: Keep case of "Exclude" and "Requires" component properties. [INTERPRETER] * BUG: Fix many compilation warnings with gcc 4.4. * BUG: Setting a breakpoint in the startup class works again. * BUG: The READ instruction could lead to a crash when reading a string with a maximum length. Fix backported from Gambas 3. * BUG: 64-bits fixes in the interpreter API. Watching file descriptors won't crash anymore on 64 bits system when adresses outside of 32 bits address space are used. * BUG: Fix an uninitialized value in the date formatting routine. [COMPILER] * BUG: "Ambiguous braces" error message was incorrect, and has been replaced by "Ambigous brackets". * BUG: Fix symbol tables that sometimes didn't work correctly when storing symbols having non-ASCII characters. [GB.FORM.MDI] * NEW: Ctrl+PgUp and Ctrl+PgDown are two new shortcuts to move to the previous or next tab in the Workspace control. [GB.NET] * BUG: Fix an uninitialized value in SerialPort class, when retrieving the port signal status. [GB.OPENGL] * BUG: Fix bad code factorization with Gl.Vertex, Gl.Color, Gl.TexCoord and Gl.RasterPos [GB.PDF] * BUG: Make gb.pdf compile with poppler >= 0.11.3. [GB.SDL] * NEW: Remove the old m4 directory before starting backporting the updated configuration process from Gambas 3. [GB.SETTINGS] * BUG: Fix the internal string quoting routine of the Settings class, so that storing strings with newline inside works correctly. ------------------------------------------------------------------------------- Enjoy it! -- Beno?t Minisini From steven at ...2097... Thu Sep 10 05:20:21 2009 From: steven at ...2097... (Steven James Drinnan) Date: Thu, 10 Sep 2009 11:20:21 +0800 Subject: [Gambas-user] Obtain my IP with Gambas In-Reply-To: <4AA7E1ED.6090100@...626...> References: <919907.96280.qm@...1656...> <200909091750.34223.gambas@...1...> <200909091844.56037.ronstk@...239...> <200909091857.20339.gambas@...1...> <4AA7E1ED.6090100@...626...> Message-ID: <1252552822.3104.5.camel@...2273...> You could try this DIM mycmd AS String DIM myIP AS String mycmd = "ifconfig| grep -w 'inet addr' | grep -v '127.0.0.1' | cut -d: -f2| awk '{print $1}'" SHELL mycmd TO myip PRINT myip Have not confirmed what it returns but by the looks it returns the local assigned ip. Not the wan side. On Wed, 2009-09-09 at 19:12 +0200, Jean-Yves F. Barbier wrote: > Beno?t Minisini a ?crit : > >> On Wednesday 09 September 2009, Beno?t Minisini wrote: > >>>> mmmm it's OK, I think there must be something like User.IP :) > >>>> > >>>> Regards > >>>> > >>>> > >>>> -- > >>>> David > >>> The IP address is not related to the user at all. > >> How about System.IP? > >> > >> > >> However David Villalobos did not tell which IP he wants. > >> I do have a IP at the incomming connection of my building. > >> For me known as WAN and a IP at the box, known to me as LAN. > >> > >> http://www.myipaddress.com for your WAN IP address :) > >> > >> Best regards, > >> > >> Ron_1st > >> > > > > IP address are attached to network interfaces, and I'm not sure that a network > > interface could not have several IP, and different types of IPs. > > yep, that's right. > ie: you can easily attach multiple IP adresses to an Ethernet interface as aliases, > thus having one ethernet HW I/F that have 10 different IP addresses. > > > Instead of adding thousands lines of code to the interpreter, I think the > > better is parsing the output of the ifconfig command. > > that's right too, many programs/scripts return different strings, obliging > the dev to consider each possible return > > JY From steven at ...2097... Thu Sep 10 07:00:22 2009 From: steven at ...2097... (Steven James Drinnan) Date: Thu, 10 Sep 2009 13:00:22 +0800 Subject: [Gambas-user] Obtain my IP with Gambas In-Reply-To: <1252552822.3104.5.camel@...2273...> References: <919907.96280.qm@...1656...> <200909091750.34223.gambas@...1...> <200909091844.56037.ronstk@...239...> <200909091857.20339.gambas@...1...> <4AA7E1ED.6090100@...626...> <1252552822.3104.5.camel@...2273...> Message-ID: <1252558823.3104.6.camel@...2273...> Sorry here is a revised one with a wan IP lookup DIM mycmd AS String DIM myIP AS String DIM myWanIP AS String 'returns the ip of a particular device replace eth0 with the name of the device mycmd = "ifconfig eth0| grep -w 'inet addr'| cut -d: -f2| awk '{print $1}'" 'mycmd = "ifconfig| grep -w 'inet addr' | grep -v '127.0.0.1' | cut -d: -f2| awk '{print $1}'" SHELL mycmd TO myIP PRINT myip 'You need wget to get this from the internet. 'mycmd = "wget www.whatismyip.com/automation/n09230945.asp -O - -q" 'using whatismyip mycmd = "wget www.sjdsoft.hk/getip.php -O - -q" 'using my webserver (seems faster based in Hong Kong) SHELL mycmd TO myWanIP PRINT myWanIP On Thu, 2009-09-10 at 11:20 +0800, Steven James Drinnan wrote: > You could try this > > DIM mycmd AS String > DIM myIP AS String > > > mycmd = "ifconfig| grep -w 'inet addr' | grep -v '127.0.0.1' | cut -d: > -f2| awk '{print $1}'" > > SHELL mycmd TO myip > > PRINT myip > > Have not confirmed what it returns but by the looks it returns the local > assigned ip. Not the wan side. > > > On Wed, 2009-09-09 at 19:12 +0200, Jean-Yves F. Barbier wrote: > > Beno?t Minisini a ?crit : > > >> On Wednesday 09 September 2009, Beno?t Minisini wrote: > > >>>> mmmm it's OK, I think there must be something like User.IP :) > > >>>> > > >>>> Regards > > >>>> > > >>>> > > >>>> -- > > >>>> David > > >>> The IP address is not related to the user at all. > > >> How about System.IP? > > >> > > >> > > >> However David Villalobos did not tell which IP he wants. > > >> I do have a IP at the incomming connection of my building. > > >> For me known as WAN and a IP at the box, known to me as LAN. > > >> > > >> http://www.myipaddress.com for your WAN IP address :) > > >> > > >> Best regards, > > >> > > >> Ron_1st > > >> > > > > > > IP address are attached to network interfaces, and I'm not sure that a network > > > interface could not have several IP, and different types of IPs. > > > > yep, that's right. > > ie: you can easily attach multiple IP adresses to an Ethernet interface as aliases, > > thus having one ethernet HW I/F that have 10 different IP addresses. > > > > > Instead of adding thousands lines of code to the interpreter, I think the > > > better is parsing the output of the ifconfig command. > > > > that's right too, many programs/scripts return different strings, obliging > > the dev to consider each possible return > > > > JY > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From oceanosoftlapalma at ...626... Thu Sep 10 08:55:12 2009 From: oceanosoftlapalma at ...626... (=?ISO-8859-1?Q?Ricardo_D=EDaz_Mart=EDn?=) Date: Thu, 10 Sep 2009 07:55:12 +0100 Subject: [Gambas-user] Selection from GridView In-Reply-To: <200909092131.19522.aleks.l@...1865...> References: <200909092131.19522.aleks.l@...1865...> Message-ID: To do the first write (select first, third and sixth rows - gvYourGridView is the name of the gridview in your form) gvYourGridView.Rows.[0].Selected = True gvYourGridView.Rows.[2].Selected = True gvYourGridView.Rows.[5].Selected = True To do the second only write gvYourGridView.Rows.Unselect Regards, Ricardo D?az 2009/9/9 Aleksandrs Livshics > Hi Gambas users. > I cannot fond how to select several rows from a GridView. > The difficulty happens only if the rows to select are not > consequent. If there is a simple interval of rows, then > selection works well, but if I want to select, say, row1 > and row5 ? > Also how can a row selection be canceled without > selecting of another row? Just mouse click on the > selected row does not cancel the selection... > My version is 2.7. > Aleks > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From eilert-sprachen at ...221... Thu Sep 10 09:22:23 2009 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Thu, 10 Sep 2009 09:22:23 +0200 Subject: [Gambas-user] Release of Gambas 2.16 In-Reply-To: <200909100105.16510.gambas@...1...> References: <200909100105.16510.gambas@...1...> Message-ID: <4AA8A92F.9070205@...221...> Beno?t Minisini schrieb: > Hi, > > This new release includes the main following changes: > > - Gambas now compiles with libtool 2.x on recent Ubuntu versions. > - CTRL+PageUp and CTRL+PageDown now switch between tabs in the IDE. > - Shortcuts are correctly saved in all cases in the IDE menu editor. > - The READ instruction has been fixed on 64 bits systems. > - gb.pdf now compiles with recent poppler versions. > > The full ChangeLog is: > > ------------------------------------------------------------------------------- > > [CONFIGURATION] > * BUG: Try to fix building with Autoconf 2.64 > * NEW: Put custom autoconf macros in the "m4" directory. > * NEW: Drop libltdl. > * NEW: Use a recent libtool. > * NEW: Make the ./reconf script verbose. > > [DEVELOPMENT ENVIRONMENT] > * BUG: Clear the breakpoint list when opening a new project. > * BUG: In the menu editor, shortcuts are now correctly saved in all cases. > * BUG: Do not fail to load a project when a component is not installed. > * BUG: In the "Requires" tab of the project property dialog, requirements > are not incorrectly converted to lower case anymore. > * BUG: Keep case of "Exclude" and "Requires" component properties. > > [INTERPRETER] > * BUG: Fix many compilation warnings with gcc 4.4. > * BUG: Setting a breakpoint in the startup class works again. > * BUG: The READ instruction could lead to a crash when reading a string > with a maximum length. Fix backported from Gambas 3. > * BUG: 64-bits fixes in the interpreter API. Watching file descriptors > won't crash anymore on 64 bits system when adresses outside of 32 bits > address space are used. > * BUG: Fix an uninitialized value in the date formatting routine. > > [COMPILER] > * BUG: "Ambiguous braces" error message was incorrect, and has been > replaced by "Ambigous brackets". > * BUG: Fix symbol tables that sometimes didn't work correctly when storing > symbols having non-ASCII characters. > > [GB.FORM.MDI] > * NEW: Ctrl+PgUp and Ctrl+PgDown are two new shortcuts to move to the > previous or next tab in the Workspace control. > > [GB.NET] > * BUG: Fix an uninitialized value in SerialPort class, when retrieving the > port signal status. > > [GB.OPENGL] > * BUG: Fix bad code factorization with Gl.Vertex, Gl.Color, Gl.TexCoord > and Gl.RasterPos > > [GB.PDF] > * BUG: Make gb.pdf compile with poppler >= 0.11.3. > > [GB.SDL] > * NEW: Remove the old m4 directory before starting backporting the updated > configuration process from Gambas 3. > > [GB.SETTINGS] > * BUG: Fix the internal string quoting routine of the Settings class, so > that storing strings with newline inside works correctly. > > ------------------------------------------------------------------------------- > > Enjoy it! > Thanks for it, Benoit. Just tried it, compiled fine and seems to work here. Regards Rolf From aleks.l at ...1865... Thu Sep 10 11:17:14 2009 From: aleks.l at ...1865... (Aleksandrs Livshics) Date: Thu, 10 Sep 2009 12:17:14 +0300 Subject: [Gambas-user] Selection from GridView In-Reply-To: References: <200909092131.19522.aleks.l@...1865...> Message-ID: <200909101217.15171.aleks.l@...1865...> Thank you. I was not clear enough, sorry. The problem is not with programming, but with the selection by mouse and keyboard. The Ctrl and Shift do not work the way they do with the ListBox for example. The only way to select more then one row is to drag the mouse cursor keeping the left button pressed. But then only the consequent rows can be chosen. Also I cannot cancel the selection. Only if I select another row.. If I click on a selected row or double click on it nothing happens. It is NOT the same as in the case of ListBox. I must also mention that I have set the mode of the GridView to multiple. I hope now my question is clear. On Thursday 10 September 2009 09:55:12 Ricardo D?az Mart?n wrote: > To do the first write (select first, third and sixth rows - gvYourGridView > is the name of the gridview in your form) > > gvYourGridView.Rows.[0].Selected = True > gvYourGridView.Rows.[2].Selected = True > gvYourGridView.Rows.[5].Selected = True > > To do the second only write > > gvYourGridView.Rows.Unselect > > > Regards, > Ricardo D?az > > 2009/9/9 Aleksandrs Livshics > > > Hi Gambas users. > > I cannot fond how to select several rows from a GridView. > > The difficulty happens only if the rows to select are not > > consequent. If there is a simple interval of rows, then > > selection works well, but if I want to select, say, row1 > > and row5 ? > > Also how can a row selection be canceled without > > selecting of another row? Just mouse click on the > > selected row does not cancel the selection... > > My version is 2.7. > > Aleks > > > > > > ------------------------------------------------------------------------- > >----- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > > 30-Day trial. Simplify your report design, integration and deployment - > > and focus on > > what you do best, core application coding. Discover what's new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > --------------------------------------------------------------------------- >--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day trial. Simplify your report design, integration and deployment - and > focus on what you do best, core application coding. Discover what's new > with Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From eilert-sprachen at ...221... Thu Sep 10 12:03:03 2009 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Thu, 10 Sep 2009 12:03:03 +0200 Subject: [Gambas-user] Word Wrap in GridView Message-ID: <4AA8CED7.3060207@...221...> When there is a longer string than fits into a cell, GridView will wrap the text. But it won't by itself make the line taller to show the whole text properly. Instead, you will see just a little bit of the letters in the second line and the first line appears pushed upwards a bit. How can I find out if GridView has wrapped text in a cell to adjust the line height by code? Thanks for your tips! Rolf From demosthenesk at ...626... Thu Sep 10 13:47:41 2009 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Thu, 10 Sep 2009 14:47:41 +0300 Subject: [Gambas-user] Release of Gambas 2.16 In-Reply-To: <4AA8A92F.9070205@...221...> References: <200909100105.16510.gambas@...1...> <4AA8A92F.9070205@...221...> Message-ID: Thanks! On Thu, Sep 10, 2009 at 10:22 AM, Rolf-Werner Eilert wrote: > Beno?t Minisini schrieb: >> Hi, >> >> This new release includes the main following changes: >> >> - Gambas now compiles with libtool 2.x on recent Ubuntu versions. >> - CTRL+PageUp and CTRL+PageDown now switch between tabs in the IDE. >> - Shortcuts are correctly saved in all cases in the IDE menu editor. >> - The READ instruction has been fixed on 64 bits systems. >> - gb.pdf now compiles with recent poppler versions. >> >> The full ChangeLog is: >> >> ------------------------------------------------------------------------------- >> >> [CONFIGURATION] >> * BUG: Try to fix building with Autoconf 2.64 >> * NEW: Put custom autoconf macros in the "m4" directory. >> * NEW: Drop libltdl. >> * NEW: Use a recent libtool. >> * NEW: Make the ./reconf script verbose. >> >> [DEVELOPMENT ENVIRONMENT] >> * BUG: Clear the breakpoint list when opening a new project. >> * BUG: In the menu editor, shortcuts are now correctly saved in all cases. >> * BUG: Do not fail to load a project when a component is not installed. >> * BUG: In the "Requires" tab of the project property dialog, requirements >> ? are not incorrectly converted to lower case anymore. >> * BUG: Keep case of "Exclude" and "Requires" component properties. >> >> [INTERPRETER] >> * BUG: Fix many compilation warnings with gcc 4.4. >> * BUG: Setting a breakpoint in the startup class works again. >> * BUG: The READ instruction could lead to a crash when reading a string >> ? with a maximum length. Fix backported from Gambas 3. >> * BUG: 64-bits fixes in the interpreter API. Watching file descriptors >> ? won't crash anymore on 64 bits system when adresses outside of 32 bits >> ? address space are used. >> * BUG: Fix an uninitialized value in the date formatting routine. >> >> [COMPILER] >> * BUG: "Ambiguous braces" error message was incorrect, and has been >> ? replaced by "Ambigous brackets". >> * BUG: Fix symbol tables that sometimes didn't work correctly when storing >> ? symbols having non-ASCII characters. >> >> [GB.FORM.MDI] >> * NEW: Ctrl+PgUp and Ctrl+PgDown are two new shortcuts to move to the >> ? previous or next tab in the Workspace control. >> >> [GB.NET] >> * BUG: Fix an uninitialized value in SerialPort class, when retrieving the >> ? port signal status. >> >> [GB.OPENGL] >> * BUG: Fix bad code factorization with Gl.Vertex, Gl.Color, Gl.TexCoord >> ? and Gl.RasterPos >> >> [GB.PDF] >> * BUG: Make gb.pdf compile with poppler >= 0.11.3. >> >> [GB.SDL] >> * NEW: Remove the old m4 directory before starting backporting the updated >> ? configuration process from Gambas 3. >> >> [GB.SETTINGS] >> * BUG: Fix the internal string quoting routine of the Settings class, so >> ? that storing strings with newline inside works correctly. >> >> ------------------------------------------------------------------------------- >> >> Enjoy it! >> > > Thanks for it, Benoit. Just tried it, compiled fine and seems to work here. > > Regards > > Rolf > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From prog at ...2177... Thu Sep 10 16:07:23 2009 From: prog at ...2177... (craf) Date: Thu, 10 Sep 2009 10:07:23 -0400 Subject: [Gambas-user] Release of Gambas 2.16 In-Reply-To: <200909100105.16510.gambas@...1...> References: <200909100105.16510.gambas@...1...> Message-ID: <1252591643.3542.1.camel@...651...> Hi. Thank you very much CRAF -----Mensaje original----- De: Beno?t Minisini Reply-to: mailing list for gambas users Para: gambas-user at lists.sourceforge.net Asunto: [Gambas-user] Release of Gambas 2.16 Fecha: Thu, 10 Sep 2009 01:05:16 +0200 Hi, This new release includes the main following changes: - Gambas now compiles with libtool 2.x on recent Ubuntu versions. - CTRL+PageUp and CTRL+PageDown now switch between tabs in the IDE. - Shortcuts are correctly saved in all cases in the IDE menu editor. - The READ instruction has been fixed on 64 bits systems. - gb.pdf now compiles with recent poppler versions. The full ChangeLog is: ------------------------------------------------------------------------------- [CONFIGURATION] * BUG: Try to fix building with Autoconf 2.64 * NEW: Put custom autoconf macros in the "m4" directory. * NEW: Drop libltdl. * NEW: Use a recent libtool. * NEW: Make the ./reconf script verbose. [DEVELOPMENT ENVIRONMENT] * BUG: Clear the breakpoint list when opening a new project. * BUG: In the menu editor, shortcuts are now correctly saved in all cases. * BUG: Do not fail to load a project when a component is not installed. * BUG: In the "Requires" tab of the project property dialog, requirements are not incorrectly converted to lower case anymore. * BUG: Keep case of "Exclude" and "Requires" component properties. [INTERPRETER] * BUG: Fix many compilation warnings with gcc 4.4. * BUG: Setting a breakpoint in the startup class works again. * BUG: The READ instruction could lead to a crash when reading a string with a maximum length. Fix backported from Gambas 3. * BUG: 64-bits fixes in the interpreter API. Watching file descriptors won't crash anymore on 64 bits system when adresses outside of 32 bits address space are used. * BUG: Fix an uninitialized value in the date formatting routine. [COMPILER] * BUG: "Ambiguous braces" error message was incorrect, and has been replaced by "Ambigous brackets". * BUG: Fix symbol tables that sometimes didn't work correctly when storing symbols having non-ASCII characters. [GB.FORM.MDI] * NEW: Ctrl+PgUp and Ctrl+PgDown are two new shortcuts to move to the previous or next tab in the Workspace control. [GB.NET] * BUG: Fix an uninitialized value in SerialPort class, when retrieving the port signal status. [GB.OPENGL] * BUG: Fix bad code factorization with Gl.Vertex, Gl.Color, Gl.TexCoord and Gl.RasterPos [GB.PDF] * BUG: Make gb.pdf compile with poppler >= 0.11.3. [GB.SDL] * NEW: Remove the old m4 directory before starting backporting the updated configuration process from Gambas 3. [GB.SETTINGS] * BUG: Fix the internal string quoting routine of the Settings class, so that storing strings with newline inside works correctly. ------------------------------------------------------------------------------- Enjoy it! From aromeroastorga at ...626... Thu Sep 10 17:18:07 2009 From: aromeroastorga at ...626... (Angel Romero Astorga) Date: Thu, 10 Sep 2009 17:18:07 +0200 Subject: [Gambas-user] Word Wrap in GridView In-Reply-To: <4AA8CED7.3060207@...221...> References: <4AA8CED7.3060207@...221...> Message-ID: <69ef2ddd0909100818h58657cfx5886e91d1a1ebba2@...627...> Hi all My problem is similar. When I used gb.gui, GridView wrap the text, but when I use gb.qt, it don't do it. ?How can I wrap the text in a cell? thanks Rolf, I don't know how to help you, sorry 2009/9/10 Rolf-Werner Eilert > When there is a longer string than fits into a cell, GridView will wrap > the text. > > But it won't by itself make the line taller to show the whole text > properly. Instead, you will see just a little bit of the letters in the > second line and the first line appears pushed upwards a bit. > > How can I find out if GridView has wrapped text in a cell to adjust the > line height by code? > > Thanks for your tips! > > Rolf > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From Karl.Reinl at ...9... Thu Sep 10 17:34:13 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Thu, 10 Sep 2009 17:34:13 +0200 Subject: [Gambas-user] a IDE-Bug in 2.16.0 rev 2323 Message-ID: <1252596853.6410.5.camel@...40...> Salut Benoit, [OperatingSystem] OperatingSystem=Linux KernelRelease=2.6.24-24-generic DistributionVendor=ubuntu DistributionRelease="Ubuntu 8.04.3 LTS" [System] CPUArchitecture=i686 TotalRam=506932 kB [Gambas] Gambas1=gbx-1.0.17 Gambas1Path=/usr/bin/gbx Gambas2=2.16.0 Gambas2Path=/usr/local/bin/gbx2 Gambas3=2.99.0 Gambas3Path=/usr/local/bin/gbx3 ----------------- gambas2 ---------------------------------------------- 2.16.0 Revision: 2323 /usr/local/bin/gbx2 changing in IDE-Editor the sub/function by selecting it in the ComboBox raise an Error and IDE crashes. -- Amicalment Charlie -------------- next part -------------- A non-text attachment was scrubbed... Name: Bildschirmfoto-gambas2.png Type: image/png Size: 11715 bytes Desc: not available URL: From dickfrost at ...2291... Thu Sep 10 18:08:01 2009 From: dickfrost at ...2291... (Richard Frost) Date: Thu, 10 Sep 2009 12:08:01 -0400 Subject: [Gambas-user] Database manager Save Table problem Message-ID: <4AA92461.3040700@...2291...> I m a new Gambas2 user, and I am not sure where "little things" like this should be posted, so if it should be somewhere else, please let me know. My system is Ubuntu Jaunty 9.04, Gambas2-2.15.2, Postgresql In the Database Manager, when I save changes to a table which has an index defined, I get an error message that the index already exists. Looking at the code, in FTable.class, function WriteTable, there are two WriteTableDef calls, the first which creates a temporary table (which it deletes afterward), and then a call to write the actual table. Postgres evidently requires index names to be unique within the database, so the create of the temporary table fails as it tries to create another index with the same name, and which of course then it does not process the write of the actual table. It works fine if I delete the indexes first, then save the table, then add the indexes back (until I save it again). My guess is that the write of the temporary table exists to ensure there aren't any problems in the table definition before the actual table is written. Anyone have any good ideas about a way around this (changing FTable.class) ? And, how does a user "ask" if the changes could be incorporated in Gambas ? Thanks for the help, Dick From Karl.Reinl at ...9... Thu Sep 10 19:59:14 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Thu, 10 Sep 2009 19:59:14 +0200 Subject: [Gambas-user] Database manager Save Table problem In-Reply-To: <4AA92461.3040700@...2291...> References: <4AA92461.3040700@...2291...> Message-ID: <1252605554.6410.9.camel@...40...> Am Donnerstag, den 10.09.2009, 12:08 -0400 schrieb Richard Frost: > I m a new Gambas2 user, and I am not sure where "little things" like > this should be posted, so if it should be somewhere else, please let me > know. > > My system is Ubuntu Jaunty 9.04, Gambas2-2.15.2, Postgresql > > In the Database Manager, when I save changes to a table which has an > index defined, I get an error message that the index already exists. > > Looking at the code, in FTable.class, function WriteTable, there are > two WriteTableDef calls, the first which creates a temporary table > (which it deletes afterward), and then a call to write the actual table. > > Postgres evidently requires index names to be unique within the > database, so the create of the temporary table fails as it tries to > create another index with the same name, and which of course then it > does not process the write of the actual table. > > It works fine if I delete the indexes first, then save the table, then > add the indexes back (until I save it again). > > My guess is that the write of the temporary table exists to ensure there > aren't any problems in the table definition before the actual table is > written. > > Anyone have any good ideas about a way around this (changing > FTable.class) ? > > And, how does a user "ask" if the changes could be incorporated in Gambas ? > > Thanks for the help, Dick Salut Dick, for your pb I'v no answer, but but for your Q: here you are right, you found it, ...had you hints ? -- Amicalment Charlie From gambas at ...1... Thu Sep 10 20:17:44 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 10 Sep 2009 20:17:44 +0200 Subject: [Gambas-user] Database manager Save Table problem In-Reply-To: <4AA92461.3040700@...2291...> References: <4AA92461.3040700@...2291...> Message-ID: <200909102017.44168.gambas@...1...> > I m a new Gambas2 user, and I am not sure where "little things" like > this should be posted, so if it should be somewhere else, please let me > know. > > My system is Ubuntu Jaunty 9.04, Gambas2-2.15.2, Postgresql > > In the Database Manager, when I save changes to a table which has an > index defined, I get an error message that the index already exists. > > Looking at the code, in FTable.class, function WriteTable, there are > two WriteTableDef calls, the first which creates a temporary table > (which it deletes afterward), and then a call to write the actual table. > > Postgres evidently requires index names to be unique within the > database, so the create of the temporary table fails as it tries to > create another index with the same name, and which of course then it > does not process the write of the actual table. Apparently on other database systems, two index can have the same name provided they are on different tables. I will modify the postgresql driver to add the table name before each index, it should solve the problem. And, as usual, someone finds a bug just after a new version is released. :-) Regards, -- Beno?t Minisini From Karl.Reinl at ...9... Thu Sep 10 20:49:47 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Thu, 10 Sep 2009 20:49:47 +0200 Subject: [Gambas-user] question about Dialog.SelectDirectory() Message-ID: <1252608587.7855.7.camel@...40...> Salut Benoit, my be a very stupid question, but for what I'm looking for, is like the Dialog.SelectDirectory() ....but when I change into a folder/directory I would like to see also the files in that folder/directory. And as result the path to the folder/directory is returned. Reason: Choosing an SQLight "Database" or I have to say where all the invoices have to be stored.... looking for the right one. -- Amicalment Charlie From dickfrost at ...2291... Thu Sep 10 20:50:20 2009 From: dickfrost at ...2291... (Richard Frost) Date: Thu, 10 Sep 2009 14:50:20 -0400 Subject: [Gambas-user] Database manager Save Table problem In-Reply-To: <200909102017.44168.gambas@...1...> References: <4AA92461.3040700@...2291...> <200909102017.44168.gambas@...1...> Message-ID: <4AA94A6C.1040100@...2291...> Beno?t Minisini wrote: >> I m a new Gambas2 user, and I am not sure where "little things" like >> this should be posted, so if it should be somewhere else, please let me >> know. >> >> My system is Ubuntu Jaunty 9.04, Gambas2-2.15.2, Postgresql >> >> In the Database Manager, when I save changes to a table which has an >> index defined, I get an error message that the index already exists. >> >> Looking at the code, in FTable.class, function WriteTable, there are >> two WriteTableDef calls, the first which creates a temporary table >> (which it deletes afterward), and then a call to write the actual table. >> >> Postgres evidently requires index names to be unique within the >> database, so the create of the temporary table fails as it tries to >> create another index with the same name, and which of course then it >> does not process the write of the actual table. >> > > Apparently on other database systems, two index can have the same name > provided they are on different tables. > > I will modify the postgresql driver to add the table name before each index, > it should solve the problem. > > And, as usual, someone finds a bug just after a new version is released. :-) > > Regards, > > Thanks Beno?t, Sorry about the timing of finding this (relative to the new release), I am a very new Gambas user. So far it is very impressive ... thanks for your's and everyone's hard work. I also made another post which disappeared, so I'll mention it here in case it helps someone else. When I first installed, and tried to edit tables with the database manager, it appeared to do nothing. Eventually I discovered that the workspace area of the window where the table edit forms are was sized so narrow that it didn't show up (I had a hard time even noticing that it was there until I looked at the form design). By dragging it back towards the tree view part of the window, everything was just fine. Thanks again, Dick From 12ukwn at ...626... Thu Sep 10 21:07:59 2009 From: 12ukwn at ...626... (Jean-Yves F. Barbier) Date: Thu, 10 Sep 2009 21:07:59 +0200 Subject: [Gambas-user] Database manager Save Table problem In-Reply-To: <200909102017.44168.gambas@...1...> References: <4AA92461.3040700@...2291...> <200909102017.44168.gambas@...1...> Message-ID: <4AA94E8F.7020403@...626...> Beno?t Minisini a ?crit : ... > Apparently on other database systems, two index can have the same name > provided they are on different tables. ? strange (and I'm not sure this fit in SQLs standards) However, in PG, you can't have a doublon, either it is from tables, indexes, sequences (exception for functions, unless args are the same) unless your items are in different schemas. > I will modify the postgresql driver to add the table name before each index, > it should solve the problem. Be careful because this is PG's standard naming system; an index is automatically named as: tablename_columnname_key (..._pkey for primary keys) > And, as usual, someone finds a bug just after a new version is released. :-) Yeah, Murphy's law is and endless PITA, just like french taxes spontaneous generation... But cheer up, even though you're doing great ;-) JY -- Q: Why do firemen wear red suspenders? A: To conform with departmental regulations concerning uniform dress. From gambas at ...1... Thu Sep 10 21:32:52 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 10 Sep 2009 21:32:52 +0200 Subject: [Gambas-user] Database manager Save Table problem In-Reply-To: <4AA94E8F.7020403@...626...> References: <4AA92461.3040700@...2291...> <200909102017.44168.gambas@...1...> <4AA94E8F.7020403@...626...> Message-ID: <200909102132.52125.gambas@...1...> > Beno?t Minisini a ?crit : > ... > > > Apparently on other database systems, two index can have the same name > > provided they are on different tables. > > ? strange (and I'm not sure this fit in SQLs standards) > > However, in PG, you can't have a doublon, either it is from tables, > indexes, sequences (exception for functions, unless args are the same) > unless your items are in different schemas. > > > I will modify the postgresql driver to add the table name before each > > index, it should solve the problem. > > Be careful because this is PG's standard naming system; an index is > automatically named as: > tablename_columnname_key (..._pkey for primary keys) > Yep. Modifying the driver is not the solution at all. I must modify the IDE instead... -- Beno?t Minisini From dosida at ...626... Thu Sep 10 22:41:17 2009 From: dosida at ...626... (Dimitris Anogiatis) Date: Thu, 10 Sep 2009 14:41:17 -0600 Subject: [Gambas-user] question about Dialog.SelectDirectory() In-Reply-To: <1252608587.7855.7.camel@...40...> References: <1252608587.7855.7.camel@...40...> Message-ID: <82bffccf0909101341h4e2c09ebrfc3ebbac2c626753@...627...> It's not a stupid question Charlie, you can use the DirChooser control that's available in gb.form You can have a form with that control come up as modal (so you can't do anything else until you have chosen a directory and inside it you can put a dirchooser control you can get the selected path like this: tmpPath = DirChooser1.SelectedPath I hope this helps Regards Dimitris On Thu, Sep 10, 2009 at 12:49 PM, Charlie Reinl wrote: > Salut Benoit, > > my be a very stupid question, but for what I'm looking for, is like the > Dialog.SelectDirectory() ....but when I change into a folder/directory > I would like to see also the files in that folder/directory. > And as result the path to the folder/directory is returned. > > Reason: > Choosing an SQLight "Database" or I have to say where all the > invoices have to be stored.... looking for the right one. > > > -- > Amicalment > Charlie > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From oceanosoftlapalma at ...626... Fri Sep 11 09:10:35 2009 From: oceanosoftlapalma at ...626... (=?ISO-8859-1?Q?Ricardo_D=EDaz_Mart=EDn?=) Date: Fri, 11 Sep 2009 08:10:35 +0100 Subject: [Gambas-user] Selection from GridView In-Reply-To: <200909101217.15171.aleks.l@...1865...> References: <200909092131.19522.aleks.l@...1865...> <200909101217.15171.aleks.l@...1865...> Message-ID: I think you have a bug in your gambas2 version. What distro are you using? (I always run gambas in ubuntu because I've got problems with fedora and opensuse and the instalation in ubuntu form sources are easy and clear - you can see step by step in gambasdoc.org) Are you using your distro repositories to install gambas2? gnome or KDE? I confirm to you I can't cancel the selection by click at the same row. This is only possible by theGridView.Rows.Unselect (I think this is one of the differences whith listbox control, but I allways use gridviews and no ListBoxes because I'm a databases programmer and allways hide first or more columns to get from this the id of the rows after) Multiple is the correct value for do that you want. I recomended to you you try to compile gambas2 from souces in souceforge using Ubuntu (Ubuntu is not the best distro but I use this because gambas run fine and it's easy and fast to deploy my apps using freenx) Regards, 2009/9/10 Aleksandrs Livshics > Thank you. I was not clear enough, sorry. The problem is not > with programming, but with the selection by mouse and keyboard. > The Ctrl and Shift do not work the way they do with the ListBox for > example. The only way to select more then one row is to drag > the mouse cursor keeping the left button pressed. But then > only the consequent rows can be chosen. > Also I cannot cancel the selection. Only if I select another row.. > If I click on a selected row or double click on it nothing happens. > It is NOT the same as in the case of ListBox. > I must also mention that I have set the mode of the GridView to multiple. > I hope now my question is clear. > > On Thursday 10 September 2009 09:55:12 Ricardo D?az Mart?n wrote: > > To do the first write (select first, third and sixth rows - > gvYourGridView > > is the name of the gridview in your form) > > > > gvYourGridView.Rows.[0].Selected = True > > gvYourGridView.Rows.[2].Selected = True > > gvYourGridView.Rows.[5].Selected = True > > > > To do the second only write > > > > gvYourGridView.Rows.Unselect > > > > > > Regards, > > Ricardo D?az > > > > 2009/9/9 Aleksandrs Livshics > > > > > Hi Gambas users. > > > I cannot fond how to select several rows from a GridView. > > > The difficulty happens only if the rows to select are not > > > consequent. If there is a simple interval of rows, then > > > selection works well, but if I want to select, say, row1 > > > and row5 ? > > > Also how can a row selection be canceled without > > > selecting of another row? Just mouse click on the > > > selected row does not cancel the selection... > > > My version is 2.7. > > > Aleks > > > > > > > > > > ------------------------------------------------------------------------- > > >----- Let Crystal Reports handle the reporting - Free Crystal Reports > 2008 > > > 30-Day trial. Simplify your report design, integration and deployment - > > > and focus on > > > what you do best, core application coding. Discover what's new with > > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > --------------------------------------------------------------------------- > >--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > > 30-Day trial. Simplify your report design, integration and deployment - > and > > focus on what you do best, core application coding. Discover what's new > > with Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From demosthenesk at ...626... Fri Sep 11 10:38:50 2009 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Fri, 11 Sep 2009 11:38:50 +0300 Subject: [Gambas-user] Workspace and scrollbars Message-ID: Good morning to all, is it possible to use scrollbars with workspace when a form is bigger than visible screen area? -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From eilert-sprachen at ...221... Fri Sep 11 11:04:15 2009 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Fri, 11 Sep 2009 11:04:15 +0200 Subject: [Gambas-user] Word Wrap in GridView In-Reply-To: <69ef2ddd0909100818h58657cfx5886e91d1a1ebba2@...627...> References: <4AA8CED7.3060207@...221...> <69ef2ddd0909100818h58657cfx5886e91d1a1ebba2@...627...> Message-ID: <4AAA128F.9050906@...221...> Angel Romero Astorga schrieb: > Hi all > > My problem is similar. When I used gb.gui, GridView wrap the text, but when I use gb.qt, it don't do it. ?How can I wrap the text in a cell? thanks > > Rolf, I don't know how to help you, sorry I'm using the whole thing under KDE only, and I don't know why it wraps the texts (though I don't mind it doing so :-) ). Is there a property to switch this on or off? Here is an idea for the developers (bonjour Benoit...) which came to me the other day: IF there is any value about word-wrap that can be read from the original C++ GridView from the libraries, it might suffice to give just an integer about the number of text lines in a grid line. If it's > 1, the program could decide whether to stretch this line's height to make the whole text visible. A single line's height can be read easily anyway. If the programmer doesn't want to decide for each line, there could be a property as well to be set with TRUE to make the GridView care for it by itself. Just my 2 cents... Regards Rolf From aleks.l at ...1865... Fri Sep 11 13:23:00 2009 From: aleks.l at ...1865... (Aleksandrs Livshics) Date: Fri, 11 Sep 2009 14:23:00 +0300 Subject: [Gambas-user] Selection from GridView In-Reply-To: References: <200909092131.19522.aleks.l@...1865...> <200909101217.15171.aleks.l@...1865...> Message-ID: <200909111423.00505.aleks.l@...1865...> I used 2.7 on eeepc version of Ubuntu 8.1 (called EasyPeasy 1.1), but now I have compiled 2.16 on the same system. No difference. I can select one row only or a group of rows, but not 2 rows in different places of the GridView. But I cannot imagine how this netbook may be different from a usual PC in this case. Should be only small and slow and without a CD/DVD inside... And I have never noticed any differences using other software. On Friday 11 September 2009 10:10:35 Ricardo D?az Mart?n wrote: > I think you have a bug in your gambas2 version. > > What distro are you using? (I always run gambas in ubuntu because I've got > problems with fedora and opensuse and the instalation in ubuntu form > sources are easy and clear - you can see step by step in gambasdoc.org) Are > you using your distro repositories to install gambas2? gnome or KDE? > > I confirm to you I can't cancel the selection by click at the same row. > This is only possible by theGridView.Rows.Unselect (I think this is one of > the differences whith listbox control, but I allways use gridviews and no > ListBoxes because I'm a databases programmer and allways hide first or more > columns to get from this the id of the rows after) > > Multiple is the correct value for do that you want. > > I recomended to you you try to compile gambas2 from souces in souceforge > using Ubuntu (Ubuntu is not the best distro but I use this because gambas > run fine and it's easy and fast to deploy my apps using freenx) > > Regards, > > 2009/9/10 Aleksandrs Livshics > > > Thank you. I was not clear enough, sorry. The problem is not > > with programming, but with the selection by mouse and keyboard. > > The Ctrl and Shift do not work the way they do with the ListBox for > > example. The only way to select more then one row is to drag > > the mouse cursor keeping the left button pressed. But then > > only the consequent rows can be chosen. > > Also I cannot cancel the selection. Only if I select another row.. > > If I click on a selected row or double click on it nothing happens. > > It is NOT the same as in the case of ListBox. > > I must also mention that I have set the mode of the GridView to multiple. > > I hope now my question is clear. > > > > On Thursday 10 September 2009 09:55:12 Ricardo D?az Mart?n wrote: > > > To do the first write (select first, third and sixth rows - > > > > gvYourGridView > > > > > is the name of the gridview in your form) > > > > > > gvYourGridView.Rows.[0].Selected = True > > > gvYourGridView.Rows.[2].Selected = True > > > gvYourGridView.Rows.[5].Selected = True > > > > > > To do the second only write > > > > > > gvYourGridView.Rows.Unselect > > > > > > > > > Regards, > > > Ricardo D?az > > > > > > 2009/9/9 Aleksandrs Livshics > > > > > > > Hi Gambas users. > > > > I cannot fond how to select several rows from a GridView. > > > > The difficulty happens only if the rows to select are not > > > > consequent. If there is a simple interval of rows, then > > > > selection works well, but if I want to select, say, row1 > > > > and row5 ? > > > > Also how can a row selection be canceled without > > > > selecting of another row? Just mouse click on the > > > > selected row does not cancel the selection... > > > > My version is 2.7. > > > > Aleks > > > > ------------------------------------------------------------------------- > > > > > >----- Let Crystal Reports handle the reporting - Free Crystal Reports > > > > 2008 > > > > > > 30-Day trial. Simplify your report design, integration and deployment > > > > - and focus on > > > > what you do best, core application coding. Discover what's new with > > > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > > > _______________________________________________ > > > > Gambas-user mailing list > > > > Gambas-user at lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------- > >-- > > > > >--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > > > 30-Day trial. Simplify your report design, integration and deployment - > > > > and > > > > > focus on what you do best, core application coding. Discover what's new > > > with Crystal Reports now. http://p.sf.net/sfu/bobj-july > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------- > >----- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > > 30-Day trial. Simplify your report design, integration and deployment - > > and focus on > > what you do best, core application coding. Discover what's new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > --------------------------------------------------------------------------- >--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day trial. Simplify your report design, integration and deployment - and > focus on what you do best, core application coding. Discover what's new > with Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas at ...1... Fri Sep 11 13:29:05 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 11 Sep 2009 13:29:05 +0200 Subject: [Gambas-user] Word Wrap in GridView In-Reply-To: <4AAA128F.9050906@...221...> References: <4AA8CED7.3060207@...221...> <69ef2ddd0909100818h58657cfx5886e91d1a1ebba2@...627...> <4AAA128F.9050906@...221...> Message-ID: <200909111329.05178.gambas@...1...> > Angel Romero Astorga schrieb: > > Hi all > > > > My problem is similar. When I used gb.gui, GridView wrap the text, > > but when I use gb.qt, it don't do it. ?How can I wrap the text in a > cell? thanks > > > Rolf, I don't know how to help you, sorry > > I'm using the whole thing under KDE only, and I don't know why it wraps > the texts (though I don't mind it doing so :-) ). Is there a property to > switch this on or off? > > Here is an idea for the developers (bonjour Benoit...) which came to me > the other day: > > IF there is any value about word-wrap that can be read from the original > C++ GridView from the libraries, it might suffice to give just an > integer about the number of text lines in a grid line. If it's > 1, the > program could decide whether to stretch this line's height to make the > whole text visible. A single line's height can be read easily anyway. > > If the programmer doesn't want to decide for each line, there could be a > property as well to be set with TRUE to make the GridView care for it by > itself. > > Just my 2 cents... > > > Regards > > Rolf > In Gambas 3, I added a WordWrap property to the cell virtual object and the Data property, both in gb.qt4 and gb.gtk. By default, this property is false, and text is not wrapped. In Gambas 2, cells won't be never wrapped. Regards, -- Beno?t Minisini From gambas at ...1... Fri Sep 11 13:33:34 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 11 Sep 2009 13:33:34 +0200 Subject: [Gambas-user] Database manager Save Table problem In-Reply-To: <200909102132.52125.gambas@...1...> References: <4AA92461.3040700@...2291...> <4AA94E8F.7020403@...626...> <200909102132.52125.gambas@...1...> Message-ID: <200909111333.34440.gambas@...1...> > > Beno?t Minisini a ?crit : > > ... > > > > > Apparently on other database systems, two index can have the same name > > > provided they are on different tables. > > > > ? strange (and I'm not sure this fit in SQLs standards) > > > > However, in PG, you can't have a doublon, either it is from tables, > > indexes, sequences (exception for functions, unless args are the same) > > unless your items are in different schemas. > > > > > I will modify the postgresql driver to add the table name before each > > > index, it should solve the problem. > > > > Be careful because this is PG's standard naming system; an index is > > automatically named as: > > tablename_columnname_key (..._pkey for primary keys) > > Yep. Modifying the driver is not the solution at all. I must modify the IDE > instead... > I modified the algorithm used by the database manager to save table definition so that index names do not conflict. The fix is in revision 2330 for Gambas 2. I will make a 2.16.1 release soon. Regards, -- Beno?t Minisini From gambas at ...1... Fri Sep 11 13:34:25 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 11 Sep 2009 13:34:25 +0200 Subject: [Gambas-user] a IDE-Bug in 2.16.0 rev 2323 In-Reply-To: <1252596853.6410.5.camel@...40...> References: <1252596853.6410.5.camel@...40...> Message-ID: <200909111334.25618.gambas@...1...> > Salut Benoit, > > > [OperatingSystem] > OperatingSystem=Linux > KernelRelease=2.6.24-24-generic > DistributionVendor=ubuntu > DistributionRelease="Ubuntu 8.04.3 LTS" > > [System] > CPUArchitecture=i686 > TotalRam=506932 kB > > [Gambas] > Gambas1=gbx-1.0.17 > Gambas1Path=/usr/bin/gbx > Gambas2=2.16.0 > Gambas2Path=/usr/local/bin/gbx2 > Gambas3=2.99.0 > Gambas3Path=/usr/local/bin/gbx3 > > ----------------- gambas2 ---------------------------------------------- > 2.16.0 > Revision: 2323 > /usr/local/bin/gbx2 > > changing in IDE-Editor the sub/function by selecting it in the ComboBox > raise an Error and IDE crashes. > I cannot reproduce the bug - please give some details about what you did exactly. Regards, -- Beno?t Minisini From rterry at ...1946... Fri Sep 11 14:53:52 2009 From: rterry at ...1946... (richard terry) Date: Fri, 11 Sep 2009 22:53:52 +1000 Subject: [Gambas-user] Property buttons for popup dialogis in IDE not working Message-ID: <200909112253.52555.rterry@...1946...> With versions after 2219, the buttons to bring up things like font dialogs, colors, don't work for me, no-one else seems to be complaining. last version tried 2230. ??just me, if so, any way of tracking this down? Regards Richard From gambas at ...1... Fri Sep 11 15:03:53 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 11 Sep 2009 15:03:53 +0200 Subject: [Gambas-user] Property buttons for popup dialogis in IDE not working In-Reply-To: <200909112253.52555.rterry@...1946...> References: <200909112253.52555.rterry@...1946...> Message-ID: <200909111503.54034.gambas@...1...> > With versions after 2219, the buttons to bring up things like font dialogs, > colors, don't work for me, no-one else seems to be complaining. last > version tried 2230. > > ??just me, if so, any way of tracking this down? > > > Regards > > Richard > I confirm the bug. -- Beno?t Minisini From rterry at ...1946... Fri Sep 11 15:03:39 2009 From: rterry at ...1946... (richard terry) Date: Fri, 11 Sep 2009 23:03:39 +1000 Subject: [Gambas-user] Property buttons for popup dialogis in IDE not working - second try In-Reply-To: <200909112253.52555.rterry@...1946...> References: <200909112253.52555.rterry@...1946...> Message-ID: <200909112303.39158.rterry@...1946...> On Friday 11 September 2009 22:53:52 richard terry wrote: Dorry, I meant after 2319. not 2219 I've taken a close look at this and what is happening is that the mouse down, instead of depressing the button > the button disappears from under the mouse. Interestingly if I double click really quickly on the blank area where the button should be, after a number of times (seemingly randomly) the mouse up event I presume seems to trigger something and the dialog appears. Regards Richard > With versions after 2219, the buttons to bring up things like font dialogs, > colors, don't work for me, no-one else seems to be complaining. last > version tried 2230. > > ??just me, if so, any way of tracking this down? > > > Regards > > Richard > > --------------------------------------------------------------------------- >--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day trial. Simplify your report design, integration and deployment - and > focus on what you do best, core application coding. Discover what's new > with Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From Karl.Reinl at ...9... Fri Sep 11 15:33:36 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Fri, 11 Sep 2009 15:33:36 +0200 Subject: [Gambas-user] a IDE-Bug in 2.16.0 rev 2323 In-Reply-To: <200909111334.25618.gambas@...1...> References: <1252596853.6410.5.camel@...40...> <200909111334.25618.gambas@...1...> Message-ID: <1252676016.6718.18.camel@...40...> Am Freitag, den 11.09.2009, 13:34 +0200 schrieb Beno?t Minisini: > > Salut Benoit, > > > > > > [OperatingSystem] > > OperatingSystem=Linux > > KernelRelease=2.6.24-24-generic > > DistributionVendor=ubuntu > > DistributionRelease="Ubuntu 8.04.3 LTS" > > > > [System] > > CPUArchitecture=i686 > > TotalRam=506932 kB > > > > [Gambas] > > Gambas1=gbx-1.0.17 > > Gambas1Path=/usr/bin/gbx > > Gambas2=2.16.0 > > Gambas2Path=/usr/local/bin/gbx2 > > Gambas3=2.99.0 > > Gambas3Path=/usr/local/bin/gbx3 > > > > ----------------- gambas2 ---------------------------------------------- > > 2.16.0 > > Revision: 2323 > > /usr/local/bin/gbx2 > > > > changing in IDE-Editor the sub/function by selecting it in the ComboBox > > raise an Error and IDE crashes. > > > > I cannot reproduce the bug - please give some details about what you did > exactly. > > Regards, > Salut, today I cannot reproduce the bug too. What I do, I often do, is changing in an open IDE the projects, run them, test them. Move sometimes the place where the project is stored (move them). Yesterday, after the a couple of reproduction off that bug, I copied the last gambas-IDE to my home, loaded and started it, then I'v chosen the project and could reproduce the error the 3 objects had all a NULL value. What I did: I stood in the code editor and wanted to change into another SUB, which I choose in the combobox.. and hoped ...and crashed. -- Amicalment Charlie -------------- next part -------------- A non-text attachment was scrubbed... Name: Bildschirmfoto.png Type: image/png Size: 203592 bytes Desc: not available URL: From jussi.lahtinen at ...626... Fri Sep 11 17:32:21 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Fri, 11 Sep 2009 18:32:21 +0300 Subject: [Gambas-user] Profiler for Gambas projects Message-ID: <384d3900909110832l25be5b1ag41b96e3fb7a10cda@...627...> Hi all! I hope I'm not talking pure non-sense about this, but lets try... I was thinking about possibility to make profiler for Gambas projects. I readed wikipedia article about profilers ( http://en.wikipedia.org/wiki/Profiler_(computer_science)#Statistical_profilers ), and I think statistical profiler would be possible solution. I really don't know for sure. If interpreter could put out time and address in bytecode, then it would be possible to do statistical analyze about running gambas project. (maybe there is problem to translate bytecode address to line of source code..?) Would be nice if interpreter could be compiled with optionally to act like profiler or normal interpreter (then no performance penalty). I think that would be possible with preprocessor conditionals..? If I'm correct, then only thing left to do is GUI for the data, and that could be written with Gambas. Comments? I think profiler is important feature, and I hope we can find other solution than just manual instrumentation... yes I actually do that. Jussi From gambas at ...1... Fri Sep 11 17:41:15 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 11 Sep 2009 17:41:15 +0200 Subject: [Gambas-user] Profiler for Gambas projects In-Reply-To: <384d3900909110832l25be5b1ag41b96e3fb7a10cda@...627...> References: <384d3900909110832l25be5b1ag41b96e3fb7a10cda@...627...> Message-ID: <200909111741.15267.gambas@...1...> > Hi all! > I hope I'm not talking pure non-sense about this, but lets try... > I was thinking about possibility to make profiler for Gambas projects. > I readed wikipedia article about profilers ( > http://en.wikipedia.org/wiki/Profiler_(computer_science)#Statistical_profil > ers ), > and I think statistical profiler would be possible solution. I really > don't know for sure. > If interpreter could put out time and address in bytecode, then it > would be possible to do statistical analyze about running gambas > project. > (maybe there is problem to translate bytecode address to line of source > code..?) > > Would be nice if interpreter could be compiled with optionally to act > like profiler or normal interpreter (then no performance penalty). > I think that would be possible with preprocessor conditionals..? > > If I'm correct, then only thing left to do is GUI for the data, and > that could be written with Gambas. > Comments? > > I think profiler is important feature, and I hope we can find other > solution than just manual instrumentation... yes I actually do that. > > > Jussi > You mean something like valgrind/callgrind, but for the Gambas bytecode? -- Beno?t Minisini From jussi.lahtinen at ...626... Fri Sep 11 17:52:30 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Fri, 11 Sep 2009 18:52:30 +0300 Subject: [Gambas-user] Profiler for Gambas projects In-Reply-To: <200909111741.15267.gambas@...1...> References: <384d3900909110832l25be5b1ag41b96e3fb7a10cda@...627...> <200909111741.15267.gambas@...1...> Message-ID: <384d3900909110852q202ba192nc53fc9ed0a02f5a@...627...> I haven't use Valgrind, but I think yes, but I'm only interested about performace analysis. Jussi 2009/9/11 Beno?t Minisini : >> Hi all! >> I hope I'm not talking pure non-sense about this, but lets try... >> I was thinking about possibility to make profiler for Gambas projects. >> I readed wikipedia article about profilers ( >> http://en.wikipedia.org/wiki/Profiler_(computer_science)#Statistical_profil >> ers ), >> and I think statistical profiler would be possible solution. I really >> don't know for sure. >> If interpreter could put out time and address in bytecode, then it >> would be possible to do statistical analyze about running gambas >> project. >> (maybe there is problem to translate bytecode address to line of source >> ?code..?) >> >> Would be nice if interpreter could be compiled with optionally to act >> like profiler or normal interpreter (then no performance penalty). >> I think that would be possible with preprocessor conditionals..? >> >> If I'm correct, then only thing left to do is GUI for the data, and >> that could be written with Gambas. >> Comments? >> >> I think profiler is important feature, and I hope we can find other >> solution than just manual instrumentation... yes I actually do that. >> >> >> Jussi >> > > You mean something like valgrind/callgrind, but for the Gambas bytecode? > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From 12ukwn at ...626... Fri Sep 11 18:21:06 2009 From: 12ukwn at ...626... (Jean-Yves F. Barbier) Date: Fri, 11 Sep 2009 18:21:06 +0200 Subject: [Gambas-user] Profiler for Gambas projects In-Reply-To: <384d3900909110852q202ba192nc53fc9ed0a02f5a@...627...> References: <384d3900909110832l25be5b1ag41b96e3fb7a10cda@...627...> <200909111741.15267.gambas@...1...> <384d3900909110852q202ba192nc53fc9ed0a02f5a@...627...> Message-ID: <4AAA78F2.4060505@...626...> Jussi Lahtinen a ?crit : > I haven't use Valgrind, but I think yes, but I'm only interested about > performace analysis. I think that's a nice idea, when I 1st used a python profiler, I found many places where small modifications greatly improved execution time. JY -- I know things about TROY DONAHUE that can't even be PRINTED!! From Karl.Reinl at ...9... Fri Sep 11 18:49:42 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Fri, 11 Sep 2009 18:49:42 +0200 Subject: [Gambas-user] a IDE-Bug in 2.16.0 rev 2323 In-Reply-To: <200909111334.25618.gambas@...1...> References: <1252596853.6410.5.camel@...40...> <200909111334.25618.gambas@...1...> Message-ID: <1252687782.6607.1.camel@...40...> Am Freitag, den 11.09.2009, 13:34 +0200 schrieb Beno?t Minisini: > > Salut Benoit, > > > > > > [OperatingSystem] > > OperatingSystem=Linux > > KernelRelease=2.6.24-24-generic > > DistributionVendor=ubuntu > > DistributionRelease="Ubuntu 8.04.3 LTS" > > > > [System] > > CPUArchitecture=i686 > > TotalRam=506932 kB > > > > [Gambas] > > Gambas1=gbx-1.0.17 > > Gambas1Path=/usr/bin/gbx > > Gambas2=2.16.0 > > Gambas2Path=/usr/local/bin/gbx2 > > Gambas3=2.99.0 > > Gambas3Path=/usr/local/bin/gbx3 > > > > ----------------- gambas2 ---------------------------------------------- > > 2.16.0 > > Revision: 2323 > > /usr/local/bin/gbx2 > > > > changing in IDE-Editor the sub/function by selecting it in the ComboBox > > raise an Error and IDE crashes. > > > > I cannot reproduce the bug - please give some details about what you did > exactly. > > Regards, > Salut, today I cannot reproduce the bug too. What I do, I often do, is changing in an open IDE the projects, run them, test them. Move sometimes the place where the project is stored (move them). Yesterday, after the a couple of reproduction off that bug, I copied the last gambas-IDE to my home, loaded and started it, then I'v chosen the project and could reproduce the error the 3 objects had all a NULL value. What I did: I stood in the code editor and wanted to change into another SUB, which I choose in the combobox.. and hoped ...and crashed. Send you the stack. -- Amicalment Charlie -------------- next part -------------- A non-text attachment was scrubbed... Name: Unbenannt.xcf Type: image/x-xcf Size: 32544 bytes Desc: not available URL: From gambas at ...1... Fri Sep 11 18:55:41 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 11 Sep 2009 18:55:41 +0200 Subject: [Gambas-user] Profiler for Gambas projects In-Reply-To: <384d3900909110852q202ba192nc53fc9ed0a02f5a@...627...> References: <384d3900909110832l25be5b1ag41b96e3fb7a10cda@...627...> <200909111741.15267.gambas@...1...> <384d3900909110852q202ba192nc53fc9ed0a02f5a@...627...> Message-ID: <200909111855.41640.gambas@...1...> > I haven't use Valgrind, but I think yes, but I'm only interested about > performace analysis. > > Jussi > OK, I read the wikipedia entry and found how gprof works, and now I can see how it could be done: 1) Have a counter for each Gambas function written in Gambas and for each public function of each component. 2) Increment this counter each time the function is called. 3) Eventually note the current stack backtrace at each function call. 4) Have another counter for each function. 5) Run a high resolution timer that increments that counter for the current function at the time the timer is triggered. 6) Save all this results to disk when the program terminates, or in real time. But I hate slowing down the interpreter for such things. I have no idea on how to implement that in a efficient way. Maybe by compiling a special version of the interpreter that dumps this information? -- Beno?t Minisini From ron at ...1740... Fri Sep 11 19:02:25 2009 From: ron at ...1740... (Ron) Date: Fri, 11 Sep 2009 19:02:25 +0200 Subject: [Gambas-user] Profiler for Gambas projects In-Reply-To: <200909111855.41640.gambas@...1...> References: <384d3900909110832l25be5b1ag41b96e3fb7a10cda@...627...> <200909111741.15267.gambas@...1...> <384d3900909110852q202ba192nc53fc9ed0a02f5a@...627...> <200909111855.41640.gambas@...1...> Message-ID: <4AAA82A1.3070005@...1740...> Beno?t Minisini schreef: >> I haven't use Valgrind, but I think yes, but I'm only interested about >> performace analysis. >> >> Jussi >> >> > > OK, I read the wikipedia entry and found how gprof works, and now I can see > how it could be done: > > 1) Have a counter for each Gambas function written in Gambas and for each > public function of each component. > > 2) Increment this counter each time the function is called. > > 3) Eventually note the current stack backtrace at each function call. > > 4) Have another counter for each function. > > 5) Run a high resolution timer that increments that counter for the current > function at the time the timer is triggered. > > 6) Save all this results to disk when the program terminates, or in real time. > > But I hate slowing down the interpreter for such things. I have no idea on how > to implement that in a efficient way. Maybe by compiling a special version of > the interpreter that dumps this information? > > I would like to have gprof alike feature added too, my project is getting bigger and bigger. That last option is the best way I guess. We don't want to loose any performance during normal use. Regards, Ron_2nd. From jussi.lahtinen at ...626... Fri Sep 11 19:08:46 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Fri, 11 Sep 2009 20:08:46 +0300 Subject: [Gambas-user] Profiler for Gambas projects In-Reply-To: <200909111855.41640.gambas@...1...> References: <384d3900909110832l25be5b1ag41b96e3fb7a10cda@...627...> <200909111741.15267.gambas@...1...> <384d3900909110852q202ba192nc53fc9ed0a02f5a@...627...> <200909111855.41640.gambas@...1...> Message-ID: <384d3900909111008k7e4d1299v891c96f70d4c9b09@...627...> > 5) Run a high resolution timer that increments that counter for the current > function at the time the timer is triggered. How accurate high resolution timer is on Linux? > But I hate slowing down the interpreter for such things. I agree, that is not good option! > Maybe by compiling a special version of the interpreter that dumps this information? Can it be implemented somehow like this: #ifdef DEBUG cout << "This is the test version, i=" << i << endl; #else cout << "This is the production version!" << endl; #endif Jussi From david_villalobos_c at ...43... Fri Sep 11 19:20:29 2009 From: david_villalobos_c at ...43... (David Villalobos Cambronero) Date: Fri, 11 Sep 2009 10:20:29 -0700 (PDT) Subject: [Gambas-user] Profiler for Gambas projects In-Reply-To: <200909111855.41640.gambas@...1...> References: <384d3900909110832l25be5b1ag41b96e3fb7a10cda@...627...> <200909111741.15267.gambas@...1...> <384d3900909110852q202ba192nc53fc9ed0a02f5a@...627...> <200909111855.41640.gambas@...1...> Message-ID: <661962.28975.qm@...1667...> What about having an Option to select if run in performace analysis or not, so the compiler will have all the needed code, but only executed if wanted? Regards -- David ----- Original Message ---- From: Beno?t Minisini To: mailing list for gambas users Sent: Friday, September 11, 2009 10:55:41 AM Subject: Re: [Gambas-user] Profiler for Gambas projects > I haven't use Valgrind, but I think yes, but I'm only interested about > performace analysis. > > Jussi > OK, I read the wikipedia entry and found how gprof works, and now I can see how it could be done: 1) Have a counter for each Gambas function written in Gambas and for each public function of each component. 2) Increment this counter each time the function is called. 3) Eventually note the current stack backtrace at each function call. 4) Have another counter for each function. 5) Run a high resolution timer that increments that counter for the current function at the time the timer is triggered. 6) Save all this results to disk when the program terminates, or in real time. But I hate slowing down the interpreter for such things. I have no idea on how to implement that in a efficient way. Maybe by compiling a special version of the interpreter that dumps this information? -- Beno?t Minisini ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From ron at ...1740... Fri Sep 11 19:46:32 2009 From: ron at ...1740... (Ron) Date: Fri, 11 Sep 2009 19:46:32 +0200 Subject: [Gambas-user] Slider problem? Message-ID: <4AAA8CF8.7020701@...1740...> If you disable a Slider, so Slider1.Enabled = FALSE , it still fires it's MouseUp event when clicked. This is not what I expected. Is this expected behaviour? Gambas 2.16.0 gb.qt. Regards, Ron_2nd. From pinozollo at ...626... Fri Sep 11 20:30:03 2009 From: pinozollo at ...626... (Pino Zollo) Date: Fri, 11 Sep 2009 14:30:03 -0400 Subject: [Gambas-user] How to crash the IDE Message-ID: <200909111430.04262.pinozollo@...626...> Hi, On 2.15.0 ..... Editing a form select the Background change feature, select Free colour and write into the HEX colour: HDFDFFF .... --> Type mismatch Wanted Integer got Null Instead FColourChooser.txtHexa_Change.372 ...and IDE dies. Regards Pino -- Key ID: 0xF6768208 Key fingerprint = B16D 0A7C 5B29 A334 CE6A 71F6 EAF8 3D88 F676 8208 Key server: hkp://wwwkeys.eu.pgp.net From matteo.pasotti at ...626... Fri Sep 11 20:46:39 2009 From: matteo.pasotti at ...626... (Matteo Pasotti) Date: Fri, 11 Sep 2009 20:46:39 +0200 Subject: [Gambas-user] HttpClient class - post method Q&A Message-ID: <4AAA9B0F.3070701@...626...> Hi, I'm developing a little application that uses the httpclient class from gb.net.curl component. In this case I used the Post method but I'm not been able to find documentation about it on gambasdoc.org. So, considering that I solved my problem, I would share my little portion of code hoping that it will be useful for someone else. DIM str AS String DIM t AS HttpClient t.Async = FALSE t.URL = "http://www.example.dot/something.php" t.Timeout = 60 str = "Hello" t.Post("application/x-www-form-urlencoded", "s=" & str) IF t.Status < 0 THEN Message("error") ELSE IF Lof(t) THEN READ #t, buffer, Lof(t) Message(buffer) ENDIF The only problem I faced is about str encoding. I solved this problem using Replace function (with a String array manually populated) but I don't know if there's a better way. Any tips? Regards, Matteo From gambas at ...1... Fri Sep 11 21:02:44 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 11 Sep 2009 21:02:44 +0200 Subject: [Gambas-user] Slider problem? In-Reply-To: <4AAA8CF8.7020701@...1740...> References: <4AAA8CF8.7020701@...1740...> Message-ID: <200909112102.44795.gambas@...1...> > If you disable a Slider, so Slider1.Enabled = FALSE , it still fires > it's MouseUp event when clicked. > This is not what I expected. Is this expected behaviour? > > Gambas 2.16.0 gb.qt. > > Regards, > Ron_2nd. > This is not a bug, this is by design. The bug is in gb.gtk, where mouse events are not raised when Enabled is False, and often not raised too when Enabled is True. Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Fri Sep 11 21:36:32 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Fri, 11 Sep 2009 22:36:32 +0300 Subject: [Gambas-user] Profiler for Gambas projects In-Reply-To: <661962.28975.qm@...1667...> References: <384d3900909110832l25be5b1ag41b96e3fb7a10cda@...627...> <200909111741.15267.gambas@...1...> <384d3900909110852q202ba192nc53fc9ed0a02f5a@...627...> <200909111855.41640.gambas@...1...> <661962.28975.qm@...1667...> Message-ID: <384d3900909111236p28d471e6wc3a54315348a0e93@...627...> It would still have performance impact, because interpreter would have to constantly check if profiler section of code is needed to execute. Compiler isn't used at runtime, so changes should be made to interpreter. Jussi On Fri, Sep 11, 2009 at 20:20, David Villalobos Cambronero wrote: > What about having an Option to select if run in performace analysis or not, so the compiler will have all the needed code, but only executed if wanted? > > ?Regards > > > -- > David > > > > ----- Original Message ---- > From: Beno?t Minisini > To: mailing list for gambas users > Sent: Friday, September 11, 2009 10:55:41 AM > Subject: Re: [Gambas-user] Profiler for Gambas projects > >> I haven't use Valgrind, but I think yes, but I'm only interested about >> performace analysis. >> >> Jussi >> > > OK, I read the wikipedia entry and found how gprof works, and now I can see > how it could be done: > > 1) Have a counter for each Gambas function written in Gambas and for each > public function of each component. > > 2) Increment this counter each time the function is called. > > 3) Eventually note the current stack backtrace at each function call. > > 4) Have another counter for each function. > > 5) Run a high resolution timer that increments that counter for the current > function at the time the timer is triggered. > > 6) Save all this results to disk when the program terminates, or in real time. > > But I hate slowing down the interpreter for such things. I have no idea on how > to implement that in a efficient way. Maybe by compiling a special version of > the interpreter that dumps this information? > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From ron at ...1740... Fri Sep 11 21:41:18 2009 From: ron at ...1740... (Ron) Date: Fri, 11 Sep 2009 21:41:18 +0200 Subject: [Gambas-user] Slider problem? In-Reply-To: <200909112102.44795.gambas@...1...> References: <4AAA8CF8.7020701@...1740...> <200909112102.44795.gambas@...1...> Message-ID: <4AAAA7DE.50808@...1740...> Beno?t Minisini schreef: >> If you disable a Slider, so Slider1.Enabled = FALSE , it still fires >> it's MouseUp event when clicked. >> This is not what I expected. Is this expected behaviour? >> >> Gambas 2.16.0 gb.qt. >> >> Regards, >> Ron_2nd. >> >> > > This is not a bug, this is by design. > > The bug is in gb.gtk, where mouse events are not raised when Enabled is False, > and often not raised too when Enabled is True. > > Regards, > > Hmm ok, i'm using gb.qt, so because of a bug in gb.gtk you change it's behaviour too.. I forgive you if you promise me we don't end up like visual basic ;-) Regards, Ron_2nd. From gambas at ...1... Fri Sep 11 21:44:45 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 11 Sep 2009 21:44:45 +0200 Subject: [Gambas-user] Slider problem? In-Reply-To: <4AAAA7DE.50808@...1740...> References: <4AAA8CF8.7020701@...1740...> <200909112102.44795.gambas@...1...> <4AAAA7DE.50808@...1740...> Message-ID: <200909112144.45422.gambas@...1...> > Beno?t Minisini schreef: > >> If you disable a Slider, so Slider1.Enabled = FALSE , it still fires > >> it's MouseUp event when clicked. > >> This is not what I expected. Is this expected behaviour? > >> > >> Gambas 2.16.0 gb.qt. > >> > >> Regards, > >> Ron_2nd. > > > > This is not a bug, this is by design. > > > > The bug is in gb.gtk, where mouse events are not raised when Enabled is > > False, and often not raised too when Enabled is True. > > > > Regards, > > Hmm ok, i'm using gb.qt, so because of a bug in gb.gtk you change it's > behaviour too.. > I forgive you if you promise me we don't end up like visual basic ;-) > > Regards, > Ron_2nd. > I didn't change the behaviour of gb.qt because of gb.gtk. Mouse events must be always raised, whatever the value of the Enabled property. Regards, -- Beno?t Minisini From ron at ...1740... Fri Sep 11 21:52:56 2009 From: ron at ...1740... (Ron) Date: Fri, 11 Sep 2009 21:52:56 +0200 Subject: [Gambas-user] Slider problem? In-Reply-To: <200909112144.45422.gambas@...1...> References: <4AAA8CF8.7020701@...1740...> <200909112102.44795.gambas@...1...> <4AAAA7DE.50808@...1740...> <200909112144.45422.gambas@...1...> Message-ID: <4AAAAA98.2040608@...1740...> Beno?t Minisini schreef: >> Beno?t Minisini schreef: >> >>>> If you disable a Slider, so Slider1.Enabled = FALSE , it still fires >>>> it's MouseUp event when clicked. >>>> This is not what I expected. Is this expected behaviour? >>>> >>>> Gambas 2.16.0 gb.qt. >>>> >>>> Regards, >>>> Ron_2nd. >>>> >>> This is not a bug, this is by design. >>> >>> The bug is in gb.gtk, where mouse events are not raised when Enabled is >>> False, and often not raised too when Enabled is True. >>> >>> Regards, >>> >> Hmm ok, i'm using gb.qt, so because of a bug in gb.gtk you change it's >> behaviour too.. >> I forgive you if you promise me we don't end up like visual basic ;-) >> >> Regards, >> Ron_2nd. >> >> > > I didn't change the behaviour of gb.qt because of gb.gtk. Mouse events must be > always raised, whatever the value of the Enabled property. > > Regards, > > Ok understand now. I have to change my code a bit to not run into trouble then when a user clicks the disabled control... Regards, Ron_2nd. From ivanwms64 at ...43... Fri Sep 11 22:01:36 2009 From: ivanwms64 at ...43... (Ivan Williams) Date: Fri, 11 Sep 2009 13:01:36 -0700 (PDT) Subject: [Gambas-user] intel i7 - parallel processing In-Reply-To: References: Message-ID: <150908.82769.qm@...2293...> Greetings I currently program in gambas on a P4 Dual Core with 2 GB RAM and will be upgrading to a I7 system by the end of the quarter. I am wondering if anyone out there is programming on a i7 and if so, what kind of speed are you seeing in program execution? Also, have you had any success in parallel programming with gambas and if so are you willing to share your code? Thank You Ivan I never saw a wild thing sorry for itself. A small bird will drop frozen dead from a bough Without ever having felt sorry for itself. -- D.H. Lawrence http://www.usconstitution.net/const.html Linux - Live Free or Die. From nando_f at ...951... Sat Sep 12 01:25:47 2009 From: nando_f at ...951... (nando) Date: Fri, 11 Sep 2009 18:25:47 -0500 Subject: [Gambas-user] intel i7 - parallel processing In-Reply-To: <150908.82769.qm@...2293...> References: <150908.82769.qm@...2293...> Message-ID: <20090911231731.M39197@...951...> I run simultaneously multiple Gambas apps on a multicore cpu - some very cpu and I/O intensive and SHELLing big scripts in the background. Most impressed I'm with is dual Atom with hyperthreading which looks like four cores to the kernel. My apps are not the same (ie parallel programs). The kernel does wonderful job working and balancing things out. Parallel programming and multi-threading is where things are going. Gambas isn't either (yet). I written a few programs that SHELLs multiple identical Gambas progams as if it was like a single multi-thread program. Works fine. Benoit et al has done a wonderfuljob! -Fernando ---------- Original Message ----------- From: Ivan Williams To: gambas-user at lists.sourceforge.net Sent: Fri, 11 Sep 2009 13:01:36 -0700 (PDT) Subject: [Gambas-user] intel i7 - parallel processing > Greetings > > I currently program in gambas on a P4 Dual Core with 2 GB RAM and will be > upgrading to a I7 system by the end of the quarter. I am wondering if anyone > out there is programming on a i7 and if so, what kind of speed are you seeing in > program execution? Also, have you had any success in parallel programming with > gambas and if so are you willing to share your code? > > Thank You > > Ivan > > I never saw a wild thing sorry for itself. > A small bird will drop frozen dead from a bough > Without ever having felt sorry for itself. > -- D.H. Lawrence > > http://www.usconstitution.net/const.html > > Linux - Live Free or Die. > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From gambas at ...1... Sat Sep 12 02:54:28 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 12 Sep 2009 02:54:28 +0200 Subject: [Gambas-user] Slider problem? In-Reply-To: <4AAAAA98.2040608@...1740...> References: <4AAA8CF8.7020701@...1740...> <200909112144.45422.gambas@...1...> <4AAAAA98.2040608@...1740...> Message-ID: <200909120254.28064.gambas@...1...> > Beno?t Minisini schreef: > >> Beno?t Minisini schreef: > >>>> If you disable a Slider, so Slider1.Enabled = FALSE , it still fires > >>>> it's MouseUp event when clicked. > >>>> This is not what I expected. Is this expected behaviour? > >>>> > >>>> Gambas 2.16.0 gb.qt. > >>>> > >>>> Regards, > >>>> Ron_2nd. > >>> > >>> This is not a bug, this is by design. > >>> > >>> The bug is in gb.gtk, where mouse events are not raised when Enabled is > >>> False, and often not raised too when Enabled is True. > >>> > >>> Regards, > >> > >> Hmm ok, i'm using gb.qt, so because of a bug in gb.gtk you change it's > >> behaviour too.. > >> I forgive you if you promise me we don't end up like visual basic ;-) > >> > >> Regards, > >> Ron_2nd. > > > > I didn't change the behaviour of gb.qt because of gb.gtk. Mouse events > > must be always raised, whatever the value of the Enabled property. > > > > Regards, > > Ok understand now. > > I have to change my code a bit to not run into trouble then when a user > clicks the disabled control... > > Regards, > Ron_2nd. > Apparently having the same behaviour in gb.gtk than in gb.qt is impossible. You cannot catch events in gb.gtk before they are processed. So I think you will be pleased :-), I have to do the contrary: prevent a disabled control to raise *any* event in gb.qt. Regards, -- Beno?t Minisini From leemcpherson at ...626... Sat Sep 12 06:43:10 2009 From: leemcpherson at ...626... (Lee McPherson) Date: Sat, 12 Sep 2009 00:43:10 -0400 Subject: [Gambas-user] Application_mousedown() + Application_keypress() ? In-Reply-To: <150908.82769.qm@...2293...> References: <150908.82769.qm@...2293...> Message-ID: <4AAB26DE.1090403@...626...> I'm trying to get an application-wide mouse down event to register. I found that when I do a Form_mousedown() it only triggers when you click on an empty part of the form, not when you're clicking on any type of control. I'm looking for something that will trigger whenever you hit the mouse button. (My app is going to be full screen, so I don't care if it works outside of the app window or not.) During my searching of the list archives, I found someone tried to use Application_Keypress() as a way to get a key press while the app is running. Well, I tried it and it doesn't work, nothing happens: Static Public Sub Application_Keypress() Message.Info(Key.code) End I tried it on Gambas 2.8 and I even compiled Gambas 3.0 r2329 and that didn't change anything. I am using GTK only (Ubuntu). Any ideas? Thanks, Lee From doriano.blengino at ...1909... Sat Sep 12 08:28:38 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sat, 12 Sep 2009 08:28:38 +0200 Subject: [Gambas-user] Profiler for Gambas projects In-Reply-To: <384d3900909111236p28d471e6wc3a54315348a0e93@...627...> References: <384d3900909110832l25be5b1ag41b96e3fb7a10cda@...627...> <200909111741.15267.gambas@...1...> <384d3900909110852q202ba192nc53fc9ed0a02f5a@...627...> <200909111855.41640.gambas@...1...> <661962.28975.qm@...1667...> <384d3900909111236p28d471e6wc3a54315348a0e93@...627...> Message-ID: <4AAB3F96.8040202@...1909...> Jussi Lahtinen ha scritto: > It would still have performance impact, > because interpreter would have to constantly check if profiler section > of code is needed to execute. > Compiler isn't used at runtime, so changes should be made to interpreter. > I remember the old good days when turbo pascal came out. There was an IDE, with integrated compiler and debugger, like gambas. But there were also separate, command line, compiler and debugger (that debugger was a milestone. Never seen something better yet). Until here, this is similar to gambas. Then, there was a command line profiler. The program to profile only needed to have debug information stored in the executable (just like gambas). There were two main ways to profile - statistical and another one, can't remember how it was named. The statistical method used a timer to interrupt the program, and counted the times the program counter was in a particular line of code at the time the timer interrupted the program. It does not really matter the frequency of the timer - what matters is to collect enough data. If a program takes only a few seconds to execute, then a high speed timer is needed. If the program is long (and at that time it was not uncommon for a program to take several hours to do the job), then a slower timer could be used. The result of profiling was a text file, which could be read by hand or used to have a graphical snapshot. The other method was to count the functions usage, func by func. I found the timer solution to be better, because normally I can guess how many times a routine gets called - no need to have something else to do that. A gambas program can spend lots of its time in the idle loop and, in general, today's program can spend a lot of time in other duties (gui, disk, network and so on). So I think that some support for profiling could be added in the language, like the DEBUG instruction. For example a "PROFILE ON" or "PROFILE OFF". One could surround the whole program or just some piece of code by PROFILE ON and PROFILE OFF. When profiling is ON, the timer runs and collects data (which is not too much: a single integer for every line of source). This way a programmer can see, even in a single routine, which is the slowest instruction. By grouping data referring to a single SUB, a usage per subroutine can be derived. The only thing I can add is that, by the time, this "profiling" loosed for me its importance - for several reasons, I think. Computers are much faster, compilers are more optimizing, analisys of the task and experience tell what to do - better than a profiler. This was clearly stated in the turbo profiler documentation: "the most important mean to write a fast program is to analyze which is the better algorithm, not to do tricks at the instructions level". But sometimes a profiler could be handy anyway. Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From doriano.blengino at ...1909... Sat Sep 12 08:35:31 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sat, 12 Sep 2009 08:35:31 +0200 Subject: [Gambas-user] Slider problem? In-Reply-To: <200909120254.28064.gambas@...1...> References: <4AAA8CF8.7020701@...1740...> <200909112144.45422.gambas@...1...> <4AAAAA98.2040608@...1740...> <200909120254.28064.gambas@...1...> Message-ID: <4AAB4133.4000600@...1909...> Beno?t Minisini ha scritto: >> Beno?t Minisini schreef: >> >>>> Beno?t Minisini schreef: >>>> >>>>>> If you disable a Slider, so Slider1.Enabled = FALSE , it still fires >>>>>> it's MouseUp event when clicked. >>>>>> This is not what I expected. Is this expected behaviour? >>>>>> >>>>>> Gambas 2.16.0 gb.qt. >>>>>> >>>>>> Regards, >>>>>> Ron_2nd. >>>>>> >>>>> This is not a bug, this is by design. >>>>> >>>>> The bug is in gb.gtk, where mouse events are not raised when Enabled is >>>>> False, and often not raised too when Enabled is True. >>>>> >>>>> Regards, >>>>> >>>> Hmm ok, i'm using gb.qt, so because of a bug in gb.gtk you change it's >>>> behaviour too.. >>>> I forgive you if you promise me we don't end up like visual basic ;-) >>>> >>>> Regards, >>>> Ron_2nd. >>>> >>> I didn't change the behaviour of gb.qt because of gb.gtk. Mouse events >>> must be always raised, whatever the value of the Enabled property. >>> Why? Why should mouse events "be always raised"? >>> Regards, >>> >> Ok understand now. >> >> I have to change my code a bit to not run into trouble then when a user >> clicks the disabled control... >> >> Regards, >> Ron_2nd. >> >> > > Apparently having the same behaviour in gb.gtk than in gb.qt is impossible. > You cannot catch events in gb.gtk before they are processed. > I am not really sure, but it seems to me that it is possible. Documentation is very poor (disgusting, I could say), but it seems you can connect to events at several stages, and even do the event cycle yourself. Complicated matter, anyway. > So I think you will be pleased :-), I have to do the contrary: prevent a > disabled control to raise *any* event in gb.qt. > > Regards, > > Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From dima.malkov.russia at ...626... Sat Sep 12 10:20:35 2009 From: dima.malkov.russia at ...626... (Dima Malkov) Date: Sat, 12 Sep 2009 13:20:35 +0500 Subject: [Gambas-user] Problem with UTF-8 in Gambas-connection to MySQL Message-ID: <1f13ba8b0909120120n2a13f7e8ya08b7bc4a5daf939@...627...> (I don't know English well) Use Debian 5 "Lenny" -32, Gambas 2.7 from repository. I develop an account program for russians users. It must work with cyrillic correct. I have made MySQL5 (default UTF8) database with direct CHARACTER SET UTF8 option, tables with direct CHARACTER SET UTF8 option. Then connected to it from gambas, output data to GridView. All string fields were not readable. I run example "Database". It works correct with some french symbols, but with cyrillic not. Program "Database manager" do the same. I get sources of Gambas-2.8.2. Opened main.c file of MySQL driver, find function <<< static int open_database(DB_DESC *desc, DB_DATABASE *db) >>>. Add string <<< fprintf(stderr, "Character set GB[%s] mysql[%s]\n", GB.System.Charset(), mysql_character_set_name(conn)); >>> before and after string <<< set_character_set(db); >>>. Compiled only this driver, copied it to /usr/lib/gambas2. Run my program. Result: <<< Character set GB[UTF-8] mysql[latin1] Character set GB[UTF-8] mysql[latin1] >>> in console. Why latin1 instead UTF-8? From jussi.lahtinen at ...626... Sat Sep 12 14:39:35 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 12 Sep 2009 15:39:35 +0300 Subject: [Gambas-user] Profiler for Gambas projects In-Reply-To: <4AAB3F96.8040202@...1909...> References: <384d3900909110832l25be5b1ag41b96e3fb7a10cda@...627...> <200909111741.15267.gambas@...1...> <384d3900909110852q202ba192nc53fc9ed0a02f5a@...627...> <200909111855.41640.gambas@...1...> <661962.28975.qm@...1667...> <384d3900909111236p28d471e6wc3a54315348a0e93@...627...> <4AAB3F96.8040202@...1909...> Message-ID: <384d3900909120539v48df2885y789f8f75fd8957f3@...627...> > Computers are much faster, Still your program can run slowly! > compilers are more optimizing, Gambas compiler do not optimize at all. > analisys of the task and experience tell what to do - better than a profiler. Not true at all. That's almost always opposite! > This was clearly stated in the turbo profiler documentation: "the most important mean to > write a fast program is to analyze which is the better algorithm, not to > do tricks at the instructions level". Idea of profiler is not to optimize instruction level. Profiler is there to tell you, what sub, function, etc. is slowing down your program. With big complicated project, it is very hard to say what is the true bottleneck. You can't "run the whole code in your head" and see where the problem is. But true is that when you optimize, you optimize algorithm, not instructions. I highly recommend to put your code into test. If you have written something with python or C/C++, test it with profiler. I bet you will be surprised! Jussi From ronstk at ...239... Sat Sep 12 14:43:29 2009 From: ronstk at ...239... (Ron_1st) Date: Sat, 12 Sep 2009 14:43:29 +0200 Subject: [Gambas-user] Slider problem? In-Reply-To: <4AAB4133.4000600@...1909...> References: <4AAA8CF8.7020701@...1740...> <200909120254.28064.gambas@...1...> <4AAB4133.4000600@...1909...> Message-ID: <200909121443.29951.ronstk@...239...> On Saturday 12 September 2009, Doriano Blengino wrote: > >>> I didn't change the behaviour of gb.qt because of gb.gtk. Mouse events > >>> must be always raised, whatever the value of the Enabled property. > >>> ? ? ? > Why? Why should mouse events "be always raised"? What if the rightmouse button has a menu option to enable/disable the control or you want to popup a message to tell the user it is disabled and will not do anything. :) > > >>> Regards, > Best regards, Ron_1st -- From jussi.lahtinen at ...626... Sat Sep 12 14:43:28 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 12 Sep 2009 15:43:28 +0300 Subject: [Gambas-user] Profiler for Gambas projects In-Reply-To: <384d3900909120539v48df2885y789f8f75fd8957f3@...627...> References: <384d3900909110832l25be5b1ag41b96e3fb7a10cda@...627...> <200909111741.15267.gambas@...1...> <384d3900909110852q202ba192nc53fc9ed0a02f5a@...627...> <200909111855.41640.gambas@...1...> <661962.28975.qm@...1667...> <384d3900909111236p28d471e6wc3a54315348a0e93@...627...> <4AAB3F96.8040202@...1909...> <384d3900909120539v48df2885y789f8f75fd8957f3@...627...> Message-ID: <384d3900909120543o544a7b8el6bee4f443d1d57cf@...627...> I must add this also... Profiler is like debugger, if you know where the error is you don't need debugger, but many times you don't! Same thing with profiler, if you know where the bottleneck is you don't need profiler, but many times you don't! Jussi On Sat, Sep 12, 2009 at 15:39, Jussi Lahtinen wrote: >> Computers are much faster, > > ?Still your program can run slowly! > > >> compilers are more optimizing, > > ?Gambas compiler do not optimize at all. > > >> analisys of the task and experience tell what to do - better than a profiler. > > ?Not true at all. That's almost always opposite! > > >> This was clearly stated in the turbo profiler documentation: "the most important mean to >> write a fast program is to analyze which is the better algorithm, not to >> do tricks at the instructions level". > > ?Idea of profiler is not to optimize instruction level. > ?Profiler is there to tell you, what sub, function, etc. is slowing > down your program. > ?With big complicated project, it is very hard to say what is the true > bottleneck. > ?You can't "run the whole code in your head" and see where the problem is. > ?But true is that when you optimize, you optimize algorithm, not instructions. > > ?I highly recommend to put your code into test. If you have written > something with python > ?or C/C++, test it with profiler. I bet you will be surprised! > > > Jussi > From johny.provoost at ...27... Sat Sep 12 14:50:57 2009 From: johny.provoost at ...27... (Johny Provoost) Date: Sat, 12 Sep 2009 14:50:57 +0200 Subject: [Gambas-user] Check if a program is already started Message-ID: <4AAB9931.2030401@...27...> Hi, Is there a command to check if a program (programed in Gambas) is already running? I want to avoid that a program is started twice. Johny Provoost From jussi.lahtinen at ...626... Sat Sep 12 15:02:44 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 12 Sep 2009 16:02:44 +0300 Subject: [Gambas-user] Check if a program is already started In-Reply-To: <4AAB9931.2030401@...27...> References: <4AAB9931.2030401@...27...> Message-ID: <384d3900909120602s7e9813bm5daba8242df71ace@...627...> Not very elegant, but works: Dim sOutput As String Exec ["pgrep", "-f", "-l", "NameOfYourProgram.gambas"] Wait To sOutput If Split(Trim$(sOutput), gb.NewLine).Count > 1 Then 'Allready running EndIf Jussi On Sat, Sep 12, 2009 at 15:50, Johny Provoost wrote: > Hi, > > Is there a command to check if a program (programed in Gambas) is > already running? > I want to avoid that a program is started twice. > > > Johny Provoost > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Sat Sep 12 14:58:55 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 12 Sep 2009 15:58:55 +0300 Subject: [Gambas-user] intel i7 - parallel processing In-Reply-To: <20090911231731.M39197@...951...> References: <150908.82769.qm@...2293...> <20090911231731.M39197@...951...> Message-ID: <384d3900909120558g247768a5ia00815a921e2cfe2@...627...> I have found problems with multi-threading, not so much because of gambas. But how to spilt a task for multi-threading! It would be interesting to know what solutions people has invent. Jussi On Sat, Sep 12, 2009 at 02:25, nando wrote: > I run simultaneously multiple Gambas apps on a multicore cpu - > some very cpu and I/O intensive and SHELLing big scripts > in the background. > Most impressed I'm with is dual Atom with hyperthreading > which looks like four cores to the kernel. > My apps are not the same (ie parallel programs). > The kernel does wonderful job working and balancing things out. > Parallel programming and multi-threading is where things are going. > Gambas isn't either (yet). > I written a few programs that SHELLs multiple identical Gambas progams > as if it was like a single multi-thread program. ?Works fine. > Benoit et al has done a wonderfuljob! > -Fernando > > > > ---------- Original Message ----------- > From: Ivan Williams > To: gambas-user at lists.sourceforge.net > Sent: Fri, 11 Sep 2009 13:01:36 -0700 (PDT) > Subject: [Gambas-user] intel i7 - parallel processing > >> Greetings >> >> ? ? ?I currently program in gambas on a P4 Dual Core with 2 GB RAM and will be >> upgrading to a I7 system by the end of the quarter. ?I am wondering if anyone >> out there is programming on a i7 and if so, what kind of speed are you seeing in >> program execution? ?Also, have you had any success in parallel programming with >> gambas and if so are you willing to share your code? >> >> Thank You >> >> Ivan >> >> I never saw a wild thing sorry for itself. >> A small bird will drop frozen dead from a bough >> Without ever having felt sorry for itself. >> -- D.H. Lawrence >> >> http://www.usconstitution.net/const.html >> >> Linux - Live Free or Die. >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> trial. Simplify your report design, integration and deployment - and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. ?http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > ------- End of Original Message ------- > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Sat Sep 12 15:40:43 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 12 Sep 2009 15:40:43 +0200 Subject: [Gambas-user] Slider problem? In-Reply-To: <200909121443.29951.ronstk@...239...> References: <4AAA8CF8.7020701@...1740...> <4AAB4133.4000600@...1909...> <200909121443.29951.ronstk@...239...> Message-ID: <200909121540.43552.gambas@...1...> > On Saturday 12 September 2009, Doriano Blengino wrote: > > >>> I didn't change the behaviour of gb.qt because of gb.gtk. Mouse > > >>> events must be always raised, whatever the value of the Enabled > > >>> property. > > > > Why? Why should mouse events "be always raised"? > > What if the rightmouse button has a menu option to enable/disable > the control or you want to popup a message to tell the user it is > disabled and will not do anything. :) > Actually you must never use Mouse events directly unless you know what you do, because then you cannot handle the keyboard events that are associated with. For example, if you open a popup menu inside a mouse event, that is actually a bug. The menu won't open if you press the "Menu" keyboard button. You must use the "Menu" event instead. In the same way, control that must answer to a double-click have an "Activate" event that you must use instead of "DblClick". Regards, -- Beno?t Minisini From gambas at ...1... Sat Sep 12 15:37:50 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 12 Sep 2009 15:37:50 +0200 Subject: [Gambas-user] Slider problem? In-Reply-To: <4AAB4133.4000600@...1909...> References: <4AAA8CF8.7020701@...1740...> <200909120254.28064.gambas@...1...> <4AAB4133.4000600@...1909...> Message-ID: <200909121537.50060.gambas@...1...> > > Why? Why should mouse events "be always raised"? > Because it is useful. A "disabled" control means that it must not be used by the user. That should not mean that it won't receive basic input events. > >>> Regards, > >> > >> Ok understand now. > >> > >> I have to change my code a bit to not run into trouble then when a user > >> clicks the disabled control... > >> > >> Regards, > >> Ron_2nd. > > > > Apparently having the same behaviour in gb.gtk than in gb.qt is > > impossible. You cannot catch events in gb.gtk before they are processed. > > I am not really sure, but it seems to me that it is possible. > Documentation is very poor (disgusting, I could say), but it seems you > can connect to events at several stages, and even do the event cycle > yourself. Complicated matter, anyway. I may have found a way, by reading the GTK+ source code. I will see if it works... Regards, -- Beno?t Minisini From gambas at ...1... Sat Sep 12 15:42:57 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 12 Sep 2009 15:42:57 +0200 Subject: [Gambas-user] Application_mousedown() + Application_keypress() ? In-Reply-To: <4AAB26DE.1090403@...626...> References: <150908.82769.qm@...2293...> <4AAB26DE.1090403@...626...> Message-ID: <200909121542.57236.gambas@...1...> > I'm trying to get an application-wide mouse down event to register. I > found that when I do a Form_mousedown() it only triggers when you click > on an empty part of the form, not when you're clicking on any type of > control. I'm looking for something that will trigger whenever you hit > the mouse button. (My app is going to be full screen, so I don't care > if it works outside of the app window or not.) > > During my searching of the list archives, I found someone tried to use > Application_Keypress() as a way to get a key press while the app is > running. Well, I tried it and it doesn't work, nothing happens: > > Static Public Sub Application_Keypress() > Message.Info(Key.code) > End > > I tried it on Gambas 2.8 and I even compiled Gambas 3.0 r2329 and that > didn't change anything. I am using GTK only (Ubuntu). Any ideas? > > Thanks, > Lee > There is no global pointer event handler, only Application_KeyPress(). But apparently it does not work with gb.gtk... Can you try with gb.qt to see if at least Application_KeyPress() is called? Note that this function must be defined in the startup class! -- Beno?t Minisini From gambas at ...1... Sat Sep 12 16:01:39 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 12 Sep 2009 16:01:39 +0200 Subject: [Gambas-user] How to crash the IDE In-Reply-To: <200909111430.04262.pinozollo@...626...> References: <200909111430.04262.pinozollo@...626...> Message-ID: <200909121601.39648.gambas@...1...> > Hi, > > On 2.15.0 ..... > Editing a form select the Background change feature, select Free colour and > write into the HEX colour: HDFDFFF .... > > --> Type mismatch Wanted Integer got Null Instead > FColourChooser.txtHexa_Change.372 > ...and IDE dies. > > Regards > Pino > It is fixed in revision 2332. Regards, -- Beno?t Minisini From gambas at ...1... Sat Sep 12 16:02:24 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 12 Sep 2009 16:02:24 +0200 Subject: [Gambas-user] a IDE-Bug in 2.16.0 rev 2323 In-Reply-To: <1252687782.6607.1.camel@...40...> References: <1252596853.6410.5.camel@...40...> <200909111334.25618.gambas@...1...> <1252687782.6607.1.camel@...40...> Message-ID: <200909121602.24154.gambas@...1...> > Am Freitag, den 11.09.2009, 13:34 +0200 schrieb Beno?t Minisini: > > > Salut Benoit, > > > > > > > > > [OperatingSystem] > > > OperatingSystem=Linux > > > KernelRelease=2.6.24-24-generic > > > DistributionVendor=ubuntu > > > DistributionRelease="Ubuntu 8.04.3 LTS" > > > > > > [System] > > > CPUArchitecture=i686 > > > TotalRam=506932 kB > > > > > > [Gambas] > > > Gambas1=gbx-1.0.17 > > > Gambas1Path=/usr/bin/gbx > > > Gambas2=2.16.0 > > > Gambas2Path=/usr/local/bin/gbx2 > > > Gambas3=2.99.0 > > > Gambas3Path=/usr/local/bin/gbx3 > > > > > > ----------------- gambas2 > > > ---------------------------------------------- 2.16.0 > > > Revision: 2323 > > > /usr/local/bin/gbx2 > > > > > > changing in IDE-Editor the sub/function by selecting it in the ComboBox > > > raise an Error and IDE crashes. > > > > I cannot reproduce the bug - please give some details about what you did > > exactly. > > > > Regards, > > Salut, > > today I cannot reproduce the bug too. > What I do, I often do, is changing in an open IDE the projects, run > them, test them. > Move sometimes the place where the project is stored (move them). > Yesterday, after the a couple of reproduction off that bug, I copied the > last gambas-IDE to my home, loaded and started it, then I'v chosen the > project and could reproduce the error the 3 objects had all a NULL > value. > > What I did: I stood in the code editor and wanted to change into another > SUB, which I choose in the combobox.. and hoped ...and crashed. > > Send you the stack. > It should be fixed in revision 2332. It won't crash, but I don't know why it crashed. Regards, -- Beno?t Minisini From johny.provoost at ...27... Sat Sep 12 15:35:00 2009 From: johny.provoost at ...27... (Johny Provoost) Date: Sat, 12 Sep 2009 15:35:00 +0200 Subject: [Gambas-user] Check if a program is already started In-Reply-To: <384d3900909120602s7e9813bm5daba8242df71ace@...627...> References: <4AAB9931.2030401@...27...> <384d3900909120602s7e9813bm5daba8242df71ace@...627...> Message-ID: <4AABA384.9050405@...27...> Thanks, It works *Vriendelijke Groeten* *Johny Provoost* *mailto: johny.provoost at ...27... * *mailto: johny.provoost at ...626... * *Website:* *http://www.johnyprovoost.net* Jussi Lahtinen schreef: > Not very elegant, but works: > > > Dim sOutput As String > > Exec ["pgrep", "-f", "-l", "NameOfYourProgram.gambas"] Wait To sOutput > > If Split(Trim$(sOutput), gb.NewLine).Count > 1 Then > 'Allready running > EndIf > > > Jussi > > > > > On Sat, Sep 12, 2009 at 15:50, Johny Provoost wrote: > >> Hi, >> >> Is there a command to check if a program (programed in Gambas) is >> already running? >> I want to avoid that a program is started twice. >> >> >> Johny Provoost >> >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> trial. Simplify your report design, integration and deployment - and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From jguardon at ...2035... Sat Sep 12 16:20:43 2009 From: jguardon at ...2035... (Jesus Guardon) Date: Sat, 12 Sep 2009 16:20:43 +0200 Subject: [Gambas-user] Check if a program is already started In-Reply-To: <384d3900909120602s7e9813bm5daba8242df71ace@...627...> References: <4AAB9931.2030401@...27...> <384d3900909120602s7e9813bm5daba8242df71ace@...627...> Message-ID: <4AABAE3B.20000@...2035...> Just another way: PUBLIC FUNCTION pidOf(program AS String) AS Boolean 'checks if a program is running DIM gotpid AS String = "" DIM running AS Boolean = FALSE TRY SHELL "pidof " & program TO gotpid IF gotpid THEN running = TRUE ELSE running = FALSE ENDIF RETURN running END Usage: IF pidOf("yourProgram") THEN whatever... At least it works for me Cheers Jesus Jussi Lahtinen escribi?: > Not very elegant, but works: > > > Dim sOutput As String > > Exec ["pgrep", "-f", "-l", "NameOfYourProgram.gambas"] Wait To sOutput > > If Split(Trim$(sOutput), gb.NewLine).Count > 1 Then > 'Allready running > EndIf > > > Jussi From ronstk at ...239... Sat Sep 12 16:33:34 2009 From: ronstk at ...239... (Ron_1st) Date: Sat, 12 Sep 2009 16:33:34 +0200 Subject: [Gambas-user] Slider problem? In-Reply-To: <200909121540.43552.gambas@...1...> References: <4AAA8CF8.7020701@...1740...> <200909121443.29951.ronstk@...239...> <200909121540.43552.gambas@...1...> Message-ID: <200909121633.34873.ronstk@...239...> On Saturday 12 September 2009, Beno?t Minisini wrote: > > On Saturday 12 September 2009, Doriano Blengino wrote: > > > >>> I didn't change the behaviour of gb.qt because of gb.gtk. Mouse > > > >>> events must be always raised, whatever the value of the Enabled > > > >>> property. > > > > > > Why? Why should mouse events "be always raised"? > > > > What if the rightmouse button has a menu option to enable/disable > > the control or you want to popup a message to tell the user it is > > disabled and will not do anything. :) > > > > Actually you must never use Mouse events directly unless you know what you do, > because then you cannot handle the keyboard events that are associated with. > > For example, if you open a popup menu inside a mouse event, that is actually a > bug. The menu won't open if you press the "Menu" keyboard button. You must use > the "Menu" event instead. The "Mennu" event was the one I mean as example. > > In the same way, control that must answer to a double-click have an "Activate" > event that you must use instead of "DblClick". > > Regards, > Best regards, Ron_1st -- From Karl.Reinl at ...9... Sat Sep 12 22:28:48 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Sat, 12 Sep 2009 22:28:48 +0200 Subject: [Gambas-user] Form_Resize Message-ID: <1252787328.7118.12.camel@...40...> Salut, is that my, or a general problem, on gambas2 2.16 I can make forms bigger, but not smaller...or did I miss something ? That I remarked on my "White-A4-PalmTop" for Debug-Watch-Windows but now I find that on a form in the project (see example). -- Amicalment Charlie -------------- next part -------------- A non-text attachment was scrubbed... Name: firstTry-0.0.1.tar.gz Type: application/x-compressed-tar Size: 8806 bytes Desc: not available URL: From doriano.blengino at ...1909... Sun Sep 13 00:08:44 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sun, 13 Sep 2009 00:08:44 +0200 Subject: [Gambas-user] Profiler for Gambas projects In-Reply-To: <384d3900909120543o544a7b8el6bee4f443d1d57cf@...627...> References: <384d3900909110832l25be5b1ag41b96e3fb7a10cda@...627...> <200909111741.15267.gambas@...1...> <384d3900909110852q202ba192nc53fc9ed0a02f5a@...627...> <200909111855.41640.gambas@...1...> <661962.28975.qm@...1667...> <384d3900909111236p28d471e6wc3a54315348a0e93@...627...> <4AAB3F96.8040202@...1909...> <384d3900909120539v48df2885y789f8f75fd8957f3@...627...> <384d3900909120543o544a7b8el6bee4f443d1d57cf@...627...> Message-ID: <4AAC1BEC.1080306@...1909...> Jussi Lahtinen ha scritto: > I must add this also... > Profiler is like debugger, if you know where the error is you don't > need debugger, > but many times you don't! > Same thing with profiler, if you know where the bottleneck is you > don't need profiler, > but many times you don't! > I don't know what kind of programs you write, so I can easily go wrong. But... to speak of profiling when using python seems to me a nonsense. I think the following and, I repeat, I could be wrong. You can teach to me. If a program does networking, database, or uses complex libraries, then the bottleneck is almost always outside the program itself. So it makes little difference in using python, gambas or assembler. If the program does intense computation, then it is a nonsense to use interpreted languages. So I ask again: what kind of program you write? We can take gambas for example. It has wonderful graphics, superb database capabilities, networking libraries and all the rest. For average applications, there is little speed difference between a gambas one and a C++ compiled one. Well. Try to write a CAD program, a word processor (a serious one), a sound or image editor with gambas, and you will find a hard life. The power of todays CPUs hides the burden, but it is still there. So I really don't understand. That's all. Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From gambas at ...1... Sun Sep 13 02:01:41 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 13 Sep 2009 02:01:41 +0200 Subject: [Gambas-user] Form_Resize In-Reply-To: <1252787328.7118.12.camel@...40...> References: <1252787328.7118.12.camel@...40...> Message-ID: <200909130201.41117.gambas@...1...> > Salut, > > is that my, or a general problem, on gambas2 2.16 I can make forms > bigger, but not smaller...or did I miss something ? > That I remarked on my "White-A4-PalmTop" for Debug-Watch-Windows but now > I find that on a form in the project (see example). > This always behaved like that: modal forms cannot be shrinked smaller than their initial size. It is feature, not a bug. Regards, -- Beno?t Minisini From gambas at ...1... Sun Sep 13 02:13:21 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 13 Sep 2009 02:13:21 +0200 Subject: [Gambas-user] Problem with UTF-8 in Gambas-connection to MySQL In-Reply-To: <1f13ba8b0909120120n2a13f7e8ya08b7bc4a5daf939@...627...> References: <1f13ba8b0909120120n2a13f7e8ya08b7bc4a5daf939@...627...> Message-ID: <200909130213.21523.gambas@...1...> > (I don't know English well) > Use Debian 5 "Lenny" -32, Gambas 2.7 from repository. > > I develop an account program for russians users. It must work with cyrillic > correct. > I have made MySQL5 (default UTF8) database with direct CHARACTER SET UTF8 > option, tables with direct CHARACTER SET UTF8 option. Then connected to it > from gambas, output data to GridView. All string fields were not readable. > > I run example "Database". It works correct with some french symbols, but > with cyrillic not. Program "Database manager" do the same. > > I get sources of Gambas-2.8.2. Opened main.c file of MySQL driver, find > function > <<< static int open_database(DB_DESC *desc, DB_DATABASE *db) >>>. > Add string > <<< fprintf(stderr, "Character set GB[%s] mysql[%s]\n", > GB.System.Charset(), mysql_character_set_name(conn)); >>> > before and after string > <<< set_character_set(db); >>>. > Compiled only this driver, copied it to /usr/lib/gambas2. Run my program. > Result: > <<< Character set GB[UTF-8] mysql[latin1] > Character set GB[UTF-8] mysql[latin1] >>> > in console. > > Why latin1 instead UTF-8? What is the value of DB.Charset just after you have connected to the database in Gambas? What happens if you uncheck the "use encoding" menu entry if the popup menu in the database manager? Can you send me your database contents, or part of it, so that I test by myself? -- Beno?t Minisini From gambas at ...1... Sun Sep 13 02:14:17 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 13 Sep 2009 02:14:17 +0200 Subject: [Gambas-user] Workspace and scrollbars In-Reply-To: References: Message-ID: <200909130214.17782.gambas@...1...> > Good morning to all, > > is it possible to use scrollbars with workspace when a form is bigger > than visible screen area? > You can put all your form contents inside a ScrollView before putting the form inside the workspace. -- Beno?t Minisini From demosthenesk at ...626... Sun Sep 13 08:49:41 2009 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Sun, 13 Sep 2009 09:49:41 +0300 Subject: [Gambas-user] Workspace and scrollbars In-Reply-To: <200909130214.17782.gambas@...1...> References: <200909130214.17782.gambas@...1...> Message-ID: yes i thought it later... Thanks anyway! 2009/9/13 Beno?t Minisini : >> Good morning to all, >> >> is it possible to use scrollbars with workspace when a form is bigger >> than visible screen area? >> > > You can put all your form contents inside a ScrollView before putting the form > inside the workspace. > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From Karl.Reinl at ...9... Sun Sep 13 10:43:20 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Sun, 13 Sep 2009 10:43:20 +0200 Subject: [Gambas-user] Form_Resize In-Reply-To: <200909130201.41117.gambas@...1...> References: <1252787328.7118.12.camel@...40...> <200909130201.41117.gambas@...1...> Message-ID: <1252831400.6532.9.camel@...40...> Am Sonntag, den 13.09.2009, 02:01 +0200 schrieb Beno?t Minisini: > > Salut, > > > > is that my, or a general problem, on gambas2 2.16 I can make forms > > bigger, but not smaller...or did I miss something ? > > That I remarked on my "White-A4-PalmTop" for Debug-Watch-Windows but now > > I find that on a form in the project (see example). > > > > This always behaved like that: modal forms cannot be shrinked smaller than > their initial size. It is feature, not a bug. > > Regards, > Salut, so let's talk about saved Debug-Watch-Windows, you make it bigger, to see more and after that you leave the session. When you restart new the Debug-Watch-Windows starts big, and can't be shrunk smaller anymore. -- Charlie From jguardon at ...2035... Sun Sep 13 11:15:09 2009 From: jguardon at ...2035... (Jesus Guardon) Date: Sun, 13 Sep 2009 11:15:09 +0200 Subject: [Gambas-user] Form_Resize In-Reply-To: <1252831400.6532.9.camel@...40...> References: <1252787328.7118.12.camel@...40...> <200909130201.41117.gambas@...1...> <1252831400.6532.9.camel@...40...> Message-ID: <4AACB81D.9030703@...2035...> Charlie Reinl escribi?: > so let's talk about saved Debug-Watch-Windows, you make it bigger, to > see more and after that you leave the session. > When you restart new the Debug-Watch-Windows starts big, and can't be > shrunk smaller anymore. > Are you saving the size and position in Settings? If so, prevent the Form.H, and Form.W to be saved and you will be able to restart your form in the original size. Jesus From jussi.lahtinen at ...626... Sun Sep 13 14:29:38 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sun, 13 Sep 2009 15:29:38 +0300 Subject: [Gambas-user] Check if a program is already started In-Reply-To: <4AABAE3B.20000@...2035...> References: <4AAB9931.2030401@...27...> <384d3900909120602s7e9813bm5daba8242df71ace@...627...> <4AABAE3B.20000@...2035...> Message-ID: <384d3900909130529t2c4df583p86d23ecaf83d818d@...627...> Your code is fine for checking if some program is running, but it cannot check double instance. If your program asks pid of itself, it will find it! I didn't know about "pidof" (I have used Linux about one year), so thanks! Jussi PS. You don't need variable "running", you can just do "Return False" or "Return True". Also "try" is unneeded. On Sat, Sep 12, 2009 at 17:20, Jesus Guardon wrote: > Just another way: > > PUBLIC FUNCTION pidOf(program AS String) AS Boolean > ? ? 'checks if a program is running > ? ? DIM gotpid AS String = "" > ? ? DIM running AS Boolean = FALSE > ? ? TRY SHELL "pidof " & program TO gotpid > ? ? IF gotpid THEN > ? ? ? ? running = TRUE > ? ? ELSE > ? ? ? ? running = FALSE > ? ? ENDIF > ? ? RETURN running > END > > Usage: > > IF pidOf("yourProgram") THEN whatever... > > At least it works for me > > Cheers > > Jesus > > Jussi Lahtinen escribi?: >> Not very elegant, but works: >> >> >> Dim sOutput As String >> >> Exec ["pgrep", "-f", "-l", "NameOfYourProgram.gambas"] Wait To sOutput >> >> If Split(Trim$(sOutput), gb.NewLine).Count > 1 Then >> 'Allready running >> EndIf >> >> >> Jussi > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Sun Sep 13 14:18:20 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sun, 13 Sep 2009 15:18:20 +0300 Subject: [Gambas-user] Profiler for Gambas projects In-Reply-To: <4AAC1BEC.1080306@...1909...> References: <384d3900909110832l25be5b1ag41b96e3fb7a10cda@...627...> <200909111741.15267.gambas@...1...> <384d3900909110852q202ba192nc53fc9ed0a02f5a@...627...> <200909111855.41640.gambas@...1...> <661962.28975.qm@...1667...> <384d3900909111236p28d471e6wc3a54315348a0e93@...627...> <4AAB3F96.8040202@...1909...> <384d3900909120539v48df2885y789f8f75fd8957f3@...627...> <384d3900909120543o544a7b8el6bee4f443d1d57cf@...627...> <4AAC1BEC.1080306@...1909...> Message-ID: <384d3900909130518k7d3e5bc7w60c80fee2522456b@...627...> > If a program does networking, database, or uses complex libraries, then > the bottleneck is almost always outside the program itself. So it makes > little difference in using python, gambas or assembler. I like Gambas because it is very fast to write, and in most cases it's also fast enough to execute. But sometimes I need to do some parts of code with C++, because they are too CPU intensive to Gambas. But what to translate to C++? You can guess, or test with profiler and actually know. Sometimes C++ is even unnecessary when you really know where the bottleneck is. > If the program does intense computation, then it is a nonsense to use interpreted > languages. You can do very complicated UI and data analyzer to that kind of program with Gambas. Just leave intense computation to C/C++. > So I ask again: what kind of program you write? I have many projects, with physics and math, different simulations, experimental game, etc. Non of them do networking or uses database at this moment. So, I don't know how much profiler can help you with them, but I guess in most cases very little. Jussi From jguardon at ...2035... Sun Sep 13 14:44:22 2009 From: jguardon at ...2035... (Jesus Guardon) Date: Sun, 13 Sep 2009 14:44:22 +0200 Subject: [Gambas-user] Check if a program is already started In-Reply-To: <384d3900909130529t2c4df583p86d23ecaf83d818d@...627...> References: <4AAB9931.2030401@...27...> <384d3900909120602s7e9813bm5daba8242df71ace@...627...> <4AABAE3B.20000@...2035...> <384d3900909130529t2c4df583p86d23ecaf83d818d@...627...> Message-ID: <4AACE926.3060609@...2035...> Jussi Lahtinen escribi?: > You don't need variable "running", you can just do "Return False" or > "Return True". > Also "try" is unneeded. You are right! And for the subject of the thread, next time I will read carefully. Sorry! Jesus From doriano.blengino at ...1909... Sun Sep 13 17:12:06 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sun, 13 Sep 2009 17:12:06 +0200 Subject: [Gambas-user] Profiler for Gambas projects In-Reply-To: <384d3900909130518k7d3e5bc7w60c80fee2522456b@...627...> References: <384d3900909110832l25be5b1ag41b96e3fb7a10cda@...627...> <200909111741.15267.gambas@...1...> <384d3900909110852q202ba192nc53fc9ed0a02f5a@...627...> <200909111855.41640.gambas@...1...> <661962.28975.qm@...1667...> <384d3900909111236p28d471e6wc3a54315348a0e93@...627...> <4AAB3F96.8040202@...1909...> <384d3900909120539v48df2885y789f8f75fd8957f3@...627...> <384d3900909120543o544a7b8el6bee4f443d1d57cf@...627...> <4AAC1BEC.1080306@...1909...> <384d3900909130518k7d3e5bc7w60c80fee2522456b@...627...> Message-ID: <4AAD0BC6.7080204@...1909...> Jussi Lahtinen ha scritto: > I have many projects, with physics and math, different simulations, > experimental game, etc. > Non of them do networking or uses database at this moment. > So, I don't know how much profiler can help you with them, but I > guess in most cases very little. > At this point I can no more understand if you are pro- or anti-profiler. :-) But, I can sum up my thought this way. I am pro-profiler (I think it is good), proof is that I described a way to implement it in gambas. But I wanted also to point out that a profiler is just a tool, like a debugger; only I find a debugger a "must have", and a profiler a "nice to have". Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From aleks.l at ...1865... Sun Sep 13 17:26:58 2009 From: aleks.l at ...1865... (Aleksandrs Livshics) Date: Sun, 13 Sep 2009 18:26:58 +0300 Subject: [Gambas-user] Is it a bug or a "feature"? Message-ID: <200909131826.59197.aleks.l@...1865...> Hi Gambas users. I have found that in version 2.16 Draw.Ellipse does not work as it was in 2.7 (my previous version). In 2.16 the parameters which should specify coordinates of the Ellipse centre are actually corresponding to the upper left corner of the rectangular area where ellipse is placed. I think it must be a bug. Aleks From jussi.lahtinen at ...626... Sun Sep 13 17:32:47 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sun, 13 Sep 2009 18:32:47 +0300 Subject: [Gambas-user] Profiler for Gambas projects In-Reply-To: <4AAD0BC6.7080204@...1909...> References: <384d3900909110832l25be5b1ag41b96e3fb7a10cda@...627...> <200909111855.41640.gambas@...1...> <661962.28975.qm@...1667...> <384d3900909111236p28d471e6wc3a54315348a0e93@...627...> <4AAB3F96.8040202@...1909...> <384d3900909120539v48df2885y789f8f75fd8957f3@...627...> <384d3900909120543o544a7b8el6bee4f443d1d57cf@...627...> <4AAC1BEC.1080306@...1909...> <384d3900909130518k7d3e5bc7w60c80fee2522456b@...627...> <4AAD0BC6.7080204@...1909...> Message-ID: <384d3900909130832s1a32a9bme929fbe8325d39a8@...627...> >> ?I have many projects, with physics and math, different simulations, >> experimental game, etc. >> ?Non of them do networking or uses database at this moment. >> ?So, I don't know how much profiler can help you with them, but I >> guess in most cases very little. >> > At this point I can no more understand if you are pro- or anti-profiler. :-) I meant, I don't know how much profiler helps with projects where bottleneck is networking or database. > But, I can sum up my thought this way. I am pro-profiler (I think it is > good), proof is that I described a way to implement it in gambas. But I > wanted also to point out that a profiler is just a tool, like a > debugger; only I find a debugger a "must have", and a profiler a "nice > to have". I agree. Profiler is same to slow code, what debugger is to buggy code. Only different is, buggy code is usually useless, but slow code is *mostly* only annoying. Jussi From gambas at ...1... Sun Sep 13 18:16:34 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 13 Sep 2009 18:16:34 +0200 Subject: [Gambas-user] Is it a bug or a "feature"? In-Reply-To: <200909131826.59197.aleks.l@...1865...> References: <200909131826.59197.aleks.l@...1865...> Message-ID: <200909131816.34819.gambas@...1...> > Hi Gambas users. > I have found that in version 2.16 Draw.Ellipse does not > work as it was in 2.7 (my previous version). > In 2.16 the parameters which should specify coordinates of the > Ellipse centre are actually corresponding to the upper left corner > of the rectangular area where ellipse is placed. > I think it must be a bug. > Aleks > I think you have dreamt that: an ellipse has no center. It has two focuses. Regards, -- Beno?t Minisini From gambas at ...1... Sun Sep 13 18:20:20 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 13 Sep 2009 18:20:20 +0200 Subject: [Gambas-user] Form_Resize In-Reply-To: <1252831400.6532.9.camel@...40...> References: <1252787328.7118.12.camel@...40...> <200909130201.41117.gambas@...1...> <1252831400.6532.9.camel@...40...> Message-ID: <200909131820.20743.gambas@...1...> > Am Sonntag, den 13.09.2009, 02:01 +0200 schrieb Beno?t Minisini: > > > Salut, > > > > > > is that my, or a general problem, on gambas2 2.16 I can make forms > > > bigger, but not smaller...or did I miss something ? > > > That I remarked on my "White-A4-PalmTop" for Debug-Watch-Windows but > > > now I find that on a form in the project (see example). > > > > This always behaved like that: modal forms cannot be shrinked smaller > > than their initial size. It is feature, not a bug. > > > > Regards, > > Salut, > > so let's talk about saved Debug-Watch-Windows, you make it bigger, to > see more and after that you leave the session. > When you restart new the Debug-Watch-Windows starts big, and can't be > shrunk smaller anymore. > *That* is a bug. It is caused by initializing the form geometry in the "_new" method instead of the "Form_Open" event handler. I will fix it in the next revision. Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Sun Sep 13 20:26:56 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sun, 13 Sep 2009 21:26:56 +0300 Subject: [Gambas-user] Is it a bug or a "feature"? In-Reply-To: <200909131816.34819.gambas@...1...> References: <200909131826.59197.aleks.l@...1865...> <200909131816.34819.gambas@...1...> Message-ID: <384d3900909131126q460d4ff9y7db0a6876e49d6d7@...627...> Maybe mean value of focuses? http://en.wikipedia.org/wiki/Ellipse#Elements_of_an_ellipse Jussi 2009/9/13 Beno?t Minisini : >> Hi Gambas users. >> I have found that in version 2.16 Draw.Ellipse does not >> work as it was in 2.7 (my previous version). >> In 2.16 the parameters which should specify coordinates of the >> Ellipse centre are actually corresponding to ?the upper left corner >> of the rectangular area where ellipse is placed. >> I think it must be a bug. >> Aleks >> > > I think you have dreamt that: an ellipse has no center. It has two focuses. > > Regards, > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From aleks.l at ...1865... Sun Sep 13 22:35:18 2009 From: aleks.l at ...1865... (Aleksandrs Livshics) Date: Sun, 13 Sep 2009 23:35:18 +0300 Subject: [Gambas-user] Is it a bug or a "feature"? In-Reply-To: <200909131816.34819.gambas@...1...> References: <200909131826.59197.aleks.l@...1865...> <200909131816.34819.gambas@...1...> Message-ID: <200909132335.19032.aleks.l@...1865...> On Sunday 13 September 2009 19:16:34 Beno?t Minisini wrote: > > Hi Gambas users. > > I have found that in version 2.16 Draw.Ellipse does not > > work as it was in 2.7 (my previous version). > > In 2.16 the parameters which should specify coordinates of the > > Ellipse centre are actually corresponding to the upper left corner > > of the rectangular area where ellipse is placed. > > I think it must be a bug. > > Aleks > > I think you have dreamt that: an ellipse has no center. It has two focuses. > > Regards, I would prefer not to give lectures in mathematics in this forum. I have another place to do that. However I must draw your attention to the fact that exactly between 2 focuses is a center.A center of gravity if you remember some physics or a center of inversion if you prefer symmetry. consideration. The problem however is that the figure is placed in a wrong place in a drawing area. To see it you can draw an ellipse in a center of a square Drawing Area and you will see that it is displaced in positive direction in both X an Y. To do things simple enough for not a professional in maths make both axes of an ellipse equal and get a circle. I hope it will convince you. From robert1juhasz at ...626... Mon Sep 14 00:39:30 2009 From: robert1juhasz at ...626... (yuhej) Date: Sun, 13 Sep 2009 15:39:30 -0700 (PDT) Subject: [Gambas-user] how to start a file? Message-ID: <25416046.post@...1379...> Hello, I just start with Gambas (used VB before) and hopefully I found a place where I can get some answers. At this moment I wish to add an option of attaching files in my application (by saving the path) and to open them later. Can someone tell me how can I start a file from Gambas? For instance a spreadsheet with open office? Thanks for your help in advance. Robi -- View this message in context: http://www.nabble.com/how-to-start-a-file--tp25416046p25416046.html Sent from the gambas-user mailing list archive at Nabble.com. From leemcpherson at ...626... Mon Sep 14 01:01:21 2009 From: leemcpherson at ...626... (Lee McPherson) Date: Sun, 13 Sep 2009 19:01:21 -0400 Subject: [Gambas-user] Application_mousedown() + Application_keypress() ? In-Reply-To: <200909121542.57236.gambas@...1...> References: <150908.82769.qm@...2293...> <4AAB26DE.1090403@...626...> <200909121542.57236.gambas@...1...> Message-ID: <4AAD79C1.9050303@...626...> Beno?t Minisini wrote: >> I'm trying to get an application-wide mouse down event to register. I >> found that when I do a Form_mousedown() it only triggers when you click >> on an empty part of the form, not when you're clicking on any type of >> control. I'm looking for something that will trigger whenever you hit >> the mouse button. (My app is going to be full screen, so I don't care >> if it works outside of the app window or not.) >> >> During my searching of the list archives, I found someone tried to use >> Application_Keypress() as a way to get a key press while the app is >> running. Well, I tried it and it doesn't work, nothing happens: >> >> Static Public Sub Application_Keypress() >> Message.Info(Key.code) >> End >> >> I tried it on Gambas 2.8 and I even compiled Gambas 3.0 r2329 and that >> didn't change anything. I am using GTK only (Ubuntu). Any ideas? >> >> Thanks, >> Lee >> >> > > There is no global pointer event handler, only Application_KeyPress(). But > apparently it does not work with gb.gtk... Can you try with gb.qt to see if at > least Application_KeyPress() is called? Note that this function must be > defined in the startup class! > Switching to gb.qt in gambas 3 works. Haven't tried it in 2.8 yet, but I don't want to use qt in any case. Since there's no global pointer event handler yet, it does not matter if you fix applicaiton_keypress for gtk (for me at least). I would suggest a global pointer event handler as a feature if you have the time. The reason I wanted to use it was for a feedback response when using a touchscreen. Since there will be no pointer on the screen (and no vibrate function like on a mobile phone), I wanted to create a graphical response to touching (clicking) the screen with your finger (a pointer). I suppose the only workaround to this is to create a procedure and call the procedure for a mouse_down or mouse_up event for every control on the form. Let me say that despite some of the drawbacks, this is the easiest and most useful tool I've ever used to do programming. Keep up the good work! When I get better at this I hope to contribute more myself. -Lee From dosida at ...626... Mon Sep 14 01:18:50 2009 From: dosida at ...626... (Dimitris Anogiatis) Date: Sun, 13 Sep 2009 17:18:50 -0600 Subject: [Gambas-user] how to start a file? In-Reply-To: <25416046.post@...1379...> References: <25416046.post@...1379...> Message-ID: <82bffccf0909131618t20913763sbee1f6994fcff679@...627...> Hey Robi, one of the options is to use the gb.settings library. while you're on the IDE press CTRL and P then click on the Componets tab, find gb.settings and click on the box on the left side of the selection then press Ok now in your code you need to use this on top of your code (ie put this on the first line of your form or module) Public pathSettings AS NEW Settings(User.Home &/ Application.Name &/ Application.Name & ".conf") this means that if your user account name is robi and your application's name is myApp then the settings file will be created in this path /home/robi/myApp/myapp.conf now to save settings you use pathSettings like this pathSettings["Files/LoadFrom"]="your path" this will create a category Files in your settings file and under that it will create a LoadFrom item where you can store your path's value to read that value all you have to do is myPath = pathSettings["Files/LoadFrom"] I hope it helps Regards Dimitris On Sun, Sep 13, 2009 at 4:39 PM, yuhej wrote: > > Hello, > > I just start with Gambas (used VB before) and hopefully I found a place > where I can get some answers. > At this moment I wish to add an option of attaching files in my application > (by saving the path) and to open them later. > Can someone tell me how can I start a file from Gambas? For instance a > spreadsheet with open office? > > Thanks for your help in advance. > > Robi > -- > View this message in context: > http://www.nabble.com/how-to-start-a-file--tp25416046p25416046.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From ronstk at ...239... Mon Sep 14 04:39:25 2009 From: ronstk at ...239... (Ron_1st) Date: Mon, 14 Sep 2009 04:39:25 +0200 Subject: [Gambas-user] Application_mousedown() + Application_keypress() ? In-Reply-To: <4AAD79C1.9050303@...626...> References: <200909121542.57236.gambas@...1...> <4AAD79C1.9050303@...626...> Message-ID: <200909140439.26585.ronstk@...239...> On Monday 14 September 2009, Lee McPherson wrote: > > Beno?t Minisini wrote: > >> I'm trying to get an application-wide mouse down event to register. I > >> found that when I do a Form_mousedown() it only triggers when you click > >> on an empty part of the form, not when you're clicking on any type of > >> control. I'm looking for something that will trigger whenever you hit > >> the mouse button. (My app is going to be full screen, so I don't care > >> if it works outside of the app window or not.) > >> > >> During my searching of the list archives, I found someone tried to use > >> Application_Keypress() as a way to get a key press while the app is > >> running. Well, I tried it and it doesn't work, nothing happens: > >> > >> Static Public Sub Application_Keypress() > >> Message.Info(Key.code) > >> End > >> > >> I tried it on Gambas 2.8 and I even compiled Gambas 3.0 r2329 and that > >> didn't change anything. I am using GTK only (Ubuntu). Any ideas? > >> > >> Thanks, > >> Lee > >> > >> > > > > There is no global pointer event handler, only Application_KeyPress(). But > > apparently it does not work with gb.gtk... Can you try with gb.qt to see if at > > least Application_KeyPress() is called? Note that this function must be > > defined in the startup class! > > > Switching to gb.qt in gambas 3 works. Haven't tried it in 2.8 yet, but > I don't want to use qt in any case. Since there's no global pointer > event handler yet, it does not matter if you fix applicaiton_keypress > for gtk (for me at least). > > I would suggest a global pointer event handler as a feature if you have > the time. The reason I wanted to use it was for a feedback response > when using a touchscreen. Since there will be no pointer on the screen > (and no vibrate function like on a mobile phone), I wanted to create a > graphical response to touching (clicking) the screen with your finger (a > pointer). > > I suppose the only workaround to this is to create a procedure and call > the procedure for a mouse_down or mouse_up event for every control on > the form. > > Let me say that despite some of the drawbacks, this is the easiest and > most useful tool I've ever used to do programming. Keep up the good > work! When I get better at this I hope to contribute more myself. > > -Lee > take a look for 'xev', is a util in the x11 package. Best regards, Ron_1st -- From leemcpherson at ...626... Mon Sep 14 05:11:17 2009 From: leemcpherson at ...626... (Lee McPherson) Date: Sun, 13 Sep 2009 23:11:17 -0400 Subject: [Gambas-user] Application_mousedown() + Application_keypress() ? In-Reply-To: <200909140439.26585.ronstk@...239...> References: <200909121542.57236.gambas@...1...> <4AAD79C1.9050303@...626...> <200909140439.26585.ronstk@...239...> Message-ID: <4AADB455.3090904@...626...> Ron_1st wrote: > On Monday 14 September 2009, Lee McPherson wrote: > >> Beno?t Minisini wrote: >> >>>> I'm trying to get an application-wide mouse down event to register. I >>>> found that when I do a Form_mousedown() it only triggers when you click >>>> on an empty part of the form, not when you're clicking on any type of >>>> control. I'm looking for something that will trigger whenever you hit >>>> the mouse button. (My app is going to be full screen, so I don't care >>>> if it works outside of the app window or not.) >>>> >>>> During my searching of the list archives, I found someone tried to use >>>> Application_Keypress() as a way to get a key press while the app is >>>> running. Well, I tried it and it doesn't work, nothing happens: >>>> >>>> Static Public Sub Application_Keypress() >>>> Message.Info(Key.code) >>>> End >>>> >>>> I tried it on Gambas 2.8 and I even compiled Gambas 3.0 r2329 and that >>>> didn't change anything. I am using GTK only (Ubuntu). Any ideas? >>>> >>>> Thanks, >>>> Lee >>>> >>>> >>>> >>> There is no global pointer event handler, only Application_KeyPress(). But >>> apparently it does not work with gb.gtk... Can you try with gb.qt to see if at >>> least Application_KeyPress() is called? Note that this function must be >>> defined in the startup class! >>> >>> >> Switching to gb.qt in gambas 3 works. Haven't tried it in 2.8 yet, but >> I don't want to use qt in any case. Since there's no global pointer >> event handler yet, it does not matter if you fix applicaiton_keypress >> for gtk (for me at least). >> >> I would suggest a global pointer event handler as a feature if you have >> the time. The reason I wanted to use it was for a feedback response >> when using a touchscreen. Since there will be no pointer on the screen >> (and no vibrate function like on a mobile phone), I wanted to create a >> graphical response to touching (clicking) the screen with your finger (a >> pointer). >> >> I suppose the only workaround to this is to create a procedure and call >> the procedure for a mouse_down or mouse_up event for every control on >> the form. >> >> Let me say that despite some of the drawbacks, this is the easiest and >> most useful tool I've ever used to do programming. Keep up the good >> work! When I get better at this I hope to contribute more myself. >> >> -Lee >> >> > > take a look for 'xev', is a util in the x11 package. > > > Best regards, > > Ron_1st > Thank you, I can see how this can be used as an alternative. I'll be experimenting... -Lee From weldon_gary at ...67... Mon Sep 14 11:18:39 2009 From: weldon_gary at ...67... (CelticBhoy) Date: Mon, 14 Sep 2009 02:18:39 -0700 (PDT) Subject: [Gambas-user] What should executable open with? Message-ID: <25432680.post@...1379...> Really daft question, but on my Ubuntu system my compiled gambas app is set to open with wine for some reason. I just want to know what it should be set to, to enable it to run. -- View this message in context: http://www.nabble.com/What-should-executable-open-with--tp25432680p25432680.html Sent from the gambas-user mailing list archive at Nabble.com. From jussi.lahtinen at ...626... Mon Sep 14 16:14:49 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 14 Sep 2009 17:14:49 +0300 Subject: [Gambas-user] What should executable open with? In-Reply-To: <25432680.post@...1379...> References: <25432680.post@...1379...> Message-ID: <384d3900909140714o7b85c08o7998b19db12757da@...627...> gbr2 ProgramName.gambas Jussi On Mon, Sep 14, 2009 at 12:18, CelticBhoy wrote: > > Really daft question, but on my Ubuntu system my compiled gambas app is set > to open with wine for some reason. I just want to know what it should be set > to, to enable it to run. > -- > View this message in context: http://www.nabble.com/What-should-executable-open-with--tp25432680p25432680.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Mon Sep 14 16:28:30 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 14 Sep 2009 17:28:30 +0300 Subject: [Gambas-user] What should executable open with? In-Reply-To: <384d3900909140714o7b85c08o7998b19db12757da@...627...> References: <25432680.post@...1379...> <384d3900909140714o7b85c08o7998b19db12757da@...627...> Message-ID: <384d3900909140728s25ee0054h60510af81fbafd7f@...627...> I think your system doesn't have gambas MIME type installed. Maybe you should try to install Gambas again. Jussi On Mon, Sep 14, 2009 at 17:14, Jussi Lahtinen wrote: > gbr2 ProgramName.gambas > > > Jussi > > > On Mon, Sep 14, 2009 at 12:18, CelticBhoy wrote: >> >> Really daft question, but on my Ubuntu system my compiled gambas app is set >> to open with wine for some reason. I just want to know what it should be set >> to, to enable it to run. >> -- >> View this message in context: http://www.nabble.com/What-should-executable-open-with--tp25432680p25432680.html >> Sent from the gambas-user mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> trial. Simplify your report design, integration and deployment - and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. ?http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > From robert1juhasz at ...626... Mon Sep 14 16:40:52 2009 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Mon, 14 Sep 2009 16:40:52 +0200 Subject: [Gambas-user] how to start a file? In-Reply-To: <82bffccf0909131618t20913763sbee1f6994fcff679@...627...> References: <25416046.post@...1379...> <82bffccf0909131618t20913763sbee1f6994fcff679@...627...> Message-ID: <68652a0b0909140740h663158a4q483f8381c7917c5a@...627...> Hi Dimitris, Thanks for your answer. I'm not sure if this is exactly what I want but I'll check. I try to tell more concretly my need: I wanna make a small project follower application for my colleagues where they can follow some actions and attach files. For instance a pdf file with the customer spec. The data, I'll store in a mySQL database where I can put the path as well. When the user (or an other user) opens the project and clicks on the link, how can I tell to Gambas to open the file with the default application (in the example with acrobat reader). I just need the same effect as when I double click on the icon. If this is what you described just confirm please. Thanks, Robi 2009/9/14 Dimitris Anogiatis > Hey Robi, > > one of the options is to use the gb.settings library. > > while you're on the IDE press CTRL and P then click on the Componets tab, > find gb.settings and click on the box on the left side of the selection > then > press Ok > > now in your code you need to use this on top of your code (ie put this on > the first line of your form or module) > > Public pathSettings AS NEW Settings(User.Home &/ Application.Name &/ > Application.Name & ".conf") > > this means that if your user account name is robi and your application's > name is myApp then the settings > file will be created in this path > > /home/robi/myApp/myapp.conf > > now to save settings you use pathSettings like this > > pathSettings["Files/LoadFrom"]="your path" > > this will create a category Files in your settings file and under that it > will create a LoadFrom item > where you can store your path's value > > to read that value all you have to do is > > myPath = pathSettings["Files/LoadFrom"] > > I hope it helps > > Regards > Dimitris > > > On Sun, Sep 13, 2009 at 4:39 PM, yuhej wrote: > > > > > Hello, > > > > I just start with Gambas (used VB before) and hopefully I found a place > > where I can get some answers. > > At this moment I wish to add an option of attaching files in my > application > > (by saving the path) and to open them later. > > Can someone tell me how can I start a file from Gambas? For instance a > > spreadsheet with open office? > > > > Thanks for your help in advance. > > > > Robi > > -- > > View this message in context: > > http://www.nabble.com/how-to-start-a-file--tp25416046p25416046.html > > Sent from the gambas-user mailing list archive at Nabble.com. > > > > > > > > > ------------------------------------------------------------------------------ > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > > trial. Simplify your report design, integration and deployment - and > focus > > on > > what you do best, core application coding. Discover what's new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Mon Sep 14 16:42:33 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 14 Sep 2009 17:42:33 +0300 Subject: [Gambas-user] how to start a file? In-Reply-To: <82bffccf0909131618t20913763sbee1f6994fcff679@...627...> References: <25416046.post@...1379...> <82bffccf0909131618t20913763sbee1f6994fcff679@...627...> Message-ID: <384d3900909140742s6dcba2d7p1fe80c48a618df78@...627...> I'm not sure what you mean, but this code creates file. Dim hFile as File Dim sString as String = "Something to write." hFile = Open "testfile.txt" For Create Write #hFile, sString Close #hFile More from here: http://gambasdoc.org/help/lang/open http://gambasdoc.org/help/cat/stream Or if you mean how to attach files to your project. For example; right mouse click on Data folder --> New --> Other... then just choose what ever you need. Jussi On Mon, Sep 14, 2009 at 02:18, Dimitris Anogiatis wrote: > Hey Robi, > > one of the options is to use the gb.settings library. > > while you're on the IDE press CTRL and P then click on the Componets tab, > find gb.settings and click on the box on the left side of the selection then > press Ok > > now in your code you need to use this on top of your code (ie put this on > the first line of your form or module) > > Public pathSettings AS NEW Settings(User.Home &/ Application.Name &/ > Application.Name & ".conf") > > this means that if your user account name is robi and your application's > name is myApp then the settings > file will be created in this path > > /home/robi/myApp/myapp.conf > > now to save settings you use pathSettings like this > > pathSettings["Files/LoadFrom"]="your path" > > this will create a category Files in your settings file and under that it > will create a LoadFrom item > where you can store your path's value > > to read that value all you have to do is > > myPath = pathSettings["Files/LoadFrom"] > > I hope it helps > > Regards > Dimitris > > > On Sun, Sep 13, 2009 at 4:39 PM, yuhej wrote: > >> >> Hello, >> >> I just start with Gambas (used VB before) and hopefully I found a place >> where I can get some answers. >> At this moment I wish to add an option of attaching files in my application >> (by saving the path) and to open them later. >> Can someone tell me how can I start a file from Gambas? For instance a >> spreadsheet with open office? >> >> Thanks for your help in advance. >> >> Robi >> -- >> View this message in context: >> http://www.nabble.com/how-to-start-a-file--tp25416046p25416046.html >> Sent from the gambas-user mailing list archive at Nabble.com. >> >> >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> trial. Simplify your report design, integration and deployment - and focus >> on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. ?http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Mon Sep 14 16:47:58 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 14 Sep 2009 16:47:58 +0200 Subject: [Gambas-user] how to start a file? In-Reply-To: <68652a0b0909140740h663158a4q483f8381c7917c5a@...627...> References: <25416046.post@...1379...> <82bffccf0909131618t20913763sbee1f6994fcff679@...627...> <68652a0b0909140740h663158a4q483f8381c7917c5a@...627...> Message-ID: <200909141647.58238.gambas@...1...> > Hi Dimitris, > > Thanks for your answer. > I'm not sure if this is exactly what I want but I'll check. I try to tell > more concretly my need: > I wanna make a small project follower application for my colleagues where > they can follow some actions and attach files. For instance a pdf file with > the customer spec. > > The data, I'll store in a mySQL database where I can put the path as well. > > When the user (or an other user) opens the project and clicks on the link, > how can I tell to Gambas to open the file with the default application (in > the example with acrobat reader). I just need the same effect as when I > double click on the icon. > > If this is what you described just confirm please. > > Thanks, > Robi > I think you need Desktop.Open() in the gb.desktop component. -- Beno?t Minisini From dosida at ...626... Mon Sep 14 17:03:09 2009 From: dosida at ...626... (Dimitris Anogiatis) Date: Mon, 14 Sep 2009 09:03:09 -0600 Subject: [Gambas-user] What should executable open with? In-Reply-To: <384d3900909140728s25ee0054h60510af81fbafd7f@...627...> References: <25432680.post@...1379...> <384d3900909140714o7b85c08o7998b19db12757da@...627...> <384d3900909140728s25ee0054h60510af81fbafd7f@...627...> Message-ID: <82bffccf0909140803s700fd55dwc32caff3892f19c6@...627...> CelticBhoy, open a folder that contains a gambas file and right click on it then click on the "Open with" tab and press the add button click on the Use a custom command section and add gbr2 when you do that select the gbr2 in the "open with" tab and click ok and next time you doubleclick on a gambas file it will automatically execute it. Hope this helps Regards, Dimitris On Mon, Sep 14, 2009 at 8:28 AM, Jussi Lahtinen wrote: > I think your system doesn't have gambas MIME type installed. > Maybe you should try to install Gambas again. > > Jussi > > > On Mon, Sep 14, 2009 at 17:14, Jussi Lahtinen > wrote: > > gbr2 ProgramName.gambas > > > > > > Jussi > > > > > > On Mon, Sep 14, 2009 at 12:18, CelticBhoy > wrote: > >> > >> Really daft question, but on my Ubuntu system my compiled gambas app is > set > >> to open with wine for some reason. I just want to know what it should be > set > >> to, to enable it to run. > >> -- > >> View this message in context: > http://www.nabble.com/What-should-executable-open-with--tp25432680p25432680.html > >> Sent from the gambas-user mailing list archive at Nabble.com. > >> > >> > >> > ------------------------------------------------------------------------------ > >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > >> trial. Simplify your report design, integration and deployment - and > focus on > >> what you do best, core application coding. Discover what's new with > >> Crystal Reports now. http://p.sf.net/sfu/bobj-july > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From dosida at ...626... Mon Sep 14 19:07:47 2009 From: dosida at ...626... (Dimitris Anogiatis) Date: Mon, 14 Sep 2009 11:07:47 -0600 Subject: [Gambas-user] how to start a file? In-Reply-To: <68652a0b0909140740h663158a4q483f8381c7917c5a@...627...> References: <25416046.post@...1379...> <82bffccf0909131618t20913763sbee1f6994fcff679@...627...> <68652a0b0909140740h663158a4q483f8381c7917c5a@...627...> Message-ID: <82bffccf0909141007m522ace0aiba5648ccd87803f1@...627...> Hey Robi, What I described above is a way to store information in a configuration file. what you need is different Files are going to be attached where? Where is the pdf going to be stored? in the same computer where the project is running? or in a website? To open a file with the default application, try using the gb.desktop component and Desktop.Open() as Benoit suggested. call it like this Desktop.Open("file:///myPDF.pdf") if it is for a file or Desktop.Open("http://myserver.com/myPDF.pdf") if the file is on a server somewhere on the internet. On Mon, Sep 14, 2009 at 8:40 AM, Robert JUHASZ wrote: > Hi Dimitris, > > Thanks for your answer. > I'm not sure if this is exactly what I want but I'll check. I try to tell > more concretly my need: > I wanna make a small project follower application for my colleagues where > they can follow some actions and attach files. For instance a pdf file with > the customer spec. > > The data, I'll store in a mySQL database where I can put the path as well. > > When the user (or an other user) opens the project and clicks on the link, > how can I tell to Gambas to open the file with the default application (in > the example with acrobat reader). I just need the same effect as when I > double click on the icon. > > If this is what you described just confirm please. > > Thanks, > Robi > > 2009/9/14 Dimitris Anogiatis > > > Hey Robi, > > > > one of the options is to use the gb.settings library. > > > > while you're on the IDE press CTRL and P then click on the Componets tab, > > find gb.settings and click on the box on the left side of the selection > > then > > press Ok > > > > now in your code you need to use this on top of your code (ie put this on > > the first line of your form or module) > > > > Public pathSettings AS NEW Settings(User.Home &/ Application.Name &/ > > Application.Name & ".conf") > > > > this means that if your user account name is robi and your application's > > name is myApp then the settings > > file will be created in this path > > > > /home/robi/myApp/myapp.conf > > > > now to save settings you use pathSettings like this > > > > pathSettings["Files/LoadFrom"]="your path" > > > > this will create a category Files in your settings file and under that it > > will create a LoadFrom item > > where you can store your path's value > > > > to read that value all you have to do is > > > > myPath = pathSettings["Files/LoadFrom"] > > > > I hope it helps > > > > Regards > > Dimitris > > > > > > On Sun, Sep 13, 2009 at 4:39 PM, yuhej wrote: > > > > > > > > Hello, > > > > > > I just start with Gambas (used VB before) and hopefully I found a place > > > where I can get some answers. > > > At this moment I wish to add an option of attaching files in my > > application > > > (by saving the path) and to open them later. > > > Can someone tell me how can I start a file from Gambas? For instance a > > > spreadsheet with open office? > > > > > > Thanks for your help in advance. > > > > > > Robi > > > -- > > > View this message in context: > > > http://www.nabble.com/how-to-start-a-file--tp25416046p25416046.html > > > Sent from the gambas-user mailing list archive at Nabble.com. > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > > 30-Day > > > trial. Simplify your report design, integration and deployment - and > > focus > > > on > > > what you do best, core application coding. Discover what's new with > > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > ------------------------------------------------------------------------------ > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > > trial. Simplify your report design, integration and deployment - and > focus > > on > > what you do best, core application coding. Discover what's new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Mon Sep 14 20:59:06 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 14 Sep 2009 20:59:06 +0200 Subject: [Gambas-user] Is it a bug or a "feature"? In-Reply-To: <200909132335.19032.aleks.l@...1865...> References: <200909131826.59197.aleks.l@...1865...> <200909131816.34819.gambas@...1...> <200909132335.19032.aleks.l@...1865...> Message-ID: <200909142059.06512.gambas@...1...> > On Sunday 13 September 2009 19:16:34 Beno?t Minisini wrote: > > > Hi Gambas users. > > > I have found that in version 2.16 Draw.Ellipse does not > > > work as it was in 2.7 (my previous version). > > > In 2.16 the parameters which should specify coordinates of the > > > Ellipse centre are actually corresponding to the upper left corner > > > of the rectangular area where ellipse is placed. > > > I think it must be a bug. > > > Aleks > > > > I think you have dreamt that: an ellipse has no center. It has two > > focuses. > > > > Regards, > > I would prefer not to give lectures in mathematics in this forum. > I have another place to do that. However I must draw your attention > to the fact that exactly between 2 focuses is a center.A center of gravity > if you remember some physics or a center of inversion if you prefer > symmetry. consideration. > Sorry, my joke didn't work! :-/ I meant that AFAIK, Draw.Ellipse() didn't change at all since the beginning. It always took the coordinates of the rectangle surrounding it. > The problem however is that the figure is placed in a wrong place in a > drawing area. To see it you can draw an ellipse in a center of a square > Drawing Area and > you will see that it is displaced in positive direction in both X an Y. > To do things simple enough for not a professional in maths make both axes > of an ellipse equal and get a circle. I hope it will convince you. > I don't understand what you want to do exactly: if you want to draw an ellipse from is center and its two diameters (for example), assuming that the two ellipse axes are horizontal and vertical, you can do: Draw.Ellipse(XCenter - XDiameter / 2, YCenter - YDiameter / 2, XDiameter, YDiameter) Of course, you will lost one pixel if XDiameter or YDiameter is not even. And if you want to rotate the ellipse, you will have to draw it yourself! Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Mon Sep 14 21:40:21 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 14 Sep 2009 22:40:21 +0300 Subject: [Gambas-user] Gambas architecture Message-ID: <384d3900909141240s359a9er2cf7e645d13f21ac@...627...> Hi! I'm trying to get better knowledge how Gambas works. I'm not sure how to progress... any hints? Flow charts, etc.? I understand role of gbc, gba and how interpreters works generally. But why there is gbr and gbx? Is gbr for gambas executables, and gbx for non archived code? Jussi From aleks.l at ...1865... Mon Sep 14 21:54:25 2009 From: aleks.l at ...1865... (Aleksandrs Livshics) Date: Mon, 14 Sep 2009 22:54:25 +0300 Subject: [Gambas-user] Is it a bug or a "feature"? In-Reply-To: <200909142059.06512.gambas@...1...> References: <200909131826.59197.aleks.l@...1865...> <200909132335.19032.aleks.l@...1865...> <200909142059.06512.gambas@...1...> Message-ID: <200909142254.25534.aleks.l@...1865...> On Monday 14 September 2009 21:59:06 Beno?t Minisini wrote: > Sorry, my joke didn't work! :-/ > > I meant that AFAIK, Draw.Ellipse() didn't change at all since the > beginning. It always took the coordinates of the rectangle surrounding it. Benoit, I cannot believe in that because I have upgraded my version 2 days ago and my screen shows a different picture running the same code. Also in the Gambas book of J.W.Rittinghouse (which is not perfect) I can read about Draw.Ellipse( arg1, arg2, arg3, arg4) where arg1 and arg2 are coordinates of a center but arg3 and arg4 are to set the horizontal and vertical width. And this is logical. If one wants to draw several ellipses changing their size around the same center he/she can change only arg3 and arg4. But as it is implemented now the arguments would look like: Draw.Ellipse( X_centre-X_width/2, Y_centre-Y_width/2, X_width, Y_width) Which looks very artificial. For me however important is to know whether this convention will be kept unchanged in the future and I think it should be documented as it is not intuitive. On the other subject... Some time ago I wrote to you about the ValueBox and "scientifick notation" for numbers. I have found that even at present it is possible to show values in this notation (it is automatically used) if the value is very-very small or too big. Like 1.0E-30. This makes it even more illogical that such a number, which can be displayed if supplied in the code, and so is absolutely legitimate, cannot be entered by the user. This is an argument against making another special ValueBoxScientifick but rather for changing the existing control. Though of course It is always possible to use a TextBox and to program the necessary checks and transformations. Regards Aleks From gambas at ...1... Mon Sep 14 21:58:49 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 14 Sep 2009 21:58:49 +0200 Subject: [Gambas-user] Gambas architecture In-Reply-To: <384d3900909141240s359a9er2cf7e645d13f21ac@...627...> References: <384d3900909141240s359a9er2cf7e645d13f21ac@...627...> Message-ID: <200909142158.49556.gambas@...1...> > Hi! > I'm trying to get better knowledge how Gambas works. > I'm not sure how to progress... any hints? Flow charts, etc.? > > I understand role of gbc, gba and how interpreters works generally. > But why there is gbr and gbx? > Is gbr for gambas executables, and gbx for non archived code? > > > Jussi > Yes. gbr is just a symbolic link to gbx. It allows to run the interpreter in "archive mode" without having to pass an extra argument. This is needed when putting the magic string "#!/usr/bin/env gbr" on top of the executable file, because you can pass only one argument on this line, which is the name of the program when using "env". In other words "gbr" is an hack to workaround a Unix limitation^W feature. Regards, -- Beno?t Minisini From gambas at ...1... Mon Sep 14 22:13:21 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 14 Sep 2009 22:13:21 +0200 Subject: [Gambas-user] Is it a bug or a "feature"? In-Reply-To: <200909142254.25534.aleks.l@...1865...> References: <200909131826.59197.aleks.l@...1865...> <200909142059.06512.gambas@...1...> <200909142254.25534.aleks.l@...1865...> Message-ID: <200909142213.22053.gambas@...1...> > On Monday 14 September 2009 21:59:06 Beno?t Minisini wrote: > > Sorry, my joke didn't work! :-/ > > > > I meant that AFAIK, Draw.Ellipse() didn't change at all since the > > beginning. It always took the coordinates of the rectangle surrounding > > it. > > Benoit, > I cannot believe in that because I have upgraded my version 2 days ago > and my screen shows a different picture running the same code. Look in the 2.7 source code, in the main/lib/draw.c file. You will see that Draw.Ellipse works the same way as in the current version. > Also in the Gambas book of J.W.Rittinghouse (which is not perfect) I can > read about Draw.Ellipse( arg1, arg2, arg3, arg4) where arg1 and arg2 are > coordinates of a center but arg3 and arg4 are to set the horizontal and > vertical width. And this is logical. If one wants to draw several ellipses > changing their size around the same center he/she can change only arg3 and > arg4. But as it is implemented now the arguments would look like: > > Draw.Ellipse( X_centre-X_width/2, Y_centre-Y_width/2, X_width, Y_width) > > Which looks very artificial. For me however important is to know whether > this convention will be kept unchanged in the future and I think it should > be documented as it is not intuitive. I cannot really change that, as it is actually the underlying toolkits that work that way. And I find it no more or less logical that your view. It is just a different logic. > > On the other subject... Some time ago I wrote to you about the ValueBox > and "scientifick notation" for numbers. I have found that even at present > it is possible to show values in this notation (it is automatically used) > if the value is very-very small or too big. Like 1.0E-30. This makes it > even more illogical that such a number, which can be displayed if supplied > in the code, and so is absolutely legitimate, cannot be entered by the > user. This is an argument against making another special > ValueBoxScientifick but rather for changing the existing control. Though > of course It is always possible to use a TextBox and to program the > necessary checks and transformations. Yes, ValueBox is a bit of mess and needs some love. But I have other things to do at the moment before deeping into it. Regards, -- Beno?t Minisini From ulusoyab at ...43... Mon Sep 14 22:34:32 2009 From: ulusoyab at ...43... (abdurrahman ulusoy) Date: Mon, 14 Sep 2009 13:34:32 -0700 (PDT) Subject: [Gambas-user] form.normal is badly overridden in class Message-ID: <763468.69575.qm@...2246...> ? ? ?When i port my project? gambas2 to gambas3 error :?"form.normal is badly overridden in class"?in gambas2 no error. it is working.? ___________________________________________________________________ Yahoo! T?rkiye a??ld?! http://yahoo.com.tr ?nternet ?zerindeki en iyi i?eri?i Yahoo! T?rkiye sizlere sunuyor! From gambas at ...1... Mon Sep 14 22:42:45 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 14 Sep 2009 22:42:45 +0200 Subject: [Gambas-user] form.normal is badly overridden in class In-Reply-To: <763468.69575.qm@...2246...> References: <763468.69575.qm@...2246...> Message-ID: <200909142242.45648.gambas@...1...> > When i port my project gambas2 to gambas3 error : "form.normal is > badly overridden in class" in gambas2 no error. it is working. > Window.Normal is a constant, you cannot override it anymore in Gambas 3. Fix your code to use another symbol name. Regards, -- Beno?t Minisini From robert1juhasz at ...626... Tue Sep 15 01:21:47 2009 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Tue, 15 Sep 2009 01:21:47 +0200 Subject: [Gambas-user] how to start a file? In-Reply-To: <384d3900909140742s6dcba2d7p1fe80c48a618df78@...627...> References: <25416046.post@...1379...> <82bffccf0909131618t20913763sbee1f6994fcff679@...627...> <384d3900909140742s6dcba2d7p1fe80c48a618df78@...627...> Message-ID: <68652a0b0909141621i4dbdd40p2a446068bc7ada20@...627...> Hi, I mean to let the user to attach a file in run time (I save the link) and let him run the file. Just I don't know how open that file using the link (not for my gambas application but just for the user with the default program of the "attached" file). In VBA I used "ShellExecute" for running programs, files or following links. I just would need the same. Thanks, Robi 2009/9/14 Jussi Lahtinen > I'm not sure what you mean, but this code creates file. > > Dim hFile as File > Dim sString as String = "Something to write." > > hFile = Open "testfile.txt" For Create > Write #hFile, sString > Close #hFile > > More from here: > http://gambasdoc.org/help/lang/open > http://gambasdoc.org/help/cat/stream > > > Or if you mean how to attach files to your project. > For example; right mouse click on Data folder --> New --> Other... > then just choose > what ever you need. > > > Jussi > > > > On Mon, Sep 14, 2009 at 02:18, Dimitris Anogiatis > wrote: > > Hey Robi, > > > > one of the options is to use the gb.settings library. > > > > while you're on the IDE press CTRL and P then click on the Componets tab, > > find gb.settings and click on the box on the left side of the selection > then > > press Ok > > > > now in your code you need to use this on top of your code (ie put this on > > the first line of your form or module) > > > > Public pathSettings AS NEW Settings(User.Home &/ Application.Name &/ > > Application.Name & ".conf") > > > > this means that if your user account name is robi and your application's > > name is myApp then the settings > > file will be created in this path > > > > /home/robi/myApp/myapp.conf > > > > now to save settings you use pathSettings like this > > > > pathSettings["Files/LoadFrom"]="your path" > > > > this will create a category Files in your settings file and under that it > > will create a LoadFrom item > > where you can store your path's value > > > > to read that value all you have to do is > > > > myPath = pathSettings["Files/LoadFrom"] > > > > I hope it helps > > > > Regards > > Dimitris > > > > > > On Sun, Sep 13, 2009 at 4:39 PM, yuhej wrote: > > > >> > >> Hello, > >> > >> I just start with Gambas (used VB before) and hopefully I found a place > >> where I can get some answers. > >> At this moment I wish to add an option of attaching files in my > application > >> (by saving the path) and to open them later. > >> Can someone tell me how can I start a file from Gambas? For instance a > >> spreadsheet with open office? > >> > >> Thanks for your help in advance. > >> > >> Robi > >> -- > >> View this message in context: > >> http://www.nabble.com/how-to-start-a-file--tp25416046p25416046.html > >> Sent from the gambas-user mailing list archive at Nabble.com. > >> > >> > >> > >> > ------------------------------------------------------------------------------ > >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > >> trial. Simplify your report design, integration and deployment - and > focus > >> on > >> what you do best, core application coding. Discover what's new with > >> Crystal Reports now. http://p.sf.net/sfu/bobj-july > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > > > ------------------------------------------------------------------------------ > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > > trial. Simplify your report design, integration and deployment - and > focus on > > what you do best, core application coding. Discover what's new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From robert1juhasz at ...626... Tue Sep 15 01:27:12 2009 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Tue, 15 Sep 2009 01:27:12 +0200 Subject: [Gambas-user] how to start a file? In-Reply-To: <82bffccf0909141007m522ace0aiba5648ccd87803f1@...627...> References: <25416046.post@...1379...> <82bffccf0909131618t20913763sbee1f6994fcff679@...627...> <68652a0b0909140740h663158a4q483f8381c7917c5a@...627...> <82bffccf0909141007m522ace0aiba5648ccd87803f1@...627...> Message-ID: <68652a0b0909141627r97bbac0r5eb01188ff0d5d76@...627...> I just read the answers in a reverse order... I believe that the Desktop.Open is exactly what I need. Many thanks! I'll run the program on a server and I let the user to decide if he saves only the link or "attach" the file - in this case I'll copy the referred file to a dedicated folder on the server and I save the link of this copy. Regards, Robi 2009/9/14 Dimitris Anogiatis > Hey Robi, > > What I described above is a way to store information in a configuration > file. what you need is different > > Files are going to be attached where? Where is the pdf going to be stored? > in the same computer where > the project is running? or in a website? > > To open a file with the default application, try using the gb.desktop > component and Desktop.Open() as Benoit suggested. > > call it like this Desktop.Open("file:///myPDF.pdf") if it is for a file or > Desktop.Open("http://myserver.com/myPDF.pdf") if the > file is on a server somewhere on the internet. > > > On Mon, Sep 14, 2009 at 8:40 AM, Robert JUHASZ >wrote: > > > Hi Dimitris, > > > > Thanks for your answer. > > I'm not sure if this is exactly what I want but I'll check. I try to tell > > more concretly my need: > > I wanna make a small project follower application for my colleagues where > > they can follow some actions and attach files. For instance a pdf file > with > > the customer spec. > > > > The data, I'll store in a mySQL database where I can put the path as > well. > > > > When the user (or an other user) opens the project and clicks on the > link, > > how can I tell to Gambas to open the file with the default application > (in > > the example with acrobat reader). I just need the same effect as when I > > double click on the icon. > > > > If this is what you described just confirm please. > > > > Thanks, > > Robi > > > > 2009/9/14 Dimitris Anogiatis > > > > > Hey Robi, > > > > > > one of the options is to use the gb.settings library. > > > > > > while you're on the IDE press CTRL and P then click on the Componets > tab, > > > find gb.settings and click on the box on the left side of the selection > > > then > > > press Ok > > > > > > now in your code you need to use this on top of your code (ie put this > on > > > the first line of your form or module) > > > > > > Public pathSettings AS NEW Settings(User.Home &/ Application.Name &/ > > > Application.Name & ".conf") > > > > > > this means that if your user account name is robi and your > application's > > > name is myApp then the settings > > > file will be created in this path > > > > > > /home/robi/myApp/myapp.conf > > > > > > now to save settings you use pathSettings like this > > > > > > pathSettings["Files/LoadFrom"]="your path" > > > > > > this will create a category Files in your settings file and under that > it > > > will create a LoadFrom item > > > where you can store your path's value > > > > > > to read that value all you have to do is > > > > > > myPath = pathSettings["Files/LoadFrom"] > > > > > > I hope it helps > > > > > > Regards > > > Dimitris > > > > > > > > > On Sun, Sep 13, 2009 at 4:39 PM, yuhej > wrote: > > > > > > > > > > > Hello, > > > > > > > > I just start with Gambas (used VB before) and hopefully I found a > place > > > > where I can get some answers. > > > > At this moment I wish to add an option of attaching files in my > > > application > > > > (by saving the path) and to open them later. > > > > Can someone tell me how can I start a file from Gambas? For instance > a > > > > spreadsheet with open office? > > > > > > > > Thanks for your help in advance. > > > > > > > > Robi > > > > -- > > > > View this message in context: > > > > http://www.nabble.com/how-to-start-a-file--tp25416046p25416046.html > > > > Sent from the gambas-user mailing list archive at Nabble.com. > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > > > 30-Day > > > > trial. Simplify your report design, integration and deployment - and > > > focus > > > > on > > > > what you do best, core application coding. Discover what's new with > > > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > > > _______________________________________________ > > > > Gambas-user mailing list > > > > Gambas-user at lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > > 30-Day > > > trial. Simplify your report design, integration and deployment - and > > focus > > > on > > > what you do best, core application coding. Discover what's new with > > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > ------------------------------------------------------------------------------ > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > > trial. Simplify your report design, integration and deployment - and > focus > > on > > what you do best, core application coding. Discover what's new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From girardhenri at ...67... Tue Sep 15 08:15:38 2009 From: girardhenri at ...67... (girardhenri at ...67...) Date: Tue, 15 Sep 2009 08:15:38 +0200 Subject: [Gambas-user] gambas-mysqladmin In-Reply-To: References: Message-ID: Hi, I tried it with gambas3 and it works great !! thanks -------------------------------------------------- From: "Demosthenes Koptsis" Sent: Tuesday, September 08, 2009 2:46 PM To: "mailing list for gambas users" Subject: [Gambas-user] gambas-mysqladmin > Hi to all. > > I wrote a very nice program called gambas-mysqladmin. > > It is a mysql administration tool, maybe you like to see it. > > Check below link: > > http://sourceforge.net/projects/gambas-mysqladm/ > > -- > > ???? ???? ?? ?????!!! > > Regards, > > Demosthenes Koptsis > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From oceanosoftlapalma at ...626... Tue Sep 15 08:43:49 2009 From: oceanosoftlapalma at ...626... (=?ISO-8859-1?Q?Ricardo_D=EDaz_Mart=EDn?=) Date: Tue, 15 Sep 2009 07:43:49 +0100 Subject: [Gambas-user] how to start a file? In-Reply-To: <68652a0b0909141627r97bbac0r5eb01188ff0d5d76@...627...> References: <25416046.post@...1379...> <82bffccf0909131618t20913763sbee1f6994fcff679@...627...> <68652a0b0909140740h663158a4q483f8381c7917c5a@...627...> <82bffccf0909141007m522ace0aiba5648ccd87803f1@...627...> <68652a0b0909141627r97bbac0r5eb01188ff0d5d76@...627...> Message-ID: You can use this (you need to have installed in your system xdg-open command - out of the box in ubuntu): EXEC ["xdg-open", PathOfTheFileYouCanOpen] "xdg-open" runs like in windows "start" Regards, Ricardo D?az 2009/9/15 Robert JUHASZ > I just read the answers in a reverse order... I believe that the > Desktop.Open is exactly what I need. Many thanks! > > I'll run the program on a server and I let the user to decide if he saves > only the link or "attach" the file - in this case I'll copy the referred > file to a dedicated folder on the server and I save the link of this copy. > > Regards, Robi > > 2009/9/14 Dimitris Anogiatis > > > Hey Robi, > > > > What I described above is a way to store information in a configuration > > file. what you need is different > > > > Files are going to be attached where? Where is the pdf going to be > stored? > > in the same computer where > > the project is running? or in a website? > > > > To open a file with the default application, try using the gb.desktop > > component and Desktop.Open() as Benoit suggested. > > > > call it like this Desktop.Open("file:///myPDF.pdf") if it is for a file > or > > Desktop.Open("http://myserver.com/myPDF.pdf") if > the > > file is on a server somewhere on the internet. > > > > > > On Mon, Sep 14, 2009 at 8:40 AM, Robert JUHASZ > >wrote: > > > > > Hi Dimitris, > > > > > > Thanks for your answer. > > > I'm not sure if this is exactly what I want but I'll check. I try to > tell > > > more concretly my need: > > > I wanna make a small project follower application for my colleagues > where > > > they can follow some actions and attach files. For instance a pdf file > > with > > > the customer spec. > > > > > > The data, I'll store in a mySQL database where I can put the path as > > well. > > > > > > When the user (or an other user) opens the project and clicks on the > > link, > > > how can I tell to Gambas to open the file with the default application > > (in > > > the example with acrobat reader). I just need the same effect as when I > > > double click on the icon. > > > > > > If this is what you described just confirm please. > > > > > > Thanks, > > > Robi > > > > > > 2009/9/14 Dimitris Anogiatis > > > > > > > Hey Robi, > > > > > > > > one of the options is to use the gb.settings library. > > > > > > > > while you're on the IDE press CTRL and P then click on the Componets > > tab, > > > > find gb.settings and click on the box on the left side of the > selection > > > > then > > > > press Ok > > > > > > > > now in your code you need to use this on top of your code (ie put > this > > on > > > > the first line of your form or module) > > > > > > > > Public pathSettings AS NEW Settings(User.Home &/ Application.Name &/ > > > > Application.Name & ".conf") > > > > > > > > this means that if your user account name is robi and your > > application's > > > > name is myApp then the settings > > > > file will be created in this path > > > > > > > > /home/robi/myApp/myapp.conf > > > > > > > > now to save settings you use pathSettings like this > > > > > > > > pathSettings["Files/LoadFrom"]="your path" > > > > > > > > this will create a category Files in your settings file and under > that > > it > > > > will create a LoadFrom item > > > > where you can store your path's value > > > > > > > > to read that value all you have to do is > > > > > > > > myPath = pathSettings["Files/LoadFrom"] > > > > > > > > I hope it helps > > > > > > > > Regards > > > > Dimitris > > > > > > > > > > > > On Sun, Sep 13, 2009 at 4:39 PM, yuhej > > wrote: > > > > > > > > > > > > > > Hello, > > > > > > > > > > I just start with Gambas (used VB before) and hopefully I found a > > place > > > > > where I can get some answers. > > > > > At this moment I wish to add an option of attaching files in my > > > > application > > > > > (by saving the path) and to open them later. > > > > > Can someone tell me how can I start a file from Gambas? For > instance > > a > > > > > spreadsheet with open office? > > > > > > > > > > Thanks for your help in advance. > > > > > > > > > > Robi > > > > > -- > > > > > View this message in context: > > > > > > http://www.nabble.com/how-to-start-a-file--tp25416046p25416046.html > > > > > Sent from the gambas-user mailing list archive at Nabble.com. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > > Let Crystal Reports handle the reporting - Free Crystal Reports > 2008 > > > > 30-Day > > > > > trial. Simplify your report design, integration and deployment - > and > > > > focus > > > > > on > > > > > what you do best, core application coding. Discover what's new with > > > > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > > > > _______________________________________________ > > > > > Gambas-user mailing list > > > > > Gambas-user at lists.sourceforge.net > > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > > > 30-Day > > > > trial. Simplify your report design, integration and deployment - and > > > focus > > > > on > > > > what you do best, core application coding. Discover what's new with > > > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > > > _______________________________________________ > > > > Gambas-user mailing list > > > > Gambas-user at lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > > 30-Day > > > trial. Simplify your report design, integration and deployment - and > > focus > > > on > > > what you do best, core application coding. Discover what's new with > > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > ------------------------------------------------------------------------------ > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > > trial. Simplify your report design, integration and deployment - and > focus > > on > > what you do best, core application coding. Discover what's new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From oceanosoftlapalma at ...626... Tue Sep 15 09:01:31 2009 From: oceanosoftlapalma at ...626... (=?ISO-8859-1?Q?Ricardo_D=EDaz_Mart=EDn?=) Date: Tue, 15 Sep 2009 08:01:31 +0100 Subject: [Gambas-user] Selection from GridView In-Reply-To: <200909111423.00505.aleks.l@...1865...> References: <200909092131.19522.aleks.l@...1865...> <200909101217.15171.aleks.l@...1865...> <200909111423.00505.aleks.l@...1865...> Message-ID: I recommend to you you download last version of gambas2 frrom souceforge and compile this. The gambas pakage in ubuntu 8.1 is too old (I don't know why ubuntu pakages version is 2.7 - it's gambas version doesn't exist!) 2009/9/11 Aleksandrs Livshics > I used 2.7 on eeepc version of Ubuntu 8.1 (called EasyPeasy 1.1), > but now I have compiled 2.16 on the same system. No difference. > I can select one row only or a group of rows, but not 2 rows in different > places of the GridView. > But I cannot imagine how this netbook may be different from a usual > PC in this case. Should be only small and slow and without a CD/DVD > inside... > And I have never noticed any differences using other software. > > On Friday 11 September 2009 10:10:35 Ricardo D?az Mart?n wrote: > > I think you have a bug in your gambas2 version. > > > > What distro are you using? (I always run gambas in ubuntu because I've > got > > problems with fedora and opensuse and the instalation in ubuntu form > > sources are easy and clear - you can see step by step in gambasdoc.org) > Are > > you using your distro repositories to install gambas2? gnome or KDE? > > > > I confirm to you I can't cancel the selection by click at the same row. > > This is only possible by theGridView.Rows.Unselect (I think this is one > of > > the differences whith listbox control, but I allways use gridviews and no > > ListBoxes because I'm a databases programmer and allways hide first or > more > > columns to get from this the id of the rows after) > > > > Multiple is the correct value for do that you want. > > > > I recomended to you you try to compile gambas2 from souces in souceforge > > using Ubuntu (Ubuntu is not the best distro but I use this because gambas > > run fine and it's easy and fast to deploy my apps using freenx) > > > > Regards, > > > > 2009/9/10 Aleksandrs Livshics > > > > > Thank you. I was not clear enough, sorry. The problem is not > > > with programming, but with the selection by mouse and keyboard. > > > The Ctrl and Shift do not work the way they do with the ListBox for > > > example. The only way to select more then one row is to drag > > > the mouse cursor keeping the left button pressed. But then > > > only the consequent rows can be chosen. > > > Also I cannot cancel the selection. Only if I select another row.. > > > If I click on a selected row or double click on it nothing happens. > > > It is NOT the same as in the case of ListBox. > > > I must also mention that I have set the mode of the GridView to > multiple. > > > I hope now my question is clear. > > > > > > On Thursday 10 September 2009 09:55:12 Ricardo D?az Mart?n wrote: > > > > To do the first write (select first, third and sixth rows - > > > > > > gvYourGridView > > > > > > > is the name of the gridview in your form) > > > > > > > > gvYourGridView.Rows.[0].Selected = True > > > > gvYourGridView.Rows.[2].Selected = True > > > > gvYourGridView.Rows.[5].Selected = True > > > > > > > > To do the second only write > > > > > > > > gvYourGridView.Rows.Unselect > > > > > > > > > > > > Regards, > > > > Ricardo D?az > > > > > > > > 2009/9/9 Aleksandrs Livshics > > > > > > > > > Hi Gambas users. > > > > > I cannot fond how to select several rows from a GridView. > > > > > The difficulty happens only if the rows to select are not > > > > > consequent. If there is a simple interval of rows, then > > > > > selection works well, but if I want to select, say, row1 > > > > > and row5 ? > > > > > Also how can a row selection be canceled without > > > > > selecting of another row? Just mouse click on the > > > > > selected row does not cancel the selection... > > > > > My version is 2.7. > > > > > Aleks > > > > > > > ------------------------------------------------------------------------- > > > > > > > >----- Let Crystal Reports handle the reporting - Free Crystal > Reports > > > > > > 2008 > > > > > > > > 30-Day trial. Simplify your report design, integration and > deployment > > > > > - and focus on > > > > > what you do best, core application coding. Discover what's new with > > > > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > > > > _______________________________________________ > > > > > Gambas-user mailing list > > > > > Gambas-user at lists.sourceforge.net > > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > ------------------------------------------------------------------------- > > >-- > > > > > > >--- Let Crystal Reports handle the reporting - Free Crystal Reports > 2008 > > > > 30-Day trial. Simplify your report design, integration and deployment > - > > > > > > and > > > > > > > focus on what you do best, core application coding. Discover what's > new > > > > with Crystal Reports now. http://p.sf.net/sfu/bobj-july > > > > _______________________________________________ > > > > Gambas-user mailing list > > > > Gambas-user at lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > ------------------------------------------------------------------------- > > >----- Let Crystal Reports handle the reporting - Free Crystal Reports > 2008 > > > 30-Day trial. Simplify your report design, integration and deployment - > > > and focus on > > > what you do best, core application coding. Discover what's new with > > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > --------------------------------------------------------------------------- > >--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > > 30-Day trial. Simplify your report design, integration and deployment - > and > > focus on what you do best, core application coding. Discover what's new > > with Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From rospolosco at ...152... Tue Sep 15 13:03:15 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Tue, 15 Sep 2009 13:03:15 +0200 Subject: [Gambas-user] Balloon In-Reply-To: <200909071248.51176.pinozollo@...626...> References: <200909070841.05680.pinozollo@...626...> <200909071758.12670.gambas@...1...> <200909071248.51176.pinozollo@...626...> Message-ID: <200909151303.16299.rospolosco@...152...> Il luned? 7 settembre 2009 18:48:51 Pino Zollo ha scritto: > Alle 11:58, luned? 7 settembre 2009, hai scritto: > > > Hi! > > > > > > >Balloon popup is little buggy (sometimes). > > > >Screenshot tells it all. > > > > > > For me (Gambas 2.15) the delay is not actuated: > > > > > > Balloon.Delay = 20000 > > > > > > shows for a small second.... > > > > > > Pino > > > > It works there... I think the problem comes from the window manager: > > which one do you use? > > Gambas 2.15, QT, Debian 5.0.1, Gnome...same on Debian 4.0r5 > > Ciao > Pino Hi. This is a little example that shows the problem on my box. Gambas 2.15.1 KDE 3.5.10 Qt 3.3.8b GTK2 2.12.12 The balloon flashes when using gtk.gb. -------------- next part -------------- A non-text attachment was scrubbed... Name: gtk-baloon-0.0.1.tar.gz Type: application/x-tgz Size: 7809 bytes Desc: not available URL: From 12ukwn at ...626... Tue Sep 15 13:20:58 2009 From: 12ukwn at ...626... (Jean-Yves F. Barbier) Date: Tue, 15 Sep 2009 13:20:58 +0200 Subject: [Gambas-user] Balloon In-Reply-To: <200909151303.16299.rospolosco@...152...> References: <200909070841.05680.pinozollo@...626...> <200909071758.12670.gambas@...1...> <200909071248.51176.pinozollo@...626...> <200909151303.16299.rospolosco@...152...> Message-ID: <4AAF789A.9000503@...626...> Stefano Palmeri a ?crit : ... > This is a little example that shows the problem on my box. > > Gambas 2.15.1 > KDE 3.5.10 > Qt 3.3.8b > GTK2 2.12.12 > > The balloon flashes when using gtk.gb. Debian sid GB 2.15.2-1 (deb package) Qt 3.3.8b-6 GTK2 2.16.6-1 Tests using your project: time (sec) From Tab ======================== Qt 5 5 GTK 0.5 5 JY -- Who is D.B. Cooper, and where is he now? From mohareve at ...626... Tue Sep 15 14:01:48 2009 From: mohareve at ...626... (M. Cs.) Date: Tue, 15 Sep 2009 14:01:48 +0200 Subject: [Gambas-user] Scaling GUI Message-ID: Is it possible to make a GUI automatically stretched upon maximizing the GUI window, with all its elements? I mean, I have a form with edit boxes, list boxes buttons. Is it possible to have them proportionally scaled when I change the size of a box? If yes, how to do that? From rterry at ...1946... Tue Sep 15 15:13:26 2009 From: rterry at ...1946... (richard terry) Date: Tue, 15 Sep 2009 23:13:26 +1000 Subject: [Gambas-user] Scaling GUI In-Reply-To: References: Message-ID: <200909152313.26481.rterry@...1946...> On Tuesday 15 September 2009 22:01:48 M. Cs. wrote: > Is it possible to make a GUI automatically stretched upon maximizing the > GUI window, with all its elements? > I mean, I have a form with edit boxes, list boxes buttons. Is it possible > to have them proportionally scaled when I change the size of a box? > If yes, how to do that? > --------------------------------------------------------------------------- >--- Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user that is really simple, you should spend some time looking at the properties in the gui as described below and I attach a simple example (its in gambas3 - using version 2 just inspect th properties. You can acheive anything you want with the gambas IDE. to do what you want as a simple example do this. Set the forms arrangement property to fill and its expand propterty to true (needed if you later embed the form - it will then expand in its container) Put something on a form like a vbox - set its expand property to true (as per the sample) Put something in the Vbox like a button, set its expand property to true. run the project, the whole lot will proportionately expand. -------------- next part -------------- A non-text attachment was scrubbed... Name: exapnd-0.0.1.tar.gz Type: application/x-compressed-tar Size: 8330 bytes Desc: not available URL: From gambas at ...1... Tue Sep 15 15:22:41 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 15 Sep 2009 15:22:41 +0200 Subject: [Gambas-user] how to start a file? In-Reply-To: References: <25416046.post@...1379...> <68652a0b0909141627r97bbac0r5eb01188ff0d5d76@...627...> Message-ID: <200909151522.42019.gambas@...1...> > You can use this (you need to have installed in your system xdg-open > command - out of the box in ubuntu): > > EXEC ["xdg-open", PathOfTheFileYouCanOpen] > > "xdg-open" runs like in windows "start" > > Regards, > Ricardo D?az > Guess what Desktop.Open() does... -- Beno?t Minisini From demosthenesk at ...626... Tue Sep 15 15:44:07 2009 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Tue, 15 Sep 2009 16:44:07 +0300 Subject: [Gambas-user] Gambas Help system Message-ID: I must say that there were times which i search for something in help files and i could not find it. The old Gambas1 had a find area that gave the opportunity to search something. Is it possible to make something about that for example a chm version of help system? -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From oceanosoftlapalma at ...626... Tue Sep 15 18:50:14 2009 From: oceanosoftlapalma at ...626... (=?ISO-8859-1?Q?Ricardo_D=EDaz_Mart=EDn?=) Date: Tue, 15 Sep 2009 17:50:14 +0100 Subject: [Gambas-user] how to start a file? In-Reply-To: <200909151522.42019.gambas@...1...> References: <25416046.post@...1379...> <68652a0b0909141627r97bbac0r5eb01188ff0d5d76@...627...> <200909151522.42019.gambas@...1...> Message-ID: maybe the same... 8-) 2009/9/15 Beno?t Minisini > > You can use this (you need to have installed in your system xdg-open > > command - out of the box in ubuntu): > > > > EXEC ["xdg-open", PathOfTheFileYouCanOpen] > > > > "xdg-open" runs like in windows "start" > > > > Regards, > > Ricardo D?az > > > > Guess what Desktop.Open() does... > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From peter.talken at ...1879... Tue Sep 15 19:12:56 2009 From: peter.talken at ...1879... (Peter Landgren) Date: Tue, 15 Sep 2009 19:12:56 +0200 Subject: [Gambas-user] Possible bug? Message-ID: <200909151912.57198.peter.talken@...1879...> Hi, I try to put the character "<" in the Text of a TextLabel, but only space is shown in the form? Same effect if I do it from code and not using the IDE. The characters after "<" are not displayed in the form. Using Gambas 2.16. /Peter From gambas at ...1... Tue Sep 15 19:29:42 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 15 Sep 2009 19:29:42 +0200 Subject: [Gambas-user] Possible bug? In-Reply-To: <200909151912.57198.peter.talken@...1879...> References: <200909151912.57198.peter.talken@...1879...> Message-ID: <200909151929.42521.gambas@...1...> > Hi, > > I try to put the character "<" in the Text of a TextLabel, but only space > is shown in the form? Same effect if I do it from code and not using the > IDE. > The characters after "<" are not displayed in the form. > > Using Gambas 2.16. > > /Peter > > TextLabel wants HTML: so you must use < Regards, -- Beno?t Minisini From mohareve at ...626... Tue Sep 15 19:49:48 2009 From: mohareve at ...626... (M. Cs.) Date: Tue, 15 Sep 2009 19:49:48 +0200 Subject: [Gambas-user] Scaling GUI In-Reply-To: <200909152313.26481.rterry@...1946...> References: <200909152313.26481.rterry@...1946...> Message-ID: Sorry, but your example won't open in Gambas 2.13 I use. I've tried to change all the expand properties to true, but there are no changes. Does a background image make some influence? From peter.talken at ...1879... Tue Sep 15 20:59:25 2009 From: peter.talken at ...1879... (Peter Landgren) Date: Tue, 15 Sep 2009 20:59:25 +0200 Subject: [Gambas-user] Possible bug? In-Reply-To: <200909151929.42521.gambas@...1...> References: <200909151912.57198.peter.talken@...1879...> <200909151929.42521.gambas@...1...> Message-ID: <200909152059.26150.peter.talken@...1879...> Den Tuesday 15 September 2009 19.29.42 skrev Beno?t Minisini: > > Hi, > > > > I try to put the character "<" in the Text of a TextLabel, but only space > > is shown in the form? Same effect if I do it from code and not using the > > IDE. > > The characters after "<" are not displayed in the form. > > > > Using Gambas 2.16. > > > > /Peter > > TextLabel wants HTML: so you must use < > > Regards, Thanks, Found it in the documentation too. However a simple ">" works OK. And the ";" seems not to be necessary, it's enough with "<". /Peter From mohareve at ...626... Tue Sep 15 22:33:37 2009 From: mohareve at ...626... (M. Cs.) Date: Tue, 15 Sep 2009 22:33:37 +0200 Subject: [Gambas-user] Concept of containers Message-ID: I don't understand the concept of containers. When I want to create a UI which would proportionally change its size (e.g. when I double the size of the form, every item doubles its size), do I have to cover all the area of form with panels or vboxes (what's this?), and then to place the real stuff (buttons, labels, views etc.) inside them? What is the use of containers? Could someone explain me the concept? From rterry at ...1946... Tue Sep 15 23:28:30 2009 From: rterry at ...1946... (richard terry) Date: Wed, 16 Sep 2009 07:28:30 +1000 Subject: [Gambas-user] Concept of containers In-Reply-To: References: Message-ID: <200909160728.30937.rterry@...1946...> On Wednesday 16 September 2009 06:33:37 M. Cs. wrote: > I don't understand the concept of containers. When I want to create a UI > which would proportionally change its size (e.g. when I double the size of > the form, every item doubles its size), do I have to cover all the area of > form with panels or vboxes (what's this?), and then to place the real stuff > (buttons, labels, views etc.) inside them? > What is the use of containers? Could someone explain me the concept? > --------------------------------------------------------------------------- >--- Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user Same concept, really simple but you will never learn this unless you do it yourself - ie put the controls on the form, set the propertikkes and watch what happends. re-read this: 1) If you set the form arrangement to fill it will fill itself with whatever the control is that you have stuck on the form. 2) If you put things withing a container stuck on a form like that, then the properties of the container determine what happens to its children. Play with them. a VBox is a container who stacks its children vertically, ie if you put button1,2,3,4 underneath each other in a vbox they will be stacked on stop on each other. How the buttons behave will depend on what you do with their properites of expand. Just try it!!!!!!!!!!!!!!!!! Richard From gambas at ...1... Wed Sep 16 00:26:43 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 16 Sep 2009 00:26:43 +0200 Subject: [Gambas-user] Balloon In-Reply-To: <200909151303.16299.rospolosco@...152...> References: <200909070841.05680.pinozollo@...626...> <200909071248.51176.pinozollo@...626...> <200909151303.16299.rospolosco@...152...> Message-ID: <200909160026.43793.gambas@...1...> > Il luned? 7 settembre 2009 18:48:51 Pino Zollo ha scritto: > > Alle 11:58, luned? 7 settembre 2009, hai scritto: > > > > Hi! > > > > > > > > >Balloon popup is little buggy (sometimes). > > > > >Screenshot tells it all. > > > > > > > > For me (Gambas 2.15) the delay is not actuated: > > > > > > > > Balloon.Delay = 20000 > > > > > > > > shows for a small second.... > > > > > > > > Pino > > > > > > It works there... I think the problem comes from the window manager: > > > which one do you use? > > > > Gambas 2.15, QT, Debian 5.0.1, Gnome...same on Debian 4.0r5 > > > > Ciao > > Pino > > Hi. > > This is a little example that shows the problem on my box. > > Gambas 2.15.1 > KDE 3.5.10 > Qt 3.3.8b > GTK2 2.12.12 > > The balloon flashes when using gtk.gb. > The bug needs the new GTK+ event management introduced in Gambas 3 to be fixed. You see it in that project because the balloon is shown inside the Form_Enter event. I don't know if you used this event on purpose. Do you want to show balloons when the mouse enters a control? Anyway, I will backport the new GTK+ event management, but I'm not sure it won't break some things, so I will need GTK+ testers of /branches/2.0 before making a 2.17 version. Regards, -- Beno?t Minisini From robert1juhasz at ...626... Wed Sep 16 01:04:50 2009 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Wed, 16 Sep 2009 01:04:50 +0200 Subject: [Gambas-user] how to start a file? In-Reply-To: References: <25416046.post@...1379...> <68652a0b0909141627r97bbac0r5eb01188ff0d5d76@...627...> <200909151522.42019.gambas@...1...> Message-ID: <68652a0b0909151604h7f19c21du39f30d2816beef02@...627...> .. and it works perfectly, thanks for all of you who helped! Robi 2009/9/15 Ricardo D?az Mart?n > maybe the same... 8-) > > 2009/9/15 Beno?t Minisini > > > > You can use this (you need to have installed in your system xdg-open > > > command - out of the box in ubuntu): > > > > > > EXEC ["xdg-open", PathOfTheFileYouCanOpen] > > > > > > "xdg-open" runs like in windows "start" > > > > > > Regards, > > > Ricardo D?az > > > > > > > Guess what Desktop.Open() does... > > > > -- > > Beno?t Minisini > > > > > > > ------------------------------------------------------------------------------ > > Come build with us! The BlackBerry® Developer Conference in SF, CA > > is the only developer event you need to attend this year. Jumpstart your > > developing skills, take BlackBerry mobile applications to market and stay > > ahead of the curve. Join us from November 9-12, 2009. Register > now! > > http://p.sf.net/sfu/devconf > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From steven at ...2097... Wed Sep 16 04:00:43 2009 From: steven at ...2097... (Steven James Drinnan) Date: Wed, 16 Sep 2009 10:00:43 +0800 Subject: [Gambas-user] Balloon In-Reply-To: <200909160026.43793.gambas@...1...> References: <200909070841.05680.pinozollo@...626...> <200909071248.51176.pinozollo@...626...> <200909151303.16299.rospolosco@...152...> <200909160026.43793.gambas@...1...> Message-ID: <1253066445.5105.0.camel@...2273...> Tell me what to do and what needs to be tested. Steven Drinnan, On Wed, 2009-09-16 at 00:26 +0200, Beno?t Minisini wrote: > > Il luned? 7 settembre 2009 18:48:51 Pino Zollo ha scritto: > > > Alle 11:58, luned? 7 settembre 2009, hai scritto: > > > > > Hi! > > > > > > > > > > >Balloon popup is little buggy (sometimes). > > > > > >Screenshot tells it all. > > > > > > > > > > For me (Gambas 2.15) the delay is not actuated: > > > > > > > > > > Balloon.Delay = 20000 > > > > > > > > > > shows for a small second.... > > > > > > > > > > Pino > > > > > > > > It works there... I think the problem comes from the window manager: > > > > which one do you use? > > > > > > Gambas 2.15, QT, Debian 5.0.1, Gnome...same on Debian 4.0r5 > > > > > > Ciao > > > Pino > > > > Hi. > > > > This is a little example that shows the problem on my box. > > > > Gambas 2.15.1 > > KDE 3.5.10 > > Qt 3.3.8b > > GTK2 2.12.12 > > > > The balloon flashes when using gtk.gb. > > > > The bug needs the new GTK+ event management introduced in Gambas 3 to be > fixed. You see it in that project because the balloon is shown inside the > Form_Enter event. > > I don't know if you used this event on purpose. Do you want to show balloons > when the mouse enters a control? > > Anyway, I will backport the new GTK+ event management, but I'm not sure it > won't break some things, so I will need GTK+ testers of /branches/2.0 before > making a 2.17 version. > > Regards, > From jriolexp at ...43... Wed Sep 16 07:07:05 2009 From: jriolexp at ...43... (jriolexp) Date: Wed, 16 Sep 2009 13:07:05 +0800 Subject: [Gambas-user] Gambas2 IDE Font in KDE4 Message-ID: <4AB07279.1050402@...43...> I'm having issues with Gambas2 version 2.15.2-1 IDE where the fonts are twice as large compared to the compiled application, making it rather hard to properly align components. I'm running Debian testing with KDE 4.2.4. How can I change the IDE font? From gambas.fr at ...626... Wed Sep 16 08:23:49 2009 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 16 Sep 2009 08:23:49 +0200 Subject: [Gambas-user] Concept of containers In-Reply-To: <200909160728.30937.rterry@...1946...> References: <200909160728.30937.rterry@...1946...> Message-ID: <6324a42a0909152323i2ed75d34vaa59197068c8c49c@...627...> it's like a web page ! on container - you have an align properties in form, panel, and some other container (some container are specific: vbox, hbox, etc (so they do not have align properties.)) - you have padding and spacing properties on child - an ignore propertiy (that say to the control and his container to not take care of him ... so it is not automatiquely moved. - an expand property that say if the child take all the free space in the container (if more that one children in the container have this property set true, then the parent divide the place between each child. Now you can do everything ! and you do not have to manage the resizing of your controls ! (just a tip :... to place a cotrole to the right in a toolbar panel: arrange: Horizontal ... just put an empty panel in the left of your button and set it's expand property to true...) Regards, Fabien Bodard 2009/9/15 richard terry : > On Wednesday 16 September 2009 06:33:37 M. Cs. wrote: >> I don't understand the concept of containers. When I want to create a UI >> which would proportionally change its size (e.g. when I double the size of >> the form, every item doubles its size), do I have to cover all the area of >> form with panels or vboxes (what's this?), and then to place the real stuff >> (buttons, labels, views etc.) inside them? >> What is the use of containers? Could someone explain me the concept? >> --------------------------------------------------------------------------- >>--- Come build with us! The BlackBerry® Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9-12, 2009. Register now! >> http://p.sf.net/sfu/devconf >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > Same concept, really simple but you will never learn this unless you do it > yourself - ie put the controls on the form, set the propertikkes and watch > what happends. > > > re-read this: > > 1) If you set the form arrangement to fill it will fill itself with whatever > the control is that you have stuck on the form. > 2) If you put things withing a container stuck on a form like that, then the > properties of the container determine what happens to its children. > > Play with them. > > a VBox is a container who stacks its children vertically, ie if you put > button1,2,3,4 underneath each other in a vbox ?they will be stacked on stop on > each other. How the buttons behave will depend on what ?you do with their > properites of expand. > > Just try it!!!!!!!!!!!!!!!!! > > Richard > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Wed Sep 16 08:28:45 2009 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 16 Sep 2009 08:28:45 +0200 Subject: [Gambas-user] Gambas Help system In-Reply-To: References: Message-ID: <6324a42a0909152328u5dace930h223b20a8447abbd0@...627...> I this this will be done when Benoit will have success to port his help in a sqlite database... Then all the help can be found with sql queries. To wait a little bit you can use the help engine in the http://gambasdoc.org site 2009/9/15 Demosthenes Koptsis : > I must say that there were times which i search for something in help > files and i could not find it. > The old Gambas1 had a find area that gave the opportunity to search something. > > Is it possible to make something about that for example a chm version > of help system? > > -- > > ???? ???? ?? ?????!!! > > Regards, > > Demosthenes Koptsis > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Wed Sep 16 08:30:43 2009 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 16 Sep 2009 08:30:43 +0200 Subject: [Gambas-user] Gambas2 IDE Font in KDE4 In-Reply-To: <4AB07279.1050402@...43...> References: <4AB07279.1050402@...43...> Message-ID: <6324a42a0909152330x200c3472j3fb8ef07748f71d1@...627...> what is your kde theme, and fonts ? desktop size ?, 2009/9/16 jriolexp : > I'm having issues with Gambas2 version 2.15.2-1 IDE where the fonts are > twice as large compared to the compiled application, making it rather > hard to properly align components. ?I'm running Debian testing with KDE > 4.2.4. How can I change the IDE font? > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry? Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From leemcpherson at ...626... Wed Sep 16 08:51:07 2009 From: leemcpherson at ...626... (Lee McPherson) Date: Wed, 16 Sep 2009 02:51:07 -0400 Subject: [Gambas-user] Application_mousedown() + Application_keypress() ? In-Reply-To: <4AADB455.3090904@...626...> References: <200909121542.57236.gambas@...1...> <4AAD79C1.9050303@...626...> <200909140439.26585.ronstk@...239...> <4AADB455.3090904@...626...> Message-ID: <4AB08ADB.8010006@...626...> Lee McPherson wrote: > Ron_1st wrote: >> On Monday 14 September 2009, Lee McPherson wrote: >> >>> Beno?t Minisini wrote: >>> >>>>> I'm trying to get an application-wide mouse down event to >>>>> register. I >>>>> found that when I do a Form_mousedown() it only triggers when you >>>>> click >>>>> on an empty part of the form, not when you're clicking on any type of >>>>> control. I'm looking for something that will trigger whenever you >>>>> hit >>>>> the mouse button. (My app is going to be full screen, so I don't >>>>> care >>>>> if it works outside of the app window or not.) >>>>> >>>>> During my searching of the list archives, I found someone tried to >>>>> use >>>>> Application_Keypress() as a way to get a key press while the app is >>>>> running. Well, I tried it and it doesn't work, nothing happens: >>>>> >>>>> Static Public Sub Application_Keypress() >>>>> Message.Info(Key.code) >>>>> End >>>>> >>>>> I tried it on Gambas 2.8 and I even compiled Gambas 3.0 r2329 and >>>>> that >>>>> didn't change anything. I am using GTK only (Ubuntu). Any ideas? >>>>> >>>>> Thanks, >>>>> Lee >>>>> >>>>> >>>> There is no global pointer event handler, only >>>> Application_KeyPress(). But apparently it does not work with >>>> gb.gtk... Can you try with gb.qt to see if at least >>>> Application_KeyPress() is called? Note that this function must be >>>> defined in the startup class! >>>> >>> Switching to gb.qt in gambas 3 works. Haven't tried it in 2.8 yet, >>> but I don't want to use qt in any case. Since there's no global >>> pointer event handler yet, it does not matter if you fix >>> applicaiton_keypress for gtk (for me at least). >>> I would suggest a global pointer event handler as a feature if you >>> have the time. The reason I wanted to use it was for a feedback >>> response when using a touchscreen. Since there will be no pointer >>> on the screen (and no vibrate function like on a mobile phone), I >>> wanted to create a graphical response to touching (clicking) the >>> screen with your finger (a pointer). >>> I suppose the only workaround to this is to create a procedure and >>> call the procedure for a mouse_down or mouse_up event for every >>> control on the form. >>> >>> Let me say that despite some of the drawbacks, this is the easiest >>> and most useful tool I've ever used to do programming. Keep up the >>> good work! When I get better at this I hope to contribute more myself. >>> >>> -Lee >>> >>> >> >> take a look for 'xev', is a util in the x11 package. >> >> >> Best regards, >> >> Ron_1st >> > Thank you, I can see how this can be used as an alternative. I'll be > experimenting... > > -Lee Just an update to anyone following this thread: xev is a great tool for testing your input devices when you click on the generated window. However, when you attach xev to an existing window using its window ID (found with xwininfo), it doesn't work the same way. The log information does not contain button clicks for some reason. It also doesn't work on a console window at all unless you're dragging it or leaving it (that was weird to me). Attached to my half-finished gambas program, it would not record mouse clicks. Oh well... Other avenues I followed: there is a program written in python called pykeylogger which is a key and mouse event logger. I was tempted to use that in some fashion. However, as of Xorg version 1.6.0, it is currently broken because of something to do with broken records in Xorg... ? I don't know exactly what the problem is. But this may be feasible later on. I found a program called "mev" which seems to get mouse clicks, but it seems half-broken and I couldn't get it to run as a process without being killed immediately. When you run it on the command line it returns the command line as if the program is finished. However, if you then click on the terminal window, some characters appear. I ditched the attempt after a while. Finally, I attempted to get data directly from /dev/input/mice. However, my mouse now goes to /dev/input/event3, but no mouse events can be recorded there (sudo cat /dev/input/event3). Apparently, all the keyboard and mouse drivers use evdev now and lock out anything else from seeing signals from these input devices. Sure enough, when I'm completely logged out of Xorg, I can see a steady stream of data using "sudo xxd /dev/input/event3" when I touch the touchpad. If anyone else has ideas, I'd be glad to hear them. However, this isn't critical to my app and I don't want to make this too time consuming. Ugh, I already wasted enough... -Lee From gambas.fr at ...626... Wed Sep 16 08:53:19 2009 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 16 Sep 2009 08:53:19 +0200 Subject: [Gambas-user] Scaling GUI In-Reply-To: References: <200909152313.26481.rterry@...1946...> Message-ID: <6324a42a0909152353i3663b36byec436b755f6e1d31@...627...> this is an example 2009/9/15 M. Cs. : > Sorry, but your example won't open in Gambas 2.13 I use. I've tried to > change all the expand properties to true, but there are no changes. Does a > background image make some influence? > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -------------- next part -------------- A non-text attachment was scrubbed... Name: expand-0.0.2.tar.gz Type: application/x-gzip Size: 8765 bytes Desc: not available URL: From rterry at ...1946... Wed Sep 16 09:17:26 2009 From: rterry at ...1946... (richard terry) Date: Wed, 16 Sep 2009 17:17:26 +1000 Subject: [Gambas-user] Gambas2 IDE Font in KDE4 In-Reply-To: <4AB07279.1050402@...43...> References: <4AB07279.1050402@...43...> Message-ID: <200909161717.26676.rterry@...1946...> On Wednesday 16 September 2009 15:07:05 jriolexp wrote: > I'm having issues with Gambas2 version 2.15.2-1 IDE where the fonts are > twice as large compared to the compiled application, making it rather > hard to properly align components. I'm running Debian testing with KDE > 4.2.4. How can I change the IDE font? > > > --------------------------------------------------------------------------- >--- Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user You can set the font for the IDE in tools preferences font. but benoit may have some other comments. For the running program use application.font. Regards Richard From rospolosco at ...152... Wed Sep 16 10:21:49 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Wed, 16 Sep 2009 10:21:49 +0200 Subject: [Gambas-user] Balloon In-Reply-To: <200909160026.43793.gambas@...1...> References: <200909070841.05680.pinozollo@...626...> <200909151303.16299.rospolosco@...152...> <200909160026.43793.gambas@...1...> Message-ID: <200909161021.49559.rospolosco@...152...> Il mercoled? 16 settembre 2009 00:26:43 Beno?t Minisini ha scritto: > > Il luned? 7 settembre 2009 18:48:51 Pino Zollo ha scritto: > > > Alle 11:58, luned? 7 settembre 2009, hai scritto: > > > > > Hi! > > > > > > > > > > >Balloon popup is little buggy (sometimes). > > > > > >Screenshot tells it all. > > > > > > > > > > For me (Gambas 2.15) the delay is not actuated: > > > > > > > > > > Balloon.Delay = 20000 > > > > > > > > > > shows for a small second.... > > > > > > > > > > Pino > > > > > > > > It works there... I think the problem comes from the window manager: > > > > which one do you use? > > > > > > Gambas 2.15, QT, Debian 5.0.1, Gnome...same on Debian 4.0r5 > > > > > > Ciao > > > Pino > > > > Hi. > > > > This is a little example that shows the problem on my box. > > > > Gambas 2.15.1 > > KDE 3.5.10 > > Qt 3.3.8b > > GTK2 2.12.12 > > > > The balloon flashes when using gtk.gb. > > The bug needs the new GTK+ event management introduced in Gambas 3 to be > fixed. You see it in that project because the balloon is shown inside the > Form_Enter event. > > I don't know if you used this event on purpose. Do you want to show > balloons when the mouse enters a control? > I discover this gtk bug while testing a little GUI written using gb.qt. I was testing gb.gtk to see if the behaviour was the same. Actually, I discover it on an Activate event. Attached example. Type "gambas" in the textbox, then activate and the balloon flashes for a few cents of second. So, probably the bug affects many events. Saluti, Stefano > Anyway, I will backport the new GTK+ event management, but I'm not sure it > won't break some things, so I will need GTK+ testers of /branches/2.0 > before making a 2.17 version. > > Regards, -------------- next part -------------- A non-text attachment was scrubbed... Name: gtk-baloon-0.0.2.tar.gz Type: application/x-tgz Size: 7826 bytes Desc: not available URL: From mohareve at ...626... Wed Sep 16 11:25:25 2009 From: mohareve at ...626... (M. Cs.) Date: Wed, 16 Sep 2009 11:25:25 +0200 Subject: [Gambas-user] Scaling GUI In-Reply-To: <6324a42a0909152353i3663b36byec436b755f6e1d31@...627...> References: <200909152313.26481.rterry@...1946...> <6324a42a0909152353i3663b36byec436b755f6e1d31@...627...> Message-ID: Well, I succeeded with that, but what if I have more than one item, let say I have an editbox and a button. I've tried to set forms arrange property to fill, but then only the button can be seen, which covers the entire area of the form. Is there a possibility to have homotetical scaling for all the items at once? From mohareve at ...626... Wed Sep 16 11:32:57 2009 From: mohareve at ...626... (M. Cs.) Date: Wed, 16 Sep 2009 11:32:57 +0200 Subject: [Gambas-user] Concept of containers In-Reply-To: <6324a42a0909152323i2ed75d34vaa59197068c8c49c@...627...> References: <200909160728.30937.rterry@...1946...> <6324a42a0909152323i2ed75d34vaa59197068c8c49c@...627...> Message-ID: If I understood it well, the form itself is parent of all. So all other items (buttons, comboboxes etc.) are children of the form. If I put something into a container, then the container is the parent of the element. And the arrange property is valid for its children. So I don't need to adjust the behavior of the children, but just the containers? I'll play with empty projects, to see how it works. From mohareve at ...626... Wed Sep 16 12:31:24 2009 From: mohareve at ...626... (M. Cs.) Date: Wed, 16 Sep 2009 12:31:24 +0200 Subject: [Gambas-user] Scaling GUI In-Reply-To: References: <200909152313.26481.rterry@...1946...> <6324a42a0909152353i3663b36byec436b755f6e1d31@...627...> Message-ID: No, I still can't figure out, how to have scaled an item at the same time in two directions. I've managed to have them scaled whether horizontally or vertically. From the point of mathematics that makes no sense. Would it be possible to count the position of each item from the upper left edge of the form, and to work with vectors? To enlarge on shrink them according to the proportional change in form's width and height. From ronstk at ...239... Wed Sep 16 13:22:48 2009 From: ronstk at ...239... (Ron_1st) Date: Wed, 16 Sep 2009 13:22:48 +0200 Subject: [Gambas-user] Possible bug? In-Reply-To: <200909152059.26150.peter.talken@...1879...> References: <200909151912.57198.peter.talken@...1879...> <200909151929.42521.gambas@...1...> <200909152059.26150.peter.talken@...1879...> Message-ID: <200909161322.49391.ronstk@...239...> On Tuesday 15 September 2009, Peter Landgren wrote: > > > Using Gambas 2.16. > > > > > > /Peter > > > > TextLabel wants HTML: so you must use < Then it should be named HtmLabel ??? IMHO text is text and a > > > Regards, > Thanks, > > Found it in the documentation too. > > However a simple ">" works OK. > And the ";" seems not to be necessary, it's enough with "<". Bad habbit to do. This way we have got already to many bad websites due IE wich do/did accept this in the past. Not a w3c std. Try this in your label: " I say '<' is not equal to '<' " Read it now strict as text and look then in your label. BTW. When the TextLabel goes follow the strict HTML rules or XML rules your app is broken. A TextLabel should show IMHO the example exact as typed here. > > /Peter > Best regards, Ron_1st -- From rterry at ...1946... Wed Sep 16 13:56:38 2009 From: rterry at ...1946... (richard terry) Date: Wed, 16 Sep 2009 21:56:38 +1000 Subject: [Gambas-user] Scaling GUI In-Reply-To: References: Message-ID: <200909162156.38884.rterry@...1946...> On Wednesday 16 September 2009 20:31:24 M. Cs. wrote: > No, I still can't figure out, how to have scaled an item at the same time > in two directions. I've managed to have them scaled whether horizontally or > vertically. From the point of mathematics that makes no sense. Would it be > possible to count the position of each item from the upper left edge of the > form, and to work with vectors? To enlarge on shrink them according to the > proportional change in form's width and height. > --------------------------------------------------------------------------- >--- Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user Not sure why you are struggling so hard with this as gambas does all the work for you without need for any code. Could I suggest you put the controls you want on a form, describe how you want them to behave, and go to project make source archive and mail it to the list, and someone can take a look, make it do what you want, and send it back. Regards Ricahrd From gambas at ...1... Wed Sep 16 14:11:15 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 16 Sep 2009 14:11:15 +0200 Subject: [Gambas-user] Possible bug? In-Reply-To: <200909161322.49391.ronstk@...239...> References: <200909151912.57198.peter.talken@...1879...> <200909152059.26150.peter.talken@...1879...> <200909161322.49391.ronstk@...239...> Message-ID: <200909161411.15677.gambas@...1...> > On Tuesday 15 September 2009, Peter Landgren wrote: > > > > Using Gambas 2.16. > > > > > > > > /Peter > > > > > > TextLabel wants HTML: so you must use < > > Then it should be named HtmLabel ??? > IMHO text is text and a This is not actually HTML, but some sort of subset. Let's call it "Rich text". This syntax is native in gb.qt, and emulated in gb.gtk (it is converted on the fly into Pango markup language). See the /doc/richtext page in the wiki. -- Beno?t Minisini From gambas at ...1... Wed Sep 16 14:15:15 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 16 Sep 2009 14:15:15 +0200 Subject: [Gambas-user] Scaling GUI In-Reply-To: References: Message-ID: <200909161415.15831.gambas@...1...> > No, I still can't figure out, how to have scaled an item at the same time > in two directions. I've managed to have them scaled whether horizontally > or vertically. From the point of mathematics that makes no sense. But this is a GUI designer, not mathematics. :-) > Would it > be possible to count the position of each item from the upper left edge of > the form, and to work with vectors? To enlarge on shrink them according to > the proportional change in form's width and height. You must do that by hand. You must register somewhere all coordinates of all controls when the form is opened, and then change them each time the form receives a Resize event. Beware that Width and Height should not be scaled the same way as X and Y. Regards, -- Beno?t Minisini From gambas.fr at ...626... Wed Sep 16 15:25:13 2009 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 16 Sep 2009 15:25:13 +0200 Subject: [Gambas-user] Concept of containers In-Reply-To: References: <200909160728.30937.rterry@...1946...> <6324a42a0909152323i2ed75d34vaa59197068c8c49c@...627...> Message-ID: <6324a42a0909160625i3622aca6v1c41ef27af51b6c1@...627...> 2009/9/16 M. Cs. : > If I understood it well, the form itself is parent of all. So all other > items (buttons, comboboxes etc.) are children of the form. If I put > something into a container, then the container is the parent of the element. > And the arrange property is valid for its children. So I don't need to > adjust the behavior of the children, but just the containers? I'll play with > empty projects, to see how it works. if you read my last mail you will see that is it two properties on the children ! but yes ... it's that ! at the end you will see how powerfull it is ... From gambas.fr at ...626... Wed Sep 16 15:28:39 2009 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 16 Sep 2009 15:28:39 +0200 Subject: [Gambas-user] Possible bug? In-Reply-To: <200909161411.15677.gambas@...1...> References: <200909151912.57198.peter.talken@...1879...> <200909152059.26150.peter.talken@...1879...> <200909161322.49391.ronstk@...239...> <200909161411.15677.gambas@...1...> Message-ID: <6324a42a0909160628y2763a41dnbf4ba4afdc7bdd94@...627...> "Rich text is mainly used by TextLabel, GridView cells, and the Draw.RichText method. " and TextView ? Le 16 septembre 2009 14:11, Beno?t Minisini a ?crit : >> On Tuesday 15 September 2009, Peter Landgren wrote: >> > > > Using Gambas 2.16. >> > > > >> > > > /Peter >> > > >> > > TextLabel wants HTML: so you must use < >> >> Then it should be named HtmLabel ??? >> IMHO text is text and a> > > This is not actually HTML, but some sort of subset. Let's call it "Rich text". > > This syntax is native in gb.qt, and emulated in gb.gtk (it is converted on the > fly into Pango markup language). > > See the /doc/richtext page in the wiki. > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Wed Sep 16 15:29:40 2009 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 16 Sep 2009 15:29:40 +0200 Subject: [Gambas-user] Possible bug? In-Reply-To: <6324a42a0909160628y2763a41dnbf4ba4afdc7bdd94@...627...> References: <200909151912.57198.peter.talken@...1879...> <200909152059.26150.peter.talken@...1879...> <200909161322.49391.ronstk@...239...> <200909161411.15677.gambas@...1...> <6324a42a0909160628y2763a41dnbf4ba4afdc7bdd94@...627...> Message-ID: <6324a42a0909160629j5a28b4a3lbebc7280622866fd@...627...> 2009/9/16 Fabien Bodard : "Rich text is mainly used by TextLabel, GridView cells, and the Draw.RichText method. " and TextView ? ------> I meen TextEdit (sorry i've 5 year late) > > > Le 16 septembre 2009 14:11, Beno?t Minisini > a ?crit : >>> On Tuesday 15 September 2009, Peter Landgren wrote: >>> > > > Using Gambas 2.16. >>> > > > >>> > > > /Peter >>> > > >>> > > TextLabel wants HTML: so you must use < >>> >>> Then it should be named HtmLabel ??? >>> IMHO text is text and a>> >> >> This is not actually HTML, but some sort of subset. Let's call it "Rich text". >> >> This syntax is native in gb.qt, and emulated in gb.gtk (it is converted on the >> fly into Pango markup language). >> >> See the /doc/richtext page in the wiki. >> >> -- >> Beno?t Minisini >> >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry® Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9-12, 2009. Register now! >> http://p.sf.net/sfu/devconf >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > From jriolexp at ...43... Wed Sep 16 16:17:51 2009 From: jriolexp at ...43... (j. riolex pinuela) Date: Wed, 16 Sep 2009 07:17:51 -0700 (PDT) Subject: [Gambas-user] Gambas2 IDE Font in KDE4 Message-ID: <773648.22232.qm@...2295...> Hi, I was rather not clear regarding the IDE font. I have attached the screenshot of this issue. As can be seen from the image, the foreground is the running application and in the background the IDE design view. The menu font are quite large. I have already set the Font size in the General Preference to Small size (there are only 2 options: Normal and Small). Another problem is Make Installation Package dialog, where the buttons at the bottom are not visible. Regards, New Email names for you! Get the Email name you've always wanted on the new @ymail and @rocketmail. Hurry before someone else does! http://mail.promotions.yahoo.com/newdomains/aa/ -------------- next part -------------- A non-text attachment was scrubbed... Name: gambas2.jpg Type: image/jpeg Size: 25420 bytes Desc: not available URL: From gambas.fr at ...626... Wed Sep 16 15:30:56 2009 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 16 Sep 2009 15:30:56 +0200 Subject: [Gambas-user] Scaling GUI In-Reply-To: <200909161415.15831.gambas@...1...> References: <200909161415.15831.gambas@...1...> Message-ID: <6324a42a0909160630k4573118bq277f5eb1adb146c9@...627...> see the gb.chart source Le 16 septembre 2009 14:15, Beno?t Minisini a ?crit : >> No, I still can't figure out, how to have scaled an item at the same time >> ?in two directions. I've managed to have them scaled whether horizontally >> ?or vertically. From the point of mathematics that makes no sense. > > But this is a GUI designer, not mathematics. :-) > >> ?Would it >> ?be possible to count the position of each item from the upper left edge of >> ?the form, and to work with vectors? To enlarge on shrink them according to >> ?the proportional change in form's width and height. > > You must do that by hand. > > You must register somewhere all coordinates of all controls when the form is > opened, and then change them each time the form receives a Resize event. > > Beware that Width and Height should not be scaled the same way as X and Y. > > Regards, > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From santiago_j_oberto at ...1877... Wed Sep 16 17:31:36 2009 From: santiago_j_oberto at ...1877... (Santiago Oberto) Date: Wed, 16 Sep 2009 12:31:36 -0300 Subject: [Gambas-user] Gambas-user Digest, Vol 40, Issue 38 In-Reply-To: References: Message-ID: <1253115096.4733.9.camel@...2296...> Hi Riolex Pinuela, I don't know if what happens to you is the same thing it happend to me. I had issues with IDE also. Try running qt3-config, it may help in changing the way the IDE looks. Regards. Santiago. From pinozollo at ...626... Wed Sep 16 18:01:22 2009 From: pinozollo at ...626... (Pino Zollo) Date: Wed, 16 Sep 2009 12:01:22 -0400 Subject: [Gambas-user] Possible bug? Message-ID: <200909161201.22938.pinozollo@...626...> >?"Rich text is mainly used by TextLabel, GridView cells, and the >Draw.RichText method. " >?and TextView ? ? ? ?------> ?I meen TextEdit ? (sorry i've 5 year late) ...but do not use the method Insert: taSpots.Insert(p) ....it prints all chars including tags use: taSpots.Text = p Only in this way Rich Text tags will be executed. [ p is a string containing rich text and taSpot is the name of the TextEdit in my project] Regads Pino -- Key ID: 0xF6768208 Key fingerprint = B16D 0A7C 5B29 A334 CE6A 71F6 EAF8 3D88 F676 8208 Key server: hkp://wwwkeys.eu.pgp.net From kevinfishburne at ...1887... Thu Sep 17 09:26:35 2009 From: kevinfishburne at ...1887... (kevinfishburne) Date: Thu, 17 Sep 2009 00:26:35 -0700 (PDT) Subject: [Gambas-user] GAMBAS crash when setting columnview's Sorted property Message-ID: <25486385.post@...1379...> I've tried this on the 64-bit versions of GAMBAS 2.13.1 and 2.8.2 included with Ubuntu 9.04 and 9.10 and the same thing happens. It may also happen with the listbox, listview or similar controls if they use the same code. If I set a columnview's Sorted property to TRUE in the GUI it works fine, but every time I call the Add method of the control it sorts the data in the columnview. I have a loop that adds 13000+ strings to the control, so sorting it each time one of these is added makes it incrementally slower. Eventually it becomes so slow it is useless. My workaround was to set the Sorted property to FALSE before the loop starts, add the 13000+ strings, then set the Sorted property back to TRUE. This would mean the columnview control was only sorted once and would be much faster. If I set the control's Sorted property through the GUI as FALSE, run the loop, then programmatically change it to TRUE, it works great and is fast. However after that if I set the control to FALSE programmatically it will crash, which leads me to believe it's a bug. I need to set it to FALSE again because later I have to clear the columnview and add different items to it. It shouldn't make any difference if I set the control's Sorted property via the GUI or programmatically, but it does. If this is a bug, has it been fixed in 2.16.0? ----- Kevin Fishburne, Eight Virtues www: http://sales.eightvirtues.com http://sales.eightvirtues.com e-mail: mailto:sales at ...1887... sales at ...1887... phone: (770) 853-6271 -- View this message in context: http://www.nabble.com/GAMBAS-crash-when-setting-columnview%27s-Sorted-property-tp25486385p25486385.html Sent from the gambas-user mailing list archive at Nabble.com. From kevinfishburne at ...1887... Thu Sep 17 10:26:38 2009 From: kevinfishburne at ...1887... (kevinfishburne) Date: Thu, 17 Sep 2009 01:26:38 -0700 (PDT) Subject: [Gambas-user] GAMBAS crash when setting columnview's Sorted property In-Reply-To: <25486385.post@...1379...> References: <25486385.post@...1379...> Message-ID: <25487136.post@...1379...> kevinfishburne wrote: > > I've tried this on the 64-bit versions of GAMBAS 2.13.1 and 2.8.2 included > with Ubuntu 9.04 and 9.10 and the same thing happens. > I just upgraded GAMBAS to 2.15.2 borrowing from Debian's current unstable repository and the problem persists. ----- Kevin Fishburne, Eight Virtues www: http://sales.eightvirtues.com http://sales.eightvirtues.com e-mail: mailto:sales at ...1887... sales at ...1887... phone: (770) 853-6271 -- View this message in context: http://www.nabble.com/GAMBAS-crash-when-setting-columnview%27s-Sorted-property-tp25486385p25487136.html Sent from the gambas-user mailing list archive at Nabble.com. From joshiggins at ...1601... Thu Sep 17 10:35:12 2009 From: joshiggins at ...1601... (Joshua Higgins) Date: Thu, 17 Sep 2009 09:35:12 +0100 Subject: [Gambas-user] GAMBAS crash when setting columnview's Sorted property In-Reply-To: <25487136.post@...1379...> References: <25486385.post@...1379...> <25487136.post@...1379...> Message-ID: <4247f5440909170135o292b8659h4ad7aba9eb1d8a37@...627...> I'm running 32-bit Gambas 2.8 (the one in Jaunty) and I don't seem to get this problem. Granted I'm not adding 13000 strings, more like 200. Are you using the gtk or qt component? -- joshua higgins >>>>>>------ From kevinfishburne at ...1887... Thu Sep 17 12:48:37 2009 From: kevinfishburne at ...1887... (kevinfishburne) Date: Thu, 17 Sep 2009 03:48:37 -0700 (PDT) Subject: [Gambas-user] GAMBAS crash when setting columnview's Sorted property In-Reply-To: <4247f5440909170135o292b8659h4ad7aba9eb1d8a37@...627...> References: <25486385.post@...1379...> <25487136.post@...1379...> <4247f5440909170135o292b8659h4ad7aba9eb1d8a37@...627...> Message-ID: <25488985.post@...1379...> joshiggins wrote: > > I'm running 32-bit Gambas 2.8 (the one in Jaunty) and I don't seem to get > this problem. Granted I'm not adding 13000 strings, more like 200. > > Are you using the gtk or qt component? > I'm using gtk. I need to correct my previous post. Whether it's set via the GUI is irrelevant. Setting it to FALSE after it's been set to TRUE (by any method) is what crashes it. It also needs to contain data. If it's empty then it won't crash. I've tried a columnview with 1 and three columns and data sizes as small as 48 strings. Here's the code snippet: ColumnView_Collection.Sorted = FALSE WHILE NOT Eof(FileCollection) LINE INPUT #FileCollection, s ColumnView_Collection.Add(Record - 1, s) ColumnView_Collection[Record - 1][1] = "Some directory" ColumnView_Collection[Record - 1][2] = "Some size" Record = Record + 1 WEND ColumnView_Collection.Sorted = TRUE It crashes at "ColumnView_Collection.Sorted = FALSE" anytime it's already sorted and contains data. Is there a way to erase the columnview's contents completely without destroying the control? I use ColumnView_Collection.Clear prior to setting .Sorted to FALSE but it makes no difference. If I could get it back to its virgin state (before I added keys to it) I can work around the issue. ----- Kevin Fishburne, Eight Virtues www: http://sales.eightvirtues.com http://sales.eightvirtues.com e-mail: mailto:sales at ...1887... sales at ...1887... phone: (770) 853-6271 -- View this message in context: http://www.nabble.com/GAMBAS-crash-when-setting-columnview%27s-Sorted-property-tp25486385p25488985.html Sent from the gambas-user mailing list archive at Nabble.com. From tmp2009 at ...2180... Thu Sep 17 14:37:31 2009 From: tmp2009 at ...2180... (nero) Date: Thu, 17 Sep 2009 14:37:31 +0200 Subject: [Gambas-user] qt4 and form.controls Message-ID: hi , I'm trying some of my code on gambas3 to be ready when it's done. I've some problem with form controls using qt4 , i've a form with n controls and want to enumerate them . I'm using somethink like: ------------------------------------------------ Public Sub Button1_Click() Dim ch As Object For Each ch In Me.Controls ta.Insert(ch.name & "\n") Next End (note: ta is a textarea) ------------------------------------------------ using qt3 i see all controls , but with qt4 i get nothink and also no error. I'm using svn 2336. thanks, marco. -- Se mi etichetti, mi annulli. -- Kirkegaard From robert1juhasz at ...626... Thu Sep 17 15:47:17 2009 From: robert1juhasz at ...626... (yuhej) Date: Thu, 17 Sep 2009 06:47:17 -0700 (PDT) Subject: [Gambas-user] gambas output Message-ID: <25491550.post@...1379...> Hello, >From my application I need to create some standard output files. When I used VB I usually put out data to Excel files. It has the advantage that everyone can open and edit and I can use templates. Do we have a simillar option from Gambas? Fo instance to write into Open Office Calc files? Thanks, Robi -- View this message in context: http://www.nabble.com/gambas-output-tp25491550p25491550.html Sent from the gambas-user mailing list archive at Nabble.com. From eilert-sprachen at ...221... Thu Sep 17 15:38:39 2009 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Thu, 17 Sep 2009 15:38:39 +0200 Subject: [Gambas-user] Doesn't IF NOT exist? Bug or feature? Or my bad logic? Message-ID: <4AB23BDF.9050908@...221...> Just stumbled over this when trying to implement a small copying function: FOR EACH datei IN Dir(opfad, odatei & ".*") IF NOT file.Ext(opfad &/ datei) = "lock" THEN COPY opfad &/ datei TO ziel &/ datei SELECT CASE file.Ext(ziel &/ datei) CASE "fehl", "feldbak", "felder", "notizen" SHELL "chgrp kartei " & ziel &/ datei WAIT SHELL "chmod 660 " & ziel &/ datei WAIT CASE "konto", "kontobak", "ktx", "ktxbak" SHELL "chgrp konto " & ziel &/ datei WAIT SHELL "chmod 660 " & ziel &/ datei WAIT END SELECT END IF NEXT IF NOT ... = ... THEN wouldn't copy anything, although only one file has the given extension. When I change this line into IF file.Ext(opfad &/ datei) <> "lock" THEN everything runs as expected. Doesn't make sense to me as both ways should mean the same in my understanding of logical NOT (which doesn't mean too much... :-) ) Regards Rolf From jussi.lahtinen at ...626... Thu Sep 17 15:50:21 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Thu, 17 Sep 2009 16:50:21 +0300 Subject: [Gambas-user] qt4 and form.controls In-Reply-To: References: Message-ID: <384d3900909170650x66e79370i27e4bdfdf36d95b2@...627...> Noticed same thing. Although "Me.Children" works. Me.Controls.Count is not zero, but enumeration doesn't happen at all. With Qt3 all works as expected. @Ubuntu 9.04 64bit Jussi On Thu, Sep 17, 2009 at 15:37, nero wrote: > hi , > > I'm trying some of my code on gambas3 to be ready when it's done. > > I've some problem with form controls using qt4 , i've a form with n > controls and want to enumerate them . > > I'm using somethink like: > > ------------------------------------------------ > Public Sub Button1_Click() > Dim ch As Object > > ?For Each ch In Me.Controls > ? ?ta.Insert(ch.name & "\n") > ?Next > > End > > (note: ta is a textarea) > > ------------------------------------------------ > > using qt3 i see all controls , but with qt4 i get nothink and also no error. > > I'm using svn 2336. > > thanks, > marco. > > > > -- > Se mi etichetti, mi annulli. > ? ? ? ? ? ? ? ?-- Kirkegaard > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From leemcpherson at ...626... Thu Sep 17 16:49:06 2009 From: leemcpherson at ...626... (Lee McPherson) Date: Thu, 17 Sep 2009 10:49:06 -0400 Subject: [Gambas-user] Doesn't IF NOT exist? Bug or feature? Or my bad logic? In-Reply-To: <4AB23BDF.9050908@...221...> References: <4AB23BDF.9050908@...221...> Message-ID: <4AB24C62.9080400@...626...> Rolf-Werner Eilert wrote: > Just stumbled over this when trying to implement a small copying function: > > FOR EACH datei IN Dir(opfad, odatei & ".*") > IF NOT file.Ext(opfad &/ datei) = "lock" THEN > COPY opfad &/ datei TO ziel &/ datei > SELECT CASE file.Ext(ziel &/ datei) > CASE "fehl", "feldbak", "felder", "notizen" > SHELL "chgrp kartei " & ziel &/ datei WAIT > SHELL "chmod 660 " & ziel &/ datei WAIT > CASE "konto", "kontobak", "ktx", "ktxbak" > SHELL "chgrp konto " & ziel &/ datei WAIT > SHELL "chmod 660 " & ziel &/ datei WAIT > END SELECT > END IF > NEXT > > IF NOT ... = ... THEN > > wouldn't copy anything, although only one file has the given extension. > When I change this line into > > IF file.Ext(opfad &/ datei) <> "lock" THEN > > everything runs as expected. Doesn't make sense to me as both ways > should mean the same in my understanding of logical NOT (which doesn't > mean too much... :-) ) > > Regards > > Rolf > From the docs, NOT is an operator that makes a boolean it's opposite (TRUE turns to FALSE and vice versa) and will also invert each bit in an integer. NOT(11) = -12 because that's what you get when you change every bit from on to off and vice versa. From other examples in the docs, if you NOT a string with something in it, you will get FALSE. However, if you NOT an empty string, you will get TRUE. From gambas at ...1... Thu Sep 17 17:01:42 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 17 Sep 2009 17:01:42 +0200 Subject: [Gambas-user] Doesn't IF NOT exist? Bug or feature? Or my bad logic? In-Reply-To: <4AB24C62.9080400@...626...> References: <4AB23BDF.9050908@...221...> <4AB24C62.9080400@...626...> Message-ID: <200909171701.42984.gambas@...1...> > Rolf-Werner Eilert wrote: > > Just stumbled over this when trying to implement a small copying > > function: > > > > FOR EACH datei IN Dir(opfad, odatei & ".*") > > IF NOT file.Ext(opfad &/ datei) = "lock" THEN > > COPY opfad &/ datei TO ziel &/ datei > > SELECT CASE file.Ext(ziel &/ datei) > > CASE "fehl", "feldbak", "felder", "notizen" > > SHELL "chgrp kartei " & ziel &/ datei WAIT > > SHELL "chmod 660 " & ziel &/ datei WAIT > > CASE "konto", "kontobak", "ktx", "ktxbak" > > SHELL "chgrp konto " & ziel &/ datei WAIT > > SHELL "chmod 660 " & ziel &/ datei WAIT > > END SELECT > > END IF > > NEXT > > > > IF NOT ... = ... THEN > > > > wouldn't copy anything, although only one file has the given extension. > > When I change this line into > > > > IF file.Ext(opfad &/ datei) <> "lock" THEN > > > > everything runs as expected. Doesn't make sense to me as both ways > > should mean the same in my understanding of logical NOT (which doesn't > > mean too much... :-) ) > > > > Regards > > > > Rolf > > From the docs, NOT is an operator that makes a boolean it's opposite > (TRUE turns to FALSE and vice versa) and will also invert each bit in an > integer. NOT(11) = -12 because that's what you get when you change > every bit from on to off and vice versa. > > From other examples in the docs, if you NOT a string with something in > it, you will get FALSE. However, if you NOT an empty string, you will > get TRUE. > In other words, try to use brackets: IF NOT (...) = ... THEN -- Beno?t Minisini From gambas at ...1... Thu Sep 17 17:18:44 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 17 Sep 2009 17:18:44 +0200 Subject: [Gambas-user] qt4 and form.controls In-Reply-To: <384d3900909170650x66e79370i27e4bdfdf36d95b2@...627...> References: <384d3900909170650x66e79370i27e4bdfdf36d95b2@...627...> Message-ID: <200909171718.44214.gambas@...1...> > Noticed same thing. Although "Me.Children" works. > Me.Controls.Count is not zero, but enumeration doesn't happen at all. > With Qt3 all works as expected. > > @Ubuntu 9.04 64bit > > Jussi > > On Thu, Sep 17, 2009 at 15:37, nero wrote: > > hi , > > > > I'm trying some of my code on gambas3 to be ready when it's done. > > > > I've some problem with form controls using qt4 , i've a form with n > > controls and want to enumerate them . > > > > I'm using somethink like: > > > > ------------------------------------------------ > > Public Sub Button1_Click() > > Dim ch As Object > > > > For Each ch In Me.Controls > > ta.Insert(ch.name & "\n") > > Next > > > > End > > > > (note: ta is a textarea) > > > > ------------------------------------------------ > > > > using qt3 i see all controls , but with qt4 i get nothink and also no > > error. > > > > I'm using svn 2336. > > > > thanks, > > marco. > > > > > > > > -- > > Se mi etichetti, mi annulli. > > -- Kirkegaard > > OK, it should be fixed in the next commit. Regards, -- Beno?t Minisini From eilert-sprachen at ...221... Thu Sep 17 17:58:00 2009 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Thu, 17 Sep 2009 17:58:00 +0200 Subject: [Gambas-user] Doesn't IF NOT exist? Bug or feature? Or my bad logic? In-Reply-To: <200909171701.42984.gambas@...1...> References: <4AB23BDF.9050908@...221...> <4AB24C62.9080400@...626...> <200909171701.42984.gambas@...1...> Message-ID: <4AB25C88.1090401@...221...> Beno?t Minisini schrieb: >> Rolf-Werner Eilert wrote: >>> Just stumbled over this when trying to implement a small copying >>> function: >>> >>> FOR EACH datei IN Dir(opfad, odatei & ".*") >>> IF NOT file.Ext(opfad &/ datei) = "lock" THEN >>> COPY opfad &/ datei TO ziel &/ datei >>> SELECT CASE file.Ext(ziel &/ datei) >>> CASE "fehl", "feldbak", "felder", "notizen" >>> SHELL "chgrp kartei " & ziel &/ datei WAIT >>> SHELL "chmod 660 " & ziel &/ datei WAIT >>> CASE "konto", "kontobak", "ktx", "ktxbak" >>> SHELL "chgrp konto " & ziel &/ datei WAIT >>> SHELL "chmod 660 " & ziel &/ datei WAIT >>> END SELECT >>> END IF >>> NEXT >>> >>> IF NOT ... = ... THEN >>> >>> wouldn't copy anything, although only one file has the given extension. >>> When I change this line into >>> >>> IF file.Ext(opfad &/ datei) <> "lock" THEN >>> >>> everything runs as expected. Doesn't make sense to me as both ways >>> should mean the same in my understanding of logical NOT (which doesn't >>> mean too much... :-) ) >>> >>> Regards >>> >>> Rolf >> From the docs, NOT is an operator that makes a boolean it's opposite >> (TRUE turns to FALSE and vice versa) and will also invert each bit in an >> integer. NOT(11) = -12 because that's what you get when you change >> every bit from on to off and vice versa. >> >> From other examples in the docs, if you NOT a string with something in >> it, you will get FALSE. However, if you NOT an empty string, you will >> get TRUE. >> > > In other words, try to use brackets: IF NOT (...) = ... THEN > > From eilert-sprachen at ...221... Thu Sep 17 17:58:41 2009 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Thu, 17 Sep 2009 17:58:41 +0200 Subject: [Gambas-user] Doesn't IF NOT exist? Bug or feature? Or my bad logic? In-Reply-To: <200909171701.42984.gambas@...1...> References: <4AB23BDF.9050908@...221...> <4AB24C62.9080400@...626...> <200909171701.42984.gambas@...1...> Message-ID: <4AB25CB1.6060208@...221...> Beno?t Minisini schrieb: >> Rolf-Werner Eilert wrote: >>> Just stumbled over this when trying to implement a small copying >>> function: >>> >>> FOR EACH datei IN Dir(opfad, odatei & ".*") >>> IF NOT file.Ext(opfad &/ datei) = "lock" THEN >>> COPY opfad &/ datei TO ziel &/ datei >>> SELECT CASE file.Ext(ziel &/ datei) >>> CASE "fehl", "feldbak", "felder", "notizen" >>> SHELL "chgrp kartei " & ziel &/ datei WAIT >>> SHELL "chmod 660 " & ziel &/ datei WAIT >>> CASE "konto", "kontobak", "ktx", "ktxbak" >>> SHELL "chgrp konto " & ziel &/ datei WAIT >>> SHELL "chmod 660 " & ziel &/ datei WAIT >>> END SELECT >>> END IF >>> NEXT >>> >>> IF NOT ... = ... THEN >>> >>> wouldn't copy anything, although only one file has the given extension. >>> When I change this line into >>> >>> IF file.Ext(opfad &/ datei) <> "lock" THEN >>> >>> everything runs as expected. Doesn't make sense to me as both ways >>> should mean the same in my understanding of logical NOT (which doesn't >>> mean too much... :-) ) >>> >>> Regards >>> >>> Rolf >> From the docs, NOT is an operator that makes a boolean it's opposite >> (TRUE turns to FALSE and vice versa) and will also invert each bit in an >> integer. NOT(11) = -12 because that's what you get when you change >> every bit from on to off and vice versa. >> >> From other examples in the docs, if you NOT a string with something in >> it, you will get FALSE. However, if you NOT an empty string, you will >> get TRUE. >> > > In other words, try to use brackets: IF NOT (...) = ... THEN > > Aaah - ok, now it's clear to me, too ;-) Regards Rolf From gambas at ...1... Thu Sep 17 18:45:42 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 17 Sep 2009 18:45:42 +0200 Subject: [Gambas-user] GAMBAS crash when setting columnview's Sorted property In-Reply-To: <25488985.post@...1379...> References: <25486385.post@...1379...> <4247f5440909170135o292b8659h4ad7aba9eb1d8a37@...627...> <25488985.post@...1379...> Message-ID: <200909171845.43096.gambas@...1...> > joshiggins wrote: > > I'm running 32-bit Gambas 2.8 (the one in Jaunty) and I don't seem to get > > this problem. Granted I'm not adding 13000 strings, more like 200. > > > > Are you using the gtk or qt component? > > I'm using gtk. I need to correct my previous post. Whether it's set via the > GUI is irrelevant. Setting it to FALSE after it's been set to TRUE (by any > method) is what crashes it. It also needs to contain data. If it's empty > then it won't crash. I've tried a columnview with 1 and three columns and > data sizes as small as 48 strings. > > Here's the code snippet: > > ColumnView_Collection.Sorted = FALSE > WHILE NOT Eof(FileCollection) > LINE INPUT #FileCollection, s > ColumnView_Collection.Add(Record - 1, s) > ColumnView_Collection[Record - 1][1] = "Some directory" > ColumnView_Collection[Record - 1][2] = "Some size" > Record = Record + 1 > WEND > ColumnView_Collection.Sorted = TRUE > > It crashes at "ColumnView_Collection.Sorted = FALSE" anytime it's already > sorted and contains data. > > Is there a way to erase the columnview's contents completely without > destroying the control? I use ColumnView_Collection.Clear prior to setting > .Sorted to FALSE but it makes no difference. If I could get it back to its > virgin state (before I added keys to it) I can work around the issue. > > ----- > Kevin Fishburne, Eight Virtues > www: http://sales.eightvirtues.com http://sales.eightvirtues.com > e-mail: mailto:sales at ...1887... sales at ...1887... > phone: (770) 853-6271 > I fixed the bug in revision #2337. It was not 64 bits related at all. If you want to show a lot of data in columns, I suggest using a GridView for that. Sorted view controls are very slow in GTK+, even if I hack a lot to workaround the problem. Regards, -- Beno?t Minisini From jlcastroar at ...626... Thu Sep 17 18:48:14 2009 From: jlcastroar at ...626... (=?ISO-8859-1?Q?Jos=E9_Luis_Castro?=) Date: Thu, 17 Sep 2009 13:48:14 -0300 Subject: [Gambas-user] Problem accessing PostreSQL schemas Message-ID: <3e8fed600909170948k85d6654k5cc9559cde3d71a9@...627...> Hola. Cree un esquema en una base de datos PostgreSQL. La sintaxis para acceder a los datos del esquema es: esquema.NombreTabla. Funciona bien cuanto utilizo el m?todo .exec (p.e: "SELECT * FROM schema.tableName" or "INSERT INTO schema.tableName VALUES..."), pero no funciona cuando intento utilizar el m?todo .edit Translation Hello. I've created a schema in a PostreSQL database. The sintax for accessing data from the schema is: schema.tableName That works fine when trying with .exec method (i.e. "SELECT * FROM schema.tableName" or "INSERT INTO schema.tableName VALUES..."), but it doesn't work when I try to use the .edit method Thanks for your help, and sorry for my english Jos? L. Castro Argentina From ronstk at ...239... Thu Sep 17 18:50:07 2009 From: ronstk at ...239... (Ron_1st) Date: Thu, 17 Sep 2009 18:50:07 +0200 Subject: [Gambas-user] Doesn't IF NOT exist? Bug or feature? Or my bad logic? In-Reply-To: <4AB23BDF.9050908@...221...> References: <4AB23BDF.9050908@...221...> Message-ID: <200909171850.08914.ronstk@...239...> On Thursday 17 September 2009, Rolf-Werner Eilert wrote: > Just stumbled over this when trying to implement a small copying function: > > FOR EACH datei IN Dir(opfad, odatei & ".*") > IF NOT file.Ext(opfad &/ datei) = "lock" THEN > COPY opfad &/ datei TO ziel &/ datei > SELECT CASE file.Ext(ziel &/ datei) > CASE "fehl", "feldbak", "felder", "notizen" > SHELL "chgrp kartei " & ziel &/ datei WAIT > SHELL "chmod 660 " & ziel &/ datei WAIT > CASE "konto", "kontobak", "ktx", "ktxbak" > SHELL "chgrp konto " & ziel &/ datei WAIT > SHELL "chmod 660 " & ziel &/ datei WAIT > END SELECT > END IF > NEXT > > IF NOT ... = ... THEN > > wouldn't copy anything, although only one file has the given extension. > When I change this line into > > IF file.Ext(opfad &/ datei) <> "lock" THEN > > everything runs as expected. Doesn't make sense to me as both ways > should mean the same in my understanding of logical NOT (which doesn't > mean too much... :-) ) > > Regards > > Rolf > Just for information You have a condition, it can be true or false and this is a boolean value. NOT inverts the boolean value, here just after it in the line. a = b The '=' is a assignment, Set a to the value of b if a = b then The '=' is here a relational operator, just as '<', '>' are. note: in all examples below text between '[' and ']' are optional values/expresions, etc Syntax diagram for IF...THEN : IF _relational-expression_ [ _relational-operator_ _relational-expression_ ] THEN ------------------------ _relational-expresion_ : _expression_ [ _relational-operator_ _expression_ ] _expression_ : variable [ arithmetic-operator variable ] _variable_: name of the variable ------------------------ About operators: _relational-operator_ : any of '<', '=', '>' or combination i.e. '=>', '<=', '=<', '=<' _logical-operator_ : a symbol/name for operating on boolean values & AND | OR XOR NOT _arithmetic-operator_ : + - * / \ % for plus, min, multiply, integerdivide and modulo ----------------------- Order of operations: Operations are done in special ordered sequence (presedence) highest-order () as i.e. ( _anything_ [ _any-operator_ _anything_] ) arith-order ^ * / sqr + - (Dutch trick:Meneer Van Dale Wacht Op Antwoord) relational-order there is one but I need to look up the correct one. 1 = 2 = < or > 3 = <= or => logical-order OR AND (not sure Its a long time ago (around 1978) I did write this expresion evaluator for Basic. Was interesting stuff to do. For the usage of AND in the IF...THEN you use variableA AND variableB variableA OR variableB variableA XOR variableB NOT variableA <------------- BE CAREFULL, only the first and only one (1) following is used for NOT if you have more following then they must be first evaluated and need '(' and ')' around it !! In a asignment as: bMyVariableC = variableA XOR variableB or bMyVariableC = NOT variableA Look now close to your line. IF NOT file.Ext(opfad &/ datei) = "lock" THEN What you say here is, do a NOT operation on the boolean value 'file.Ext(opfad &/ datei)' and compare it to a string "lock" the parts are 1 NOT file.Ext(opfad &/ datei) 2 = 3 "lock" You did want however test for the equality of 'file.Ext(opfad &/ datei) = "lock"' and if this is not equal then use the THEN code. These are two strings and if they are equal the result is boolean TRUE. For the inverse you need then use the NOT on the result. This way you should have used. IF NOT ( file.Ext(opfad &/ datei) = "lock" ) THEN I know a very long answer but it just information also for other how it is more or less is working and why you got the wrong behaviour in first place. IF file.Ext(opfad &/ datei) <> "lock" THEN is the good replacement for the IF NOT ( TRUE ) THEN Best regards, Ron_1st -- From ronstk at ...239... Thu Sep 17 18:51:42 2009 From: ronstk at ...239... (Ron_1st) Date: Thu, 17 Sep 2009 18:51:42 +0200 Subject: [Gambas-user] Doesn't IF NOT exist? Bug or feature? Or my bad logic? In-Reply-To: <4AB25CB1.6060208@...221...> References: <4AB23BDF.9050908@...221...> <200909171701.42984.gambas@...1...> <4AB25CB1.6060208@...221...> Message-ID: <200909171851.42759.ronstk@...239...> On Thursday 17 September 2009, Rolf-Werner Eilert wrote: > Beno?t Minisini schrieb: > >> Rolf-Werner Eilert wrote: > >>> Just stumbled over this when trying to implement a small copying > >>> function: > >>> > >>> FOR EACH datei IN Dir(opfad, odatei & ".*") > >>> IF NOT file.Ext(opfad &/ datei) = "lock" THEN > >>> COPY opfad &/ datei TO ziel &/ datei > >>> SELECT CASE file.Ext(ziel &/ datei) > >>> CASE "fehl", "feldbak", "felder", "notizen" > >>> SHELL "chgrp kartei " & ziel &/ datei WAIT > >>> SHELL "chmod 660 " & ziel &/ datei WAIT > >>> CASE "konto", "kontobak", "ktx", "ktxbak" > >>> SHELL "chgrp konto " & ziel &/ datei WAIT > >>> SHELL "chmod 660 " & ziel &/ datei WAIT > >>> END SELECT > >>> END IF > >>> NEXT > >>> > >>> IF NOT ... = ... THEN > >>> > >>> wouldn't copy anything, although only one file has the given extension. > >>> When I change this line into > >>> > >>> IF file.Ext(opfad &/ datei) <> "lock" THEN > >>> > >>> everything runs as expected. Doesn't make sense to me as both ways > >>> should mean the same in my understanding of logical NOT (which doesn't > >>> mean too much... :-) ) > >>> > >>> Regards > >>> > >>> Rolf > >> From the docs, NOT is an operator that makes a boolean it's opposite > >> (TRUE turns to FALSE and vice versa) and will also invert each bit in an > >> integer. NOT(11) = -12 because that's what you get when you change > >> every bit from on to off and vice versa. > >> > >> From other examples in the docs, if you NOT a string with something in > >> it, you will get FALSE. However, if you NOT an empty string, you will > >> get TRUE. > >> > > > > In other words, try to use brackets: IF NOT (...) = ... THEN > > > > > > Aaah - ok, now it's clear to me, too ;-) > > Regards > > Rolf Funny isn't it ?? :) :) Best regards, Ron_1st -- From demosthenesk at ...626... Thu Sep 17 18:55:24 2009 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Thu, 17 Sep 2009 19:55:24 +0300 Subject: [Gambas-user] Grid View and Mysql Result, Time Data Message-ID: I have a gridview control and i fill it with values from a mysql $RESULT with the next code PUBLIC SUB grdView_Data(Row AS Integer, Column AS Integer) $Result.MoveTo(Row) grdView.Data.Text = Str($Result[grdView.Columns[Column].Text]) END The problem now. When value is Date with mysql format %Y-%m-%d the gridview shows "00:00:00" instead "0000:00:00" when the value of result is empty and change the format to %m/%d/%Y. For example see col4 which holds dates mysql> SELECT * FROM `table4`; +------+------+------+------------+ | col1 | col2 | col3 | col4 | +------+------+------+------------+ | 1 | 11 | 111 | 2008-09-24 | <- %Y-%m-%d | 2 | 22 | 222 | 0000-00-00 | +------+------+------+------------+ 2 rows in set (0.00 sec) And gridview shows 09/24/08 Why is this? Normally the gridview must get the string " 2008-09-24" -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From Karl.Reinl at ...9... Thu Sep 17 23:45:32 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Thu, 17 Sep 2009 23:45:32 +0200 Subject: [Gambas-user] another IDE cut/n paste behaviour In-Reply-To: <200909091258.06474.gambas@...1...> References: <1252493319.7035.10.camel@...40...> <200909091258.06474.gambas@...1...> Message-ID: <1253223932.6415.25.camel@...40...> Am Mittwoch, den 09.09.2009, 12:58 +0200 schrieb Beno?t Minisini: > > Salut, > > > > on gambas2 and gambas3 (since month) in code editor CTRL+C not always > > works. > > CTRL+V is OK, CTRL+X (I haven't tested) > > > > ContextMenu/Copy works well. > > > > Is that a gambas behaviour or Linux/Ubuntu 8.04/Xorg behaviour. > > Or a problem on my box. > > > > Please give more details on when it does not work. > Salut Benoit, back again today for that. Finally, for sure, in gambas2 2.16 when I try during debug, having selected something of in the editor, I can't copy it with CTRL+C I have to use the ContextMenu/Copy. CTRL+V works. -- Amicalment Charlie From gambas at ...1... Fri Sep 18 03:43:06 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 18 Sep 2009 03:43:06 +0200 Subject: [Gambas-user] I made a mistake again Message-ID: <200909180343.06763.gambas@...1...> By adding a "clear internal html cache" feature to the wiki, I made a mistake again, and erased all images stored in the wiki. :-( Hopefully, I have saved the database, but it was a few weeks ago, so all images inserted in the wiki after 26 Jul 2009 are lost! I'm really sorry for the inconvenience. I hope that there are not too many lost images... Regards, -- Beno?t Minisini From message at ...2228... Fri Sep 18 03:00:50 2009 From: message at ...2228... (Dan Sheffner) Date: Thu, 17 Sep 2009 20:00:50 -0500 Subject: [Gambas-user] Treeview auto resize Message-ID: Does anyone have a sub or the code to automatically resize columns on a trueview to fit text? Thanks in advance. From message at ...2228... Fri Sep 18 05:03:23 2009 From: message at ...2228... (Dan Sheffner) Date: Thu, 17 Sep 2009 22:03:23 -0500 Subject: [Gambas-user] Treeview auto resize In-Reply-To: References: Message-ID: I found this code but when I have a ton of rows it stalls the app: Trying to find a solution for a treeview that has 100,000+ records. PUBLIC SUB AdjustGridColumns(pPassedGrid AS TableView) DIM $Row AS Integer DIM $Col AS Integer DIM MaxWidth AS Integer MaxWidth = 0 WITH pPassedGrid .Columns.Resizable = TRUE FOR $Col = 0 TO .Columns.Count - 1 .Row = 0 .Column = $Col MaxWidth = .Current.Width FOR $Row = 0 TO .Rows.Count - 1 .Row = $Row ' DEBUG .Current.Text ' <--- always empty ' DEBUG .Font.Width(.Current.Text) ' <--always 0 IF .Font.Width(.Current.Text) > MaxWidth THEN MaxWidth = .Font.Width(.Current.Text) + 10 END IF NEXT ' DEBUG $Col, MaxWidth ' <-- always 99 .Columns[$Col].Width = MaxWidth NEXT END WITH END On Thu, Sep 17, 2009 at 8:00 PM, Dan Sheffner wrote: > Does anyone have a sub or the code to automatically resize columns on a > trueview to fit text? Thanks in advance. > From kevinfishburne at ...1887... Fri Sep 18 06:50:10 2009 From: kevinfishburne at ...1887... (kevinfishburne) Date: Thu, 17 Sep 2009 21:50:10 -0700 (PDT) Subject: [Gambas-user] GAMBAS crash when setting columnview's Sorted property In-Reply-To: <200909171845.43096.gambas@...1...> References: <25486385.post@...1379...> <25487136.post@...1379...> <4247f5440909170135o292b8659h4ad7aba9eb1d8a37@...627...> <25488985.post@...1379...> <200909171845.43096.gambas@...1...> Message-ID: <25503074.post@...1379...> Bugzilla from gambas at ...1... wrote: > > I fixed the bug in revision #2337. It was not 64 bits related at all. > > Thanks. I'm assuming revision #2337 is in the 2.x development branch, as I just compiled and ran 2.16.0 and it has the same problem. Looks like it was GTK-related, as using gb.qt works fine under 2.16.0 but gb.gtk doesn't. Bugzilla from gambas at ...1... wrote: > > If you want to show a lot of data in columns, I suggest using a GridView > for > that. Sorted view controls are very slow in GTK+, even if I hack a lot to > workaround the problem. > I'd like to use the gridview, but it doesn't appear to have integrated sorting capabilities. If I used that then I'd be coding sorting algorithms myself and getting all kinds of headaches. ;) For now I'm going to switch to gb.qt and redo my form's colors since they look all crazy under gb.qt in Ubuntu. Thanks for fixing the bug and have a good weekend. ----- Kevin Fishburne, Eight Virtues www: http://sales.eightvirtues.com http://sales.eightvirtues.com e-mail: mailto:sales at ...1887... sales at ...1887... phone: (770) 853-6271 -- View this message in context: http://www.nabble.com/GAMBAS-crash-when-setting-columnview%27s-Sorted-property-tp25486385p25503074.html Sent from the gambas-user mailing list archive at Nabble.com. From eilert-sprachen at ...221... Fri Sep 18 08:13:58 2009 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Fri, 18 Sep 2009 08:13:58 +0200 Subject: [Gambas-user] Doesn't IF NOT exist? Bug or feature? Or my bad logic? In-Reply-To: <200909171850.08914.ronstk@...239...> References: <4AB23BDF.9050908@...221...> <200909171850.08914.ronstk@...239...> Message-ID: <4AB32526.4030805@...221...> Thanks a lot Ron for your explanation, I did read it line by line and found it explains it very well for me. For instance, I didn't realize that operators have a relational order, too. Just one question left: > arith-order > ^ * / sqr + - (Dutch trick:Meneer Van Dale Wacht Op Antwoord) I don't see the trick. Ik kan een betje op Nederlands praten, but I don't see the relationship here :-) Regards Rolf From doriano.blengino at ...1909... Fri Sep 18 09:38:55 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Fri, 18 Sep 2009 09:38:55 +0200 Subject: [Gambas-user] Doesn't IF NOT exist? Bug or feature? Or my bad logic? In-Reply-To: <200909171701.42984.gambas@...1...> References: <4AB23BDF.9050908@...221...> <4AB24C62.9080400@...626...> <200909171701.42984.gambas@...1...> Message-ID: <4AB3390F.20400@...1909...> Beno?t Minisini ha scritto: >> Rolf-Werner Eilert wrote: >> >>> Just stumbled over this when trying to implement a small copying >>> function: >>> >>> FOR EACH datei IN Dir(opfad, odatei & ".*") >>> IF NOT file.Ext(opfad &/ datei) = "lock" THEN >>> COPY opfad &/ datei TO ziel &/ datei >>> SELECT CASE file.Ext(ziel &/ datei) >>> CASE "fehl", "feldbak", "felder", "notizen" >>> SHELL "chgrp kartei " & ziel &/ datei WAIT >>> SHELL "chmod 660 " & ziel &/ datei WAIT >>> CASE "konto", "kontobak", "ktx", "ktxbak" >>> SHELL "chgrp konto " & ziel &/ datei WAIT >>> SHELL "chmod 660 " & ziel &/ datei WAIT >>> END SELECT >>> END IF >>> NEXT >>> >>> IF NOT ... = ... THEN >>> >>> wouldn't copy anything, although only one file has the given extension. >>> When I change this line into >>> >>> IF file.Ext(opfad &/ datei) <> "lock" THEN >>> >>> everything runs as expected. Doesn't make sense to me as both ways >>> should mean the same in my understanding of logical NOT (which doesn't >>> mean too much... :-) ) >>> >>> Regards >>> >>> Rolf >>> >> From the docs, NOT is an operator that makes a boolean it's opposite >> (TRUE turns to FALSE and vice versa) and will also invert each bit in an >> integer. NOT(11) = -12 because that's what you get when you change >> every bit from on to off and vice versa. >> >> From other examples in the docs, if you NOT a string with something in >> it, you will get FALSE. However, if you NOT an empty string, you will >> get TRUE. >> >> > > In other words, try to use brackets: IF NOT (...) = ... THEN > There is some wrong things in here, I think. First, the operator NOT applied to a string is a little strange. It can be handy for testing whether the string is empty or not, but doing so it's ambiguous - it could be better to write: if astring <> "" then... Anyway, the result of such operation (NOT astring) would be a boolean. Now, comparing a boolean value to a string should give a syntax error. But go a step further. Your affirmation "try to use brackets" does not work, at least in principle, because he wants to test the contents of the first string against another string. By applying NOT only to the first argument, the contents of the first string is lost. The parenthesis should be put around the whole test: NOT (astring = "xxx") THEN. I would prefer the NOT operator be incompatible with strings and, doing so, the expression NOT astring = "xxx" could not be interpreted like "negate astring and go ahead" but instead as "compare astring, and then negate" (if the parser can take such decisions). Other languages, notably C, use different operators for different results (! vs ~, && vs &...). More evoluted languages can determine from the context the exact meaning of several operators. But the gambas current way is the more ambiguous of all... Regards, Doriano. From tmp2009 at ...2180... Fri Sep 18 10:09:40 2009 From: tmp2009 at ...2180... (nero) Date: Fri, 18 Sep 2009 10:09:40 +0200 Subject: [Gambas-user] qt4 and form.controls References: <384d3900909170650x66e79370i27e4bdfdf36d95b2@...627...> <200909171718.44214.gambas@...1...> Message-ID: Beno?t Minisini wrote: > OK, it should be fixed in the next commit. Thank's very much , now with revision 2342 works perfectly. -- Gli hacker lo fanno con poche istruzioni. From oceanosoftlapalma at ...626... Fri Sep 18 10:30:45 2009 From: oceanosoftlapalma at ...626... (=?ISO-8859-1?Q?Ricardo_D=EDaz_Mart=EDn?=) Date: Fri, 18 Sep 2009 09:30:45 +0100 Subject: [Gambas-user] gambas output In-Reply-To: <25491550.post@...1379...> References: <25491550.post@...1379...> Message-ID: I use my own system to generate standard odt files but maybe it's no enought clear for other people... :-( To do this, first I extract content.xml from .odt template and modify it. After, I put the new content.xml again inside the new file. I use this for print reports in my apps and works fine. I'm thinking to make an example of this but more user friendly and put as gambas example but I got lot of work now (maybe in a few months...) 2009/9/17 yuhej > > Hello, > > >From my application I need to create some standard output files. When I > used > VB I usually put out data to Excel files. It has the advantage that > everyone > can open and edit and I can use templates. > Do we have a simillar option from Gambas? Fo instance to write into Open > Office Calc files? > > Thanks, > Robi > -- > View this message in context: > http://www.nabble.com/gambas-output-tp25491550p25491550.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jguardon at ...2035... Fri Sep 18 17:01:32 2009 From: jguardon at ...2035... (Jesus Guardon) Date: Fri, 18 Sep 2009 17:01:32 +0200 Subject: [Gambas-user] I made a mistake again In-Reply-To: <200909180343.06763.gambas@...1...> References: <200909180343.06763.gambas@...1...> Message-ID: <4AB3A0CC.6040306@...2035...> Beno?t Minisini escribi?: > By adding a "clear internal html cache" feature to the wiki, I made a mistake > again, and erased all images stored in the wiki. :-( > > Hopefully, I have saved the database, but it was a few weeks ago, so all > images inserted in the wiki after 26 Jul 2009 are lost! > > I'm really sorry for the inconvenience. I hope that there are not too many > lost images... > > Regards, > I think there is something broken furthermore... I've got this error when trying to access several translated pages of the wiki: "Unexpected error while displaying this page. Result is not available Main.DisplayPage.1851" Always the same line error. Regards Jesus Guardon From gambas at ...1... Fri Sep 18 18:48:51 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 18 Sep 2009 18:48:51 +0200 Subject: [Gambas-user] I made a mistake again In-Reply-To: <4AB3A0CC.6040306@...2035...> References: <200909180343.06763.gambas@...1...> <4AB3A0CC.6040306@...2035...> Message-ID: <200909181848.51519.gambas@...1...> > Beno?t Minisini escribi?: > > By adding a "clear internal html cache" feature to the wiki, I made a > > mistake again, and erased all images stored in the wiki. :-( > > > > Hopefully, I have saved the database, but it was a few weeks ago, so all > > images inserted in the wiki after 26 Jul 2009 are lost! > > > > I'm really sorry for the inconvenience. I hope that there are not too > > many lost images... > > > > Regards, > > I think there is something broken furthermore... > > I've got this error when trying to access several translated pages of > the wiki: > > "Unexpected error while displaying this page. > > Result is not available > Main.DisplayPage.1851" > > Always the same line error. > > Regards > > Jesus Guardon > It should be fixed now. Regards, -- Beno?t Minisini From gambas at ...1... Fri Sep 18 18:56:19 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 18 Sep 2009 18:56:19 +0200 Subject: [Gambas-user] GAMBAS crash when setting columnview's Sorted property In-Reply-To: <25503074.post@...1379...> References: <25486385.post@...1379...> <200909171845.43096.gambas@...1...> <25503074.post@...1379...> Message-ID: <200909181856.19905.gambas@...1...> > Bugzilla from gambas at ...1... wrote: > > I fixed the bug in revision #2337. It was not 64 bits related at all. > > Thanks. I'm assuming revision #2337 is in the 2.x development branch, as I > just compiled and ran 2.16.0 and it has the same problem. Looks like it was > GTK-related, as using gb.qt works fine under 2.16.0 but gb.gtk doesn't. > > Bugzilla from gambas at ...1... wrote: > > If you want to show a lot of data in columns, I suggest using a GridView > > for > > that. Sorted view controls are very slow in GTK+, even if I hack a lot to > > workaround the problem. > > I'd like to use the gridview, but it doesn't appear to have integrated > sorting capabilities. If your data comes from a SQL query, you can redo the query with a different "ORDER BY" SQL clause. If your query returns a lot of data, just return what you need by using the Limit() method ( or the "LIMIT" SQL keyword). The DataView control of gb.db.form just does all that. It only fetches 64 records of a query, and does its sorting by using "ORDER BY". It works well even if there is Internet between the computer and the database. > If I used that then I'd be coding sorting algorithms > myself and getting all kinds of headaches. ;) For now I'm going to switch > to gb.qt and redo my form's colors since they look all crazy under gb.qt > in Ubuntu. What's the problem with the form colors? They should not change if you switch between gb.qt and gb.gtk. Regards, -- Beno?t Minisini From gambas at ...1... Fri Sep 18 18:58:35 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 18 Sep 2009 18:58:35 +0200 Subject: [Gambas-user] Grid View and Mysql Result, Time Data In-Reply-To: References: Message-ID: <200909181858.36208.gambas@...1...> > I have a gridview control and i fill it with values from a mysql > $RESULT with the next code > > PUBLIC SUB grdView_Data(Row AS Integer, Column AS Integer) > > $Result.MoveTo(Row) > > grdView.Data.Text = Str($Result[grdView.Columns[Column].Text]) > > END > > > The problem now. > When value is Date with mysql format %Y-%m-%d > the gridview shows "00:00:00" instead "0000:00:00" when the value of > result is empty > and change the format to %m/%d/%Y. > > > For example see col4 which holds dates > > mysql> SELECT * FROM `table4`; > +------+------+------+------------+ > > | col1 | col2 | col3 | col4 | > > +------+------+------+------------+ > > | 1 | 11 | 111 | 2008-09-24 | <- %Y-%m-%d > | 2 | 22 | 222 | 0000-00-00 | > > +------+------+------+------------+ > 2 rows in set (0.00 sec) > > And gridview shows > > 09/24/08 > > Why is this? Normally the gridview must get the string " 2008-09-24" > No. Gambas takes from MySQL the real date, and then you convert it to a string with the Str() function. The "mysql" program does the same thing, but uses its own "date to string" conversion functions. If you want the same format, instead of using Str() (which is the better IMHO, as it follows the system localization settings), do that: grdView.Data.Text = Format($Result[grdView.Columns[Column].Text], "yyyy-mm-dd") Regards, -- Beno?t Minisini From gambas at ...1... Fri Sep 18 19:16:15 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 18 Sep 2009 19:16:15 +0200 Subject: [Gambas-user] another IDE cut/n paste behaviour In-Reply-To: <1253223932.6415.25.camel@...40...> References: <1252493319.7035.10.camel@...40...> <200909091258.06474.gambas@...1...> <1253223932.6415.25.camel@...40...> Message-ID: <200909181916.15914.gambas@...1...> > Am Mittwoch, den 09.09.2009, 12:58 +0200 schrieb Beno?t Minisini: > > > Salut, > > > > > > on gambas2 and gambas3 (since month) in code editor CTRL+C not always > > > works. > > > CTRL+V is OK, CTRL+X (I haven't tested) > > > > > > ContextMenu/Copy works well. > > > > > > Is that a gambas behaviour or Linux/Ubuntu 8.04/Xorg behaviour. > > > Or a problem on my box. > > > > Please give more details on when it does not work. > > Salut Benoit, > > back again today for that. > > Finally, for sure, in gambas2 2.16 when I try during debug, having > selected something of in the editor, I can't copy it with CTRL+C I have > to use the ContextMenu/Copy. > CTRL+V works. > If you type CTRL+C in debugging mode, it won't work if the balloon is displayed. Do you hide the balloon before doing CTRL+C? If I do that, it works there. -- Beno?t Minisini From demosthenesk at ...626... Fri Sep 18 20:20:45 2009 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Fri, 18 Sep 2009 21:20:45 +0300 Subject: [Gambas-user] Grid View and Mysql Result, Time Data In-Reply-To: <200909181858.36208.gambas@...1...> References: <200909181858.36208.gambas@...1...> Message-ID: ok i got it. Thanks! 2009/9/18 Beno?t Minisini : >> I have a gridview control and i fill it with values from a mysql >> $RESULT with the next code >> >> PUBLIC SUB grdView_Data(Row AS Integer, Column AS Integer) >> >> ? $Result.MoveTo(Row) >> >> ? grdView.Data.Text = Str($Result[grdView.Columns[Column].Text]) >> >> END >> >> >> The problem now. >> When value is Date with mysql format %Y-%m-%d >> the gridview shows "00:00:00" instead "0000:00:00" when the value of >> result is empty >> and change the format to %m/%d/%Y. >> >> >> For example see col4 which holds dates >> >> mysql> SELECT * FROM `table4`; >> +------+------+------+------------+ >> >> | col1 | col2 | col3 | col4 ? ? ? | >> >> +------+------+------+------------+ >> >> | ? ?1 | ? 11 | ?111 | 2008-09-24 | ?<- %Y-%m-%d >> | ? ?2 | ? 22 | ?222 | 0000-00-00 | >> >> +------+------+------+------------+ >> 2 rows in set (0.00 sec) >> >> And gridview shows >> >> 09/24/08 >> >> Why is this? Normally the gridview must get the string " 2008-09-24" >> > > No. Gambas takes from MySQL the real date, and then you convert it to a string > with the Str() function. The "mysql" program does the same thing, but uses its > own "date to string" conversion functions. > > If you want the same format, instead of using Str() (which is the better IMHO, > as it follows the system localization settings), do that: > > ?grdView.Data.Text = Format($Result[grdView.Columns[Column].Text], > ? ? ? ? ? ? ? ? ? ? ? ? ? ? "yyyy-mm-dd") > > Regards, > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From kevinfishburne at ...1887... Fri Sep 18 22:15:09 2009 From: kevinfishburne at ...1887... (kevinfishburne) Date: Fri, 18 Sep 2009 13:15:09 -0700 (PDT) Subject: [Gambas-user] embedding QT/GTK themes or better control of app appearance (was: Re: GAMBAS crash when setting columnview's Sorted property) In-Reply-To: <200909181856.19905.gambas@...1...> References: <25486385.post@...1379...> <25487136.post@...1379...> <4247f5440909170135o292b8659h4ad7aba9eb1d8a37@...627...> <25488985.post@...1379...> <200909171845.43096.gambas@...1...> <25503074.post@...1379...> <200909181856.19905.gambas@...1...> Message-ID: <25514853.post@...1379...> Bugzilla from gambas at ...1... wrote: > > If your data comes from a SQL query, you can redo the query with a > different > "ORDER BY" SQL clause. > > If your query returns a lot of data, just return what you need by using > the > Limit() method ( or the "LIMIT" SQL keyword). > > The DataView control of gb.db.form just does all that. It only fetches 64 > records of a query, and does its sorting by using "ORDER BY". It works > well > even if there is Internet between the computer and the database. > Unfortunately the data comes from the output of SHELL "ls -R --sort extension " & "\"" & TextBox_Collection_Path.Text & "\"" & "|grep .sf2 > " & User.Home & "/.LiquidSynth/Collection.data" which a flat text file I parse with LINE INPUT. I need the user to be able to sort three columns via the GUI, forward and backward and to be able to scroll through all the entries in the list at once whether it be 50 or 50000. It's a SoundFont management app basically. I'm going to leave the columnview to .Sorted=TRUE by default, since most of my app's users wont' have 10000+ SoundFonts in their collection. Unfortunately for me I have well over 50000, so I may just have to deal with it for the time being. Bugzilla from gambas at ...1... wrote: > > What's the problem with the form colors? They should not change if you > switch > between gb.qt and gb.gtk. > It's not so much the form's colors as the colors of the various controls (sliders, buttons). Though you can change a control's properties to use colors taken from the user's current GTK/QT theme or choose static/independent colors, which specific part(s) of the control changes color and how they change color (shading for example) depend on the current theme being used by GTK/QT. Each control generally uses one or more colors from the current GTK/QT theme that there is no property to override in GAMBAS. This hybrid nature of the form controls makes it very difficult to customize the look of a GAMBAS app such that a user's particular GTK/QT theme won't interfere with it. The only solutions I can think of to allow GAMBAS apps to be better customized visually are: 1) Find a way to allow a GAMBAS app to embed and use its own GTK or QT theme separate from what the desktop environment is using. I don't know if GTK and QT can even do this. 2) Create a separate property for each visual element in a control, allowing a dev to completely override what colors a control would otherwise be borrowing from the user's theme. Here's are a few mild examples of what I'm talking about. The GAMBAS IDE looks slightly different from the runtime app using gb.qt. Using my custom theme and gb.gtk the background is colored blue as I specified in GAMBAS, but using the wii-black theme makes them dark. I have the background colors explicity set but they are ignored when switching to wii-black for some reason. Since I am running GNOME there's not much I can do about the colors borrowed from QT themes were I to switch the app to use gb.qt. http://www.eightvirtues.com/misc/ide%20under%20gnome%20-%20gb.gtk%20component%20-%20default%20qt%20theme.jpg http://www.eightvirtues.com/misc/runtime%20under%20gnome%20-%20gb.gtk%20component%20-%20my%20gtk%20theme.jpg http://www.eightvirtues.com/misc/runtime%20under%20gnome%20-%20gb.gtk%20component%20-%20wii-black%20gtk%20theme.jpg http://www.eightvirtues.com/misc/runtime%20under%20gnome%20-%20gb.qt%20component%20-%20default%20qt%20theme.jpg Another example is that using my GTK theme (which uses "glossy" controls) and gb.gtk the buttons when enabled use a vertical blend of the foreground and background colors explicitly set in GAMBAS. If disable the buttons the same gradient is used, though the button border appears softer. If I switch my theme to wii-black or switch to gb.qt any disabled buttons suddenly allow the form's background color to show through, which causes them to be black in the case of wii-black or solid blue in the case of gb.qt. It's confusing, but the bottom line is that the only way to ensure your GAMBAS application looks okay under both GTK, QT, and whatever theme the user is using is to not change the form or control colors in GAMBAS at all. Has any work been done to implement theming, skinning or otherwise allowing tighter control of the way an app looks under different environments? ----- Kevin Fishburne, Eight Virtues www: http://sales.eightvirtues.com http://sales.eightvirtues.com e-mail: mailto:sales at ...1887... sales at ...1887... phone: (770) 853-6271 -- View this message in context: http://www.nabble.com/GAMBAS-crash-when-setting-columnview%27s-Sorted-property-tp25486385p25514853.html Sent from the gambas-user mailing list archive at Nabble.com. From jussi.lahtinen at ...626... Fri Sep 18 23:08:07 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 19 Sep 2009 00:08:07 +0300 Subject: [Gambas-user] Error message from (at least earlier valid) pointer usage. Message-ID: <384d3900909181408n6ee893cbx27a7450f8e17249a@...627...> This code, gives error message "wanted Stream got Long instead": pPOINTS = Alloc(4, 1522) tmp = CalculatePoints(pPOINTS,matrix.Data) .... For ii = 0 To tmp tmpPOINT = New POINT Read #pPOINTS + (ii * 4), tmpPOINT.x <---- Fails here! Read #pPOINTS + (ii * 4) + 2, tmpPOINT.y ... POINT class: Public x As Short = -1 Public y As Short There is also rather complicated "_compare" function, but I don't think it matters with this problem. This code worked fine with earlier Gambas 3 revisions. Does this has anything to do with my error? * NEW: A Pointer can not be used as a stream directly. You must use the new Memory instruction for that. New feature understandably lacks documentation, so I need help! Jussi From jussi.lahtinen at ...626... Sat Sep 19 00:42:11 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 19 Sep 2009 01:42:11 +0300 Subject: [Gambas-user] another IDE cut/n paste behaviour In-Reply-To: <1252495211.7035.27.camel@...40...> References: <1252493319.7035.10.camel@...40...> <200909091258.06474.gambas@...1...> <1252495211.7035.27.camel@...40...> Message-ID: <384d3900909181542h63d442a3m8bf101ee41e6d4a3@...627...> I can confirm partly with Gambas 3 revision 2342. On console CTRL+V and CTRL+C doesn't work, but "mouse right click menu" copy and paste works. With Gambas 2.15, keys works as expected. On IDE code editor, keys works with both Gambas 2 and 3, as expected. @Ubuntu 9.04 64bit. Jussi On Wed, Sep 9, 2009 at 14:20, Charlie Reinl wrote: > Am Mittwoch, den 09.09.2009, 12:58 +0200 schrieb Beno?t Minisini: >> > Salut, >> > >> > on gambas2 and gambas3 (since month) in code editor CTRL+C not always >> > works. >> > CTRL+V is OK, CTRL+X (I haven't tested) >> > >> > ContextMenu/Copy works well. >> > >> > Is that a gambas behaviour or Linux/Ubuntu 8.04/Xorg behaviour. >> > Or a problem on my box. >> > >> >> Please give more details on when it does not work. >> > > This behaviour is something on my "White-A4-PalmTop" which I spread > today, after read Richards mail. > > For the details, I have to observer closer. > One case I remember, during debugging. > > Keep it in mind, I set it on the top of my "White-A4-PalmTop", and tell > you later. > > But perhaps there are other around there who remarked that. > > > > -- > Amicalment > Charlie > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. ?http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Sat Sep 19 00:54:26 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 19 Sep 2009 01:54:26 +0300 Subject: [Gambas-user] Error message from (at least earlier valid) pointer usage. In-Reply-To: <384d3900909181408n6ee893cbx27a7450f8e17249a@...627...> References: <384d3900909181408n6ee893cbx27a7450f8e17249a@...627...> Message-ID: <384d3900909181554j14ace426sad29f2cf9f627919@...627...> I forgot to mention that CalculatePoints is external function. Jussi On Sat, Sep 19, 2009 at 00:08, Jussi Lahtinen wrote: > This code, gives error message "wanted Stream got Long instead": > > pPOINTS = Alloc(4, 1522) > tmp = CalculatePoints(pPOINTS,matrix.Data) > > .... > > ?For ii = 0 To tmp > ?tmpPOINT = New POINT > ?Read #pPOINTS + (ii * 4), tmpPOINT.x ? ?<---- Fails here! > ?Read #pPOINTS + (ii * 4) + 2, tmpPOINT.y > ?... > > POINT class: > > Public x As Short = -1 > Public y As Short > > There is also rather complicated "_compare" function, but I don't > think it matters with this problem. > > > This code worked fine with earlier Gambas 3 revisions. > Does this has anything to do with my error? > ?* NEW: A Pointer can not be used as a stream directly. You must use the new > ? ?Memory instruction for that. > > New feature understandably lacks documentation, so I need help! > > Jussi > From gambas at ...1... Sat Sep 19 01:01:00 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 19 Sep 2009 01:01:00 +0200 Subject: [Gambas-user] Error message from (at least earlier valid) pointer usage. In-Reply-To: <384d3900909181408n6ee893cbx27a7450f8e17249a@...627...> References: <384d3900909181408n6ee893cbx27a7450f8e17249a@...627...> Message-ID: <200909190101.00995.gambas@...1...> > This code, gives error message "wanted Stream got Long instead": > > pPOINTS = Alloc(4, 1522) > tmp = CalculatePoints(pPOINTS,matrix.Data) > > .... > > For ii = 0 To tmp > tmpPOINT = New POINT > Read #pPOINTS + (ii * 4), tmpPOINT.x <---- Fails here! > Read #pPOINTS + (ii * 4) + 2, tmpPOINT.y > ... > > POINT class: > > Public x As Short = -1 > Public y As Short > > There is also rather complicated "_compare" function, but I don't > think it matters with this problem. > > > This code worked fine with earlier Gambas 3 revisions. > Does this has anything to do with my error? > * NEW: A Pointer can not be used as a stream directly. You must use the > new Memory instruction for that. > > New feature understandably lacks documentation, so I need help! > > Jussi > Sorry, all that is work in progress. I am currently redoing the way Gambas deals with binary data. So now, to access memory located at a specific pointer, you must do: Dim pPoints as Pointer Dim hFile AS File hFile = Memory pPoints For Read ' or For Write ... Close #hFile Then you use the READ instruction normally, except that hFile has an internal memory pointer that is automatically incremented. The first time, the data is read at address pPoints. But if, for example, you read 4 bytes, the next read will occur at address pPoints + 4. And so on until the end of the memory or a memory access error. The syntax of READ and WRITE will change too, and there is an high risk that the bytecode format changes, and that projects need to be recompiled. Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Sat Sep 19 01:33:55 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 19 Sep 2009 02:33:55 +0300 Subject: [Gambas-user] Error message from (at least earlier valid) pointer usage. In-Reply-To: <200909190101.00995.gambas@...1...> References: <384d3900909181408n6ee893cbx27a7450f8e17249a@...627...> <200909190101.00995.gambas@...1...> Message-ID: <384d3900909181633p3583f5fcv4bfba9c71b89a4f@...627...> OK, now it works! Thanks! That makes my code more simple than it was, very good! Only one little disruptive thing... using "File" is little counter intuitive, but maybe I just don't name it "hFile", maybe instead "hMyData" or like. Must go to sleep... Jussi 2009/9/19 Beno?t Minisini : >> This code, gives error message "wanted Stream got Long instead": >> >> pPOINTS = Alloc(4, 1522) >> tmp = CalculatePoints(pPOINTS,matrix.Data) >> >> .... >> >> ?For ii = 0 To tmp >> ?tmpPOINT = New POINT >> ?Read #pPOINTS + (ii * 4), tmpPOINT.x ? ?<---- Fails here! >> ?Read #pPOINTS + (ii * 4) + 2, tmpPOINT.y >> ?... >> >> POINT class: >> >> Public x As Short = -1 >> Public y As Short >> >> There is also rather complicated "_compare" function, but I don't >> think it matters with this problem. >> >> >> This code worked fine with earlier Gambas 3 revisions. >> Does this has anything to do with my error? >> ? * NEW: A Pointer can not be used as a stream directly. You must use the >> ?new Memory instruction for that. >> >> New feature understandably lacks documentation, so I need help! >> >> Jussi >> > > Sorry, all that is work in progress. > > I am currently redoing the way Gambas deals with binary data. > > So now, to access memory located at a specific pointer, you must do: > > Dim pPoints as Pointer > Dim hFile AS File > > hFile = Memory pPoints For Read ' or For Write > ... > Close #hFile > > Then you use the READ instruction normally, except that hFile has an internal > memory pointer that is automatically incremented. > > The first time, the data is read at address pPoints. But if, for example, you > read 4 bytes, the next read will occur at address pPoints + 4. And so on until > the end of the memory or a memory access error. > > The syntax of READ and WRITE will change too, and there is an high risk that > the bytecode format changes, and that projects need to be recompiled. > > Regards, > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Sat Sep 19 01:37:30 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 19 Sep 2009 02:37:30 +0300 Subject: [Gambas-user] Error message from (at least earlier valid) pointer usage. In-Reply-To: <384d3900909181633p3583f5fcv4bfba9c71b89a4f@...627...> References: <384d3900909181408n6ee893cbx27a7450f8e17249a@...627...> <200909190101.00995.gambas@...1...> <384d3900909181633p3583f5fcv4bfba9c71b89a4f@...627...> Message-ID: <384d3900909181637m6633640bw4bbe938d48b93795@...627...> One more thing... "While Not Eof(hFile)" doesn't work with this case. Eof() never finds end of "file". Almost sleeping already... Jussi On Sat, Sep 19, 2009 at 02:33, Jussi Lahtinen wrote: > OK, now it works! Thanks! > That makes my code more simple than it was, very good! > Only one little disruptive thing... using "File" is little counter > intuitive, but maybe I just don't name it "hFile", > maybe instead "hMyData" or like. > > Must go to sleep... > > Jussi > > > 2009/9/19 Beno?t Minisini : >>> This code, gives error message "wanted Stream got Long instead": >>> >>> pPOINTS = Alloc(4, 1522) >>> tmp = CalculatePoints(pPOINTS,matrix.Data) >>> >>> .... >>> >>> ?For ii = 0 To tmp >>> ?tmpPOINT = New POINT >>> ?Read #pPOINTS + (ii * 4), tmpPOINT.x ? ?<---- Fails here! >>> ?Read #pPOINTS + (ii * 4) + 2, tmpPOINT.y >>> ?... >>> >>> POINT class: >>> >>> Public x As Short = -1 >>> Public y As Short >>> >>> There is also rather complicated "_compare" function, but I don't >>> think it matters with this problem. >>> >>> >>> This code worked fine with earlier Gambas 3 revisions. >>> Does this has anything to do with my error? >>> ? * NEW: A Pointer can not be used as a stream directly. You must use the >>> ?new Memory instruction for that. >>> >>> New feature understandably lacks documentation, so I need help! >>> >>> Jussi >>> >> >> Sorry, all that is work in progress. >> >> I am currently redoing the way Gambas deals with binary data. >> >> So now, to access memory located at a specific pointer, you must do: >> >> Dim pPoints as Pointer >> Dim hFile AS File >> >> hFile = Memory pPoints For Read ' or For Write >> ... >> Close #hFile >> >> Then you use the READ instruction normally, except that hFile has an internal >> memory pointer that is automatically incremented. >> >> The first time, the data is read at address pPoints. But if, for example, you >> read 4 bytes, the next read will occur at address pPoints + 4. And so on until >> the end of the memory or a memory access error. >> >> The syntax of READ and WRITE will change too, and there is an high risk that >> the bytecode format changes, and that projects need to be recompiled. >> >> Regards, >> >> -- >> Beno?t Minisini >> >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry® Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9-12, 2009. Register now! >> http://p.sf.net/sfu/devconf >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > From robert1juhasz at ...626... Sat Sep 19 06:04:27 2009 From: robert1juhasz at ...626... (yuhej) Date: Fri, 18 Sep 2009 21:04:27 -0700 (PDT) Subject: [Gambas-user] gambas output In-Reply-To: References: <25491550.post@...1379...> Message-ID: <25518414.post@...1379...> Hello Ricardo, For the moment I survive with text files. It would be very useful if you can make a function with this option when you have a little time! Regards, Robi Ricardo D?az Mart?n wrote: > > I use my own system to generate standard odt files but maybe it's no > enought > clear for other people... :-( > > To do this, first I extract content.xml from .odt template and modify it. > After, I put the new content.xml again inside the new file. I use this for > print reports in my apps and works fine. > > I'm thinking to make an example of this but more user friendly and put as > gambas example but I got lot of work now (maybe in a few months...) > > > 2009/9/17 yuhej > >> >> Hello, >> >> >From my application I need to create some standard output files. When I >> used >> VB I usually put out data to Excel files. It has the advantage that >> everyone >> can open and edit and I can use templates. >> Do we have a simillar option from Gambas? Fo instance to write into Open >> Office Calc files? >> >> Thanks, >> Robi >> -- >> View this message in context: >> http://www.nabble.com/gambas-output-tp25491550p25491550.html >> Sent from the gambas-user mailing list archive at Nabble.com. >> >> >> >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry® Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9-12, 2009. Register >> now! >> http://p.sf.net/sfu/devconf >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register > now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > -- View this message in context: http://www.nabble.com/gambas-output-tp25491550p25518414.html Sent from the gambas-user mailing list archive at Nabble.com. From robert1juhasz at ...626... Sat Sep 19 06:08:04 2009 From: robert1juhasz at ...626... (yuhej) Date: Fri, 18 Sep 2009 21:08:04 -0700 (PDT) Subject: [Gambas-user] serial port Message-ID: <25518421.post@...1379...> Hello, I can see that Gambas can handle the serial ports which is a very good news for me. Can someone tell me how can I get the list of the serial ports of my computer? I wish to make an autodetect function and only allow to select from the working serial ports. Robi -- View this message in context: http://www.nabble.com/serial-port-tp25518421p25518421.html Sent from the gambas-user mailing list archive at Nabble.com. From leemcpherson at ...626... Sat Sep 19 07:22:25 2009 From: leemcpherson at ...626... (Lee McPherson) Date: Sat, 19 Sep 2009 01:22:25 -0400 Subject: [Gambas-user] serial port In-Reply-To: <25518421.post@...1379...> References: <25518421.post@...1379...> Message-ID: <4AB46A91.5020501@...626...> yuhej wrote: > I can see that Gambas can handle the serial ports which is a very good news > for me. > Can someone tell me how can I get the list of the serial ports of my > computer? I wish to make an autodetect function and only allow to select > from the working serial ports. > > Robi > I think you want /dev/ttyS0, ttyS1, etc... Also, I don't have a serial port on my laptop, but my USB to serial converter creates a device called /dev/ttyUSB0. All these devices are present on my system (Ubuntu latest), but I have no idea how to check if they are valid. Obviously, sending data to /dev/ttyS0 would do nothing on my laptop. You could setup handshaking routines to check and see if there's a device that can respond on all of those devices. Your device would have to be able to do hardware or software handshaking though. Other than that, it's out of my league. From jriolexp at ...43... Sat Sep 19 07:50:13 2009 From: jriolexp at ...43... (j. riolex pinuela) Date: Fri, 18 Sep 2009 22:50:13 -0700 (PDT) Subject: [Gambas-user] Gambas2 IDE Font in KDE4 [SOLVE] Message-ID: <821192.47132.qm@...2297...> Hi, Thank you everyone for your suggestions. I finally solve this. issue.? As Santiago mentioned it is qt3 configuration which i don't have since this system is running KDE4 and qt4, I have to install qt3-qtconfig and qt3 theme. Hope this helps anyone who encounter similar issue. Regards Get your new Email address! Grab the Email name you've always wanted before someone else does! http://mail.promotions.yahoo.com/newdomains/aa/ From rospolosco at ...152... Sat Sep 19 12:23:44 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Sat, 19 Sep 2009 12:23:44 +0200 Subject: [Gambas-user] clipboard paste doesn't work Message-ID: <200909191223.44973.rospolosco@...152...> Hi, Benoit. It seems that Clipboard.Paste() doesn't work (see example pasteclip). I select a text somewhere, then press in the example "Paste from clipboard", but it does not return the text I've selected. To make it work I have to: 1) select the text; 2) copy the text; 3) press the button "Paste from clipboard" Around there are tools that works without the second step ('copy before paste'). Here is a little command line tool that works as expected: http://www.vergenet.net/~conrad/software/xsel/#intro You select a text somewhere, type on console xsel and get the very last selected text (without the 'copy before' step) I've tried to reproduce the code of xsel with an EXTERN call, but I miserably failed to my lack of knowlegde. The example is pasteX and it produces a Gambas segfault (error 11). So, help will be appreciated if you explain me how to reproduce with an EXTERN call the behaviour of xsel. Thank you all. Stefano Gambas 2.15.1 KDE 3.5.10 Qt 3.3.8b GTK2 2.12.12 -------------- next part -------------- A non-text attachment was scrubbed... Name: pasteX-0.0.1.tar.gz Type: application/x-tgz Size: 8016 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pasteclip-0.0.1.tar.gz Type: application/x-tgz Size: 7761 bytes Desc: not available URL: From nando_f at ...951... Sat Sep 19 18:40:42 2009 From: nando_f at ...951... (nando) Date: Sat, 19 Sep 2009 11:40:42 -0500 Subject: [Gambas-user] serial port In-Reply-To: <25518421.post@...1379...> References: <25518421.post@...1379...> Message-ID: <20090919163437.M15768@...951...> In my Linux serial port experience, serial port devices are named: /dev/ttyS0..9 and upwards /dev/ttyUSB0..9 and upwards depending on what is plugged in USB. I have done a lot of serial port stuff with Gambas. I know that trying to open then with the serial port control will fail is non-exising port. This error can be detected. It can be possible to open a port as a test to see if it exists, but you may be changing parameters and stealing chars from an existing connection. I've had this happen too....really messes things up. -Fernando ---------- Original Message ----------- From: yuhej To: gambas-user at lists.sourceforge.net Sent: Fri, 18 Sep 2009 21:08:04 -0700 (PDT) Subject: [Gambas-user] serial port > Hello, > > I can see that Gambas can handle the serial ports which is a very good news > for me. > Can someone tell me how can I get the list of the serial ports of my > computer? I wish to make an autodetect function and only allow to select > from the working serial ports. > > Robi > -- > View this message in context: http://www.nabble.com/serial-port-tp25518421p25518421.html > Sent from the gambas-user mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From dima.malkov.russia at ...626... Sun Sep 20 07:11:20 2009 From: dima.malkov.russia at ...626... (Dima Malkov) Date: Sun, 20 Sep 2009 10:11:20 +0500 Subject: [Gambas-user] Problem with UTF-8 in Gambas-connection to MySQL Message-ID: <1f13ba8b0909192211g4578ed4w5d8ae7905c6ed4a7@...627...> > > (I don't know English well) > > Use Debian 5 "Lenny" -32, Gambas 2.7 from repository. > > > > I develop an account program for russian users. It must work with cyrillic > > correct. > > I have made MySQL5 (default UTF8) database with direct CHARACTER SET UTF8 > > option, tables with direct CHARACTER SET UTF8 option. Then connected to it > > from gambas, output data to GridView. All string fields were not readable. > > > > I run example "Database". It works correct with some french symbols, but > > with cyrillic not. Program "Database manager" do the same. > > > > I got sources of Gambas-2.8.2. Opened main.c file of MySQL driver, found > > function > > ? <<< static int open_database(DB_DESC *desc, DB_DATABASE *db) >>>. > > Added string > > ? <<< fprintf(stderr, "Character set GB[%s] mysql[%s]\n", > > GB.System.Charset(), mysql_character_set_name(conn)); >>> > > before and after string > > ? <<< set_character_set(db); >>>. > > Compiled only this driver, copied it to /usr/lib/gambas2. Run my program. > > Result: > > ? <<< Character set GB[UTF-8] mysql[latin1] > > ? ? ? ? ?Character set GB[UTF-8] mysql[latin1] >>> > > in console. > > > > Why latin1 instead UTF-8? > > > > -- > > Dima Malkov > > What is the value of DB.Charset just after you have connected to the database > in Gambas? > > What happens if you uncheck the "use encoding" menu entry if the popup menu in > the database manager? > > Can you send me your database contents, or part of it, so that I test by > myself? > > -- > Beno?t Minisini The value of DB.Charset just after connection to the database in Gambas is "utf8". Unchecking "use encoding UTF8" menu entry has no any visible effect. This letter includes a ZIP archive. I created a small database by command "CREATE DATABASE Cyrillic CHARACTER SET utf8;" in MySQL-console. Then just created a table by command "CREATE TABLE tbl1 (id SERIAL, word VARCHAR(20), PRIMARY KEY (id));". Inserted 5 rows in MySQL-console, then 5 rows from the "database manager". First 5 rows are not readable in the "database manager", and last 5 rows are not readable in MySQL-console. -- Dima Malkov -------------- next part -------------- A non-text attachment was scrubbed... Name: cyrillic.zip Type: application/zip Size: 48434 bytes Desc: not available URL: From robert1juhasz at ...626... Sun Sep 20 08:20:18 2009 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Sun, 20 Sep 2009 08:20:18 +0200 Subject: [Gambas-user] serial port In-Reply-To: <20090919163437.M15768@...951...> References: <25518421.post@...1379...> <20090919163437.M15768@...951...> Message-ID: <68652a0b0909192320s5ac22c22h20d819dd2822ab9@...627...> Useful info, I'll do like that. Thanks, Robi 2009/9/19 nando > In my Linux serial port experience, serial port devices are named: > > /dev/ttyS0..9 and upwards > /dev/ttyUSB0..9 and upwards depending on what is plugged in USB. > > I have done a lot of serial port stuff with Gambas. > > I know that trying to open then with the serial port control > will fail is non-exising port. This error can be detected. > > It can be possible to open a port as a test to see if it exists, but you > may be changing parameters and stealing chars from an existing connection. > I've had this happen too....really messes things up. > > -Fernando > > > ---------- Original Message ----------- > From: yuhej > To: gambas-user at lists.sourceforge.net > Sent: Fri, 18 Sep 2009 21:08:04 -0700 (PDT) > Subject: [Gambas-user] serial port > > > Hello, > > > > I can see that Gambas can handle the serial ports which is a very good > news > > for me. > > Can someone tell me how can I get the list of the serial ports of my > > computer? I wish to make an autodetect function and only allow to select > > from the working serial ports. > > > > Robi > > -- > > View this message in context: > http://www.nabble.com/serial-port-tp25518421p25518421.html > > Sent from the gambas-user mailing list archive at Nabble.com. > > > > > ------------------------------------------------------------------------------ > > Come build with us! The BlackBerry® Developer Conference in SF, CA > > is the only developer event you need to attend this year. Jumpstart your > > developing skills, take BlackBerry mobile applications to market and stay > > ahead of the curve. Join us from November 9-12, 2009. Register > now! > > http://p.sf.net/sfu/devconf > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------- End of Original Message ------- > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mike.crean at ...1940... Sun Sep 20 10:26:07 2009 From: mike.crean at ...1940... (Mike) Date: Sun, 20 Sep 2009 16:26:07 +0800 Subject: [Gambas-user] serial port In-Reply-To: <68652a0b0909192320s5ac22c22h20d819dd2822ab9@...627...> References: <25518421.post@...1379...> <20090919163437.M15768@...951...> <68652a0b0909192320s5ac22c22h20d819dd2822ab9@...627...> Message-ID: <4AB5E71F.3030909@...1940...> Robert JUHASZ wrote: > Useful info, I'll do like that. > Thanks, Robi > > 2009/9/19 nando > > >> In my Linux serial port experience, serial port devices are named: >> >> /dev/ttyS0..9 and upwards >> /dev/ttyUSB0..9 and upwards depending on what is plugged in USB. >> >> I have done a lot of serial port stuff with Gambas. >> >> I know that trying to open then with the serial port control >> will fail is non-exising port. This error can be detected. >> >> It can be possible to open a port as a test to see if it exists, but you >> may be changing parameters and stealing chars from an existing connection. >> I've had this happen too....really messes things up. >> >> -Fernando >> >> >> ---------- Original Message ----------- >> From: yuhej >> To: gambas-user at lists.sourceforge.net >> Sent: Fri, 18 Sep 2009 21:08:04 -0700 (PDT) >> Subject: [Gambas-user] serial port >> >> >>> Hello, >>> >>> I can see that Gambas can handle the serial ports which is a very good >>> >> news >> >>> for me. >>> Can someone tell me how can I get the list of the serial ports of my >>> computer? I wish to make an autodetect function and only allow to select >>> from the working serial ports. >>> >>> Robi >>> -- >>> View this message in context: >>> >> http://www.nabble.com/serial-port-tp25518421p25518421.html >> >>> Sent from the gambas-user mailing list archive at Nabble.com. >>> >>> >>> >> ------------------------------------------------------------------------------ >> >>> Come build with us! The BlackBerry® Developer Conference in SF, CA >>> is the only developer event you need to attend this year. Jumpstart your >>> developing skills, take BlackBerry mobile applications to market and stay >>> ahead of the curve. Join us from November 9-12, 2009. Register >>> >> now! >> >>> http://p.sf.net/sfu/devconf >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> ------- End of Original Message ------- >> >> >> >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry® Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9-12, 2009. Register now! >> http://p.sf.net/sfu/devconf >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > Hi, try the code below, I have no problems with the serial port. PRIVATE Sport AS SerialPort CONST None AS Integer = 0 PRIVATE Rx AS String PUBLIC SUB Form_Open() Sport = NEW SerialPort AS "Sport" Sport.PortName = "/dev/ttyUSB0" Sport.Speed = "19200" Sport.Parity = 0 Sport.DataBits = "8" Sport.StopBits = "1" Sport.FlowControl = 0 TRY Sport.Open() IF ERROR THEN TRY Sport.PortName = "/dev/ttyS0" Sport.Speed = "19200" Sport.Parity = 0 Sport.DataBits = "8" Sport.StopBits = "1" Sport.FlowControl = 0 Sport.Open() IF ERROR THEN Message(" Onboard Uart Comm 1 not found -- PROGRAM TERMINATING") QUIT ENDIF ENDIF END '******** Get RS232 data ******** PUBLIC SUB Sport_Read() SLEEP 0.025 TRY READ #Sport, Rx, Lof(Sport) IF ERROR THEN GOTO NoRx ENDIF IF Len(Rx) > 8 THEN ListBox1.Add(Rx) END IF NoRx: Rx = "" END PUBLIC SUB Form_Close() Sport.Close() QUIT END Regards Mike From mike.crean at ...1940... Mon Sep 21 12:44:06 2009 From: mike.crean at ...1940... (Mike) Date: Mon, 21 Sep 2009 18:44:06 +0800 Subject: [Gambas-user] serial port In-Reply-To: <68652a0b0909192320s5ac22c22h20d819dd2822ab9@...627...> References: <25518421.post@...1379...> <20090919163437.M15768@...951...> <68652a0b0909192320s5ac22c22h20d819dd2822ab9@...627...> Message-ID: <4AB758F6.8070100@...1940...> Robert JUHASZ wrote: > Useful info, I'll do like that. > Thanks, Robi > > 2009/9/19 nando > > >> In my Linux serial port experience, serial port devices are named: >> >> /dev/ttyS0..9 and upwards >> /dev/ttyUSB0..9 and upwards depending on what is plugged in USB. >> >> I have done a lot of serial port stuff with Gambas. >> >> I know that trying to open then with the serial port control >> will fail is non-exising port. This error can be detected. >> >> It can be possible to open a port as a test to see if it exists, but you >> may be changing parameters and stealing chars from an existing connection. >> I've had this happen too....really messes things up. >> >> -Fernando >> >> >> ---------- Original Message ----------- >> From: yuhej >> To: gambas-user at lists.sourceforge.net >> Sent: Fri, 18 Sep 2009 21:08:04 -0700 (PDT) >> Subject: [Gambas-user] serial port >> >> >>> Hello, >>> >>> I can see that Gambas can handle the serial ports which is a very good >>> >> news >> >>> for me. >>> Can someone tell me how can I get the list of the serial ports of my >>> computer? I wish to make an autodetect function and only allow to select >>> from the working serial ports. >>> >>> Robi >>> -- >>> View this message in context: >>> >> http://www.nabble.com/serial-port-tp25518421p25518421.html >> >>> Sent from the gambas-user mailing list archive at Nabble.com. >>> >>> >>> >> ------------------------------------------------------------------------------ >> >>> Come build with us! The BlackBerry® Developer Conference in SF, CA >>> is the only developer event you need to attend this year. Jumpstart your >>> developing skills, take BlackBerry mobile applications to market and stay >>> ahead of the curve. Join us from November 9-12, 2009. Register >>> >> now! >> >>> http://p.sf.net/sfu/devconf >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> ------- End of Original Message ------- >> >> >> >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry® Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9-12, 2009. Register now! >> http://p.sf.net/sfu/devconf >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > Is the list up. Mike From gambas at ...1... Mon Sep 21 17:16:21 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 21 Sep 2009 17:16:21 +0200 Subject: [Gambas-user] Problem with UTF-8 in Gambas-connection to MySQL In-Reply-To: <1f13ba8b0909192211g4578ed4w5d8ae7905c6ed4a7@...627...> References: <1f13ba8b0909192211g4578ed4w5d8ae7905c6ed4a7@...627...> Message-ID: <200909211716.21452.gambas@...1...> > > > (I don't know English well) > > > Use Debian 5 "Lenny" -32, Gambas 2.7 from repository. > > > > > > I develop an account program for russian users. It must work with > > > cyrillic correct. > > > I have made MySQL5 (default UTF8) database with direct CHARACTER SET > > > UTF8 option, tables with direct CHARACTER SET UTF8 option. Then > > > connected to it from gambas, output data to GridView. All string fields > > > were not readable. > > > > > > I run example "Database". It works correct with some french symbols, > > > but with cyrillic not. Program "Database manager" do the same. > > > > > > I got sources of Gambas-2.8.2. Opened main.c file of MySQL driver, > > > found function > > > <<< static int open_database(DB_DESC *desc, DB_DATABASE *db) >>>. > > > Added string > > > <<< fprintf(stderr, "Character set GB[%s] mysql[%s]\n", > > > GB.System.Charset(), mysql_character_set_name(conn)); >>> > > > before and after string > > > <<< set_character_set(db); >>>. > > > Compiled only this driver, copied it to /usr/lib/gambas2. Run my > > > program. Result: > > > <<< Character set GB[UTF-8] mysql[latin1] > > > Character set GB[UTF-8] mysql[latin1] >>> > > > in console. > > > > > > Why latin1 instead UTF-8? > > > > > > -- > > > Dima Malkov > > > > What is the value of DB.Charset just after you have connected to the > > database in Gambas? > > > > What happens if you uncheck the "use encoding" menu entry if the popup > > menu in the database manager? > > > > Can you send me your database contents, or part of it, so that I test by > > myself? > > > > -- > > Beno?t Minisini > > The value of DB.Charset just after connection to the database in > Gambas is "utf8". > > Unchecking "use encoding UTF8" menu entry has no any visible effect. > > This letter includes a ZIP archive. I created a small database by > command "CREATE DATABASE Cyrillic CHARACTER SET utf8;" in > MySQL-console. Then just created a table by command "CREATE TABLE tbl1 > (id SERIAL, word VARCHAR(20), PRIMARY KEY (id));". Inserted 5 rows in > MySQL-console, then 5 rows from the "database manager". First 5 rows > are not readable in the "database manager", and last 5 rows are not > readable in MySQL-console. > > -- > Dima Malkov > Hi, I copied your database in the mysql server directory on my own system, then I run the "mysql" utility: --------------------------------------------------------------------------- $ mysql -u root cyrillic Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 593 Server version: 5.1.34 Mandriva Linux - MySQL Standard Edition (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select * from tbl1; +----+------------------------------+ | id | word | +----+------------------------------+ | 1 | ???????? | | 2 | ?????? | | 3 | ?????? | | 4 | ???????????? | | 5 | ??????? | | 6 | ????? | | 7 | ???? | | 8 | ?????? | | 9 | ?????? | | 10 | ?????? | +----+------------------------------+ 10 rows in set (0.00 sec) mysql> --------------------------------------------------------------------------- So I got the same thing in 'mysql' than in the Gambas database manager. So I think that you didn't specify UTF-8 as default character set when entering the data from 'mysql', and that you used a Cyrillic-specific character set. But I didn't succeed in guessing what charset is used to encode the five first rows of the 'tbl1' table. Can you check that by typing "mysql --help" and look in the list of variables displayed after the help contents? You should see a "default-character-set" line. On my system, for example, 'mysql' uses utf8 by default. --------------------------------------------------------------------------- $ mysql --help mysql Ver 14.14 Distrib 5.1.34, for mandriva-linux-gnu (i586) using readline 6.0 Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. ... Variables (--variable-name=value) and boolean options {FALSE|TRUE} Value (after reading options) --------------------------------- ----------------------------- auto-rehash FALSE character-sets-dir (No default value) column-type-info FALSE comments FALSE compress FALSE ... default-character-set utf8 ... --------------------------------------------------------------------------- See http://dev.mysql.com/doc/refman/5.0/en/charset-applications.html In a few words, everything must be "UTF-8" from the beginning to the end. Not just the character set specified at database creation. Regards, -- Beno?t Minisini From horst at ...2298... Mon Sep 21 19:42:40 2009 From: horst at ...2298... (Horst =?ISO-8859-1?Q?G=FCnther?= Burkhardt III) Date: Tue, 22 Sep 2009 03:42:40 +1000 Subject: [Gambas-user] Arithmetic failure in project Message-ID: <1253554960.8056.27950.camel@...2299...> Hey everybody. I'm building a basic flash exposure calculator with floats and extremely precise arithmetic, to benefit those of us who happen to list photography among our hobbies ;) Unfortunately, I've run into several issues with the code. The foremost of which: no matter the data that is plugged in, the result is always 0. Also, my case construct for power adjustment is ... considerably failed. Attached are my .form .class and a screenshot of the result i get. Thanks in advance for all your help :) -------------- next part -------------- A non-text attachment was scrubbed... Name: FMain.class Type: application/x-java Size: 9681 bytes Desc: not available URL: -------------- next part -------------- # Gambas Form File 2.0 { Form Form MoveScaled(0,0,48,24) Background = Color.Background Text = ("Final Solution Flash Calculator") Border = Window.Fixed { din Frame MoveScaled(2,2,34,6) Text = ("Sensitivity") { din_decor Label MoveScaled(10,2,5,3) Text = ("\xC2\xB0DIN") } { asa Label MoveScaled(17,2,6,3) Text = ("25") Alignment = Align.Right } { asa_decor Label MoveScaled(24,2,9,3) Text = ("\xC2\xB0ASA/ISO") } } { input_din SpinBox MoveScaled(4,4,7,3) MinValue = 15 MaxValue = 33 } { strobe Frame MoveScaled(2,9,33,9) Text = ("Strobe Setting") { input_gn ValueBox MoveScaled(1,2,7,3) ToolTip = ("The average mean of the guide numbers of the strobes you are using. \n\nGuide numbers are in feet, at 21\xC2\xB0 (100 ASA).") MaxLength = 3 } { labelgnft Label MoveScaled(8,2,12,3) Text = ("Guide Number") } { input_power ComboBox MoveScaled(21,2,11,3) ToolTip = ("If your flashes have a power restriction setting, dial it in here.") Text = ("Power") List = [("1/1"), ("1/2"), ("1/4"), ("1/8"), ("1/16"), ("1/32"), ("1/64"), ("1/128"), ("1/256")] } { gn_feet RadioButton MoveScaled(1,5,8,3) ToolTip = ("Guide Number is set in Feet (American units)") Text = ("Feet") } { gn_metres RadioButton MoveScaled(11,5,10,3) ToolTip = ("Guide Number is set in Metres (Japanese and European units)") Text = ("Metres") } } { multi Frame MoveScaled(37,2,9,6) Text = ("Flashes") { multiflash SpinBox MoveScaled(1,2,7,3) ToolTip = ("The number of strobes you are using. ") MinValue = 1 MaxValue = 8 Value = 1 } } { target Frame MoveScaled(36,9,10,9) Text = ("Target") { input_distance ValueBox MoveScaled(1,2,8,3) ToolTip = ("Target distance in metres. ") } { label_unit Label MoveScaled(1,6,7,2) Text = ("metres") Alignment = Align.Center } } { action Button MoveScaled(2,19,10,3) Text = ("Compute!") } { labelfstop Label MoveScaled(13,19,20,3) Text = ("recommended \xC6\x92 /stop:") Alignment = Align.Right } { output_f Label MoveScaled(34,19,9,3) Text = ("\xC6\x92 / ") Alignment = Align.Center } } -------------- next part -------------- A non-text attachment was scrubbed... Name: flashcomputer-trial1.png Type: image/png Size: 7000 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part URL: From Karl.Reinl at ...9... Mon Sep 21 21:20:44 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Mon, 21 Sep 2009 21:20:44 +0200 Subject: [Gambas-user] Arithmetic failure in project In-Reply-To: <1253554960.8056.27950.camel@...2299...> References: <1253554960.8056.27950.camel@...2299...> Message-ID: <1253560844.7255.6.camel@...40...> Am Dienstag, den 22.09.2009, 03:42 +1000 schrieb Horst G?nther Burkhardt III: > Hey everybody. > > I'm building a basic flash exposure calculator with floats and extremely > precise arithmetic, to benefit those of us who happen to list > photography among our hobbies ;) > > Unfortunately, I've run into several issues with the code. > > The foremost of which: no matter the data that is plugged in, the result > is always 0. > > Also, my case construct for power adjustment is ... considerably failed. > > Attached are my .form .class and a screenshot of the result i get. > > Thanks in advance for all your help :) Salut Horst G?nther Burkhardt, please help us to help! Tell use , your version of gambas, and send us the project "Source archive" can by made by pressing CTRL +ALT+A at same time. Thanks in advance for all your help :) Charlie From jussi.lahtinen at ...626... Mon Sep 21 21:27:51 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 21 Sep 2009 22:27:51 +0300 Subject: [Gambas-user] Arithmetic failure in project In-Reply-To: <1253560844.7255.6.camel@...40...> References: <1253554960.8056.27950.camel@...2299...> <1253560844.7255.6.camel@...40...> Message-ID: <384d3900909211227n2469c384x1c45fb3975b5c8ba@...627...> I noticed some problems with your code. - Variable "guidenumber" is not set before calculate. - Change input_distance_KeyPress() --> input_distance_Change() Jussi On Mon, Sep 21, 2009 at 22:20, Charlie Reinl wrote: > Am Dienstag, den 22.09.2009, 03:42 +1000 schrieb Horst G?nther Burkhardt > III: >> Hey everybody. >> >> I'm building a basic flash exposure calculator with floats and extremely >> precise arithmetic, to benefit those of us who happen to list >> photography among our hobbies ;) >> >> Unfortunately, I've run into several issues with the code. >> >> The foremost of which: no matter the data that is plugged in, the result >> is always 0. >> >> Also, my case construct for power adjustment is ... considerably failed. >> >> Attached are my .form .class and a screenshot of the result i get. >> >> Thanks in advance for all your help :) > > Salut Horst G?nther Burkhardt, > > please help us to help! > > Tell use , your version of gambas, > and send us the project "Source archive" can by made by pressing CTRL > +ALT+A at same time. > > Thanks in advance for all your help :) > Charlie > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Mon Sep 21 21:29:49 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 21 Sep 2009 22:29:49 +0300 Subject: [Gambas-user] Arithmetic failure in project In-Reply-To: <384d3900909211227n2469c384x1c45fb3975b5c8ba@...627...> References: <1253554960.8056.27950.camel@...2299...> <1253560844.7255.6.camel@...40...> <384d3900909211227n2469c384x1c45fb3975b5c8ba@...627...> Message-ID: <384d3900909211229h4897ae35u9fcf314efc413188@...627...> - Check if variable "distance" is set before calculate. Jussi On Mon, Sep 21, 2009 at 22:27, Jussi Lahtinen wrote: > I noticed some problems with your code. > > - Variable "guidenumber" is not set before calculate. > - Change ?input_distance_KeyPress() --> input_distance_Change() > > > Jussi > > > On Mon, Sep 21, 2009 at 22:20, Charlie Reinl wrote: >> Am Dienstag, den 22.09.2009, 03:42 +1000 schrieb Horst G?nther Burkhardt >> III: >>> Hey everybody. >>> >>> I'm building a basic flash exposure calculator with floats and extremely >>> precise arithmetic, to benefit those of us who happen to list >>> photography among our hobbies ;) >>> >>> Unfortunately, I've run into several issues with the code. >>> >>> The foremost of which: no matter the data that is plugged in, the result >>> is always 0. >>> >>> Also, my case construct for power adjustment is ... considerably failed. >>> >>> Attached are my .form .class and a screenshot of the result i get. >>> >>> Thanks in advance for all your help :) >> >> Salut Horst G?nther Burkhardt, >> >> please help us to help! >> >> Tell use , your version of gambas, >> and send us the project "Source archive" can by made by pressing CTRL >> +ALT+A at same time. >> >> Thanks in advance for all your help :) >> Charlie >> >> >> >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry® Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9-12, 2009. Register now! >> http://p.sf.net/sfu/devconf >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > From 12ukwn at ...626... Mon Sep 21 21:38:09 2009 From: 12ukwn at ...626... (Jean-Yves F. Barbier) Date: Mon, 21 Sep 2009 21:38:09 +0200 Subject: [Gambas-user] Arithmetic failure in project In-Reply-To: <1253554960.8056.27950.camel@...2299...> References: <1253554960.8056.27950.camel@...2299...> Message-ID: <4AB7D621.4060902@...626...> Horst G?nther Burkhardt III a ?crit : > I'm building a basic flash exposure calculator with floats and extremely > precise arithmetic, to benefit those of us who happen to list > photography among our hobbies ;) > > Unfortunately, I've run into several issues with the code. > > The foremost of which: no matter the data that is plugged in, the result > is always 0. > > Also, my case construct for power adjustment is ... considerably failed. > > Attached are my .form .class and a screenshot of the result i get. unusable, send the whole project instead. Your example isn't relevant: @53m with a 25ASA film and a 50mm, you'll need many more than 8 flash lights to get the amount of light required. (or a diaf @... 0.5) As far as I see, it may be result that is cast into an integer instead of a float, use float everywhere to see. Also you must recompute the NG if you don't have walls that reflect the flash light(s) and if the reflexion coeff is different from 18% (NG base computation conditions & K). JY -- Ankh if you love Isis. From message at ...2228... Tue Sep 22 18:16:47 2009 From: message at ...2228... (Dan Sheffner) Date: Tue, 22 Sep 2009 11:16:47 -0500 Subject: [Gambas-user] listBox loop selected In-Reply-To: References: Message-ID: Never mind I found it. '----------------------------- --------------------------------------------------------------------------- PUBLIC FUNCTION multipleSelections(targetLB AS ListBox) AS String DIM targetCount AS Integer DIM foundSelected AS Integer DIM Res AS String targetCount = 0 foundSelected = 0 DO WHILE targetCount < targetLB.Count IF targetLB[targetCount].selected = TRUE THEN Res &= targetLB[targetCount].Text & "|" INC foundSelected ENDIF INC targetCount LOOP IF foundSelected = 0 THEN RETURN "Nothing found" ELSE RETURN Left(Res, Len(Res) - 1) ENDIF END '-------------------------------------------------------------------------------------------------------- On Tue, Sep 22, 2009 at 11:06 AM, Dan Sheffner wrote: > I want all selected values from the listBox. > > > On Tue, Sep 22, 2009 at 11:04 AM, Dan Sheffner wrote: > >> Can someone please give me the code to loop through a listBox and put all >> values into a string array? >> >> I would think this would be very straight forward but I'm having a very >> hard time finding any documentation on this or an examples. >> >> Thanks in advance. >> >> ~Dan >> > > From message at ...2228... Tue Sep 22 18:04:21 2009 From: message at ...2228... (Dan Sheffner) Date: Tue, 22 Sep 2009 11:04:21 -0500 Subject: [Gambas-user] listBox loop selected Message-ID: Can someone please give me the code to loop through a listBox and put all values into a string array? I would think this would be very straight forward but I'm having a very hard time finding any documentation on this or an examples. Thanks in advance. ~Dan From message at ...2228... Tue Sep 22 18:06:52 2009 From: message at ...2228... (Dan Sheffner) Date: Tue, 22 Sep 2009 11:06:52 -0500 Subject: [Gambas-user] listBox loop selected In-Reply-To: References: Message-ID: I want all selected values from the listBox. On Tue, Sep 22, 2009 at 11:04 AM, Dan Sheffner wrote: > Can someone please give me the code to loop through a listBox and put all > values into a string array? > > I would think this would be very straight forward but I'm having a very > hard time finding any documentation on this or an examples. > > Thanks in advance. > > ~Dan > From vkan53 at ...2300... Tue Sep 22 21:13:36 2009 From: vkan53 at ...2300... (Vassilis K) Date: Tue, 22 Sep 2009 22:13:36 +0300 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. Message-ID: <200909222213.36919.vkan53@...2300...> Hello, I want to print one line each time in order to keep the entrance book of a little hotel. I want to print one line each time. How can I do it? With SHELL command it can only print files. I have tried: SHELL "lp1 tEpitheto.Text" WAIT (where tEpitheto.Text is the text I want to print) but it doesn't work! I also want to print a reciept form directly to a second printer at lp0 I know that I can do it with : Draw.Begin(Printer) Draw.Text(tEpitheto.Text & " " & tOnoma.Text & " " & tEthnikotita.Text, 200, 200) Draw.End But is this normal to print with Draw.Begin(Printer) ? What will happen if I change the lp ports? Is there any other way to print directly to a port like Draw.Begin(lp0)? Vassilis Kanatas From gambas at ...1... Tue Sep 22 21:52:37 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 22 Sep 2009 21:52:37 +0200 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <200909222213.36919.vkan53@...2300...> References: <200909222213.36919.vkan53@...2300...> Message-ID: <200909222152.37085.gambas@...1...> > Hello, > > I want to print one line each time in order to keep the entrance book of a > little hotel. > I want to print one line each time. > How can I do it? > With SHELL command it can only print files. > I have tried: > > SHELL "lp1 tEpitheto.Text" WAIT > > (where tEpitheto.Text is the text I want to print) > > but it doesn't work! > What kind of printer do you use? I'm afraid that only old printers with pins is able to do that. If you have such one, you can bypass the printing system and sends your characters directly to /dev/lp0. > I also want to print a reciept form directly to a second printer at lp0 > I know that I can do it with : > > Draw.Begin(Printer) > Draw.Text(tEpitheto.Text & " " & tOnoma.Text & " " & tEthnikotita.Text, > 200, 200) > Draw.End > > But is this normal to print with Draw.Begin(Printer) ? What will happen if > I change the lp ports? Is there any other way to print directly to a port > like Draw.Begin(lp0)? Draw.Begin(Printer) ... Draw.End actually generates a postscript file that is sent then to the printing system. Only him knows how to transform the ps file into something that the printer will understand, how to send the data to the printer, and on which device. Regards, -- Beno?t Minisini From m0e.lnx at ...626... Tue Sep 22 22:55:24 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Tue, 22 Sep 2009 15:55:24 -0500 Subject: [Gambas-user] Passive wait ??? Message-ID: <1f1e8c1b0909221355j1bb8e0a1vbcfcea8dfd71af5@...627...> I'm trying to implement soft of a "status bar" on my application. When certain actions are performed, I want to display the successful results on this status bar, rather than a pop-up message. This is an attempt to reduce the number of clicks necessary (get annoying after a while). So I thought, to accomplish this, I can add a text label a the bottom of my form, and use it as a status bar. When a task is performed succesffully, I want it to display the message for 5 seconds and then clear the status bar, so I thogh tlStatusLbl.text = "Task succeeded" wait 5 tlStatusLbl.text = "" And that works, except that while it's in that WAIT loop, the whole app lags, and the app doesn't move or refresh until the wait period is over. Does anyone know a way to send this wait to the background or another way to implement this behaviour? From david_villalobos_c at ...43... Tue Sep 22 23:41:46 2009 From: david_villalobos_c at ...43... (David Villalobos Cambronero) Date: Tue, 22 Sep 2009 14:41:46 -0700 (PDT) Subject: [Gambas-user] Passive wait ??? In-Reply-To: <1f1e8c1b0909221355j1bb8e0a1vbcfcea8dfd71af5@...627...> References: <1f1e8c1b0909221355j1bb8e0a1vbcfcea8dfd71af5@...627...> Message-ID: <27656.66829.qm@...1656...> What about using MessageLabel? Regards -- David ----- Original Message ---- From: M0E Lnx To: mailing list for gambas users Sent: Tuesday, September 22, 2009 2:55:24 PM Subject: [Gambas-user] Passive wait ??? I'm trying to implement soft of a "status bar" on my application. When certain actions are performed, I want to display the successful results on this status bar, rather than a pop-up message. This is an attempt to reduce the number of clicks necessary (get annoying after a while). So I thought, to accomplish this, I can add a text label a the bottom of my form, and use it as a status bar. When a task is performed succesffully, I want it to display the message for 5 seconds and then clear the status bar, so I thogh tlStatusLbl.text = "Task succeeded" wait 5 tlStatusLbl.text = "" And that works, except that while it's in that WAIT loop, the whole app lags, and the app doesn't move or refresh until the wait period is over. Does anyone know a way to send this wait to the background or another way to implement this behaviour? ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas at ...1... Tue Sep 22 23:48:09 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 22 Sep 2009 23:48:09 +0200 Subject: [Gambas-user] Passive wait ??? In-Reply-To: <1f1e8c1b0909221355j1bb8e0a1vbcfcea8dfd71af5@...627...> References: <1f1e8c1b0909221355j1bb8e0a1vbcfcea8dfd71af5@...627...> Message-ID: <200909222348.09476.gambas@...1...> > I'm trying to implement soft of a "status bar" on my application. > When certain actions are performed, I want to display the successful > results on this status bar, rather than a pop-up message. This is an > attempt to reduce the number of clicks necessary (get annoying after a > while). > > So I thought, to accomplish this, I can add a text label a the bottom > of my form, and use it as a status bar. > When a task is performed succesffully, I want it to display the > message for 5 seconds and then clear the status bar, so I thogh > > tlStatusLbl.text = "Task succeeded" > wait 5 Why waiting for five seconds? Just use WAIT. -- Beno?t Minisini From gambas at ...1... Wed Sep 23 00:05:47 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 23 Sep 2009 00:05:47 +0200 Subject: [Gambas-user] Passive wait ??? In-Reply-To: <200909222348.09476.gambas@...1...> References: <1f1e8c1b0909221355j1bb8e0a1vbcfcea8dfd71af5@...627...> <200909222348.09476.gambas@...1...> Message-ID: <200909230005.47382.gambas@...1...> > > I'm trying to implement soft of a "status bar" on my application. > > When certain actions are performed, I want to display the successful > > results on this status bar, rather than a pop-up message. This is an > > attempt to reduce the number of clicks necessary (get annoying after a > > while). > > > > So I thought, to accomplish this, I can add a text label a the bottom > > of my form, and use it as a status bar. > > When a task is performed succesffully, I want it to display the > > message for 5 seconds and then clear the status bar, so I thogh > > > > tlStatusLbl.text = "Task succeeded" > > wait 5 > > Why waiting for five seconds? Just use WAIT. > Sorry: ...and starts a timer to clear the status five seconds later. -- Beno?t Minisini From m0e.lnx at ...626... Wed Sep 23 01:28:30 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Tue, 22 Sep 2009 18:28:30 -0500 Subject: [Gambas-user] Passive wait ??? In-Reply-To: <200909230005.47382.gambas@...1...> References: <1f1e8c1b0909221355j1bb8e0a1vbcfcea8dfd71af5@...627...> <200909222348.09476.gambas@...1...> <200909230005.47382.gambas@...1...> Message-ID: <1f1e8c1b0909221628n1f92db1aw291fc7e4a05e2c3e@...627...> Never heard of a statuslabel before... but yes... I need it to clear after 5 seconds On Sep 22, 2009 5:07 PM, "Beno?t Minisini" wrote: > > I'm trying to implement soft of a "status bar" on my application. > > When certain actions are p... Sorry: ...and starts a timer to clear the status five seconds later. -- Beno?t Minisini ------------------------------------------------------------------------------... From 12ukwn at ...626... Wed Sep 23 04:22:20 2009 From: 12ukwn at ...626... (Jean-Yves F. Barbier) Date: Wed, 23 Sep 2009 04:22:20 +0200 Subject: [Gambas-user] chop project Message-ID: <4AB9865C.6090301@...626...> Hi people, I wonder if it is possible to chop a big project into some smaller ones? My only problem is to keep a kinda global class linked to all sub-projects in oder to "pass" parms from one sub-project to another; is there a manner to do that or not? JY -- Life is like an onion: you peel it off one layer at a time, and sometimes you weep. -- Carl Sandburg From dosida at ...626... Wed Sep 23 07:19:26 2009 From: dosida at ...626... (Dimitris Anogiatis) Date: Tue, 22 Sep 2009 23:19:26 -0600 Subject: [Gambas-user] chop project In-Reply-To: <4AB9865C.6090301@...626...> References: <4AB9865C.6090301@...626...> Message-ID: <82bffccf0909222219i33d406cct4f91a2ae390cac81@...627...> Hey JY, One approach would be to create a main message-passing class, and link the sub-projects to that class passing messages through a common set of properties and methods Another approach is to create the sub-projects with a class of common properties and methods that pass the message from one sub-project to the other. The tricky part would be to dynamically load that sub-project in your main project, effectivelly creating a sort of plugin. I hope this helps Regards Dimitris On Tue, Sep 22, 2009 at 8:22 PM, Jean-Yves F. Barbier <12ukwn at ...626...>wrote: > Hi people, > > I wonder if it is possible to chop a big project into some smaller ones? > > My only problem is to keep a kinda global class linked to all sub-projects > in oder to "pass" parms from one sub-project to another; is there a manner > to do that or not? > > JY > -- > Life is like an onion: you peel it off one layer at a time, and sometimes > you weep. -- Carl Sandburg > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From oceanosoftlapalma at ...626... Wed Sep 23 10:42:12 2009 From: oceanosoftlapalma at ...626... (=?ISO-8859-1?Q?Ricardo_D=EDaz_Mart=EDn?=) Date: Wed, 23 Sep 2009 09:42:12 +0100 Subject: [Gambas-user] Passive wait ??? In-Reply-To: <1f1e8c1b0909221628n1f92db1aw291fc7e4a05e2c3e@...627...> References: <1f1e8c1b0909221355j1bb8e0a1vbcfcea8dfd71af5@...627...> <200909222348.09476.gambas@...1...> <200909230005.47382.gambas@...1...> <1f1e8c1b0909221628n1f92db1aw291fc7e4a05e2c3e@...627...> Message-ID: I think you need to use a Timer control inside the form to control your status bar message. It's simple to use. Regards, Ricardo D?az 2009/9/23 M0E Lnx > Never heard of a statuslabel before... but yes... I need it to clear after > 5 > seconds > > On Sep 22, 2009 5:07 PM, "Beno?t Minisini" > wrote: > > > > I'm trying to implement soft of a "status bar" on my application. > > > When certain actions are p... > Sorry: ...and starts a timer to clear the status five seconds later. > > -- Beno?t Minisini > > ------------------------------------------------------------------------------... > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From Karl.Reinl at ...9... Wed Sep 23 11:13:56 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Wed, 23 Sep 2009 11:13:56 +0200 Subject: [Gambas-user] chop project In-Reply-To: <4AB9865C.6090301@...626...> References: <4AB9865C.6090301@...626...> Message-ID: <1253697236.7760.18.camel@...40...> Am Mittwoch, den 23.09.2009, 04:22 +0200 schrieb Jean-Yves F. Barbier: > Hi people, > > I wonder if it is possible to chop a big project into some smaller ones? > > My only problem is to keep a kinda global class linked to all sub-projects > in oder to "pass" parms from one sub-project to another; is there a manner > to do that or not? > > JY Salut Jean-Yves, Poseidon the father of gambas, raised gambas-components for that. And that is what I do. My programs are compiled as components, so I can use them as program, embed then in other programs or just call them from an other program. To unify the args[], all these programs have a String[]Array PROPERTY called CallingArgs[] in which I fill at start up the Application.Args. Now I can overwrite it at the caller. Here an Example. PUBLIC SUB btnPrint_Click() DIM args AS String[] DIM $TheCalledTwo AS FViewer IF NOT IsNull($TheCalledTwo) THEN $TheCalledTwo.close() $TheCalledTwo = NEW FViewer <-- calling the FViewer-Component which has a Form and can be called 'txtFile.Text TRY $TheCalledTwo.CallingArgs.Clear() args = gettingArgusPreview() $TheCalledTwo.CallingArgs = args <-- filling the args[] $TheCalledTwo.Show <-- and make visible END Have fun Charlie From rterry at ...1946... Wed Sep 23 11:19:44 2009 From: rterry at ...1946... (richard terry) Date: Wed, 23 Sep 2009 19:19:44 +1000 Subject: [Gambas-user] Using SVN in gambas question Message-ID: <200909231919.44497.rterry@...1946...> I'm writing some documentation for my project. When I created it from svn, I did it via the gambas gui interface, not by using the terminal as one would for example by typing svn checkout svn://project/trunk. I wondered if it is possible to do a manual checkout of an svn project and then load it from the gambas IDE (which of course one can) but will the IDE then treat the project like a svn project and allow the usual updates and commits? Hope this is not ambiguous. Regards Richard From vkan53 at ...2300... Wed Sep 23 11:46:43 2009 From: vkan53 at ...2300... (Vassilis K) Date: Wed, 23 Sep 2009 12:46:43 +0300 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. Message-ID: <200909231246.43359.vkan53@...2300...> I have an 9 pins printer for this job. If I understood well I have to make a file with the line that I want to print then I shall use the SHELL command to send it directly to the printer lp1: SHELL lp -d lpt2 printfile.ps I need a small example to get it to work. I also need the printer to feed one line per time. Is this possible? From doriano.blengino at ...1909... Wed Sep 23 12:11:14 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Wed, 23 Sep 2009 12:11:14 +0200 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <200909231246.43359.vkan53@...2300...> References: <200909231246.43359.vkan53@...2300...> Message-ID: <4AB9F442.1030106@...1909...> Vassilis K ha scritto: > I have an 9 pins printer for this job. > > If I understood well I have to make a file with the line that I want to print > then I shall use the SHELL command to send it directly to the printer lp1: > > SHELL lp -d lpt2 printfile.ps > > I need a small example to get it to work. > I also need the printer to feed one line per time. Is this possible? > If you printer has a 9 pin DB connector, then it could be a serial printer. If so, check out its manual, and determine the communication parameters; set up the serial port used to communicate to it (within gambas), then send every line you want to print to that serial port, followed by a CR and a LF: chr$(13) and chr$(10). Using SHELL and /bin/lp is perhaps more simple but far less versatile and very slow (for what it can count speaking about printers...). /bin/lp (or /usr/bin/lp) is intended for a higher level usage, and it could be difficult to explain to it that you *don't* want to eject a page, you *don't* want to print if the printer is off-line, you *don't* want a banner and so on. By sending special characters and/or escape sequences you can take advantage of some printer features (may be your printer has a cutter, or other equipment). Probably it can do also graphics, barcode and more, but this is more difficult. Regards, Doriano From rospolosco at ...152... Wed Sep 23 12:24:17 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Wed, 23 Sep 2009 12:24:17 +0200 Subject: [Gambas-user] signal #11 Message-ID: <200909231224.18043.rospolosco@...152...> This code stopped with signal #11: ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, PUBLIC SUB Main() DIM sHostname, sDisplay AS String DIM sClipboardLastEntry AS String SHELL "hostname" TO sHostname SHELL "xdpyinfo | head -1 | awk '{print $4}'" TO sDisplay sDisplay = Trim$(sHostname) & Trim$(sDisplay) sClipboardLastEntry = XInternAtom(sDisplay, "PRIMARY", FALSE) END EXTERN XInternAtom(sDisplay AS String, sAtom AS String, boolValue AS Boolean) AS String IN "libX11" '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' I'm trying to use XInternAtom function, but I'm not able. This code stops with error #11. Any help appreciated for making it work. Thanks. Saluti, Stefano From m0e.lnx at ...626... Wed Sep 23 13:36:37 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Wed, 23 Sep 2009 06:36:37 -0500 Subject: [Gambas-user] Using SVN in gambas question In-Reply-To: <200909231919.44497.rterry@...1946...> References: <200909231919.44497.rterry@...1946...> Message-ID: <1f1e8c1b0909230436l61b6c9bdlba9ad4f56ad1b4f5@...627...> I have always created the project without the subversion option enabled. The added the project to the svn repo. after that, then you open the project with the gambas ide you can commit and update using the gui. Always worked for me On Sep 23, 2009 4:23 AM, "richard terry" wrote: I'm writing some documentation for my project. When I created it from svn, I did it via the gambas gui interface, not by using the terminal as one would for example by typing svn checkout svn://project/trunk. I wondered if it is possible to do a manual checkout of an svn project and then load it from the gambas IDE (which of course one can) but will the IDE then treat the project like a svn project and allow the usual updates and commits? Hope this is not ambiguous. Regards Richard ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From 12ukwn at ...626... Wed Sep 23 13:44:28 2009 From: 12ukwn at ...626... (Jean-Yves F. Barbier) Date: Wed, 23 Sep 2009 13:44:28 +0200 Subject: [Gambas-user] chop project In-Reply-To: <1253697236.7760.18.camel@...40...> References: <4AB9865C.6090301@...626...> <1253697236.7760.18.camel@...40...> Message-ID: <4ABA0A1C.8030401@...626...> Charlie Reinl a ?crit : > Salut Jean-Yves, > > Poseidon the father of gambas, raised gambas-components for that. > > And that is what I do. My programs are compiled as components, so I can > use them as program, embed then in other programs or just call them from > an other program. > > To unify the args[], all these programs have a String[]Array PROPERTY > called CallingArgs[] in which I fill at start up the Application.Args. > Now I can overwrite it at the caller. > > Here an Example. > > PUBLIC SUB btnPrint_Click() > DIM args AS String[] > DIM $TheCalledTwo AS FViewer > IF NOT IsNull($TheCalledTwo) THEN $TheCalledTwo.close() > $TheCalledTwo = NEW FViewer <-- calling the FViewer-Component which > has a Form and can be called > 'txtFile.Text > TRY $TheCalledTwo.CallingArgs.Clear() > args = gettingArgusPreview() > $TheCalledTwo.CallingArgs = args <-- filling the args[] > $TheCalledTwo.Show <-- and make visible > END > > Have fun > Charlie Thanks Charlie, I think I've got my solution -- The most difficult thing about surviving AIDS is trying to convince your parents that you're Haitian. From ulusoyab at ...43... Wed Sep 23 14:00:56 2009 From: ulusoyab at ...43... (abdurrahman ulusoy) Date: Wed, 23 Sep 2009 05:00:56 -0700 (PDT) Subject: [Gambas-user] =?utf-8?q?=C4=B0lt=3A_Button_form?= Message-ID: <484115.97977.qm@...2264...> Can i change button forms? like attached pic. ___________________________________________________________________ Yahoo! T?rkiye a??ld?! http://yahoo.com.tr ?nternet ?zerindeki en iyi i?eri?i Yahoo! T?rkiye sizlere sunuyor! -------------- next part -------------- A non-text attachment was scrubbed... Name: buttonform.png Type: image/png Size: 1283 bytes Desc: not available URL: From gambas at ...1... Wed Sep 23 14:29:08 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 23 Sep 2009 14:29:08 +0200 Subject: [Gambas-user] signal #11 In-Reply-To: <200909231224.18043.rospolosco@...152...> References: <200909231224.18043.rospolosco@...152...> Message-ID: <200909231429.08659.gambas@...1...> > This code stopped with signal #11: > > ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, > ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, PUBLIC SUB Main() > > DIM sHostname, sDisplay AS String > DIM sClipboardLastEntry AS String > > SHELL "hostname" TO sHostname > SHELL "xdpyinfo | head -1 | awk '{print $4}'" TO sDisplay > > sDisplay = Trim$(sHostname) & Trim$(sDisplay) > > sClipboardLastEntry = XInternAtom(sDisplay, "PRIMARY", FALSE) > > END > > EXTERN XInternAtom(sDisplay AS String, sAtom AS String, boolValue AS > Boolean) AS String IN "libX11" > ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' > ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' > > I'm trying to use XInternAtom function, but I'm not able. This code stops > with error #11. Any help appreciated for making it work. Thanks. > > Saluti, > > Stefano > > The first argument of XInternAtom is a pointer to the display, not a string. You get a pointer to the display when you connect to the X11 server. I don't know how to get it after that (as when your code starts, the connection is already done). Regards, -- Beno?t Minisini From rospolosco at ...152... Wed Sep 23 16:29:43 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Wed, 23 Sep 2009 16:29:43 +0200 Subject: [Gambas-user] signal #11 In-Reply-To: <200909231429.08659.gambas@...1...> References: <200909231224.18043.rospolosco@...152...> <200909231429.08659.gambas@...1...> Message-ID: <200909231629.44116.rospolosco@...152...> Il mercoled? 23 settembre 2009 14:29:08 Beno?t Minisini ha scritto: > > This code stopped with signal #11: > > > > ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, > >,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, PUBLIC SUB Main() > > > > DIM sHostname, sDisplay AS String > > DIM sClipboardLastEntry AS String > > > > SHELL "hostname" TO sHostname > > SHELL "xdpyinfo | head -1 | awk '{print $4}'" TO sDisplay > > > > sDisplay = Trim$(sHostname) & Trim$(sDisplay) > > > > sClipboardLastEntry = XInternAtom(sDisplay, "PRIMARY", FALSE) > > > > END > > > > EXTERN XInternAtom(sDisplay AS String, sAtom AS String, boolValue AS > > Boolean) AS String IN "libX11" > > ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' > >'' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' > > > > I'm trying to use XInternAtom function, but I'm not able. This code stops > > with error #11. Any help appreciated for making it work. Thanks. > > > > Saluti, > > > > Stefano > > The first argument of XInternAtom is a pointer to the display, not a > string. You get a pointer to the display when you connect to the X11 > server. > > I don't know how to get it after that (as when your code starts, the > connection is already done). > > Regards, Thank you for explanation. Stefano From vkan53 at ...2300... Wed Sep 23 16:54:08 2009 From: vkan53 at ...2300... (Vassilis K) Date: Wed, 23 Sep 2009 17:54:08 +0300 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <200909231246.43359.vkan53@...2300...> References: <200909231246.43359.vkan53@...2300...> Message-ID: <200909231754.08396.vkan53@...2300...> Actually it is a serial matrix impact printer (panasonic KX-P1150) with a 9 pins head and parallel port (LTP) So I think it is only possible to print with Shell command like SHELL lp -d ltp2 printfile.ps I only need an example for this action. If somebody has done it before it would be nice to know how. I want to print one line each time without paper feeding. Only one line feed on every action. In Visual Basic 6 this command was: Open "LPT3" For Output As #8 Print #8, "Hello World" Close #8 The result was: Hello World with page feed. The printer only feeded the current line. From demosthenesk at ...626... Wed Sep 23 17:18:03 2009 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 23 Sep 2009 18:18:03 +0300 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <200909231754.08396.vkan53@...2300...> References: <200909231246.43359.vkan53@...2300...> <200909231754.08396.vkan53@...2300...> Message-ID: try also cat file > /dev/lp0 or echo "test" > /dev/lp0 did i help you? On Wed, Sep 23, 2009 at 5:54 PM, Vassilis K wrote: > Actually it is a serial matrix impact printer (panasonic KX-P1150) with a 9 > pins head and parallel port (LTP) > So I think it is only possible to print with Shell command like > > SHELL lp -d ltp2 printfile.ps > > I only need an example for this action. If somebody has done it before it > would be nice to know how. > I want to print one line each time without paper feeding. Only one line feed > on every action. > In Visual Basic 6 this command was: > > Open "LPT3" For Output As #8 > ? ? ? ? ? ?Print #8, "Hello World" > ?Close #8 > > The result was: > > Hello World > > with page feed. The printer only feeded the current line. > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From vkan53 at ...2300... Wed Sep 23 17:54:09 2009 From: vkan53 at ...2300... (Vassilis K) Date: Wed, 23 Sep 2009 18:54:09 +0300 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <200909231246.43359.vkan53@...2300...> References: <200909231246.43359.vkan53@...2300...> Message-ID: <200909231854.09150.vkan53@...2300...> I do not understand how exactly to use : cat file > /dev/lp0 or echo "test" > /dev/lp0 Could you be more specific? ????????? ?????????! Thanks Demosthenis! From doriano.blengino at ...1909... Wed Sep 23 17:55:16 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Wed, 23 Sep 2009 17:55:16 +0200 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <200909231754.08396.vkan53@...2300...> References: <200909231246.43359.vkan53@...2300...> <200909231754.08396.vkan53@...2300...> Message-ID: <4ABA44E4.6080801@...1909...> Vassilis K ha scritto: > Actually it is a serial matrix impact printer (panasonic KX-P1150) with a 9 > pins head and parallel port (LTP) > Just because the printer is like this, you *don't* need to use a SHELL. It can be simpler, however. The device /dev/lp0 is what the name says: "Line Printer" (and I underline *line*...). The parallel interface is much more simple than the serial one; at least, it does not have a baudrate. > So I think it is only possible to print with Shell command like > > SHELL lp -d ltp2 printfile.ps > ...if you want the whole page ejected, perhaps a banner, a print queue with retries, then do so. > I only need an example for this action. If somebody has done it before it > would be nice to know how. > I want to print one line each time without paper feeding. Only one line feed > on every action. > In Visual Basic 6 this command was: > > Open "LPT3" For Output As #8 > Print #8, "Hello World" > Close #8 > > The result was: > > Hello World > > with page feed. The printer only feeded the current line. > hPrinter = open "/dev/lp0" for output hPrinter.EndOfLine = gb.Windows ' not really, but the printer requires CR-LF PRINT #hFile, "test a line: "; ' does not create a new line because of the semicolon PRINT #hFile, "this is a test" ' goes to the next line PRINT #hFile, chr$(12); ' chances are that this line ejects a page CLOSE hPrinter ' don't forget to close as you are done If you have two printers, then you can use /dev/lp0 for the first and /dev/lp1 for the second. Regards, Doriano From leemcpherson at ...626... Wed Sep 23 18:05:35 2009 From: leemcpherson at ...626... (Lee McPherson) Date: Wed, 23 Sep 2009 12:05:35 -0400 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <200909222213.36919.vkan53@...2300...> References: <200909222213.36919.vkan53@...2300...> Message-ID: <4ABA474F.1030609@...626...> One alternative is to use the program parashell Software: http://parashell.sourceforge.net/ Docs: http://parashell.sourceforge.net/docs/parallel.txt Apparently, all you need to do is send it byte commands. (and you need root access) I bet that would be much easier if it works as advertised. -Lee From doriano.blengino at ...1909... Wed Sep 23 19:04:04 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Wed, 23 Sep 2009 19:04:04 +0200 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <4ABA474F.1030609@...626...> References: <200909222213.36919.vkan53@...2300...> <4ABA474F.1030609@...626...> Message-ID: <4ABA5504.6060707@...1909...> Lee McPherson ha scritto: > One alternative is to use the program parashell > > Software: http://parashell.sourceforge.net/ > > Docs: http://parashell.sourceforge.net/docs/parallel.txt > > Apparently, all you need to do is send it byte commands. (and you need > root access) I bet that would be much easier if it works as advertised. > Nice, but don't depict this problem (a printer attached to a computer) as more difficult than it really is. It is possible to do an: echo -e "Hello world\r" >/dev/lp0 or PRINT #hPrinter, "Hello world" the kernel driver for parallel port already does everything we need (to make a normal printer work) - why point out difficult (and useless) things? And, to better reply to Vassilis about cat and echo: cat file > /dev/lp0 /bin/cat is a Unix command, which takes the content of a file and send it, in this case, to the first parallel printer. You can open a terminal, and type: cat /etc/passwd >/dev/lp0 to dump the contents of /etc/passwd to the printer. It will work, not very well though... echo "test" > /dev/lp0 /bin/echo is another Unix command which sends data somewhere. The data is taken directly from the command line, not a file. In this example... guess where "test" is dumped to? These two commands will work, at least at a certain degree, if your hardware is OK and your linux kernel correctly manages printer ports. Two modules named "lp" and "parport" should be present and loaded for this. If it is not done automatically, try to modprobe parport modprobe lp (or "su modprobe blah blah blah blah"). If you don't know what cat, echo, modprobe, shell are, then read a good Unix/Linux book. Regards, Doriano From leemcpherson at ...626... Wed Sep 23 21:20:52 2009 From: leemcpherson at ...626... (Lee McPherson) Date: Wed, 23 Sep 2009 15:20:52 -0400 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <4ABA5504.6060707@...1909...> References: <200909222213.36919.vkan53@...2300...> <4ABA474F.1030609@...626...> <4ABA5504.6060707@...1909...> Message-ID: <4ABA7514.7060808@...626...> Doriano Blengino wrote: > Lee McPherson ha scritto: > >> One alternative is to use the program parashell >> >> Software: http://parashell.sourceforge.net/ >> >> Docs: http://parashell.sourceforge.net/docs/parallel.txt >> >> Apparently, all you need to do is send it byte commands. (and you need >> root access) I bet that would be much easier if it works as advertised. >> >> > Nice, but don't depict this problem (a printer attached to a computer) > as more difficult than it really is. > It is possible to do an: > > echo -e "Hello world\r" >/dev/lp0 > > or > > PRINT #hPrinter, "Hello world" > > the kernel driver for parallel port already does everything we need (to > make a normal printer work) - why point out difficult (and useless) things? > > And, to better reply to Vassilis about cat and echo: > > cat file > /dev/lp0 > > /bin/cat is a Unix command, which takes the content of a file and send it, in this case, to the first parallel printer. You can open a terminal, and type: > > cat /etc/passwd >/dev/lp0 > > to dump the contents of /etc/passwd to the printer. It will work, not very well though... > > echo "test" > /dev/lp0 > > /bin/echo is another Unix command which sends data somewhere. The data is taken directly from the command line, not a file. In this example... guess where "test" is dumped to? > > These two commands will work, at least at a certain degree, if your hardware is OK and your linux kernel correctly manages printer ports. Two modules named "lp" and "parport" should be present and loaded for this. If it is not done automatically, try to > > modprobe parport > modprobe lp > > (or "su modprobe blah blah blah blah"). If you don't know what cat, echo, modprobe, shell are, then read a good Unix/Linux book. > > Regards, > Doriano > > Sorry, don't know where my head was. Your way is much, much simpler. The prog I found just takes the ASCII input method out for users who want to drive circuits of specific pins of the parallel port. From m0e.lnx at ...626... Wed Sep 23 21:35:11 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Wed, 23 Sep 2009 14:35:11 -0500 Subject: [Gambas-user] Passive wait ??? In-Reply-To: References: <1f1e8c1b0909221355j1bb8e0a1vbcfcea8dfd71af5@...627...> <200909222348.09476.gambas@...1...> <200909230005.47382.gambas@...1...> <1f1e8c1b0909221628n1f92db1aw291fc7e4a05e2c3e@...627...> Message-ID: <1f1e8c1b0909231235n2e6e9c19l40d4a7dd6d783ff@...627...> Timer seems to do the trick Just to be sure though.. 5 seconds = 5000 miliseconds? Can somebody verify that for me? From leemcpherson at ...626... Wed Sep 23 21:45:03 2009 From: leemcpherson at ...626... (Lee McPherson) Date: Wed, 23 Sep 2009 15:45:03 -0400 Subject: [Gambas-user] Passive wait ??? In-Reply-To: <1f1e8c1b0909231235n2e6e9c19l40d4a7dd6d783ff@...627...> References: <1f1e8c1b0909221355j1bb8e0a1vbcfcea8dfd71af5@...627...> <200909222348.09476.gambas@...1...> <200909230005.47382.gambas@...1...> <1f1e8c1b0909221628n1f92db1aw291fc7e4a05e2c3e@...627...> <1f1e8c1b0909231235n2e6e9c19l40d4a7dd6d783ff@...627...> Message-ID: <4ABA7ABF.4090409@...626...> Yes M0E Lnx wrote: > Timer seems to do the trick > > Just to be sure though.. > 5 seconds = 5000 miliseconds? > Can somebody verify that for me? > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From m0e.lnx at ...626... Wed Sep 23 21:50:53 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Wed, 23 Sep 2009 14:50:53 -0500 Subject: [Gambas-user] Passive wait ??? In-Reply-To: <4ABA7ABF.4090409@...626...> References: <1f1e8c1b0909221355j1bb8e0a1vbcfcea8dfd71af5@...627...> <200909222348.09476.gambas@...1...> <200909230005.47382.gambas@...1...> <1f1e8c1b0909221628n1f92db1aw291fc7e4a05e2c3e@...627...> <1f1e8c1b0909231235n2e6e9c19l40d4a7dd6d783ff@...627...> <4ABA7ABF.4090409@...626...> Message-ID: <1f1e8c1b0909231250t22380d46s11f47f89d406f990@...627...> Great. Thank you. This takes care of what I needed to do On Sep 23, 2009 2:47 PM, "Lee McPherson" wrote: Yes M0E Lnx wrote: > Timer seems to do the trick > > Just to be sure though.. > 5 seconds = 5000 milise... > ------------------------------------------------------------------------------ > Come build with u... From ulusoyab at ...43... Wed Sep 23 22:19:29 2009 From: ulusoyab at ...43... (abdurrahman ulusoy) Date: Wed, 23 Sep 2009 13:19:29 -0700 (PDT) Subject: [Gambas-user] Yan: Button form In-Reply-To: <484115.97977.qm@...2264...> Message-ID: <87503.95233.qm@...2247...> ok. maybe a circle or other form but rectangle. --- 23/09/09 ?ar tarihinde abdurrahman ulusoy ??yle yaz?yor: Kimden: abdurrahman ulusoy Konu: [Gambas-user] ?lt: Button form Kime: gambas-user at lists.sourceforge.net Tarihi: 23 Eyl?l 2009 ?ar?amba, 15:00 Can i change button forms? like attached pic. ? ? ? ___________________________________________________________________ Yahoo! T?rkiye a??ld?!? http://yahoo.com.tr ?nternet ?zerindeki en iyi i?eri?i Yahoo! T?rkiye sizlere sunuyor! -----Sat?r ??i Eki Var----- ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf -----Sat?r ??i Eki Var----- _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user ___________________________________________________________________ Yahoo! T?rkiye a??ld?! http://yahoo.com.tr ?nternet ?zerindeki en iyi i?eri?i Yahoo! T?rkiye sizlere sunuyor! From demosthenesk at ...626... Thu Sep 24 00:26:13 2009 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Thu, 24 Sep 2009 01:26:13 +0300 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <200909231854.09150.vkan53@...2300...> References: <200909231246.43359.vkan53@...2300...> <200909231854.09150.vkan53@...2300...> Message-ID: these are shell commands, cat and echo cat shows the contents of a file and echo print a string in screen we use redirection which is > to a device printer /dev/lp0 or lp1 or lp2 see what is your printer To print a file you can write in shell or in gambas SHELL command the command cat file > /dev/lp0 there must be a file with name "file" which contains what you want to print or if you want to print a line straight use echo if you type in a console echo "test" you see in console the word test, so you redirect this to printer lp0 with this command echo "test" > /dev/lp0 and you print it. try them fisrt from a console and then use them with Gambas SHELL or EXEC On Wed, Sep 23, 2009 at 6:54 PM, Vassilis K wrote: > I do not understand how exactly to use : > > cat file > /dev/lp0 > > or > > echo "test" > /dev/lp0 > > Could you be more specific? > > ????????? ?????????! > Thanks Demosthenis! > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From gambas at ...1... Thu Sep 24 00:33:34 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 24 Sep 2009 00:33:34 +0200 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: References: <200909231246.43359.vkan53@...2300...> <200909231854.09150.vkan53@...2300...> Message-ID: <200909240033.34447.gambas@...1...> > these are shell commands, cat and echo > cat shows the contents of a file and echo print a string in screen > we use redirection which is > > to a device printer /dev/lp0 or lp1 or lp2 see what is your printer > > To print a file you can write in shell or in gambas SHELL command the > command cat file > /dev/lp0 > > there must be a file with name "file" which contains what you want to print > > or if you want to print a line straight use echo > > if you type in a console echo "test" you see in console the word test, > so you redirect this to printer lp0 with this command > > echo "test" > /dev/lp0 > and you print it. > > try them fisrt from a console and then use them with Gambas SHELL or EXEC > In Gambas, you can use PRINT instead of running a shell to run "echo"! -- Beno?t Minisini From wdahn at ...1000... Thu Sep 24 04:11:24 2009 From: wdahn at ...1000... (Werner) Date: Thu, 24 Sep 2009 10:11:24 +0800 Subject: [Gambas-user] Yan: Button form In-Reply-To: <87503.95233.qm@...2247...> References: <87503.95233.qm@...2247...> Message-ID: <4ABAD54C.3080802@...1000...> abdurrahman ulusoy wrote: > ok. maybe a circle or other form but rectangle. > > --- 23/09/09 ?ar tarihinde abdurrahman ulusoy ??yle yaz?yor: > > Kimden: abdurrahman ulusoy > Konu: [Gambas-user] ?lt: Button form > Kime: gambas-user at lists.sourceforge.net > Tarihi: 23 Eyl?l 2009 ?ar?amba, 15:00 > > Can i change button forms? like attached pic. > Examples-->Drawing-->Clock might give you ideas. From jlcastroar at ...626... Thu Sep 24 04:44:46 2009 From: jlcastroar at ...626... (=?ISO-8859-1?Q?Jos=E9_Luis_Castro?=) Date: Wed, 23 Sep 2009 23:44:46 -0300 Subject: [Gambas-user] Can't access PostreSQL schemas Message-ID: <3e8fed600909231944v24741056ua8345e44ebec8f57@...627...> Hi. I've created a schema in a PostreSQL database. The sintax for accessing data from the schema is: schema.tableName That works fine when trying with .exec method (i.e. "SELECT * FROM schema.tableName" or "INSERT INTO schema.tableName VALUES..."), but it doesn't work when I try to use the .edit method I'm using Gambas 2.16 and PostreSQL 8.5 If anyone can help me with this (maybe just telling me where to get the answer for this question, probably already answered) i'll apreciatte it. JOS? L. CASTRO From doriano.blengino at ...1909... Thu Sep 24 09:41:58 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Thu, 24 Sep 2009 09:41:58 +0200 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <200909240033.34447.gambas@...1...> References: <200909231246.43359.vkan53@...2300...> <200909231854.09150.vkan53@...2300...> <200909240033.34447.gambas@...1...> Message-ID: <4ABB22C6.6010600@...1909...> Beno?t Minisini ha scritto: >> these are shell commands, cat and echo >> cat shows the contents of a file and echo print a string in screen >> we use redirection which is > >> to a device printer /dev/lp0 or lp1 or lp2 see what is your printer >> >> To print a file you can write in shell or in gambas SHELL command the >> command cat file > /dev/lp0 >> >> there must be a file with name "file" which contains what you want to print >> >> or if you want to print a line straight use echo >> >> if you type in a console echo "test" you see in console the word test, >> so you redirect this to printer lp0 with this command >> >> echo "test" > /dev/lp0 >> and you print it. >> >> try them fisrt from a console and then use them with Gambas SHELL or EXEC >> >> > > In Gambas, you can use PRINT instead of running a shell to run "echo"! > > This is true but... can I redirect output to every file I want using a simple one-line syntax? It could be interesting, as in the unix world everything is a file: PRINT "Program started" TO "/var/log/messages" ' append? or... PRINT "Program started" APPEND "/var/log/messages" ...or something like that. Truth is that one can make a subroutine to do it. Regards, Doriano From demosthenesk at ...626... Thu Sep 24 11:23:45 2009 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Thu, 24 Sep 2009 12:23:45 +0300 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <4ABB22C6.6010600@...1909...> References: <200909231246.43359.vkan53@...2300...> <200909231854.09150.vkan53@...2300...> <200909240033.34447.gambas@...1...> <4ABB22C6.6010600@...1909...> Message-ID: in shell you can do it by echo "Program started" >> /var/log/messages note* >> means redirection to the end of file, so it is append if you type > you will erase the contents of the file and put only "Program started" now you can use this command with SHELL. On Thu, Sep 24, 2009 at 10:41 AM, Doriano Blengino wrote: > Beno?t Minisini ha scritto: >>> these are shell commands, cat and echo >>> cat shows the contents of a file and echo print a string in screen >>> we use redirection which is > >>> to a device printer /dev/lp0 or lp1 or lp2 see what is your printer >>> >>> To print a file you can write in shell or in gambas SHELL command the >>> ?command cat file > /dev/lp0 >>> >>> there must be a file with name "file" which contains what you want to print >>> >>> or if you want to print a line straight use echo >>> >>> if you type in a console echo "test" you see in console the word test, >>> so you redirect this to printer lp0 with this command >>> >>> echo "test" > /dev/lp0 >>> and you print it. >>> >>> try them fisrt from a console and then use them with Gambas SHELL or EXEC >>> >>> >> >> In Gambas, you can use PRINT instead of running a shell to run "echo"! >> >> > This is true but... can I redirect output to every file I want using a > simple one-line syntax? > It could be interesting, as in the unix world everything is a file: > > ? ?PRINT "Program started" TO "/var/log/messages" ? ? ?' append? or... > ? ?PRINT "Program started" APPEND "/var/log/messages" > > ...or something like that. Truth is that one can make a subroutine to do it. > > Regards, > Doriano > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From doriano.blengino at ...1909... Thu Sep 24 12:10:50 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Thu, 24 Sep 2009 12:10:50 +0200 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: References: <200909231246.43359.vkan53@...2300...> <200909231854.09150.vkan53@...2300...> <200909240033.34447.gambas@...1...> <4ABB22C6.6010600@...1909...> Message-ID: <4ABB45AA.90008@...1909...> Demosthenes Koptsis ha scritto: > in shell you can do it by > > echo "Program started" >> /var/log/messages > > note* >> means redirection to the end of file, so it is append > > if you type > you will erase the contents of the file and put only > "Program started" > > now you can use this command with SHELL. > Thank you. I was pointing out to Benoit that invoking SHELL to run a /bin/echo, which could seem stupid at first, it is not so stupid because in a single line you do what gambas would do in three lines. So, it could be nice to have something similar native in gambas, because in unix everything is a file. I suspect that this feature would be useful only in a few situations, so one can well write a subroutine to do that, but anyway I tried to think at a possible syntax: PRINT/TO, or PRINT/APPEND. It's funny to invent these things... Writing a subroutine has the disadvantage that every functionality has the same syntax. Look at what is clearer: print "Started" to "/var/log/messages" ' good and clear syntax myappend("/var/log/messages", "Started") ' much less readable or, on the wave of these new stupid languages: Os.FileSystemUtilities.AppendStringToFile("/var/log/messages", "Started"); Note that in the myappend() call you don't know, at first, if "Started" is appended to /var/log/messages, or "/var/log/messages" is appended to ./start. Then you go to the declaration to check this... where is the declaration in a big project having tenth of sources? I agree that choosing good names for identifiers is a must, but there could be something better. Regards, Doriano From rospolosco at ...152... Thu Sep 24 12:28:13 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Thu, 24 Sep 2009 12:28:13 +0200 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <4ABB45AA.90008@...1909...> References: <200909231246.43359.vkan53@...2300...> <4ABB45AA.90008@...1909...> Message-ID: <200909241228.13792.rospolosco@...152...> Il gioved? 24 settembre 2009 12:10:50 Doriano Blengino ha scritto: > Demosthenes Koptsis ha scritto: > > in shell you can do it by > > > > echo "Program started" >> /var/log/messages > > > > note* >> means redirection to the end of file, so it is append > > > > if you type > you will erase the contents of the file and put only > > "Program started" > > > > now you can use this command with SHELL. > > Thank you. > I was pointing out to Benoit that invoking SHELL to run a /bin/echo, > which could seem stupid at first, it is not so stupid because in a > single line you do what gambas would do in three lines. So, it could be > nice to have something similar native in gambas, because in unix > everything is a file. I suspect that this feature would be useful only > in a few situations, so one can well write a subroutine to do that, but > anyway I tried to think at a possible syntax: PRINT/TO, or PRINT/APPEND. > It's funny to invent these things... Writing a subroutine has the > disadvantage that every functionality has the same syntax. Look at what > is clearer: > > print "Started" to "/var/log/messages" ' good and clear > syntax > myappend("/var/log/messages", "Started") ' much less readable > > or, on the wave of these new stupid languages: > > Os.FileSystemUtilities.AppendStringToFile("/var/log/messages", > "Started"); > > Note that in the myappend() call you don't know, at first, if "Started" > is appended to /var/log/messages, or "/var/log/messages" is appended to > ./start. Then you go to the declaration to check this... where is the > declaration in a big project having tenth of sources? I agree that > choosing good names for identifiers is a must, but there could be > something better. > > Regards, > Doriano > > > > --------------------------------------------------------------------------- >--- Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user Another way to append a line wothput "echo >" or SHELL or OPEN is: File.Save(User.home &/ "test", File.Load(User.home &/ "test") & "\nhello") This append "hello" to file "test" in user home. File "test" must exist. Stefano From vkan53 at ...2300... Thu Sep 24 13:12:49 2009 From: vkan53 at ...2300... (Vassilis K) Date: Thu, 24 Sep 2009 14:12:49 +0300 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <200909231246.43359.vkan53@...2300...> References: <200909231246.43359.vkan53@...2300...> Message-ID: <200909241412.49324.vkan53@...2300...> Thank you all for your help. I have tried the following printing SUB: PUBLIC SUB bEktiposi_Click() DIM hPrinter AS Printer DIM hFile AS File hPrinter = OPEN "dev/lp1" FOR OUTPUT hPrinter.EndOfLine = gb.Windows PRINT #hFile, "test a line: "; CLOSE hPrinter END It is compiled but it stops when bEtiposi Button is clicked at line : hPrinter = OPEN "dev/lp1" FOR OUTPUT with the message: " Access Forbidden. " I have tried to print from terminal with commands echo -e "Hello World\r" > /dev/lp1 cat /etc/passwd > /dev/lp1 They have both worked only with root terminal. First question: How exactly can I put echo into SHELL command of Gambas? Second question: I suppose that's the reason why the routine OPEN "dev/lp1" .... is not working. It needs root privileges! Is there any other way to setup the printer /dev/lp1 in order to work with simple user privileges? From ron at ...1740... Thu Sep 24 13:40:16 2009 From: ron at ...1740... (Ron) Date: Thu, 24 Sep 2009 13:40:16 +0200 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <200909241412.49324.vkan53@...2300...> References: <200909231246.43359.vkan53@...2300...> <200909241412.49324.vkan53@...2300...> Message-ID: <4ABB5AA0.2020709@...1740...> You forgot the slash before dev/lp1 or is that a typo? So hPrinter = OPEN "dev/lp1" FOR OUTPUT Gets hPrinter = OPEN "/dev/lp1" FOR OUTPUT Regards, Ron_2nd. > Thank you all for your help. > > I have tried the following printing SUB: > > PUBLIC SUB bEktiposi_Click() > DIM hPrinter AS Printer > DIM hFile AS File > hPrinter = OPEN "dev/lp1" FOR OUTPUT > hPrinter.EndOfLine = gb.Windows > PRINT #hFile, "test a line: "; > CLOSE hPrinter > END > > It is compiled but it stops when bEtiposi Button is clicked > at line : > hPrinter = OPEN "dev/lp1" FOR OUTPUT > with the message: > " Access Forbidden. " > > I have tried to print from terminal with commands > echo -e "Hello World\r" > /dev/lp1 > cat /etc/passwd > /dev/lp1 > They have both worked only with root terminal. > > First question: > How exactly can I put echo into SHELL command of Gambas? > > Second question: > I suppose that's the reason why the routine OPEN "dev/lp1" .... is not > working. It needs root privileges! > Is there any other way to setup the printer /dev/lp1 in order to work with > simple user privileges? > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From demosthenesk at ...626... Thu Sep 24 13:45:55 2009 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Thu, 24 Sep 2009 14:45:55 +0300 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <200909241412.49324.vkan53@...2300...> References: <200909231246.43359.vkan53@...2300...> <200909241412.49324.vkan53@...2300...> Message-ID: On Thu, Sep 24, 2009 at 2:12 PM, Vassilis K wrote: > Thank you all for your help. > > I have tried the following printing SUB: > > PUBLIC SUB bEktiposi_Click() > ? ? ? ?DIM hPrinter AS Printer > ? ? ? ?DIM hFile AS File > ? ? ? ?hPrinter = OPEN "dev/lp1" FOR OUTPUT > ? ? ? ?hPrinter.EndOfLine = gb.Windows > ? ? ? ?PRINT #hFile, "test a line: "; > ? ? ? ?CLOSE hPrinter > END > > It is compiled but it stops when bEtiposi Button is clicked > at line : > hPrinter = OPEN "dev/lp1" FOR OUTPUT > with the message: > " Access Forbidden. " > > I have tried to print from terminal with commands > echo -e "Hello World\r" > /dev/lp1 > cat /etc/passwd > /dev/lp1 > They have both worked only with root terminal. > > First question: > How exactly can I put echo into SHELL command of Gambas? an example of: echo "This is a test" >> /var/log/messages DIM varCommand AS String DIM varProcess AS Process varCommand = "echo \"This is a test\" >> /var/log/messages" varProcess = SHELL varCommand WAIT but you need root privileges to write to /var/log/messages > Second question: > I suppose that's the reason why the routine OPEN "dev/lp1" .... is not > working. It needs root privileges! > Is there any other way to setup the printer /dev/lp1 in order to work with > simple user privileges? users can use the command lpr to send files for printing see manual of lpr with man lpr also the command echo "This is a test" > /dev/lp0 is the same with echo "This is a test" | lpr or echo "This is a test" | lpr -P PrinterName where PrinterName is your printer's name May be you must use lpr instead sending strings/files to /dev/lp0 directly > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From vkan53 at ...2300... Thu Sep 24 13:51:34 2009 From: vkan53 at ...2300... (Vassilis K) Date: Thu, 24 Sep 2009 14:51:34 +0300 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <200909231246.43359.vkan53@...2300...> References: <200909231246.43359.vkan53@...2300...> Message-ID: <200909241451.34178.vkan53@...2300...> It is a typogriphic error. I wrote it as "/dev/lp1" From doriano.blengino at ...1909... Thu Sep 24 14:10:43 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Thu, 24 Sep 2009 14:10:43 +0200 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <200909241451.34178.vkan53@...2300...> References: <200909231246.43359.vkan53@...2300...> <200909241451.34178.vkan53@...2300...> Message-ID: <4ABB61C3.3070905@...1909...> Vassilis K ha scritto: > It is a typogriphic error. > > I wrote it as "/dev/lp1" > Every file in unix has permissions you can change with chmod: chmod a+w /dev/lp1 (ran as user root). It will give everyone permission to use /dev/lp1. Or, you can check/change only the permission for the group. In my system: crw-rw---- 1 root lp 6, 0 26 feb 2005 /dev/lp0 crw-rw---- 1 root lp 6, 1 26 feb 2005 /dev/lp1 crw-rw---- 1 root lp 6, 2 26 feb 2005 /dev/lp2 show that a user belonging to group "lp" can write. Add yourself or your users to that group: adduser vassilis lp and vassilis will be able to write to /dev/lpX. If the setup of your /dev/lpX is different, you can change its group with chgrp. Linux is good because _you_ are in control with your beloved computer... Regards, Doriano From vkan53 at ...2300... Thu Sep 24 14:18:38 2009 From: vkan53 at ...2300... (Vassilis K) Date: Thu, 24 Sep 2009 15:18:38 +0300 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <200909231246.43359.vkan53@...2300...> References: <200909231246.43359.vkan53@...2300...> Message-ID: <200909241518.38644.vkan53@...2300...> You are right! It works without root privileges with: echo "this is a test"" | lpr -P lpt2 but it feeds all the paper !! I 'll try to find a way not to feed the paper !! From demosthenesk at ...626... Thu Sep 24 14:43:39 2009 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Thu, 24 Sep 2009 15:43:39 +0300 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <200909241518.38644.vkan53@...2300...> References: <200909231246.43359.vkan53@...2300...> <200909241518.38644.vkan53@...2300...> Message-ID: see the manual man lpr man pr On Thu, Sep 24, 2009 at 3:18 PM, Vassilis K wrote: > > You are right! > > It works without root privileges with: > > echo "this is a test"" | lpr -P lpt2 > > but it feeds all the paper !! > I 'll try to find a way not to feed the paper !! > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From charles at ...1784... Thu Sep 24 17:17:49 2009 From: charles at ...1784... (charlesg) Date: Thu, 24 Sep 2009 08:17:49 -0700 (PDT) Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <200909231246.43359.vkan53@...2300...> References: <200909231246.43359.vkan53@...2300...> Message-ID: <25576315.post@...1379...> Hi, I tried printing line-by-line directly to the raw device and got into awful overlapping (? buffering) problems. I think you would be far better to create a single line text file each time and then print it with (for example): SHELL "cat /home/charles/tilRcpt>/dev/lp0" It's blindingly quick and for me is absolutely reliable. As usual, I am sure there are more elegent solutions :) I also had to set write permission to the device in form_open something like: SHELL "gksu -u root 'chmod a+rw /dev/lp0'" Its a pain to have to supply a password, but it only does it once. -- View this message in context: http://www.nabble.com/How-to-sent-a-line-line-to-a-lp1-printer-and-form-to-lp0-printer-directly.-tp25574065p25576315.html Sent from the gambas-user mailing list archive at Nabble.com. From doriano.blengino at ...1909... Thu Sep 24 17:40:08 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Thu, 24 Sep 2009 17:40:08 +0200 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <25576315.post@...1379...> References: <200909231246.43359.vkan53@...2300...> <25576315.post@...1379...> Message-ID: <4ABB92D8.3010705@...1909...> charlesg ha scritto: > Hi, > > I tried printing line-by-line directly to the raw device and got into awful > overlapping (? buffering) problems. > > I think you would be far better to create a single line text file each time > and then print it with (for example): > SHELL "cat /home/charles/tilRcpt>/dev/lp0" > > It's blindingly quick and for me is absolutely reliable. As usual, I am sure > there are more elegent solutions :) > > I also had to set write permission to the device in form_open something > like: > SHELL "gksu -u root 'chmod a+rw /dev/lp0'" > Its a pain to have to supply a password, but it only does it once. > > Beware... I don't know if your overlapping problem is caused by buffering (I don't think so), but I am sure that in unix, text line are terminated by a single LF (line feed). For the printer, it means to go a line down, but not to reposition the printing head to the beginning of the line. What you obtain if you fail to do so, is something like this: line1 line2 line3 It depends also on the kind of printer. I am sure that all old impact printer do so; the most modern ones, perhaps using postscript directly, can behave differently. You must add a CR (carriage return) to correctly print lines of text on an impact printer. Regards, Doriano From gambas at ...1... Thu Sep 24 20:46:50 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 24 Sep 2009 20:46:50 +0200 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <4ABB22C6.6010600@...1909...> References: <200909231246.43359.vkan53@...2300...> <200909240033.34447.gambas@...1...> <4ABB22C6.6010600@...1909...> Message-ID: <200909242046.50739.gambas@...1...> > Beno?t Minisini ha scritto: > >> these are shell commands, cat and echo > >> cat shows the contents of a file and echo print a string in screen > >> we use redirection which is > > >> to a device printer /dev/lp0 or lp1 or lp2 see what is your printer > >> > >> To print a file you can write in shell or in gambas SHELL command the > >> command cat file > /dev/lp0 > >> > >> there must be a file with name "file" which contains what you want to > >> print > >> > >> or if you want to print a line straight use echo > >> > >> if you type in a console echo "test" you see in console the word test, > >> so you redirect this to printer lp0 with this command > >> > >> echo "test" > /dev/lp0 > >> and you print it. > >> > >> try them fisrt from a console and then use them with Gambas SHELL or > >> EXEC > > > > In Gambas, you can use PRINT instead of running a shell to run "echo"! > > This is true but... can I redirect output to every file I want using a > simple one-line syntax? > It could be interesting, as in the unix world everything is a file: > > PRINT "Program started" TO "/var/log/messages" ' append? or... > PRINT "Program started" APPEND "/var/log/messages" > > ...or something like that. Truth is that one can make a subroutine to do > it. > > Regards, > Doriano You must use the Open / Close instructions. If you don't want to specify the stream at each Print instruction, you can use the "Output To" instruction. Regards, -- Beno?t Minisini From gambas at ...1... Thu Sep 24 20:53:42 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 24 Sep 2009 20:53:42 +0200 Subject: [Gambas-user] How can I specify the translation directory? In-Reply-To: References: Message-ID: <200909242053.42438.gambas@...1...> > Hi, > > I can specify the language to use with: > System.Language = "fr_FR" > > But how can I specify the directory containing the translations? > > Also, where are those things documented? I only found the System.Language > info on the mailing-list. > > John > You can't specify this directory. The translations of a gambas project (*.po files) are stored in the ".lang" sub-directory of the project, with their compiled version (*.mo files). When you make an executable, the *.mo files of the .lang directory are stored in it. When you run the executable, a temporary directory is created, and the compiled translation file (*.mo) of the current language is stored in this directory and used. When the program ends, these temporary directories are destroyed. Why do you want to know that? -- Beno?t Minisini From vkan53 at ...2300... Thu Sep 24 21:59:14 2009 From: vkan53 at ...2300... (Vassilis K) Date: Thu, 24 Sep 2009 22:59:14 +0300 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <200909231246.43359.vkan53@...2300...> References: <200909231246.43359.vkan53@...2300...> Message-ID: <200909242259.15244.vkan53@...2300...> Is there any chance to find out why I get the message: Access forbidden at the following Sub? And of course to make it work? PUBLIC SUB bEktiposi_Click() DIM hPrinter AS Printer DIM hFile AS File hPrinter = OPEN "dev/lp1" FOR OUTPUT hPrinter.EndOfLine = gb.Windows PRINT #hFile, "test a line: "; CLOSE hPrinter END It is compiled but it stops when bEtiposi Button is clicked at line : hPrinter = OPEN "dev/lp1" FOR OUTPUT with the message: " Access Forbidden. " From doriano.blengino at ...1909... Thu Sep 24 22:47:08 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Thu, 24 Sep 2009 22:47:08 +0200 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <200909242259.15244.vkan53@...2300...> References: <200909231246.43359.vkan53@...2300...> <200909242259.15244.vkan53@...2300...> Message-ID: <4ABBDACC.5080802@...1909...> Vassilis K ha scritto: > Is there any chance to find out why I get the message: > Access forbidden at the following Sub? And of course to make it work? > PUBLIC SUB bEktiposi_Click() > DIM hPrinter AS Printer > DIM hFile AS File > hPrinter = OPEN "dev/lp1" FOR OUTPUT > hPrinter.EndOfLine = gb.Windows > PRINT #hFile, "test a line: "; > CLOSE hPrinter > END > > It is compiled but it stops when bEtiposi Button is clicked > at line : > hPrinter = OPEN "dev/lp1" FOR OUTPUT > with the message: > " Access Forbidden. " > Open a console; log in as root; issue: chmod a+w /dev/lp1 and it's done (it gives write permission to every user). Perhaps not the best method, but quick to see if all the rest is ok. Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From rterry at ...1946... Fri Sep 25 00:09:01 2009 From: rterry at ...1946... (richard terry) Date: Fri, 25 Sep 2009 08:09:01 +1000 Subject: [Gambas-user] Using SVN in gambas question In-Reply-To: <1f1e8c1b0909230436l61b6c9bdlba9ad4f56ad1b4f5@...627...> References: <200909231919.44497.rterry@...1946...> <1f1e8c1b0909230436l61b6c9bdlba9ad4f56ad1b4f5@...627...> Message-ID: <200909250809.01217.rterry@...1946...> On Wednesday 23 September 2009 21:36:37 you wrote: > I have always created the project without the subversion option enabled. > The added the project to the svn repo. > after that, then you open the project with the gambas ide you can commit > and update using the gui. Always worked for me Do you mean you did this 1) A SVN is setup somewhere you want to access 2) You download that svn manually from a terminal to your machine 3) You then point gambas to that directory 4) Gambas then 'knows' this is an svn project and treats it accordingly? Also, I 've been finding that gambas somehow corrupts the svn under some circumstances - it seems to be around a couple of scenarios that I havn't quite defined.One seems to be when I've added a new directory from within gambas and then deleted it within the same session without a commit in between. Also re-naming files seems to be a problem. Another question I thought one could copy files from outside ones svn into the svn tree and that svn would cope with this. Also that I could delete files externally then do an update and svn would replace them - apparently not so with the missing files as described below. My svn is in a real mess at the moment and I can't commit anything even on the command line as I get this sequence: richard ~/coding/trunk $ svn update At revision 185. richard ~/coding/trunk $ svn commit -m "help files" svn: Commit failed (details follow): svn: Directory '/home/richard/coding/trunk/help/introduction/.svn' containing working copy admin area is missing richard ~/coding/trunk $ Not sure how to untangle this as there are all sorts of hidden files involved. HELP!!!! anyone!!! thanks Richard > > On Sep 23, 2009 4:23 AM, "richard terry" wrote: > > I'm writing some documentation for my project. > > When I created it from svn, I did it via the gambas gui interface, not by > using the terminal as one would for example by typing svn checkout > svn://project/trunk. > > I wondered if it is possible to do a manual checkout of an svn project and > then load it from the gambas IDE (which of course one can) but will the IDE > then treat the project like a svn project and allow the usual updates and > commits? > > Hope this is not ambiguous. > > Regards > > Richard > > --------------------------------------------------------------------------- >--- Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas at ...1... Fri Sep 25 01:08:43 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 25 Sep 2009 01:08:43 +0200 Subject: [Gambas-user] Using SVN in gambas question In-Reply-To: <200909250809.01217.rterry@...1946...> References: <200909231919.44497.rterry@...1946...> <1f1e8c1b0909230436l61b6c9bdlba9ad4f56ad1b4f5@...627...> <200909250809.01217.rterry@...1946...> Message-ID: <200909250108.43839.gambas@...1...> > On Wednesday 23 September 2009 21:36:37 you wrote: > > I have always created the project without the subversion option enabled. > > The added the project to the svn repo. > > after that, then you open the project with the gambas ide you can commit > > and update using the gui. Always worked for me > > Do you mean you did this > 1) A SVN is setup somewhere you want to access > 2) You download that svn manually from a terminal to your machine > 3) You then point gambas to that directory > 4) Gambas then 'knows' this is an svn project and treats it accordingly? > > Also, I 've been finding that gambas somehow corrupts the svn under some > circumstances - it seems to be around a couple of scenarios that I havn't > quite defined.One seems to be when I've added a new directory from within > gambas and then deleted it within the same session without a commit in > between. Also re-naming files seems to be a problem. As far as I could test, renaming files is not a problem, but renaming a directory is. To rename a directory, svn copies the old one to the new one, and deletes the old one. But it will actually delete the old one at the next commit. So you can't rename the new directory back to its old name. > > Another question I thought one could copy files from outside ones svn into > the svn tree and that svn would cope with this. You were wrong. svn deals with files only if you tell him with "svn add". > > Also that I could delete files externally then do an update and svn would > replace them - apparently not so with the missing files as described below. It depends. If you delete a file without using "svn remove", then you can use "svn update" or, faster, "svn revert" to get the file back. > > My svn is in a real mess at the moment and I can't commit anything even on > the command line as I get this sequence: > > richard ~/coding/trunk $ svn update > At revision 185. > richard ~/coding/trunk $ svn commit -m "help files" > svn: Commit failed (details follow): > svn: Directory '/home/richard/coding/trunk/help/introduction/.svn' > containing working copy admin area is missing > richard ~/coding/trunk $ > > Not sure how to untangle this as there are all sorts of hidden files > involved. > > HELP!!!! anyone!!! > > thanks > > Richard > I suggest that you checkout your project in a new directory, copy your changes from the old ones (by using svn commands of course), and then commit from the new one. Then you will use it definitely, and can delete the old directory. Regards, -- Beno?t Minisini From m0e.lnx at ...626... Fri Sep 25 01:40:33 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Thu, 24 Sep 2009 18:40:33 -0500 Subject: [Gambas-user] Using SVN in gambas question In-Reply-To: <200909250108.43839.gambas@...1...> References: <200909231919.44497.rterry@...1946...> <1f1e8c1b0909230436l61b6c9bdlba9ad4f56ad1b4f5@...627...> <200909250809.01217.rterry@...1946...> <200909250108.43839.gambas@...1...> Message-ID: <1f1e8c1b0909241640m2c88b6c5k606ca701f2ca0773@...627...> Yes.. I just check out the code and load the peoject. I've had issues in the past where gambas would add the .gambas (hidden) directory to svn. That creates a problem. So I just exclude that dir from version control and that takes care of it On Sep 24, 2009 6:10 PM, "Beno?t Minisini" wrote: > On Wednesday 23 September 2009 21:36:37 you wrote: > > I have always created the project without t... As far as I could test, renaming files is not a problem, but renaming a directory is. To rename a directory, svn copies the old one to the new one, and deletes the old one. But it will actually delete the old one at the next commit. So you can't rename the new directory back to its old name. > > Another question I thought one could copy files from outside ones svn into > the svn tree and... You were wrong. svn deals with files only if you tell him with "svn add". > > Also that I could delete files externally then do an update and svn would > replace them - app... It depends. If you delete a file without using "svn remove", then you can use "svn update" or, faster, "svn revert" to get the file back. > > My svn is in a real mess at the moment and I can't commit anything even on > the command line... I suggest that you checkout your project in a new directory, copy your changes from the old ones (by using svn commands of course), and then commit from the new one. Then you will use it definitely, and can delete the old directory. Regards, -- Beno?t Minisini ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event y... From doriano.blengino at ...1909... Fri Sep 25 07:26:17 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Fri, 25 Sep 2009 07:26:17 +0200 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <200909242259.15244.vkan53@...2300...> References: <200909231246.43359.vkan53@...2300...> <200909242259.15244.vkan53@...2300...> Message-ID: <4ABC5479.1090408@...1909...> Vassilis K ha scritto: > Is there any chance to find out why I get the message: > Access forbidden at the following Sub? And of course to make it work? > PUBLIC SUB bEktiposi_Click() > DIM hPrinter AS Printer > DIM hFile AS File > hPrinter = OPEN "dev/lp1" FOR OUTPUT > hPrinter.EndOfLine = gb.Windows > PRINT #hFile, "test a line: "; > CLOSE hPrinter > END > > It is compiled but it stops when bEtiposi Button is clicked > at line : > hPrinter = OPEN "dev/lp1" FOR OUTPUT > with the message: > " Access Forbidden. " > I missed one important thing. Don't confuse hPrinter with Printer - in one of my previous messages I used the name hPrinter, because it was intended as a handle to a printer, but it was a *file*. In your code you DIM hPrinter as Printer, and then use it as a file. May be gambas gets confused by this - don't do so. A Printer is a different thing than a file or stream. I repeat: we are using the printer through the file system, not through Printer class. Next problem could be an access privilege on the file you are trying to open (/dev/lp1 in this case). If the problem persists, make a ls -l /dev/lp* to see what the privileges are, and post the result to this list. Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From eilert-sprachen at ...221... Fri Sep 25 11:36:48 2009 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Fri, 25 Sep 2009 11:36:48 +0200 Subject: [Gambas-user] Closing X in Form event? Message-ID: <4ABC8F30.7020401@...221...> Hi all, which event refers to the closing X of the form? When I use Form_Close the code will be run even when clicking OK (and closing the form). What I want is the same reaction like when clicking the Cancel button without affecting OK. Maybe a stupid question, but 've never had this problem yet. Regards Rolf From vkan53 at ...2300... Fri Sep 25 11:43:54 2009 From: vkan53 at ...2300... (Vassilis A. Kanatas) Date: Fri, 25 Sep 2009 12:43:54 +0300 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. Message-ID: <1253871834.5352.10.camel@...2302...> Yeeeeeeeeeesssssssssssssssss!!! Gracia Doriano, ????????? Demosthenes Merci Benoit It is done! Doriano had right I had to add the lp group to the user Vassilis. I also had to put DIM hPrinter AS File !!! After that the correct code for printing 1 line each time is the following: PUBLIC SUB bEktiposi_Click() DIM hPrinter AS File hPrinter = OPEN "/dev/lp1" FOR OUTPUT hPrinter.EndOfLine = gb.Windows PRINT #hPrinter, "test a line: " CLOSE hPrinter END From dosida at ...626... Fri Sep 25 11:45:13 2009 From: dosida at ...626... (Dimitris Anogiatis) Date: Fri, 25 Sep 2009 03:45:13 -0600 Subject: [Gambas-user] Closing X in Form event? In-Reply-To: <4ABC8F30.7020401@...221...> References: <4ABC8F30.7020401@...221...> Message-ID: <82bffccf0909250245s7e5bb3ecs698b54be249630c3@...627...> hey Rolf, Is it a modal form a normal form or a dialog? I think that in normal forms Form_Unload is the event you want but I'm not entirely sure could you give us a few more details on what you're trying to do? Regards Dimitris On Fri, Sep 25, 2009 at 3:36 AM, Rolf-Werner Eilert < eilert-sprachen at ...221...> wrote: > Hi all, > > which event refers to the closing X of the form? > > When I use Form_Close the code will be run even when clicking OK (and > closing the form). What I want is the same reaction like when clicking > the Cancel button without affecting OK. > > Maybe a stupid question, but 've never had this problem yet. > > Regards > > Rolf > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From doriano.blengino at ...1909... Fri Sep 25 12:06:20 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Fri, 25 Sep 2009 12:06:20 +0200 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <1253871834.5352.10.camel@...2302...> References: <1253871834.5352.10.camel@...2302...> Message-ID: <4ABC961C.6000408@...1909...> Vassilis A. Kanatas ha scritto: > Yeeeeeeeeeesssssssssssssssss!!! > > Gracia Doriano, > ????????? Demosthenes > Merci Benoit > > It is done! > > Doriano had right > > I had to add the lp group to the user Vassilis. > I am glad you finally succeded! But, it's my habit (I had to be a teacher), I must correct you once again... :-) "Grazie Doriano" (I am italian), and you added yourself, user vassilis, to the group lp, not vice-versa. Things that can help you even more to print nice receipts: by sending special characters, like chr$(15) (or 18?): PRINT #hPrinter, chr$(15) & "test a line: " you can select different fonts and sizes, use bold, italic and underline, and some more nice effects. All this special characters should be explained in the printer's user manual, when in the good times manuals were manuals and explained things. If you are interested, but don't have the manual, I can provide some small instruction. Regards, Doriano From eilert-sprachen at ...221... Fri Sep 25 12:26:46 2009 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Fri, 25 Sep 2009 12:26:46 +0200 Subject: [Gambas-user] Closing X in Form event? In-Reply-To: <82bffccf0909250245s7e5bb3ecs698b54be249630c3@...627...> References: <4ABC8F30.7020401@...221...> <82bffccf0909250245s7e5bb3ecs698b54be249630c3@...627...> Message-ID: <4ABC9AE6.7030608@...221...> Dimitris Anogiatis schrieb: > hey Rolf, > > Is it a modal form a normal form or a dialog? It's a modal one > > I think that in normal forms Form_Unload is the event you want but I'm not > entirely sure > could you give us a few more details on what you're trying to do? Well, I can't find Form_Unload. Wasn't that VB? No, what I was looking for was an event referring to the X gadget of the window only. But I just remembered that I could do it using a flag which is set clicking OK and not set clicking Cancel or something else. This flag then is referenced during Form_Close. This would have the same effect (if my crude logic doesn't fool me today...) :-) Rolf > > Regards > Dimitris > > On Fri, Sep 25, 2009 at 3:36 AM, Rolf-Werner Eilert < > eilert-sprachen at ...221...> wrote: > >> Hi all, >> >> which event refers to the closing X of the form? >> >> When I use Form_Close the code will be run even when clicking OK (and >> closing the form). What I want is the same reaction like when clicking >> the Cancel button without affecting OK. >> >> Maybe a stupid question, but 've never had this problem yet. >> >> Regards >> >> Rolf >> >> >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry® Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9-12, 2009. Register now! >> http://p.sf.net/sfu/devconf >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From dosida at ...626... Fri Sep 25 12:50:44 2009 From: dosida at ...626... (Dimitris Anogiatis) Date: Fri, 25 Sep 2009 04:50:44 -0600 Subject: [Gambas-user] Closing X in Form event? In-Reply-To: <4ABC9AE6.7030608@...221...> References: <4ABC8F30.7020401@...221...> <82bffccf0909250245s7e5bb3ecs698b54be249630c3@...627...> <4ABC9AE6.7030608@...221...> Message-ID: <82bffccf0909250350w6a40a81td818302128883076@...627...> You're right Rolf, I was under the impression that there was such an event :) sorry about that :) when you get it working would you mind pasting the code here? I'd like to take a look at it Regards Dimitris On Fri, Sep 25, 2009 at 4:26 AM, Rolf-Werner Eilert < eilert-sprachen at ...221...> wrote: > Dimitris Anogiatis schrieb: > > hey Rolf, > > > > Is it a modal form a normal form or a dialog? > > It's a modal one > > > > > I think that in normal forms Form_Unload is the event you want but I'm > not > > entirely sure > > could you give us a few more details on what you're trying to do? > > Well, I can't find Form_Unload. Wasn't that VB? No, what I was looking > for was an event referring to the X gadget of the window only. > > But I just remembered that I could do it using a flag which is set > clicking OK and not set clicking Cancel or something else. This flag > then is referenced during Form_Close. This would have the same effect > (if my crude logic doesn't fool me today...) :-) > > Rolf > > > > > Regards > > Dimitris > > > > On Fri, Sep 25, 2009 at 3:36 AM, Rolf-Werner Eilert < > > eilert-sprachen at ...221...> wrote: > > > >> Hi all, > >> > >> which event refers to the closing X of the form? > >> > >> When I use Form_Close the code will be run even when clicking OK (and > >> closing the form). What I want is the same reaction like when clicking > >> the Cancel button without affecting OK. > >> > >> Maybe a stupid question, but 've never had this problem yet. > >> > >> Regards > >> > >> Rolf > >> > >> > >> > ------------------------------------------------------------------------------ > >> Come build with us! The BlackBerry® Developer Conference in SF, CA > >> is the only developer event you need to attend this year. Jumpstart your > >> developing skills, take BlackBerry mobile applications to market and > stay > >> ahead of the curve. Join us from November 9-12, 2009. Register > now! > >> http://p.sf.net/sfu/devconf > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > > > ------------------------------------------------------------------------------ > > Come build with us! The BlackBerry® Developer Conference in SF, CA > > is the only developer event you need to attend this year. Jumpstart your > > developing skills, take BlackBerry mobile applications to market and stay > > ahead of the curve. Join us from November 9-12, 2009. Register > now! > > http://p.sf.net/sfu/devconf > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From demosthenesk at ...626... Fri Sep 25 13:59:34 2009 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Fri, 25 Sep 2009 14:59:34 +0300 Subject: [Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly. In-Reply-To: <4ABC961C.6000408@...1909...> References: <1253871834.5352.10.camel@...2302...> <4ABC961C.6000408@...1909...> Message-ID: ????! On Fri, Sep 25, 2009 at 1:06 PM, Doriano Blengino wrote: > Vassilis A. Kanatas ha scritto: >> Yeeeeeeeeeesssssssssssssssss!!! >> >> Gracia Doriano, >> ????????? ?Demosthenes >> Merci Benoit >> >> It is done! >> >> Doriano had right >> >> I had to add the lp group to the user Vassilis. >> > I am glad you finally succeded! > > But, it's my habit (I had to be a teacher), I must correct you once > again... :-) > > "Grazie Doriano" (I am italian), > > and you added yourself, user vassilis, to the group lp, not vice-versa. > > > Things that can help you even more to print nice receipts: by sending > special characters, like chr$(15) (or 18?): > > ? ?PRINT #hPrinter, chr$(15) & "test a line: " > > you can select different fonts and sizes, use bold, italic and > underline, and some more nice effects. All this special characters > should be explained in the printer's user manual, when in the good times > manuals were manuals and explained things. If you are interested, but > don't have the manual, I can provide some small instruction. > > Regards, > Doriano > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From ron at ...1740... Fri Sep 25 14:18:15 2009 From: ron at ...1740... (Ron) Date: Fri, 25 Sep 2009 14:18:15 +0200 Subject: [Gambas-user] Closing X in Form event? In-Reply-To: <82bffccf0909250350w6a40a81td818302128883076@...627...> References: <4ABC8F30.7020401@...221...> <82bffccf0909250245s7e5bb3ecs698b54be249630c3@...627...> <4ABC9AE6.7030608@...221...> <82bffccf0909250350w6a40a81td818302128883076@...627...> Message-ID: <4ABCB507.8060900@...1740...> If your goal is to prevent closing the form if users click the X I do this: PUBLIC SUB Form_Close() IF bAuthOk = FALSE THEN STOP EVENT END So if then are not authenticated (it's a login form) then disable X button. Regards, Ron_2nd. > You're right Rolf, > > I was under the impression that there was such an event :) > > sorry about that :) > > when you get it working would you mind pasting the code here? > > I'd like to take a look at it > > Regards > Dimitris > > On Fri, Sep 25, 2009 at 4:26 AM, Rolf-Werner Eilert < > eilert-sprachen at ...221...> wrote: > > >> Dimitris Anogiatis schrieb: >> >>> hey Rolf, >>> >>> Is it a modal form a normal form or a dialog? >>> >> It's a modal one >> >> >>> I think that in normal forms Form_Unload is the event you want but I'm >>> >> not >> >>> entirely sure >>> could you give us a few more details on what you're trying to do? >>> >> Well, I can't find Form_Unload. Wasn't that VB? No, what I was looking >> for was an event referring to the X gadget of the window only. >> >> But I just remembered that I could do it using a flag which is set >> clicking OK and not set clicking Cancel or something else. This flag >> then is referenced during Form_Close. This would have the same effect >> (if my crude logic doesn't fool me today...) :-) >> >> Rolf >> >> >>> Regards >>> Dimitris >>> >>> On Fri, Sep 25, 2009 at 3:36 AM, Rolf-Werner Eilert < >>> eilert-sprachen at ...221...> wrote: >>> >>> >>>> Hi all, >>>> >>>> which event refers to the closing X of the form? >>>> >>>> When I use Form_Close the code will be run even when clicking OK (and >>>> closing the form). What I want is the same reaction like when clicking >>>> the Cancel button without affecting OK. >>>> >>>> Maybe a stupid question, but 've never had this problem yet. >>>> >>>> Regards >>>> >>>> Rolf >>>> >>>> >>>> >>>> >> ------------------------------------------------------------------------------ >> >>>> Come build with us! The BlackBerry® Developer Conference in SF, CA >>>> is the only developer event you need to attend this year. Jumpstart your >>>> developing skills, take BlackBerry mobile applications to market and >>>> >> stay >> >>>> ahead of the curve. Join us from November 9-12, 2009. Register >>>> >> now! >> >>>> >> >>> urve. Join us from November 9-12, 2009. Register >>> >> now! >> >> From gambas at ...1... Sat Sep 26 01:11:55 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 26 Sep 2009 01:11:55 +0200 Subject: [Gambas-user] Can't access PostreSQL schemas In-Reply-To: <3e8fed600909231944v24741056ua8345e44ebec8f57@...627...> References: <3e8fed600909231944v24741056ua8345e44ebec8f57@...627...> Message-ID: <200909260111.55719.gambas@...1...> > Hi. I've created a schema in a PostreSQL database. The sintax for accessing > data from the schema is: schema.tableName > That works fine when trying with .exec method (i.e. "SELECT * FROM > schema.tableName" or "INSERT INTO schema.tableName VALUES..."), but it > doesn't work when I try to use the .edit method > > I'm using Gambas 2.16 and PostreSQL 8.5 > > If anyone can help me with this (maybe just telling me where to get the > answer for this question, probably already answered) i'll apreciatte it. > > JOS? L. CASTRO You can only use the Edit() on tables having a primary index. In that case, you should better create your database with the database manager, to be sure things work as expected. See: http://gambasdoc.org/help/comp/gb.db Regards, -- Beno?t Minisini From robert1juhasz at ...626... Sat Sep 26 03:20:54 2009 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Sat, 26 Sep 2009 03:20:54 +0200 Subject: [Gambas-user] how to start a file? In-Reply-To: <68652a0b0909151604h7f19c21du39f30d2816beef02@...627...> References: <25416046.post@...1379...> <68652a0b0909141627r97bbac0r5eb01188ff0d5d76@...627...> <200909151522.42019.gambas@...1...> <68652a0b0909151604h7f19c21du39f30d2816beef02@...627...> Message-ID: <68652a0b0909251820j57a2bf2cy1c28bc880bb69bb8@...627...> Hello, I'm very happy with this solution and was perfect as long as I used my program myself. Now I wanna put it in a common folder on the server and for storing the files I'll use a folder. To avoid the direct access of this folder, I'll make it protected. The question now is how can I handle this kind of folder from Gambas. I don't wish to deal with the rights of teh folder. The idea is to give a read and write password to the folder and use the password from Gambas according to the user rights in Gambas. - the files will be displayed by a file view control. Is there any place of this control to enter (from code) the reading / writing password of the folder used by the control? - or, when using the Desktop.Open function, can I specify if I open the file for read only? Thanks, Robi 2009/9/16 Robert JUHASZ > .. and it works perfectly, thanks for all of you who helped! > > Robi > > 2009/9/15 Ricardo D?az Mart?n > > maybe the same... 8-) >> >> 2009/9/15 Beno?t Minisini >> >> > > You can use this (you need to have installed in your system xdg-open >> > > command - out of the box in ubuntu): >> > > >> > > EXEC ["xdg-open", PathOfTheFileYouCanOpen] >> > > >> > > "xdg-open" runs like in windows "start" >> > > >> > > Regards, >> > > Ricardo D?az >> > > >> > >> > Guess what Desktop.Open() does... >> > >> > -- >> > Beno?t Minisini >> > >> > >> > >> ------------------------------------------------------------------------------ >> > Come build with us! The BlackBerry® Developer Conference in SF, CA >> > is the only developer event you need to attend this year. Jumpstart your >> > developing skills, take BlackBerry mobile applications to market and >> stay >> > ahead of the curve. Join us from November 9-12, 2009. Register >> now! >> > http://p.sf.net/sfu/devconf >> > _______________________________________________ >> > Gambas-user mailing list >> > Gambas-user at lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/gambas-user >> > >> >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry® Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9-12, 2009. Register >> now! >> http://p.sf.net/sfu/devconf >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > From jlcastroar at ...626... Sat Sep 26 04:45:08 2009 From: jlcastroar at ...626... (=?ISO-8859-1?Q?Jos=E9_Luis_Castro?=) Date: Fri, 25 Sep 2009 23:45:08 -0300 Subject: [Gambas-user] Can't access PostreSQL schemas In-Reply-To: <200909260111.55719.gambas@...1...> References: <3e8fed600909231944v24741056ua8345e44ebec8f57@...627...> <200909260111.55719.gambas@...1...> Message-ID: <3e8fed600909251945m6df4336ep3924e29afb4ae817@...627...> Hi Beno?t. Thanks for your kind answer. I must say, however, the database was created and it's maintained using the application "PGAdmin", so I can say with absolute security that the table I'm trying to acces has been created, in fact, with a primary key. Also I ran a lot of queries from PGAdmin and everything works just fine; so a priori I think the database and tables are well designed. On the other hand, I tried to access from Gambas 2.16, another table of the same database, but a one that is not into the schema (for instance, has the same sctructure, keys and indexes) and works fine when using the Edit() method. That's the reason I think this is a problem with schemas. Regards, Jos? Luis 2009/9/25 Beno?t Minisini > > Hi. I've created a schema in a PostreSQL database. The sintax for > accessing > > data from the schema is: schema.tableName > > That works fine when trying with .exec method (i.e. "SELECT * FROM > > schema.tableName" or "INSERT INTO schema.tableName VALUES..."), but it > > doesn't work when I try to use the .edit method > > > > I'm using Gambas 2.16 and PostreSQL 8.5 > > > > If anyone can help me with this (maybe just telling me where to get the > > answer for this question, probably already answered) i'll apreciatte it. > > > > JOS? L. CASTRO > > You can only use the Edit() on tables having a primary index. In that case, > you should better create your database with the database manager, to be > sure > things work as expected. > > See: http://gambasdoc.org/help/comp/gb.db > > Regards, > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From 12ukwn at ...626... Sat Sep 26 04:59:21 2009 From: 12ukwn at ...626... (Jean-Yves F. Barbier) Date: Sat, 26 Sep 2009 04:59:21 +0200 Subject: [Gambas-user] Can't access PostreSQL schemas In-Reply-To: <3e8fed600909251945m6df4336ep3924e29afb4ae817@...627...> References: <3e8fed600909231944v24741056ua8345e44ebec8f57@...627...> <200909260111.55719.gambas@...1...> <3e8fed600909251945m6df4336ep3924e29afb4ae817@...627...> Message-ID: <4ABD8389.9020402@...626...> Jos? Luis Castro a ?crit : > Hi Beno?t. Thanks for your kind answer. > > I must say, however, the database was created and it's maintained using the > application "PGAdmin", so I can say with absolute security that the table > I'm trying to acces has been created, in fact, with a primary key. Also I > ran a lot of queries from PGAdmin and everything works just fine; so a > priori I think the database and tables are well designed. > On the other hand, I tried to access from Gambas 2.16, another table of the > same database, but a one that is not into the schema (for instance, has the > same sctructure, keys and indexes) and works fine when using the Edit() > method. That's the reason I think this is a problem with schemas. Jos?, did you set your schema up into the 'search_path' variable ? -- Reality is a cop-out for people who can't handle drugs. From jlcastroar at ...626... Sat Sep 26 05:09:00 2009 From: jlcastroar at ...626... (=?ISO-8859-1?Q?Jos=E9_Luis_Castro?=) Date: Sat, 26 Sep 2009 00:09:00 -0300 Subject: [Gambas-user] Can't access PostreSQL schemas In-Reply-To: <4ABD8389.9020402@...626...> References: <3e8fed600909231944v24741056ua8345e44ebec8f57@...627...> <200909260111.55719.gambas@...1...> <3e8fed600909251945m6df4336ep3924e29afb4ae817@...627...> <4ABD8389.9020402@...626...> Message-ID: <3e8fed600909252009k7c03c947qa6fdb200f8a78b6@...627...> Sorry, Jean-Yves: I have no idea how to do that. Is it necessary? Or -better answered- when is necessary to declare a "search_path" variable? Thaks for your help. 2009/9/25 Jean-Yves F. Barbier <12ukwn at ...626...> > Jos? Luis Castro a ?crit : > > Hi Beno?t. Thanks for your kind answer. > > > > I must say, however, the database was created and it's maintained using > the > > application "PGAdmin", so I can say with absolute security that the table > > I'm trying to acces has been created, in fact, with a primary key. Also I > > ran a lot of queries from PGAdmin and everything works just fine; so a > > priori I think the database and tables are well designed. > > On the other hand, I tried to access from Gambas 2.16, another table of > the > > same database, but a one that is not into the schema (for instance, has > the > > same sctructure, keys and indexes) and works fine when using the Edit() > > method. That's the reason I think this is a problem with schemas. > > Jos?, did you set your schema up into the 'search_path' variable ? > > -- > Reality is a cop-out for people who can't handle drugs. > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From 12ukwn at ...626... Sat Sep 26 05:46:42 2009 From: 12ukwn at ...626... (Jean-Yves F. Barbier) Date: Sat, 26 Sep 2009 05:46:42 +0200 Subject: [Gambas-user] Can't access PostreSQL schemas In-Reply-To: <3e8fed600909252009k7c03c947qa6fdb200f8a78b6@...627...> References: <3e8fed600909231944v24741056ua8345e44ebec8f57@...627...> <200909260111.55719.gambas@...1...> <3e8fed600909251945m6df4336ep3924e29afb4ae817@...627...> <4ABD8389.9020402@...626...> <3e8fed600909252009k7c03c947qa6fdb200f8a78b6@...627...> Message-ID: <4ABD8EA2.9@...626...> Jos? Luis Castro a ?crit : > Sorry, Jean-Yves: I have no idea how to do that. Is it necessary? Or -better > answered- when is necessary to declare a "search_path" variable? > Thaks for your help. search_path is a system variable, unique for each role. command to see what's going on is: show search-path; default path is: "$user",public" this command can be issued by a regular user. however, if you happen to create new schemas, only the postgres user has total control of it (ONLY with qualified table's name if you don't update the postgres SU search_path variable, such as: schema2.table5), for a user, you must inclued the new schema in its search_path otherwise he'll see the schema but won't be able to access what's in it. (this not exactly true, as it depend on the permissions you're gonna GRANT to him, but until you haven't got further, this would be a loss of time) permanent alteration can be done by postgres user as: ALTER USER mybeloveduserthatilovesomuch SET search_path TO schema1,schema2,schema3.......; This is a very important command as most of the time you suppress any rights from the public schema (WARNING: there's a 'public' ROLE AND a 'public' SCHEMA!!!) in order to gain the possibility to enable/disable the CONNECT possibility for any user that must have access to this DB (and also other type of access). This also gives the user the possibility to retrieve rows from a table that is listed into its search_path. Things are a tiny bit more complicated, but this should do. JY -- Q: How many Democrats does it take to enjoy a good joke? A: One more than you can find. From gambas at ...1... Sat Sep 26 21:55:33 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 26 Sep 2009 21:55:33 +0200 Subject: [Gambas-user] clipboard paste doesn't work In-Reply-To: <200909191223.44973.rospolosco@...152...> References: <200909191223.44973.rospolosco@...152...> Message-ID: <200909262155.33411.gambas@...1...> > Hi, Benoit. > > It seems that Clipboard.Paste() doesn't work (see example pasteclip). > > I select a text somewhere, then press in the example "Paste from > clipboard", but it does not return the text I've selected. To make it work > I have to: > > 1) select the text; > 2) copy the text; > 3) press the button "Paste from clipboard" > There are two clipboards on X-window. One that is filled when you select something, and the other that is filled when you explicitely select the "copy" command. In Gambas, the Clipboard class only deals with the second clipboard, not the first one. Regards, -- Beno?t Minisini From gambas at ...1... Sat Sep 26 22:32:32 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 26 Sep 2009 22:32:32 +0200 Subject: [Gambas-user] gb.gtk evenement handling in Gambas 2 Message-ID: <200909262232.32684.gambas@...1...> Hi, In revision #2362, I backported from Gambas 3 the new GTK+ event management: - Basic events (Mouse, Keyboard, Enter & Leave) now work the same way as in gb.qt. Especially disabled controls now raise these events. - The input method management was fixed. I.e., Key.Text now returns the right value during a Key event. - The Application_KeyPress global event handler has been implemented. If some people can test this revision, before I release a 2.17 version with it, it would be cool. Otherwise, as usual, I will get bug reports just after the release and will have to make a 2.17.1! :-) Regards, -- Beno?t Minisini From gambas at ...1... Sat Sep 26 22:40:02 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 26 Sep 2009 22:40:02 +0200 Subject: [Gambas-user] another IDE cut/n paste behaviour In-Reply-To: <384d3900909181542h63d442a3m8bf101ee41e6d4a3@...627...> References: <1252493319.7035.10.camel@...40...> <1252495211.7035.27.camel@...40...> <384d3900909181542h63d442a3m8bf101ee41e6d4a3@...627...> Message-ID: <200909262240.02190.gambas@...1...> > I can confirm partly with Gambas 3 revision 2342. > On console CTRL+V and CTRL+C doesn't work, but "mouse right click > menu" copy and paste works. > > With Gambas 2.15, keys works as expected. > On IDE code editor, keys works with both Gambas 2 and 3, as expected. > > @Ubuntu 9.04 64bit. > > Bug fixed in revision #2364 for Gambas 3. Regards, -- Beno?t Minisini From gambas at ...1... Sat Sep 26 22:40:27 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 26 Sep 2009 22:40:27 +0200 Subject: [Gambas-user] another IDE cut/n paste behaviour In-Reply-To: <1253223932.6415.25.camel@...40...> References: <1252493319.7035.10.camel@...40...> <200909091258.06474.gambas@...1...> <1253223932.6415.25.camel@...40...> Message-ID: <200909262240.27670.gambas@...1...> > Am Mittwoch, den 09.09.2009, 12:58 +0200 schrieb Beno?t Minisini: > > > Salut, > > > > > > on gambas2 and gambas3 (since month) in code editor CTRL+C not always > > > works. > > > CTRL+V is OK, CTRL+X (I haven't tested) > > > > > > ContextMenu/Copy works well. > > > > > > Is that a gambas behaviour or Linux/Ubuntu 8.04/Xorg behaviour. > > > Or a problem on my box. > > > > Please give more details on when it does not work. > > Salut Benoit, > > back again today for that. > > Finally, for sure, in gambas2 2.16 when I try during debug, having > selected something of in the editor, I can't copy it with CTRL+C I have > to use the ContextMenu/Copy. > CTRL+V works. > I didn't succed in reproducing the problem on Gambas 2. Can you try with the latest revision? -- Beno?t Minisini From Karl.Reinl at ...9... Sun Sep 27 00:02:10 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Sun, 27 Sep 2009 00:02:10 +0200 Subject: [Gambas-user] another IDE cut/n paste behaviour In-Reply-To: <200909262240.27670.gambas@...1...> References: <1252493319.7035.10.camel@...40...> <200909091258.06474.gambas@...1...> <1253223932.6415.25.camel@...40...> <200909262240.27670.gambas@...1...> Message-ID: <1254002530.6424.24.camel@...40...> Am Samstag, den 26.09.2009, 22:40 +0200 schrieb Beno?t Minisini: > > Am Mittwoch, den 09.09.2009, 12:58 +0200 schrieb Beno?t Minisini: > > > > Salut, > > > > > > > > on gambas2 and gambas3 (since month) in code editor CTRL+C not always > > > > works. > > > > CTRL+V is OK, CTRL+X (I haven't tested) > > > > > > > > ContextMenu/Copy works well. > > > > > > > > Is that a gambas behaviour or Linux/Ubuntu 8.04/Xorg behaviour. > > > > Or a problem on my box. > > > > > > Please give more details on when it does not work. > > > > Salut Benoit, > > > > back again today for that. > > > > Finally, for sure, in gambas2 2.16 when I try during debug, having > > selected something of in the editor, I can't copy it with CTRL+C I have > > to use the ContextMenu/Copy. > > CTRL+V works. > > > > I didn't succed in reproducing the problem on Gambas 2. Can you try with the > latest revision? > Salut Benoit, I tried it twice: gambas2 rev 2363 on a Standalone-Laptop with kubuntu 9.04 and gambas2 rev 2364 on a box on a KVM-Switch (KVM=Keyboard ? Video ? Mouse, where CTRL is a soft key to switch) with ubuntu 8.04 On both, the same test and the same result : - starting the IDE - loading a project - pressing F8 to start -marking with a dbl-click a word (CALL it 'COPY-001' here) -pressing Ctrl+C -changing to the IDE-console -pressing Ctrl+V --------------> 'COPY-001' is insert +changing to the Edit-Window +marking by a dbl-click a other word (CALL it 'COPY-002' here) +pressing Ctrl+C +changing to the IDE-console +pressing Ctrl+V --------------> 'COPY-001' is insert and NOT 'COPY-002' as expected. *changing to the Edit-Window *marking by a dbl-click a other word (CALL it 'COPY-003' here) *using context-menu 'Copy' *changing to the IDE-console *pressing Ctrl+V --------------> 'COPY-003' is insert So the problem still persists. -- Amicalment Charlie From jussi.lahtinen at ...626... Sun Sep 27 02:33:13 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sun, 27 Sep 2009 03:33:13 +0300 Subject: [Gambas-user] another IDE cut/n paste behaviour In-Reply-To: <1254002530.6424.24.camel@...40...> References: <1252493319.7035.10.camel@...40...> <200909091258.06474.gambas@...1...> <1253223932.6415.25.camel@...40...> <200909262240.27670.gambas@...1...> <1254002530.6424.24.camel@...40...> Message-ID: <384d3900909261733q3063a14dl97a499e5cb065d21@...627...> Tested with Gambas 3 revision 2364 and Gambas 2.17, all work as expected. Jussi On Sun, Sep 27, 2009 at 01:02, Charlie Reinl wrote: > Am Samstag, den 26.09.2009, 22:40 +0200 schrieb Beno?t Minisini: >> > Am Mittwoch, den 09.09.2009, 12:58 +0200 schrieb Beno?t Minisini: >> > > > Salut, >> > > > >> > > > on gambas2 and gambas3 (since month) in code editor CTRL+C not always >> > > > works. >> > > > CTRL+V is OK, CTRL+X (I haven't tested) >> > > > >> > > > ContextMenu/Copy works well. >> > > > >> > > > Is that a gambas behaviour or Linux/Ubuntu 8.04/Xorg behaviour. >> > > > Or a problem on my box. >> > > >> > > Please give more details on when it does not work. >> > >> > Salut Benoit, >> > >> > back again today for that. >> > >> > Finally, for sure, in gambas2 2.16 when I try during debug, having >> > selected something of in the editor, I can't copy it with CTRL+C I have >> > to use the ContextMenu/Copy. >> > CTRL+V works. >> > >> >> I didn't succed in reproducing the problem on Gambas 2. Can you try with the >> latest revision? >> > Salut Benoit, > > I tried it twice: > gambas2 rev 2363 on a Standalone-Laptop with kubuntu 9.04 > and > gambas2 rev 2364 on a box on a KVM-Switch (KVM=Keyboard ? Video ? Mouse, > where CTRL is a soft key to switch) with ubuntu 8.04 > > On both, the same test and the same result : > - starting the IDE > - loading a project > - pressing F8 to start > ? ? ? ?-marking with a dbl-click a word (CALL it 'COPY-001' here) > ? ? ? ?-pressing Ctrl+C > ? ? ? ?-changing to the IDE-console > ? ? ? ?-pressing Ctrl+V ? --------------> 'COPY-001' is insert > ? ? ? ?+changing to the Edit-Window > ? ? ? ?+marking by a dbl-click a other word (CALL it 'COPY-002' here) > ? ? ? ?+pressing Ctrl+C > ? ? ? ?+changing to the IDE-console > ? ? ? ?+pressing Ctrl+V ? --------------> 'COPY-001' is insert and > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? NOT 'COPY-002' as expected. > ? ? ? ?*changing to the Edit-Window > ? ? ? ?*marking by a dbl-click a other word (CALL it 'COPY-003' here) > ? ? ? ?*using context-menu 'Copy' > ? ? ? ?*changing to the IDE-console > ? ? ? ?*pressing Ctrl+V ? --------------> 'COPY-003' is insert > > So the problem still persists. > -- > Amicalment > Charlie > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From doriano.blengino at ...1909... Sun Sep 27 11:03:27 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sun, 27 Sep 2009 11:03:27 +0200 Subject: [Gambas-user] how to start a file? In-Reply-To: <68652a0b0909251820j57a2bf2cy1c28bc880bb69bb8@...627...> References: <25416046.post@...1379...> <68652a0b0909141627r97bbac0r5eb01188ff0d5d76@...627...> <200909151522.42019.gambas@...1...> <68652a0b0909151604h7f19c21du39f30d2816beef02@...627...> <68652a0b0909251820j57a2bf2cy1c28bc880bb69bb8@...627...> Message-ID: <4ABF2A5F.9030000@...1909...> Robert JUHASZ ha scritto: > Hello, > > I'm very happy with this solution and was perfect as long as I used my > program myself. > Now I wanna put it in a common folder on the server and for storing the > files I'll use a folder. To avoid the direct access of this folder, I'll > make it protected. > > The question now is how can I handle this kind of folder from Gambas. I > don't wish to deal with the rights of teh folder. The idea is to give a read > and write password to the folder and use the password from Gambas according > to the user rights in Gambas. > > - the files will be displayed by a file view control. Is there any place of > this control to enter (from code) the reading / writing password of the > folder used by the control? > > - or, when using the Desktop.Open function, can I specify if I open the file > for read only? > Complicated matter... I don't understand well, but I will try to add some information you may miss. First of all, at the file system level there could be everything you need. A file can be made not accessible, or readonly, or fully writable, to every single user of the computer. This is not so simple, however, because when two different users must share some privileges, you must use groups and things get messy. Even so, protecting a folder has different effects than proteting files. For example, if you write-protect a folder, you only assure that in that folder no files will be added or deleted, but single files will remain writeable. I bet this is not what you intended. On the other hand, if a file (not its folder) is write protected to a user, then that user will have no way to modify the file - every program will open that file in read-only mode. To prevent the file from being deleted, its folder must be protected, not the file itself. Finally, to use such system, every user must login in the system using its own identifier; if you have only one copy of your program running, with different users alternating if front of it, then you should have your gambas program change user ID (there is a system call for this, but gambas don't seem to implement it). However, you can take advantage of /bin/sudo, which lets you impersonate other users. The system is configurable and not difficult to understand (see the manual page). About FileView control, it has no property for specifying a username, but you can use a textbox aside and ask the user to write its username. Desktop.Open, or any other "high level" shell function, can not "open a file read-only"; it is the final program that must be instructed to work in read-only, be it openoffice, or a CAD, or anything else. Perhaps not all the program can be instructed to do so. It is possible, however, to protect the file before launching the application, and remove the protection afterward, Or the file can be copied elsewhere and then opened, alerting the user that modifications will be lost. I don't know what you are trying to do, and what your final system should look (one computer? many? Several system-level users? Just one?) but the final solutions could be to manage the access rights inside the program - your program asks for credentials, and then decides what to show, what to open read-only and what to permit to be modified or deleted. There are add-ons for Linux which permit, at the filesystem level, to use ACLs (access control list). This way you can more easily grant permissions to single users without getting crazy with users and groups. Or you can make several folders with different permissions (one writeable to anyone, another only readeable to everyone, and so on). Hope I pointed out some useful idea, regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From rospolosco at ...152... Sun Sep 27 11:19:31 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Sun, 27 Sep 2009 11:19:31 +0200 Subject: [Gambas-user] clipboard paste doesn't work In-Reply-To: <200909262155.33411.gambas@...1...> References: <200909191223.44973.rospolosco@...152...> <200909262155.33411.gambas@...1...> Message-ID: <200909271119.31738.rospolosco@...152...> Il sabato 26 settembre 2009 21:55:33 Beno?t Minisini ha scritto: > > Hi, Benoit. > > > > It seems that Clipboard.Paste() doesn't work (see example pasteclip). > > > > I select a text somewhere, then press in the example "Paste from > > clipboard", but it does not return the text I've selected. To make it > > work I have to: > > > > 1) select the text; > > 2) copy the text; > > 3) press the button "Paste from clipboard" > > There are two clipboards on X-window. One that is filled when you select > something, and the other that is filled when you explicitely select the > "copy" command. > > In Gambas, the Clipboard class only deals with the second clipboard, not > the first one. > > Regards, Thanks for reply. It would be useful to have: Clipboard.PastePrimary Clipboard.PasteSecondary Just an idea. Regards, Stefano From rterry at ...1946... Sun Sep 27 12:09:00 2009 From: rterry at ...1946... (richard terry) Date: Sun, 27 Sep 2009 20:09:00 +1000 Subject: [Gambas-user] Connection.Create(tablename) question. Message-ID: <200909272009.00869.rterry@...1946...> I've saved images back to my tables for ages, but with very in-efficent code, so I looked at the picturedb sample and it works fine for postgres so I thought I'd just its method for saving the pitures. So: From rterry at ...1946... Sun Sep 27 23:15:52 2009 From: rterry at ...1946... (richard terry) Date: Mon, 28 Sep 2009 07:15:52 +1000 Subject: [Gambas-user] Connection.Create(tablename) question.re-sent Message-ID: <200909280715.52519.rterry@...1946...> This didnt seem to end up on the list, so I've sent again. I've saved images back to my tables for ages, but with very in-efficent code, so I looked at the picturedb sample and it works fine for postgres so I thought I'd just its method for saving the pitures. So: From rterry at ...1946... Mon Sep 28 08:02:32 2009 From: rterry at ...1946... (richard terry) Date: Mon, 28 Sep 2009 16:02:32 +1000 Subject: [Gambas-user] Bouncing emails ?missed posts/emails Message-ID: <200909281602.33010.rterry@...1946...> Hi LIst/benoit, My mailbox apparently overflowed and my ISP bounced all my emails for the last 24/24rs, so I wondered if anyone posted me or replied to my question about images if you could re-post. I'll repost it anyway to ensure it got to the list. Sorry. richard From rterry at ...1946... Mon Sep 28 08:03:23 2009 From: rterry at ...1946... (richard terry) Date: Mon, 28 Sep 2009 16:03:23 +1000 Subject: [Gambas-user] Connection.Create(tablename) question.re-sent Message-ID: <200909281603.23330.rterry@...1946...> This didnt seem to end up on the list, so I've sent again. I've saved images back to my tables for ages, but with very in-efficent code, so I looked at the picturedb sample and it works fine for postgres so I thought I'd just its method for saving the pitures. So: From dosida at ...626... Mon Sep 28 08:29:32 2009 From: dosida at ...626... (Dimitris Anogiatis) Date: Mon, 28 Sep 2009 00:29:32 -0600 Subject: [Gambas-user] Bouncing emails ?missed posts/emails In-Reply-To: <200909281602.33010.rterry@...1946...> References: <200909281602.33010.rterry@...1946...> Message-ID: <82bffccf0909272329v32fcb88ascbe61c46521a4daa@...627...> Hey Richard, I don't see any replies yet so I assume someone is trying to figure out a reply :) Keep up the great work :) Regards Dimitris On Mon, Sep 28, 2009 at 12:02 AM, richard terry wrote: > Hi LIst/benoit, > > My mailbox apparently overflowed and my ISP bounced all my emails for the > last > 24/24rs, so I wondered if anyone posted me or replied to my question about > images if you could re-post. > > I'll repost it anyway to ensure it got to the list. > > Sorry. > > richard > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From Karl.Reinl at ...9... Mon Sep 28 09:48:31 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Mon, 28 Sep 2009 09:48:31 +0200 Subject: [Gambas-user] clipboard paste doesn't work In-Reply-To: <200909262155.33411.gambas@...1...> References: <200909191223.44973.rospolosco@...152...> <200909262155.33411.gambas@...1...> Message-ID: <1254124112.6428.1.camel@...40...> Am Samstag, den 26.09.2009, 21:55 +0200 schrieb Beno?t Minisini: > > Hi, Benoit. > > > > It seems that Clipboard.Paste() doesn't work (see example pasteclip). > > > > I select a text somewhere, then press in the example "Paste from > > clipboard", but it does not return the text I've selected. To make it work > > I have to: > > > > 1) select the text; > > 2) copy the text; > > 3) press the button "Paste from clipboard" > > > > There are two clipboards on X-window. One that is filled when you select > something, and the other that is filled when you explicitely select the "copy" > command. > > In Gambas, the Clipboard class only deals with the second clipboard, not the > first one. > > Regards, > Salut, is there a way to inspect the first clipboard ? -- Amicalment Charlie From dosida at ...626... Mon Sep 28 10:43:35 2009 From: dosida at ...626... (Dimitris Anogiatis) Date: Mon, 28 Sep 2009 02:43:35 -0600 Subject: [Gambas-user] stop file COPY Message-ID: <82bffccf0909280143i22dd9825x5ae294e6b97c7f99@...627...> Hey guys, Does anyone if it's possible to cancel a file COPY of a pretty big file (a few hundred megabytes) in the middle of the action? I'm trying to add this functionality to my backup project but I can't find any parameters on the Copy command within the documentation. Regards Dimitris From wdahn at ...1000... Mon Sep 28 11:51:26 2009 From: wdahn at ...1000... (Werner) Date: Mon, 28 Sep 2009 17:51:26 +0800 Subject: [Gambas-user] Bouncing emails ?missed posts/emails In-Reply-To: <200909281602.33010.rterry@...1946...> References: <200909281602.33010.rterry@...1946...> Message-ID: <4AC0871E.7030007@...1000...> richard terry wrote: > Hi LIst/benoit, > > My mailbox apparently overflowed and my ISP bounced all my emails for the last > 24/24rs, so I wondered if anyone posted me or replied to my question about > images if you could re-post. > > I'll repost it anyway to ensure it got to the list. > > Sorry. > > richard > http://sourceforge.net/mailarchive/forum.php?forum_name=gambas-user Regards Werner From robert1juhasz at ...626... Mon Sep 28 13:25:03 2009 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Mon, 28 Sep 2009 13:25:03 +0200 Subject: [Gambas-user] how to start a file? In-Reply-To: <4ABF2A5F.9030000@...1909...> References: <25416046.post@...1379...> <68652a0b0909141627r97bbac0r5eb01188ff0d5d76@...627...> <200909151522.42019.gambas@...1...> <68652a0b0909151604h7f19c21du39f30d2816beef02@...627...> <68652a0b0909251820j57a2bf2cy1c28bc880bb69bb8@...627...> <4ABF2A5F.9030000@...1909...> Message-ID: <68652a0b0909280425v6ccf4867qe28e022bce32b92b@...627...> Hi, Probably I'll try to do it directly with the files as you told. About the project: it is a small project follower with different users. And I only want to make the files accesible for those who participate in the project. So it isn't possible to define on the system level. The best could have been to have a password for the main folder so the users could access the files only through my application. I suppose that when creating a directory or copying a file by Gambas, I cannot define/change the attributes. At leas with VB I couldn't. OK, maybe I need to reconsider if I find a better way for storing the files. Regards, Robi 2009/9/27 Doriano Blengino > Robert JUHASZ ha scritto: > > Hello, > > > > I'm very happy with this solution and was perfect as long as I used my > > program myself. > > Now I wanna put it in a common folder on the server and for storing the > > files I'll use a folder. To avoid the direct access of this folder, I'll > > make it protected. > > > > The question now is how can I handle this kind of folder from Gambas. I > > don't wish to deal with the rights of teh folder. The idea is to give a > read > > and write password to the folder and use the password from Gambas > according > > to the user rights in Gambas. > > > > - the files will be displayed by a file view control. Is there any place > of > > this control to enter (from code) the reading / writing password of the > > folder used by the control? > > > > - or, when using the Desktop.Open function, can I specify if I open the > file > > for read only? > > > Complicated matter... I don't understand well, but I will try to add > some information you may miss. > > First of all, at the file system level there could be everything you > need. A file can be made not accessible, or readonly, or fully writable, > to every single user of the computer. This is not so simple, however, > because when two different users must share some privileges, you must > use groups and things get messy. Even so, protecting a folder has > different effects than proteting files. For example, if you > write-protect a folder, you only assure that in that folder no files > will be added or deleted, but single files will remain writeable. I bet > this is not what you intended. On the other hand, if a file (not its > folder) is write protected to a user, then that user will have no way to > modify the file - every program will open that file in read-only mode. > To prevent the file from being deleted, its folder must be protected, > not the file itself. > > Finally, to use such system, every user must login in the system using > its own identifier; if you have only one copy of your program running, > with different users alternating if front of it, then you should have > your gambas program change user ID (there is a system call for this, but > gambas don't seem to implement it). However, you can take advantage of > /bin/sudo, which lets you impersonate other users. The system is > configurable and not difficult to understand (see the manual page). > > About FileView control, it has no property for specifying a username, > but you can use a textbox aside and ask the user to write its username. > > Desktop.Open, or any other "high level" shell function, can not "open a > file read-only"; it is the final program that must be instructed to work > in read-only, be it openoffice, or a CAD, or anything else. Perhaps not > all the program can be instructed to do so. It is possible, however, to > protect the file before launching the application, and remove the > protection afterward, Or the file can be copied elsewhere and then > opened, alerting the user that modifications will be lost. > > I don't know what you are trying to do, and what your final system > should look (one computer? many? Several system-level users? Just one?) > but the final solutions could be to manage the access rights inside the > program - your program asks for credentials, and then decides what to > show, what to open read-only and what to permit to be modified or deleted. > > There are add-ons for Linux which permit, at the filesystem level, to > use ACLs (access control list). This way you can more easily grant > permissions to single users without getting crazy with users and groups. > Or you can make several folders with different permissions (one > writeable to anyone, another only readeable to everyone, and so on). > > Hope I pointed out some useful idea, > regards, > > -- > Doriano Blengino > > "Listen twice before you speak. > This is why we have two ears, but only one mouth." > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From robert1juhasz at ...626... Mon Sep 28 13:29:48 2009 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Mon, 28 Sep 2009 13:29:48 +0200 Subject: [Gambas-user] serial port In-Reply-To: <4AB758F6.8070100@...1940...> References: <25518421.post@...1379...> <20090919163437.M15768@...951...> <68652a0b0909192320s5ac22c22h20d819dd2822ab9@...627...> <4AB758F6.8070100@...1940...> Message-ID: <68652a0b0909280429l597142aj6384c812b1595568@...627...> Hello, One more question to the same project. It is a measurement program where the user can give equations for calculated quantities. Is there an easy way in Gambas to execute them? For example if I have a string (formula) of "2*3+6*(4-1)" how can I calculate the result? Thanks, Robi 2009/9/21 Mike > Robert JUHASZ wrote: > > Useful info, I'll do like that. > > Thanks, Robi > > > > 2009/9/19 nando > > > > > >> In my Linux serial port experience, serial port devices are named: > >> > >> /dev/ttyS0..9 and upwards > >> /dev/ttyUSB0..9 and upwards depending on what is plugged in USB. > >> > >> I have done a lot of serial port stuff with Gambas. > >> > >> I know that trying to open then with the serial port control > >> will fail is non-exising port. This error can be detected. > >> > >> It can be possible to open a port as a test to see if it exists, but you > >> may be changing parameters and stealing chars from an existing > connection. > >> I've had this happen too....really messes things up. > >> > >> -Fernando > >> > >> > >> ---------- Original Message ----------- > >> From: yuhej > >> To: gambas-user at lists.sourceforge.net > >> Sent: Fri, 18 Sep 2009 21:08:04 -0700 (PDT) > >> Subject: [Gambas-user] serial port > >> > >> > >>> Hello, > >>> > >>> I can see that Gambas can handle the serial ports which is a very good > >>> > >> news > >> > >>> for me. > >>> Can someone tell me how can I get the list of the serial ports of my > >>> computer? I wish to make an autodetect function and only allow to > select > >>> from the working serial ports. > >>> > >>> Robi > >>> -- > >>> View this message in context: > >>> > >> http://www.nabble.com/serial-port-tp25518421p25518421.html > >> > >>> Sent from the gambas-user mailing list archive at Nabble.com. > >>> > >>> > >>> > >> > ------------------------------------------------------------------------------ > >> > >>> Come build with us! The BlackBerry® Developer Conference in SF, CA > >>> is the only developer event you need to attend this year. Jumpstart > your > >>> developing skills, take BlackBerry mobile applications to market and > stay > >>> ahead of the curve. Join us from November 9-12, 2009. Register > >>> > >> now! > >> > >>> http://p.sf.net/sfu/devconf > >>> _______________________________________________ > >>> Gambas-user mailing list > >>> Gambas-user at lists.sourceforge.net > >>> https://lists.sourceforge.net/lists/listinfo/gambas-user > >>> > >> ------- End of Original Message ------- > >> > >> > >> > >> > ------------------------------------------------------------------------------ > >> Come build with us! The BlackBerry® Developer Conference in SF, CA > >> is the only developer event you need to attend this year. Jumpstart your > >> developing skills, take BlackBerry mobile applications to market and > stay > >> ahead of the curve. Join us from November 9-12, 2009. Register > now! > >> http://p.sf.net/sfu/devconf > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > >> > > > ------------------------------------------------------------------------------ > > Come build with us! The BlackBerry® Developer Conference in SF, CA > > is the only developer event you need to attend this year. Jumpstart your > > developing skills, take BlackBerry mobile applications to market and stay > > ahead of the curve. Join us from November 9-12, 2009. Register > now! > > http://p.sf.net/sfu/devconf > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > Is the list up. > > Mike > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From wdahn at ...1000... Mon Sep 28 13:44:57 2009 From: wdahn at ...1000... (Werner) Date: Mon, 28 Sep 2009 19:44:57 +0800 Subject: [Gambas-user] serial port In-Reply-To: <68652a0b0909280429l597142aj6384c812b1595568@...627...> References: <25518421.post@...1379...> <20090919163437.M15768@...951...> <68652a0b0909192320s5ac22c22h20d819dd2822ab9@...627...> <4AB758F6.8070100@...1940...> <68652a0b0909280429l597142aj6384c812b1595568@...627...> Message-ID: <4AC0A1B9.5030604@...1000...> Robert JUHASZ wrote: > Hello, > > One more question to the same project. > It is a measurement program where the user can give equations for calculated > quantities. Is there an easy way in Gambas to execute them? For example if I > have a string (formula) of "2*3+6*(4-1)" how can I calculate the result? > > Thanks, Robi > with Eval Regards Werner PS: It is better to start a new thread for a new question. From gambas at ...1... Mon Sep 28 14:38:08 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 28 Sep 2009 14:38:08 +0200 Subject: [Gambas-user] clipboard paste doesn't work In-Reply-To: <1254124112.6428.1.camel@...40...> References: <200909191223.44973.rospolosco@...152...> <200909262155.33411.gambas@...1...> <1254124112.6428.1.camel@...40...> Message-ID: <200909281438.08058.gambas@...1...> > Am Samstag, den 26.09.2009, 21:55 +0200 schrieb Beno?t Minisini: > > > Hi, Benoit. > > > > > > It seems that Clipboard.Paste() doesn't work (see example pasteclip). > > > > > > I select a text somewhere, then press in the example "Paste from > > > clipboard", but it does not return the text I've selected. To make it > > > work I have to: > > > > > > 1) select the text; > > > 2) copy the text; > > > 3) press the button "Paste from clipboard" > > > > There are two clipboards on X-window. One that is filled when you select > > something, and the other that is filled when you explicitely select the > > "copy" command. > > > > In Gambas, the Clipboard class only deals with the second clipboard, not > > the first one. > > > > Regards, > > Salut, > is there a way to inspect the first clipboard ? > No. But if I find a clean way to do that, I may provide an access to the "primary" clipboard in Gambas 3. Regards, -- Beno?t Minisini From gambas at ...1... Mon Sep 28 14:35:01 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 28 Sep 2009 14:35:01 +0200 Subject: [Gambas-user] stop file COPY In-Reply-To: <82bffccf0909280143i22dd9825x5ae294e6b97c7f99@...627...> References: <82bffccf0909280143i22dd9825x5ae294e6b97c7f99@...627...> Message-ID: <200909281435.01692.gambas@...1...> > Hey guys, > > Does anyone if it's possible to cancel a file COPY of a pretty big file > (a few hundred megabytes) in the middle of the action? > > I'm trying to add this functionality to my backup project but I can't find > any parameters on the Copy command within the documentation. > > Regards > Dimitris You can't. You must write your own copy command to handle that. Regards, -- Beno?t Minisini From gambas at ...1... Mon Sep 28 14:44:22 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 28 Sep 2009 14:44:22 +0200 Subject: [Gambas-user] how to start a file? In-Reply-To: <68652a0b0909280425v6ccf4867qe28e022bce32b92b@...627...> References: <25416046.post@...1379...> <4ABF2A5F.9030000@...1909...> <68652a0b0909280425v6ccf4867qe28e022bce32b92b@...627...> Message-ID: <200909281444.22043.gambas@...1...> > Hi, > > Probably I'll try to do it directly with the files as you told. > About the project: it is a small project follower with different users. And > I only want to make the files accesible for those who participate in the > project. So it isn't possible to define on the system level. The best could > have been to have a password for the main folder so the users could access > the files only through my application. That does not work like that : rights are based on user identity. A human user usually changes his identity only for becoming root for doing administrative tasks. To do what you want, you have to create a group for your project, adds to the group all users that should access these files, and grant to the files read and write access only to the group and the owner. You do the same thing to grant access to a device only for specific users. A group for cdroms, cdwriters, parallel ports devices, and so on. Only members of these groups can use the device. > > I suppose that when creating a directory or copying a file by Gambas, I > cannot define/change the attributes. At leas with VB I couldn't. Yes, but EXEC [ "chown" ... ] is just one line of code in Gambas. Regards, -- Beno?t Minisini From robert1juhasz at ...626... Mon Sep 28 14:33:25 2009 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Mon, 28 Sep 2009 14:33:25 +0200 Subject: [Gambas-user] serial port In-Reply-To: <4AC0A1B9.5030604@...1000...> References: <25518421.post@...1379...> <20090919163437.M15768@...951...> <68652a0b0909192320s5ac22c22h20d819dd2822ab9@...627...> <4AB758F6.8070100@...1940...> <68652a0b0909280429l597142aj6384c812b1595568@...627...> <4AC0A1B9.5030604@...1000...> Message-ID: <68652a0b0909280533y27667087k19fcb9dc1c450312@...627...> thanks a lot !!! 2009/9/28 Werner > Robert JUHASZ wrote: > > Hello, > > > > One more question to the same project. > > It is a measurement program where the user can give equations for > calculated > > quantities. Is there an easy way in Gambas to execute them? For example > if I > > have a string (formula) of "2*3+6*(4-1)" how can I calculate the result? > > > > Thanks, Robi > > > with Eval > > Regards > Werner > > PS: It is better to start a new thread for a new question. > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From nando_f at ...951... Mon Sep 28 14:20:58 2009 From: nando_f at ...951... (nando) Date: Mon, 28 Sep 2009 07:20:58 -0500 Subject: [Gambas-user] stop file COPY In-Reply-To: <82bffccf0909280143i22dd9825x5ae294e6b97c7f99@...627...> References: <82bffccf0909280143i22dd9825x5ae294e6b97c7f99@...627...> Message-ID: <20090928121903.M94246@...951...> You would have to find the pid of the copy program such as something like the following to help find the exact command: pgrep "cp..." then use kill, pkill This may lesd you in a direction. -Fernando ---------- Original Message ----------- From: Dimitris Anogiatis To: mailing list for gambas users Sent: Mon, 28 Sep 2009 02:43:35 -0600 Subject: [Gambas-user] stop file COPY > Hey guys, > > Does anyone if it's possible to cancel a file COPY of a pretty big file > (a few hundred megabytes) in the middle of the action? > > I'm trying to add this functionality to my backup project but I can't find > any parameters on the Copy command within the documentation. > > Regards > Dimitris > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From rospolosco at ...152... Mon Sep 28 16:00:41 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Mon, 28 Sep 2009 16:00:41 +0200 Subject: [Gambas-user] clipboard paste doesn't work In-Reply-To: <1254124112.6428.1.camel@...40...> References: <200909191223.44973.rospolosco@...152...> <200909262155.33411.gambas@...1...> <1254124112.6428.1.camel@...40...> Message-ID: <200909281600.41355.rospolosco@...152...> Il luned? 28 settembre 2009 09:48:31 Charlie Reinl ha scritto: > Am Samstag, den 26.09.2009, 21:55 +0200 schrieb Beno?t Minisini: > > > Hi, Benoit. > > > > > > It seems that Clipboard.Paste() doesn't work (see example pasteclip). > > > > > > I select a text somewhere, then press in the example "Paste from > > > clipboard", but it does not return the text I've selected. To make it > > > work I have to: > > > > > > 1) select the text; > > > 2) copy the text; > > > 3) press the button "Paste from clipboard" > > > > There are two clipboards on X-window. One that is filled when you select > > something, and the other that is filled when you explicitely select the > > "copy" command. > > > > In Gambas, the Clipboard class only deals with the second clipboard, not > > the first one. > > > > Regards, > > Salut, > is there a way to inspect the first clipboard ? I tried different solution, because I need this option in one application. I don't want users install xsel: http://www.vergenet.net/~conrad/software/xsel/#intro So looking around I found a python script that does the job and can be easily distributed within a gambas project: Here's the code for using once. Best way is copying the script on startup somewhere. PUBLIC SUB Main() DIM sClipboardPrimary, sPythonScript AS String sPythonScript = Temp$ File.Save(sPythonSCript, "import gtk\nclip = gtk.clipboard_get(selection='PRIMARY')\nprint clip.wait_for_text()") SHELL "python " & sPythonSCript TO sClipboardPrimary PRINT sClipboardPrimary END From zerkowski at ...395... Mon Sep 28 15:10:56 2009 From: zerkowski at ...395... (zerkowski sur bouquiniste.biz) Date: Mon, 28 Sep 2009 15:10:56 +0200 Subject: [Gambas-user] stop file COPY In-Reply-To: <200909281435.01692.gambas@...1...> References: <82bffccf0909280143i22dd9825x5ae294e6b97c7f99@...627...> <200909281435.01692.gambas@...1...> Message-ID: <4AC0B5E0.9060501@...395...> From doriano.blengino at ...1909... Mon Sep 28 17:04:42 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Mon, 28 Sep 2009 17:04:42 +0200 Subject: [Gambas-user] how to start a file? In-Reply-To: <200909281444.22043.gambas@...1...> References: <25416046.post@...1379...> <4ABF2A5F.9030000@...1909...> <68652a0b0909280425v6ccf4867qe28e022bce32b92b@...627...> <200909281444.22043.gambas@...1...> Message-ID: <4AC0D08A.4030000@...1909...> Beno?t Minisini ha scritto: >> Hi, >> >> Probably I'll try to do it directly with the files as you told. >> About the project: it is a small project follower with different users. And >> I only want to make the files accesible for those who participate in the >> project. So it isn't possible to define on the system level. The best could >> have been to have a password for the main folder so the users could access >> the files only through my application. >> > > That does not work like that : rights are based on user identity. A human user > usually changes his identity only for becoming root for doing administrative > tasks. > > To do what you want, you have to create a group for your project, adds to the > group all users that should access these files, and grant to the files read > and write access only to the group and the owner. > > You do the same thing to grant access to a device only for specific users. A > group for cdroms, cdwriters, parallel ports devices, and so on. Only members > of these groups can use the device. > Or you can give the files the root owner (or whatever else), and access those files exclusively with your gambas application, makind it SUID (is this possible, Benoit? I mean - a SUID bytecode; probably not). Regards, Doriano From gambas at ...1... Mon Sep 28 17:23:11 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 28 Sep 2009 17:23:11 +0200 Subject: [Gambas-user] how to start a file? In-Reply-To: <4AC0D08A.4030000@...1909...> References: <25416046.post@...1379...> <200909281444.22043.gambas@...1...> <4AC0D08A.4030000@...1909...> Message-ID: <200909281723.11357.gambas@...1...> > Beno?t Minisini ha scritto: > >> Hi, > >> > >> Probably I'll try to do it directly with the files as you told. > >> About the project: it is a small project follower with different users. > >> And I only want to make the files accesible for those who participate in > >> the project. So it isn't possible to define on the system level. The > >> best could have been to have a password for the main folder so the users > >> could access the files only through my application. > > > > That does not work like that : rights are based on user identity. A human > > user usually changes his identity only for becoming root for doing > > administrative tasks. > > > > To do what you want, you have to create a group for your project, adds to > > the group all users that should access these files, and grant to the > > files read and write access only to the group and the owner. > > > > You do the same thing to grant access to a device only for specific > > users. A group for cdroms, cdwriters, parallel ports devices, and so on. > > Only members of these groups can use the device. > > Or you can give the files the root owner (or whatever else), and access > those files exclusively with your gambas application, makind it SUID (is > this possible, Benoit? I mean - a SUID bytecode; probably not). > > Regards, > Doriano > AFAIK, SUID gambas programs are forbidden by Linux, because of the '#!' magic at the beginning of the archive file. Regards, -- Beno?t Minisini From Karl.Reinl at ...9... Mon Sep 28 18:55:37 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Mon, 28 Sep 2009 18:55:37 +0200 Subject: [Gambas-user] clipboard paste doesn't work In-Reply-To: <200909281600.41355.rospolosco@...152...> References: <200909191223.44973.rospolosco@...152...> <200909262155.33411.gambas@...1...> <1254124112.6428.1.camel@...40...> <200909281600.41355.rospolosco@...152...> Message-ID: <1254156937.6854.2.camel@...40...> Am Montag, den 28.09.2009, 16:00 +0200 schrieb Stefano Palmeri: > Il luned? 28 settembre 2009 09:48:31 Charlie Reinl ha scritto: > > Am Samstag, den 26.09.2009, 21:55 +0200 schrieb Beno?t Minisini: > > > > Hi, Benoit. > > > > > > > > It seems that Clipboard.Paste() doesn't work (see example pasteclip). > > > > > > > > I select a text somewhere, then press in the example "Paste from > > > > clipboard", but it does not return the text I've selected. To make it > > > > work I have to: > > > > > > > > 1) select the text; > > > > 2) copy the text; > > > > 3) press the button "Paste from clipboard" > > > > > > There are two clipboards on X-window. One that is filled when you select > > > something, and the other that is filled when you explicitely select the > > > "copy" command. > > > > > > In Gambas, the Clipboard class only deals with the second clipboard, not > > > the first one. > > > > > > Regards, > > > > Salut, > > is there a way to inspect the first clipboard ? > > I tried different solution, because I need this option in one application. > I don't want users install xsel: > > http://www.vergenet.net/~conrad/software/xsel/#intro > > So looking around I found a python script that does the job and > can be easily distributed within a gambas project: > Here's the code for using once. Best way is copying the script > on startup somewhere. > > > PUBLIC SUB Main() > > DIM sClipboardPrimary, sPythonScript AS String > sPythonScript = Temp$ > > File.Save(sPythonSCript, "import gtk\nclip = > gtk.clipboard_get(selection='PRIMARY')\nprint clip.wait_for_text()") > > SHELL "python " & sPythonSCript TO sClipboardPrimary > PRINT sClipboardPrimary > > END Salut Stefano, I just want to know where my Ctrl+C ends, so I thinks that will do it. You will have news about. Thank you very much! -- Cordialement Charlie From Karl.Reinl at ...9... Mon Sep 28 20:44:03 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Mon, 28 Sep 2009 20:44:03 +0200 Subject: [Gambas-user] clipboard paste doesn't work In-Reply-To: <1254156937.6854.2.camel@...40...> References: <200909191223.44973.rospolosco@...152...> <200909262155.33411.gambas@...1...> <1254124112.6428.1.camel@...40...> <200909281600.41355.rospolosco@...152...> <1254156937.6854.2.camel@...40...> Message-ID: <1254163443.6854.24.camel@...40...> Am Montag, den 28.09.2009, 18:55 +0200 schrieb Charlie Reinl: > Am Montag, den 28.09.2009, 16:00 +0200 schrieb Stefano Palmeri: > > Il luned? 28 settembre 2009 09:48:31 Charlie Reinl ha scritto: > > > Am Samstag, den 26.09.2009, 21:55 +0200 schrieb Beno?t Minisini: > > > > > Hi, Benoit. > > > > > > > > > > It seems that Clipboard.Paste() doesn't work (see example pasteclip). > > > > > > > > > > I select a text somewhere, then press in the example "Paste from > > > > > clipboard", but it does not return the text I've selected. To make it > > > > > work I have to: > > > > > > > > > > 1) select the text; > > > > > 2) copy the text; > > > > > 3) press the button "Paste from clipboard" > > > > > > > > There are two clipboards on X-window. One that is filled when you select > > > > something, and the other that is filled when you explicitely select the > > > > "copy" command. > > > > > > > > In Gambas, the Clipboard class only deals with the second clipboard, not > > > > the first one. > > > > > > > > Regards, > > > > > > Salut, > > > is there a way to inspect the first clipboard ? > > > > I tried different solution, because I need this option in one application. > > I don't want users install xsel: > > > > http://www.vergenet.net/~conrad/software/xsel/#intro > > > > So looking around I found a python script that does the job and > > can be easily distributed within a gambas project: > > Here's the code for using once. Best way is copying the script > > on startup somewhere. > > > > > > PUBLIC SUB Main() > > > > DIM sClipboardPrimary, sPythonScript AS String > > sPythonScript = Temp$ > > > > File.Save(sPythonSCript, "import gtk\nclip = > > gtk.clipboard_get(selection='PRIMARY')\nprint clip.wait_for_text()") > > > > SHELL "python " & sPythonSCript TO sClipboardPrimary > > PRINT sClipboardPrimary > > > > END > > Salut Stefano, > > I just want to know where my Ctrl+C ends, so I thinks that will do it. > > You will have news about. Thank you very much! > Hi all, made a small project on base of Stefano's script, in an expanded version, now I can say CTRL+C and Context-Copy is not the same for me on gambas2.17 Charlie -------------- next part -------------- A non-text attachment was scrubbed... Name: copy_and paste_test.tar.gz Type: application/x-compressed-tar Size: 8028 bytes Desc: not available URL: From robert1juhasz at ...626... Tue Sep 29 13:29:20 2009 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Tue, 29 Sep 2009 13:29:20 +0200 Subject: [Gambas-user] how to start a file? In-Reply-To: <200909281723.11357.gambas@...1...> References: <25416046.post@...1379...> <200909281444.22043.gambas@...1...> <4AC0D08A.4030000@...1909...> <200909281723.11357.gambas@...1...> Message-ID: <68652a0b0909290429o149ac990j5f97e534acee6e9a@...627...> Can it be an other option to load files to the mysql database as BLOB? If yes can someone tell me the command to upload and download the file from/to a certain location? This would solve my problem with the rights. Thx, Robi From ihedenius at ...43... Tue Sep 29 19:02:29 2009 From: ihedenius at ...43... (stderr) Date: Tue, 29 Sep 2009 10:02:29 -0700 (PDT) Subject: [Gambas-user] TextEdit copy&Paste and removal of hyper tags Message-ID: <25666934.post@...1379...> hi, I wanted to make a text editor that recognized hyper links. So I used 'TextEdit'. To extract the plain text I tried to use SelectAll + Copy + Paste like this: PUBLIC SUB Form_Open() DIM txt AS String PRINT "?abc?" TextEdit1.Text = "?abc?" TextEdit1.SelectAll() TextEdit1.Copy() txt = Clipboard.Paste() PRINT txt END ?abc? ?abc? but noticed that while it handles some special characters (like '?') other gets lost (and replaced by '?'). Above example uses 'Left & Right double quotation mark's which are lost and replaced by '?' (code 63). So it seems the only option is to parse the 'TextEdit1.Text' buffer or some special characters are lost. By trial and error I've noted that if I set 'TextEdit.ReadOnly=true' it will remove all hypertext tags. Except when it doesn't. I don't know how to predict when the 'TextEdit1.Text' buffer will contain hypertext tags and when it will not. Is there a way to remove the hypertext links that always works ? Or make it predictable (which amounts to the same thing). * Can the latest stable version (2.16.0) coexist with my current straight from 'Debian lenny' repository 2.7 ? I.e. can I have both installed ? Gambas 2.7 on Debian Lenny. regards, -- View this message in context: http://www.nabble.com/TextEdit-copy-Paste-and-removal-of-hyper-tags-tp25666934p25666934.html Sent from the gambas-user mailing list archive at Nabble.com. From tmp2009 at ...2180... Tue Sep 29 19:03:21 2009 From: tmp2009 at ...2180... (nero) Date: Tue, 29 Sep 2009 19:03:21 +0200 Subject: [Gambas-user] tableview Message-ID: <1ar9p6-2e5.ln1@...2181...> Hi, when using a tableview in gambas3 if I doubleclick between two columns all columns autoresize to best fit. How can I have the same by code without do nothink with mouse ? thank's, marco. -- E' Primavera. I sensi si risvegliano. Le giornate si allungano, e non solo quelle... O -----------------> O From gambas at ...1... Tue Sep 29 19:23:05 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 29 Sep 2009 19:23:05 +0200 Subject: [Gambas-user] tableview In-Reply-To: <1ar9p6-2e5.ln1@...2181...> References: <1ar9p6-2e5.ln1@...2181...> Message-ID: <200909291923.05335.gambas@...1...> > Hi, > > when using a tableview in gambas3 if I doubleclick between two columns all > columns autoresize to best fit. > > How can I have the same by code without do nothink with mouse ? > > thank's, > marco. > Try to put -1 in the TableView.Columns.Width property. If I remember, it does not work correctly if your data comes from the Data event. Regards, -- Beno?t Minisini From tmp2009 at ...2180... Tue Sep 29 19:32:40 2009 From: tmp2009 at ...2180... (nero) Date: Tue, 29 Sep 2009 19:32:40 +0200 Subject: [Gambas-user] tableview References: <1ar9p6-2e5.ln1@...2181...> <200909291923.05335.gambas@...1...> Message-ID: <11t9p6-276.ln1@...2181...> Beno?t Minisini wrote: > Try to put -1 in the TableView.Columns.Width property. If I remember, it > does not work correctly if your data comes from the Data event. no , it don't work , it make all columns ~ 10 px . Isn't there a way to call the directly the mouse action ? like call Tableview_Click but sending the double click between columns ? thank's. -- Legge di Preudhomme sul Lavaggio delle Finestre: E' dall'altra parte. From gambas at ...1... Tue Sep 29 19:42:02 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 29 Sep 2009 19:42:02 +0200 Subject: [Gambas-user] tableview In-Reply-To: <11t9p6-276.ln1@...2181...> References: <1ar9p6-2e5.ln1@...2181...> <200909291923.05335.gambas@...1...> <11t9p6-276.ln1@...2181...> Message-ID: <200909291942.03034.gambas@...1...> > Beno?t Minisini wrote: > > Try to put -1 in the TableView.Columns.Width property. If I remember, it > > does not work correctly if your data comes from the Data event. > > no , it don't work , it make all columns ~ 10 px . > > Isn't there a way to call the directly the mouse action ? > like call Tableview_Click but sending the double click between columns ? > > thank's. > No, there is no way to do that. But if it does not work by code, it should not work with the mouse too. Strange... How do you fill the contents of the TableView? -- Beno?t Minisini From jussi.lahtinen at ...626... Tue Sep 29 20:54:46 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 29 Sep 2009 21:54:46 +0300 Subject: [Gambas-user] Stack backtrace window Message-ID: <384d3900909291154r2bbfc5adu5695e2cbd6ba555f@...627...> Hi! Where the stack backtrace window disappear? Talking about Gambas 3, revision 2364. @Ubuntu 9.04 64bit Jussi From jussi.lahtinen at ...626... Tue Sep 29 22:02:32 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 29 Sep 2009 23:02:32 +0300 Subject: [Gambas-user] UI controls copy paste problem. Message-ID: <384d3900909291302h1122f31co37931ceafbd07803@...627...> Hi! In Gambas 3 revision 2364, you can copy example button, but paste option is greyed out (also CTRL + V is not working). So, you cannot actually copy/paste any controls. Jussi From rterry at ...1946... Wed Sep 30 03:34:22 2009 From: rterry at ...1946... (richard terry) Date: Wed, 30 Sep 2009 11:34:22 +1000 Subject: [Gambas-user] fouled up svn question Message-ID: <200909301134.22614.rterry@...1946...> Gambas has fouled up my svn, I think benoit is aware of the issue but in the meantime I can't commit. It occurred around renaming a directory in gambas. When I last did an update this was the outcome D help/clinical/familyhistory Updated to revision 202. I then tried a commit but the directory is still physically on the disk and there is a little padlock on the directory name richard ~/coding/trunk $ svn commit -m "more help" svn: Commit failed (details follow): svn: Unable to lock '/home/richard/coding/trunk/help/clinical/familyhistory' does anyone know how to resolve this sort of problem? Regards richard From gambas at ...1... Wed Sep 30 08:56:05 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 30 Sep 2009 08:56:05 +0200 Subject: [Gambas-user] fouled up svn question In-Reply-To: <200909301134.22614.rterry@...1946...> References: <200909301134.22614.rterry@...1946...> Message-ID: <200909300856.05504.gambas@...1...> > Gambas has fouled up my svn, I think benoit is aware of the issue but in > the meantime I can't commit. > > It occurred around renaming a directory in gambas. > > When I last did an update this was the outcome > D help/clinical/familyhistory > Updated to revision 202. > > I then tried a commit but the directory is still physically on the disk and > there is a little padlock on the directory name > > richard ~/coding/trunk $ svn commit -m "more help" > svn: Commit failed (details follow): > svn: Unable to lock > '/home/richard/coding/trunk/help/clinical/familyhistory' > > does anyone know how to resolve this sort of problem? > > Regards > > richard > Gambas is not necessarily the cause, svn is powerful enough to screw up itself in many many ways. Do what I have already told you: checkout somewhere else, apply your changes there by hand, to start from a fresh local repository. Regards, -- Beno?t Minisini From tmp2009 at ...2180... Wed Sep 30 09:42:03 2009 From: tmp2009 at ...2180... (nero) Date: Wed, 30 Sep 2009 09:42:03 +0200 Subject: [Gambas-user] tableview References: <1ar9p6-2e5.ln1@...2181...> <200909291923.05335.gambas@...1...> <11t9p6-276.ln1@...2181...> <200909291942.03034.gambas@...1...> Message-ID: Beno?t Minisini wrote: > No, there is no way to do that. But if it does not work by code, it should > not work with the mouse too. Strange... How do you fill the contents of > the TableView? without the data event , i simply set value of any row. I will move to use data event but not immediately because I use a routine to load a lot of different data in different type of control so before rewrite all I need to test that it works with all the case. thank's, marco. -- La cosa bella degli standard e' che ce ne sono cosi' tanti tra cui scegliere... -- Andrew S. Tanenbaum From rterry at ...1946... Wed Sep 30 12:47:48 2009 From: rterry at ...1946... (richard terry) Date: Wed, 30 Sep 2009 20:47:48 +1000 Subject: [Gambas-user] Tabstrip.text question Message-ID: <200909302047.48919.rterry@...1946...> I wondered if there was a way to change the text on the tab when it is not the foremost tab, without having to do this: tabstrip1.index = 1 ' change to tab1 tabstrip1.text = "some text" 'change its text tabstrip1.index = 0 'change it back to tab0 Thanks in anticipation Richard From rospolosco at ...152... Wed Sep 30 13:15:29 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Wed, 30 Sep 2009 13:15:29 +0200 Subject: [Gambas-user] Tabstrip.text question In-Reply-To: <200909302047.48919.rterry@...1946...> References: <200909302047.48919.rterry@...1946...> Message-ID: <200909301315.30117.rospolosco@...152...> Il mercoled? 30 settembre 2009 12:47:48 richard terry ha scritto: > I wondered if there was a way to change the text on the tab when it is not > the foremost tab, without having to do this: > > tabstrip1.index = 1 ' change to tab1 > tabstrip1.text = "some text" 'change its text > tabstrip1.index = 0 'change it back to tab0 > > Thanks in anticipation > > Richard > TabStrip1[1].Text = "some text" Stefano > --------------------------------------------------------------------------- >--- Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas at ...1... Wed Sep 30 14:02:50 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 30 Sep 2009 14:02:50 +0200 Subject: [Gambas-user] tableview In-Reply-To: References: <1ar9p6-2e5.ln1@...2181...> <200909291942.03034.gambas@...1...> Message-ID: <200909301402.50544.gambas@...1...> > Beno?t Minisini wrote: > > No, there is no way to do that. But if it does not work by code, it > > should not work with the mouse too. Strange... How do you fill the > > contents of the TableView? > > without the data event , i simply set value of any row. > So setting the width of columns to "-1" should work as you expected, at least with gb.qt. Strange... -- Beno?t Minisini From tmp2009 at ...2180... Wed Sep 30 14:28:47 2009 From: tmp2009 at ...2180... (nero) Date: Wed, 30 Sep 2009 14:28:47 +0200 Subject: [Gambas-user] tableview References: <1ar9p6-2e5.ln1@...2181...> <200909291942.03034.gambas@...1...> <200909301402.50544.gambas@...1...> Message-ID: <8jvbp6-fk4.ln1@...2181...> Beno?t Minisini wrote: > So setting the width of columns to "-1" should work as you expected, at > least with gb.qt. Strange... I'm using qt4 , i'm porting an app from gambas2/qt3/kde3 to gambas3/qt4/kde4 , I can't try with qt3 since I don't have kde3 installed . -- E' piu' logico sacrificare una vita piuttosto che sei. -- Spock, "The Galileo Seven", data astrale 2822.3 From david_villalobos_c at ...43... Wed Sep 30 16:46:46 2009 From: david_villalobos_c at ...43... (David Villalobos Cambronero) Date: Wed, 30 Sep 2009 07:46:46 -0700 (PDT) Subject: [Gambas-user] Using _Data & _Save events Message-ID: <247478.11553.qm@...1655...> Hi, I have some problems using the _Data & the _Save events in a TableView. * I select data fom a table and fill the TableView with the _Data event. * Then I edit the data with the _Edit metod and save the new information with the _Save event. Then some thing wear happens. The event _Data is called and all is very extrange. Mandriva 2009.1 32 Bits, mysql, KDE. Gambas 3 See the attached example. Regards -- David -------------- next part -------------- A non-text attachment was scrubbed... Name: TableView.Question-0.0.1.tar.gz Type: application/x-gzip Size: 8461 bytes Desc: not available URL: From robert1juhasz at ...626... Wed Sep 30 18:31:54 2009 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Wed, 30 Sep 2009 18:31:54 +0200 Subject: [Gambas-user] how to start a file? In-Reply-To: <68652a0b0909290429o149ac990j5f97e534acee6e9a@...627...> References: <25416046.post@...1379...> <200909281444.22043.gambas@...1...> <4AC0D08A.4030000@...1909...> <200909281723.11357.gambas@...1...> <68652a0b0909290429o149ac990j5f97e534acee6e9a@...627...> Message-ID: <68652a0b0909300931m20a081cg1fe5fc2c2dabe8bc@...627...> Yes, it works perfectly with mySQL. Robi 2009/9/29 Robert JUHASZ > Can it be an other option to load files to the mysql database as BLOB? If > yes can someone tell me the command to upload and download the file from/to > a certain location? This would solve my problem with the rights. > > Thx, Robi > From robert1juhasz at ...626... Wed Sep 30 18:31:54 2009 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Wed, 30 Sep 2009 18:31:54 +0200 Subject: [Gambas-user] how to start a file? In-Reply-To: <68652a0b0909290429o149ac990j5f97e534acee6e9a@...627...> References: <25416046.post@...1379...> <200909281444.22043.gambas@...1...> <4AC0D08A.4030000@...1909...> <200909281723.11357.gambas@...1...> <68652a0b0909290429o149ac990j5f97e534acee6e9a@...627...> Message-ID: <68652a0b0909300931m20a081cg1fe5fc2c2dabe8bc@...627...> Yes, it works perfectly with mySQL. Robi 2009/9/29 Robert JUHASZ > Can it be an other option to load files to the mysql database as BLOB? If > yes can someone tell me the command to upload and download the file from/to > a certain location? This would solve my problem with the rights. > > Thx, Robi >