From jbskaggs at ...1871... Wed Apr 1 00:06:20 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Tue, 31 Mar 2009 15:06:20 -0700 (PDT) Subject: [Gambas-user] What is the most asked question in gambas programming? In-Reply-To: <200904010739.31876.rterry@...1946...> References: <22805257.post@...1379...> <200904010739.31876.rterry@...1946...> Message-ID: <22815793.post@...1379...> Sounds like a great idea! And I'd love to see it. I was surprised that was the hard part for you. I guess SInce I came from a gaming background that resizng controls wasn't the hard part- the hardpart was that Gambas runs very near what I did before EXCEPT the names changed: a room was a container, an object as a child, and a control was a property of the object Whereas I am just now understanding that in gambas a container would be what I would call a room, a control would be an object,an object a unique instance of a control, and properties would be what I called controls So it caused me tremendous headaches even though it functioned very near each other. I still forget and use the old gml references. Such as in my recent post about loops. JB SKaggs richard terry-5 wrote: > > On Wed, 1 Apr 2009 05:05:05 am jbskaggs wrote: >> To the oldtimers here: Out of curiousity what is the most common question >> asked by newcomers to gambas besides install problems? What causes them >> the most common problem? >> >> JB > > My first stuggle with gambas coming from wxPython and not being a > programmer > in my real life was the IDE designer and understanding how to get the gui > to > proportionally resize properly > > One I understood the Fill/exaand properties and how to use containers it > turned out to be really simple. > > This is one area I'd be more than happy to write a tutorial on. > > Regards > > Richard > > > ------------------------------------------------------------------------------ > _______________________________________________ > 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/What-is-the-most-asked-question-in-gambas-programming--tp22805257p22815793.html Sent from the gambas-user mailing list archive at Nabble.com. From jbskaggs at ...1871... Wed Apr 1 00:20:37 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Tue, 31 Mar 2009 15:20:37 -0700 (PDT) Subject: [Gambas-user] Timer question In-Reply-To: <200904010745.35249.rterry@...1946...> References: <200904010745.35249.rterry@...1946...> Message-ID: <22816012.post@...1379...> I use timers alot in the game I am writing. I just use timer1.delay=5 that is pretty close to immediate action. then i rest the delay later JB richard terry-5 wrote: > > I want to be able to reset the timers time to 0 at will, without stopping > the > timer, so that I can link it to the keypress of a textbox. Every time the > user hits a key, the place the timer is up to is reset, once they lag, > then > the timer event fires. > > Dosn't seem to be such a property. > > Thanks. > > ------------------------------------------------------------------------------ > _______________________________________________ > 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/Timer-question-tp22814443p22816012.html Sent from the gambas-user mailing list archive at Nabble.com. From iecltd at ...2113... Wed Apr 1 00:29:00 2009 From: iecltd at ...2113... (Rodney Rundstrom) Date: Wed, 1 Apr 2009 11:29:00 +1300 Subject: [Gambas-user] Dynamic Objects In-Reply-To: <49D1B456.2070103@...1909...> Message-ID: Thanks for that I'll work thought over the next few day. One last question on dynamic object (I think) how do we delete them and release the memory? -----Original Message----- From: Doriano Blengino [mailto:doriano.blengino at ...1909...] Sent: Tuesday, 31 March 2009 7:13 p.m. To: mailing list for gambas users Subject: Re: [Gambas-user] Dynamic Objects Rodney Rundstrom ha scritto: > Thanks using last.text works in this case, can you clarify how I would > access using parent/child can a form itself be the container or my I use > another although a similar arrangement is available in VB I am not really > sure how to use it? > The following routine iterates through all the controls inside a given container, recursively (included other containers), and returns its children one after another. ' Returns the i-th children of hContainer, recursively PUBLIC SUB ith_children_of(hContainer AS Container, i AS Integer) AS Object DIM hScan AS Object DIM hResult AS Object DIM counted AS Integer counted = 0 FOR EACH hScan IN hContainer.Children INC counted DEC i IF i = 0 THEN RETURN hScan IF hScan IS Container THEN ' traverse it hResult = ith_children_of(hScan, i) IF hResult THEN RETURN hResult ' function found the control ' function exhausted controls, but how many? counted += ith_controls_counted i -= ith_controls_counted ENDIF NEXT ith_controls_counted = counted END In one of my apps, I use it to fill TextBoxes associating ldap field names to textboxes names. It is slightly more complicated than necessary, but it shows what is possible to do. You can pass a form as first parameter, which is indeed a container: DIM hScan AS Object DIM i AS Integer i = 0 DO INC i hScan = ith_children_of(ME, i) IF NOT hScan THEN BREAK IF aname = "lDn" THEN hScan.text = dn IF object.Type(hScan) = "TextBox" OR object.Type(hScan) = "TextArea" THEN hScan.text = "" ' default ELSE IF object.Type(hScan) = "Button" THEN IF db_is_readonly AND hScan.name = "btModify" THEN hScan.Visible = FALSE IF db_is_readonly AND hScan.name = "btDelete" THEN hScan.Visible = FALSE ENDIF LOOP Here you see: I scan all the container (ME, the form where the subroutine resides), then I do several things depending on what I've got. You can test for the class of the object, or its name. A useful thing to test for is TAG, where you can store data serving no other purposes than your ones. As I said before, there is no need of such complication, I took it simply to show the variety of things. If you have a bunch of dynamically created controls scattered in a form, you can set the .Tag or .Name on each of them at the time of instanciation, and then use these kinds of routine. But if you put them all inside a single container, then you access them with for each hScan in hManyButtonsHbox.Children hScan.Enabled = false ' all the children of this hBox are disabled next The more effective way is to keep an array of handles when creating the controls, thought. I showed all this complication because you asked me about containers and childrens, but sometimes, especially in complex form, to operate this way saves time and errors. Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." ---------------------------------------------------------------------------- -- _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From rterry at ...1946... Wed Apr 1 00:52:30 2009 From: rterry at ...1946... (richard terry) Date: Wed, 1 Apr 2009 09:52:30 +1100 Subject: [Gambas-user] Timer question In-Reply-To: <22816012.post@...1379...> References: <200904010745.35249.rterry@...1946...> <22816012.post@...1379...> Message-ID: <200904010952.31036.rterry@...1946...> On Wed, 1 Apr 2009 09:20:37 am jbskaggs wrote: > I use timers alot in the game I am writing. > > I just use timer1.delay=5 that wasn't the question - I wanted to re-set the timer to stop the event triggering until the key action pauses and then let the timer progress to execute > > that is pretty close to immediate action. then i rest the delay later > > JB > > richard terry-5 wrote: > > I want to be able to reset the timers time to 0 at will, without stopping > > the > > timer, so that I can link it to the keypress of a textbox. Every time the > > user hits a key, the place the timer is up to is reset, once they lag, > > then > > the timer event fires. > > > > Dosn't seem to be such a property. > > > > Thanks. > > > > ------------------------------------------------------------------------- > >----- _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user From rterry at ...1946... Wed Apr 1 02:23:07 2009 From: rterry at ...1946... (richard terry) Date: Wed, 1 Apr 2009 11:23:07 +1100 Subject: [Gambas-user] Warning newby questions In-Reply-To: References: Message-ID: <200904011123.07970.rterry@...1946...> On Wed, 1 Apr 2009 08:58:24 am Jeff Gray wrote: > 1. Can anyone point me towards some help with splits, panels and expanders? > THe help I have read doesn't seem to go into depth and I can't see any > obvious methods to add items to them. > > > > 2. What's the difference between using qt or gtk? Dont use gtk and your programming experience will be pleasant. I've never once used a panel anywhere and am non the poorer for it. Use VBox and HBox As to splitters/panels/expanders I assume you mean HSplit VSplit and the properties on controls (expanders don't exist in gambas). I've knocked up a VERY VERY VERY CRUDE example in a couple of minutes. Just note this: The forms expand property is set to true. if this is not set, and you embed this form in another, it will not expand in its new container. This property has no effect if you run it as a stand alone form. The forms arrangment property is set to FILL - if you don't set this, then the forms contains wont' expand to FILL the form. Don't worry about the other properties in this category as you'll probablly never need them. Change this and run it and you will see what I mean. As to all the other controls, the general principal is this: If a control eg a VBox has its expand property set to true then it will expand within its container. If false, it will not expand within its container. Examine all the properties of the controls, change some of the expand properties and watch what happens when you run it. Move the splitters and watch what happens to the textboxes at the top. Hope this is what you mean. Its in gambas3 1917 so if not using this you will have to update forms and recompile. Regards Richard > > > > > > _________________________________________________________________ > Need a new place to rent, share or buy? Let ninemsn property help. > http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Edomain%2Ecom%2Eau >%2F%3Fs%5Fcid%3DFDMedia%3ANineMSN%5FHotmail%5FTagline&_t=774152450&_r=Domain >_tagline&_m=EXT > --------------------------------------------------------------------------- >--- _______________________________________________ > 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: Splitters-0.0.1.tar.gz Type: application/x-tgz Size: 8508 bytes Desc: not available URL: From gambas at ...1... Wed Apr 1 10:05:17 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Wed, 1 Apr 2009 10:05:17 +0200 Subject: [Gambas-user] (no subject) In-Reply-To: References: Message-ID: <200904011005.17934.gambas@...1...> > Hi!First of all many thanks to the developer and everybody that helped to > the creation and the now shape of this programming language... It was > really was linux missed... > Anyway... > I have a problem or "bug" at programming with gambas...I really searched > and googled to find out how to solve this one but nothing... Also in this > e-mail i have a screenhost attached with the "error" tha appears and the > source behind... I am quite sure that the problem is not at the code i > wrote...the problem is that this error writes me that "there are too many > nested control structures". So i guess that the language for some reason > doesnt support more than a fixed number of line codes or more than a fixed > number of IF THEN ELSE END IF... > I really dont no what to do about this... > Any reply helpful or not will be really appricieted...:D > > Here are information about my pc (maybe is my pc's problem...dunno) : > > * distribution : ubuntu 8.10 > * kernel linux : 2.6.27-7-generic > * gnome : 2.24.1 > * memory : 2gb > * processor : amd athlon 64 (3000+) > * gambas version : 2.7 > > thank you in advance > and if someone wants to send him my program's code to check out glad to do > that and i am greek so a reply from another greek or in greek will be more > apprecieted because i will understand the reply even easier :D > thank you again > > _________________________________________________________________ > Invite your mail contacts to join your friends list with Windows Live > Spaces. It's easy! > http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx >&mkt=en-us You must put "Else If" on the same line, otherwise the compiler will open a new "If ... Then ... Else ... EndIf" control structure. If ... Then Else If ... Then Else If ... Then ... EndIf Is only one control structure. If ... Then Else If ... Then Else If ... Then Are three control structures. Regards, -- Beno?t From doriano.blengino at ...1909... Wed Apr 1 10:12:43 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Wed, 01 Apr 2009 10:12:43 +0200 Subject: [Gambas-user] Timer question In-Reply-To: <200904010952.31036.rterry@...1946...> References: <200904010745.35249.rterry@...1946...> <22816012.post@...1379...> <200904010952.31036.rterry@...1946...> Message-ID: <49D321FB.5080703@...1909...> richard terry ha scritto: > On Wed, 1 Apr 2009 09:20:37 am jbskaggs wrote: > >> I use timers alot in the game I am writing. >> >> I just use timer1.delay=5 >> > that wasn't the question - I wanted to re-set the timer to stop the event > triggering until the key action pauses and then let the timer progress to > execute > It could work; if it does'nt, try to stop and start in sequence: timer1.stop timer1.start If you put sometthing like this in a keyPress event, the timer should fire after the keyboard activity ceased. In the timer event itself, put a Timer1.stop statement. Regards, Doriano From eilert-sprachen at ...221... Wed Apr 1 10:39:57 2009 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Wed, 01 Apr 2009 10:39:57 +0200 Subject: [Gambas-user] What is the most asked question in gambas programming? In-Reply-To: <22805257.post@...1379...> References: <22805257.post@...1379...> Message-ID: <49D3285D.3060906@...221...> jbskaggs schrieb: > To the oldtimers here: Out of curiousity what is the most common question > asked by newcomers to gambas besides install problems? What causes them the > most common problem? > > JB Just a guess - "how do I get data filled in a GridView" ? Maybe one could count contributions back a few months, and I do not read a lot of questions because I don't know an answer to them (yet) :-) Rolf From doriano.blengino at ...1909... Wed Apr 1 10:39:59 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Wed, 01 Apr 2009 10:39:59 +0200 Subject: [Gambas-user] (no subject) In-Reply-To: <1238532864.6462.36.camel@...40...> References: <384d3900903310946l71dd71d6o86c5460eedfcae0f@...627...> <1238519444.6462.15.camel@...40...> <49D27BBF.7080908@...1909...> <1238532864.6462.36.camel@...40...> Message-ID: <49D3285F.6090906@...1909...> Charlie Reinl ha scritto: > Am Dienstag, den 31.03.2009, 22:23 +0200 schrieb Doriano Blengino: > >> Charlie Reinl ha scritto: >> >>> Salut, >>> >>> you have to close 'If Then Else' by an 'Endif' >>> Or you could write : >>> >>> If TextBox1.Text = "T" then TextBox2.Text = "T" >>> If TextBox1.Text = "Y" then TextBox2.Text = "I" >>> >>> >> If it is so, then the gambas parser has a problem: >> >> if textbox1.text="0" then >> ' now a endif is expected... >> else ' where does this "else" bind to? >> >> ...and the message "too many nested control structure" is completely >> misguiding. >> >> Regards, >> >> > Salut, > > you have to close 'If Then Else' by an 'Endif' .. I said! > > if textbox1.text="0" then > ' do something for "0" > Else if textbox1.text="1" then > ' do something for "1" > Else > ' do something for all others (then "0" and "1") > End if '<---------------- close your control structure > > You are right; the final part of that long statement was not visible. But I tried to write a statement that long (7211 lines!), and the error from the compiler was "Endif missing ...". So it is still a mistery... Regards, Doriano From doriano.blengino at ...1909... Wed Apr 1 10:50:35 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Wed, 01 Apr 2009 10:50:35 +0200 Subject: [Gambas-user] (no subject) In-Reply-To: <1238532864.6462.36.camel@...40...> References: <384d3900903310946l71dd71d6o86c5460eedfcae0f@...627...> <1238519444.6462.15.camel@...40...> <49D27BBF.7080908@...1909...> <1238532864.6462.36.camel@...40...> Message-ID: <49D32ADB.3000201@...1909...> Charlie Reinl ha scritto: > Am Dienstag, den 31.03.2009, 22:23 +0200 schrieb Doriano Blengino: > >> Charlie Reinl ha scritto: >> >>> Salut, >>> >>> you have to close 'If Then Else' by an 'Endif' >>> Or you could write : >>> >>> If TextBox1.Text = "T" then TextBox2.Text = "T" >>> If TextBox1.Text = "Y" then TextBox2.Text = "I" >>> >>> >> If it is so, then the gambas parser has a problem: >> >> if textbox1.text="0" then >> ' now a endif is expected... >> else ' where does this "else" bind to? >> >> ...and the message "too many nested control structure" is completely >> misguiding. >> >> Regards, >> >> > Salut, > > you have to close 'If Then Else' by an 'Endif' .. I said! > > if textbox1.text="0" then > ' do something for "0" > Else if textbox1.text="1" then > ' do something for "1" > Else > ' do something for all others (then "0" and "1") > End if '<---------------- close your control structure > > OK, found the problem. Writing: if test then else if test then else if test then ... works. Writing instead: if test then else if test then else ... gives "Too many nested control structure", even if the ENDIF clause is present. For a few lines of code, it (correctly) says "ENDIF missing". Note that if you write 3 lines ending with THEN, then 3 ENDIF are required, so what you said before is wrong. And our friend is right, there is a limit; when the complex statement grows over a certain number of lines, the other error appears. I am too lazy to discover how many nested ELSEs are legal. Regards, Doriano From gambas at ...1... Wed Apr 1 10:54:46 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Wed, 1 Apr 2009 10:54:46 +0200 Subject: [Gambas-user] (no subject) In-Reply-To: <49D32ADB.3000201@...1909...> References: <1238532864.6462.36.camel@...40...> <49D32ADB.3000201@...1909...> Message-ID: <200904011054.46813.gambas@...1...> > Charlie Reinl ha scritto: > > Am Dienstag, den 31.03.2009, 22:23 +0200 schrieb Doriano Blengino: > >> Charlie Reinl ha scritto: > >>> Salut, > >>> > >>> you have to close 'If Then Else' by an 'Endif' > >>> Or you could write : > >>> > >>> If TextBox1.Text = "T" then TextBox2.Text = "T" > >>> If TextBox1.Text = "Y" then TextBox2.Text = "I" > >> > >> If it is so, then the gambas parser has a problem: > >> > >> if textbox1.text="0" then > >> ' now a endif is expected... > >> else ' where does this "else" bind to? > >> > >> ...and the message "too many nested control structure" is completely > >> misguiding. > >> > >> Regards, > > > > Salut, > > > > you have to close 'If Then Else' by an 'Endif' .. I said! > > > > if textbox1.text="0" then > > ' do something for "0" > > Else if textbox1.text="1" then > > ' do something for "1" > > Else > > ' do something for all others (then "0" and "1") > > End if '<---------------- close your control structure > > OK, found the problem. > Writing: > > if test then > else if test then > else if test then > ... > > works. Writing instead: > > if test then > else > if test then > else > ... > > gives "Too many nested control structure", even if the ENDIF clause is > present. For a few lines of code, it (correctly) says "ENDIF missing". > Note that if you write 3 lines ending with THEN, then 3 ENDIF are > required, so what you said before is wrong. And our friend is right, > there is a limit; when the complex statement grows over a certain number > of lines, the other error appears. I am too lazy to discover how many > nested ELSEs are legal. > > Regards, > Doriano > > The answer is in the source file 'gb_limit.h' located in the /main/share directory. -- Beno?t From jbskaggs at ...1871... Wed Apr 1 10:45:41 2009 From: jbskaggs at ...1871... (JB Skaggs) Date: Wed, 01 Apr 2009 03:45:41 -0500 Subject: [Gambas-user] Timer question In-Reply-To: <200904010952.31036.rterry@...1946...> References: <200904010745.35249.rterry@...1946...> <22816012.post@...1379...> <200904010952.31036.rterry@...1946...> Message-ID: <1238575541.14744.2.camel@...1876...> If I understand what you mean this is what I did to be able to pause and start a timer as the same spot and continue. Mind you I am just beginning to understand this stuff. So bear with the inefficient coding. ' Gambas class file PUBLIC a AS Integer ' for seconds PUBLIC i AS Integer ' for new timer1.delay ' timer1.delay set to 10000 for ten seconds, timer 2 for 1000, and timer3 for 1 'button1 stops and displays seconds passed 'button 2 starts and displays new seconds to go and counts up to it. 'if timer1 counts all the way down it will turn the button1 red PUBLIC SUB Form_Open() a = 0 'integer for seconds Timer1.Enabled = TRUE 'starts main timer Timer2.Enabled = TRUE 'starts seconds counter END PUBLIC SUB Timer2_Timer() ' this is little counter that counts seconds a += 1 Timer3.enabled = TRUE END PUBLIC SUB timer3_timer() 'resets timer2 AND displays seconds ValueBox1.Value = a Timer2.Start END PUBLIC SUB Button1_Click() 'stops timers and gets time from A and converts to seconds Timer3.Stop Timer2.Stop i = (10000 - (a * 1000)) 'the new delay setting for timer.delat to start where left off ValueBox1.Value = a END PUBLIC SUB Button2_Click() 'starts the timer1 again and resets A Timer1.delay = i Timer1.STOP ValueBox2.Value = (Timer1.Delay) / 1000 Timer1.Start Timer2.Start a = 0 END PUBLIC SUB Timer1_Timer() ' what happens when timer1 goes off Button1.BackColor = Color.Red Timer2.Stop Timer3.Stop ValueBox1.Value = a END JB SKaggs On Wed, 2009-04-01 at 09:52 +1100, richard terry wrote: > On Wed, 1 Apr 2009 09:20:37 am jbskaggs wrote: > > I use timers alot in the game I am writing. > > > > I just use timer1.delay=5 > that wasn't the question - I wanted to re-set the timer to stop the event > triggering until the key action pauses and then let the timer progress to > execute > > > > that is pretty close to immediate action. then i rest the delay later > > > > JB > > > > richard terry-5 wrote: > > > I want to be able to reset the timers time to 0 at will, without stopping > > > the > > > timer, so that I can link it to the keypress of a textbox. Every time the > > > user hits a key, the place the timer is up to is reset, once they lag, > > > then > > > the timer event fires. > > > > > > Dosn't seem to be such a property. > > > > > > Thanks. > > > > > > ------------------------------------------------------------------------- > > >----- _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From doriano.blengino at ...1909... Wed Apr 1 12:13:09 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Wed, 01 Apr 2009 12:13:09 +0200 Subject: [Gambas-user] Dynamic Objects In-Reply-To: References: Message-ID: <49D33E35.8070506@...1909...> Rodney Rundstrom ha scritto: > Thanks for that I'll work thought over the next few day. One last question > on dynamic object (I think) how do we delete them and release the memory? > This is a matter unclear to me, anyway: an object is freed when no reference to it are in effect. When you instantiate a visual control, its parent gets a reference to the object. I don't know how to delete that reference (perhaps a Delete() method of its Children property?). For forms, a Persistent property says what to do when the form is closed, either hide it or destroy it. For other objects, I don't know - better someone else replies to you. Regards, Doriano From marc at ...2075... Wed Apr 1 14:53:14 2009 From: marc at ...2075... (Marc Miralles) Date: Wed, 01 Apr 2009 14:53:14 +0200 Subject: [Gambas-user] Package Files In-Reply-To: <7481ab230903301524s68369d22i4171e15cfd890fa2@...627...> References: <7481ab230903301524s68369d22i4171e15cfd890fa2@...627...> Message-ID: <49D363BA.7080606@...2075...> Hello Cristian Wath's your problem with debs? In Gambas web site we have all packages, and instructions about how to install it. In deb files or information about how to compile sources. http://gambas.sourceforge.net/ In Gambas web site go to download option and scrooll down to packages for diferent Linux Distribuitions. En/na cristian abarzua ha escrit: > Hello everyone. > > How deb package files, the sources of Gambas. > Sorry for my bad English > > Greetings > > Cristian Abarz?a > Temuco - Chile > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From tsopanotragi at ...67... Wed Apr 1 16:06:49 2009 From: tsopanotragi at ...67... (vlahonick vlahonick) Date: Wed, 1 Apr 2009 17:06:49 +0300 Subject: [Gambas-user] (no subject) Message-ID: Thanks you all for your replies.... For those that they propuse me to put "end if" at the end of the code of course i did that!!!! In the screenshot i send you all it was just a part of the code,the theme of the screenshot was to show u the error. If i didnt close the code with as many end if were needed the language itself would give me other error that end if are needed. The code i wrote was completely correct,i double-triple checked it... In the screenshot i repeat is just a very small part of my code because i want u to see the error and not the code... Anyway i tried to rewrite my code with the Select Case expression but is more difficult because there are many cases and ONLY one have to be triggered per time and which case should be triggered depends from what the user will wirte... I didnt really succeded to do that with the Select Case expression. So here i give u an example and if someone could help me by writing the same example with the select case expression it will be very helpful. PUBLIC SUB Button1_Click if textbox1.text = "a" then textbox2.text = "b" else if textbox1.text = "b" then textbox2.text = "g" end if end if END (like the example is my program's code-and the events are triggered when the user press the OK button) ty in advance again...:D _________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us From doriano.blengino at ...1909... Wed Apr 1 16:51:39 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Wed, 01 Apr 2009 16:51:39 +0200 Subject: [Gambas-user] (no subject) In-Reply-To: References: Message-ID: <49D37F7B.1080403@...1909...> vlahonick vlahonick ha scritto: > Thanks you all for your replies.... > For those that they propuse me to put "end if" at the end of the code of course i did that!!!! > In the screenshot i send you all it was just a part of the code,the theme of the screenshot was to show u the error. > If i didnt close the code with as many end if were needed the language itself would give me other error that end if are needed. > The code i wrote was completely correct,i double-triple checked it... > In the screenshot i repeat is just a very small part of my code because i want u to see the error and not the code... > --- > Anyway i tried to rewrite my code with the Select Case expression but is more difficult because there are many cases and ONLY > one have to be triggered per time and which case should be triggered depends from what the user will wirte... > ...but this is exactly what a SELECT (in gambas) does... only one branch is executed! Differently from C, where from one branch you can "fall" in the next, here you don't have to worry about terminating your branches with "break". Different is if you modify the initial value inside a branch, and then you want the test to be performed again: if avalue="a" then avalue="A" if avalue="A" then avalue="B" You can't do that in a SELECT, and this is what you seem to want. Regards, Doriano From abarzuaf at ...626... Wed Apr 1 16:55:02 2009 From: abarzuaf at ...626... (cristian abarzua) Date: Wed, 1 Apr 2009 10:55:02 -0400 Subject: [Gambas-user] Package Files In-Reply-To: <49D363BA.7080606@...2075...> References: <7481ab230903301524s68369d22i4171e15cfd890fa2@...627...> <49D363BA.7080606@...2075...> Message-ID: <7481ab230904010755j531c9abeydcfa0ef3878dd5eb@...627...> Hello. Thanks for responding. Used Ubuntu 8.10 Intrepid Ibex, which brings the shrimp version 2.7. I want to try the 2.12 version, but I want to create Deb packages. I have dealt with: *$ Auto-apt run. / Configure $ Sudo make $ Sudo checkinstall * This usually fails. Do you know any website where they teach create deb packages of Gambas sources. Excuse my English, I am writing through San Google. Greetings Cristian 2009/4/1 Marc Miralles > Hello Cristian > > Wath's your problem with debs? In Gambas web site we have all > packages, and instructions about how to install it. In deb files or > information about how to compile sources. > > http://gambas.sourceforge.net/ > > In Gambas web site go to download option and scrooll down to > packages for diferent Linux Distribuitions. > > > > > En/na cristian abarzua ha escrit: > > Hello everyone. > > > > How deb package files, the sources of Gambas. > > Sorry for my bad English > > > > Greetings > > > > Cristian Abarz?a > > Temuco - Chile > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From Karl.Reinl at ...9... Wed Apr 1 17:16:38 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Wed, 01 Apr 2009 17:16:38 +0200 Subject: [Gambas-user] (no subject) In-Reply-To: References: Message-ID: <1238598998.6472.8.camel@...40...> Am Mittwoch, den 01.04.2009, 17:06 +0300 schrieb vlahonick vlahonick: > Thanks you all for your replies.... > For those that they propuse me to put "end if" at the end of the code of course i did that!!!! > In the screenshot i send you all it was just a part of the code,the theme of the screenshot was to show u the error. > If i didnt close the code with as many end if were needed the language itself would give me other error that end if are needed. > The code i wrote was completely correct,i double-triple checked it... > In the screenshot i repeat is just a very small part of my code because i want u to see the error and not the code... > Anyway i tried to rewrite my code with the Select Case expression but is more difficult because there are many cases and ONLY > one have to be triggered per time and which case should be triggered depends from what the user will wirte... > I didnt really succeded to do that with the Select Case expression. > So here i give u an example and if someone could help me by writing the same example with the select case expression it will be very helpful. > > PUBLIC SUB Button1_Click > > if textbox1.text = "a" then > textbox2.text = "b" > else > if textbox1.text = "b" then > textbox2.text = "g" > end if > end if > > END > > (like the example is my program's code-and the events are triggered when the user press the OK button) > > ty in advance again...:D Salut, first: tell us what version of Gambas you are using. second: am I right, you are writing a kind of CONVERTER ? if so this is what I would write quickly. FUNCTION myConvert(sInChar AS String) AS String DIM sRetChar AS String = sInChar ' makes the return value to the given value ' now make you changes IF sInChar = "a" THEN sRetChar = "0" IF sInChar = "b" THEN sRetChar = "1" IF sInChar = "c" THEN sRetChar = "2" IF sInChar = "d" THEN sRetChar = "3" IF sInChar = "e" THEN sRetChar = "4" IF sInChar = "f" THEN sRetChar = "5" IF sInChar = "g" THEN sRetChar = "6" IF sInChar = "h" THEN sRetChar = "7" IF sInChar = "i" THEN sRetChar = "8" IF sInChar = "j" THEN sRetChar = "9" IF sInChar = "0" THEN sRetChar = "a" IF sInChar = "1" THEN sRetChar = "b" IF sInChar = "2" THEN sRetChar = "c" IF sInChar = "3" THEN sRetChar = "d" IF sInChar = "4" THEN sRetChar = "e" IF sInChar = "5" THEN sRetChar = "f" IF sInChar = "6" THEN sRetChar = "g" IF sInChar = "7" THEN sRetChar = "h" IF sInChar = "8" THEN sRetChar = "i" IF sInChar = "9" THEN sRetChar = "j" RETURN sRetChar END I attached you a test. -- Amicalment Charlie -------------- next part -------------- A non-text attachment was scrubbed... Name: TEST-0.0.1.tar.gz Type: application/x-compressed-tar Size: 7882 bytes Desc: not available URL: From tsopanotragi at ...67... Wed Apr 1 17:44:22 2009 From: tsopanotragi at ...67... (vlahonick vlahonick) Date: Wed, 1 Apr 2009 18:44:22 +0300 Subject: [Gambas-user] (no subject) In-Reply-To: <1238598998.6472.8.camel@...40...> References: <1238598998.6472.8.camel@...40...> Message-ID: > From: Karl.Reinl at ...9... > To: gambas-user at lists.sourceforge.net > Date: Wed, 1 Apr 2009 17:16:38 +0200 > Subject: Re: [Gambas-user] (no subject) > > Am Mittwoch, den 01.04.2009, 17:06 +0300 schrieb vlahonick vlahonick: > > Thanks you all for your replies.... > > For those that they propuse me to put "end if" at the end of the code of course i did that!!!! > > In the screenshot i send you all it was just a part of the code,the theme of the screenshot was to show u the error. > > If i didnt close the code with as many end if were needed the language itself would give me other error that end if are needed. > > The code i wrote was completely correct,i double-triple checked it... > > In the screenshot i repeat is just a very small part of my code because i want u to see the error and not the code... > > Anyway i tried to rewrite my code with the Select Case expression but is more difficult because there are many cases and ONLY > > one have to be triggered per time and which case should be triggered depends from what the user will wirte... > > I didnt really succeded to do that with the Select Case expression. > > So here i give u an example and if someone could help me by writing the same example with the select case expression it will be very helpful. > > > > PUBLIC SUB Button1_Click > > > > if textbox1.text = "a" then > > textbox2.text = "b" > > else > > if textbox1.text = "b" then > > textbox2.text = "g" > > end if > > end if > > > > END > > > > (like the example is my program's code-and the events are triggered when the user press the OK button) > > > > ty in advance again...:D > > Salut, > > first: tell us what version of Gambas you are using. > second: am I right, you are writing a kind of CONVERTER ? > > if so this is what I would write quickly. > > FUNCTION myConvert(sInChar AS String) AS String > DIM sRetChar AS String = sInChar ' makes the return value to the given > value > ' now make you changes > IF sInChar = "a" THEN sRetChar = "0" > IF sInChar = "b" THEN sRetChar = "1" > IF sInChar = "c" THEN sRetChar = "2" > IF sInChar = "d" THEN sRetChar = "3" > IF sInChar = "e" THEN sRetChar = "4" > IF sInChar = "f" THEN sRetChar = "5" > IF sInChar = "g" THEN sRetChar = "6" > IF sInChar = "h" THEN sRetChar = "7" > IF sInChar = "i" THEN sRetChar = "8" > IF sInChar = "j" THEN sRetChar = "9" > IF sInChar = "0" THEN sRetChar = "a" > IF sInChar = "1" THEN sRetChar = "b" > IF sInChar = "2" THEN sRetChar = "c" > IF sInChar = "3" THEN sRetChar = "d" > IF sInChar = "4" THEN sRetChar = "e" > IF sInChar = "5" THEN sRetChar = "f" > IF sInChar = "6" THEN sRetChar = "g" > IF sInChar = "7" THEN sRetChar = "h" > IF sInChar = "8" THEN sRetChar = "i" > IF sInChar = "9" THEN sRetChar = "j" > RETURN sRetChar > END > > I attached you a test. > > -- > Amicalment > Charlie First of all thanks you all again about your replies... But no i am not writing a kind of converter... Program's idea is to learn greek with an easy method... And because in greek we dont use latin letters the most important thing is to learn and understand the way the greek letters work... So for AlMOST every greek letter and difthong in greek exists somekind of a match in latin letters or latin letters combinations... So the program in a very simple version to understand will have 2 textboxes and an OK button. So the user will write a greek (or lation) letter in textbox1.text and the result will appear in textbox2.text (or in a label-this doesnt really matters). So when u press the OK button it has to be triggered ONLY ONE event...!!! How i do that with SELECT CASE expression? (when i wrote the whole program with if-then-else-end if i had an error "too many nested control structures" but the code was 200% correct...so any information will be very apprecieted) ============ |textbox1.text| ============ ============ |textbox2.text| ============ ____ |OK| ty all for one more time :D _________________________________________________________________ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx From tsopanotragi at ...67... Wed Apr 1 17:55:01 2009 From: tsopanotragi at ...67... (vlahonick vlahonick) Date: Wed, 1 Apr 2009 18:55:01 +0300 Subject: [Gambas-user] (no subject) In-Reply-To: <1238598998.6472.8.camel@...40...> References: <1238598998.6472.8.camel@...40...> Message-ID: > From: Karl.Reinl at ...9... > To: gambas-user at lists.sourceforge.net > Date: Wed, 1 Apr 2009 17:16:38 +0200 > Subject: Re: [Gambas-user] (no subject) > > Am Mittwoch, den 01.04.2009, 17:06 +0300 schrieb vlahonick vlahonick: > > Thanks you all for your replies.... > > For those that they propuse me to put "end if" at the end of the code of course i did that!!!! > > In the screenshot i send you all it was just a part of the code,the theme of the screenshot was to show u the error. > > If i didnt close the code with as many end if were needed the language itself would give me other error that end if are needed. > > The code i wrote was completely correct,i double-triple checked it... > > In the screenshot i repeat is just a very small part of my code because i want u to see the error and not the code... > > Anyway i tried to rewrite my code with the Select Case expression but is more difficult because there are many cases and ONLY > > one have to be triggered per time and which case should be triggered depends from what the user will wirte... > > I didnt really succeded to do that with the Select Case expression. > > So here i give u an example and if someone could help me by writing the same example with the select case expression it will be very helpful. > > > > PUBLIC SUB Button1_Click > > > > if textbox1.text = "a" then > > textbox2.text = "b" > > else > > if textbox1.text = "b" then > > textbox2.text = "g" > > end if > > end if > > > > END > > > > (like the example is my program's code-and the events are triggered when the user press the OK button) > > > > ty in advance again...:D > > Salut, > > first: tell us what version of Gambas you are using. > second: am I right, you are writing a kind of CONVERTER ? > > if so this is what I would write quickly. > > FUNCTION myConvert(sInChar AS String) AS String > DIM sRetChar AS String = sInChar ' makes the return value to the given > value > ' now make you changes > IF sInChar = "a" THEN sRetChar = "0" > IF sInChar = "b" THEN sRetChar = "1" > IF sInChar = "c" THEN sRetChar = "2" > IF sInChar = "d" THEN sRetChar = "3" > IF sInChar = "e" THEN sRetChar = "4" > IF sInChar = "f" THEN sRetChar = "5" > IF sInChar = "g" THEN sRetChar = "6" > IF sInChar = "h" THEN sRetChar = "7" > IF sInChar = "i" THEN sRetChar = "8" > IF sInChar = "j" THEN sRetChar = "9" > IF sInChar = "0" THEN sRetChar = "a" > IF sInChar = "1" THEN sRetChar = "b" > IF sInChar = "2" THEN sRetChar = "c" > IF sInChar = "3" THEN sRetChar = "d" > IF sInChar = "4" THEN sRetChar = "e" > IF sInChar = "5" THEN sRetChar = "f" > IF sInChar = "6" THEN sRetChar = "g" > IF sInChar = "7" THEN sRetChar = "h" > IF sInChar = "8" THEN sRetChar = "i" > IF sInChar = "9" THEN sRetChar = "j" > RETURN sRetChar > END > > I attached you a test. > > -- > Amicalment > Charlie I tried your test and it was really what i need :D Faster in code with less writing and more simple :D But when i try to modify it and put instead of number greek latters and then i run the program the result in text box 2 is some boxes like |X|...so this means that for some reason the program doesnt respawn in greek or doesnt understand them? How i can modify the code? ty a lot _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx From Karl.Reinl at ...9... Wed Apr 1 18:14:32 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Wed, 01 Apr 2009 18:14:32 +0200 Subject: [Gambas-user] (no subject) In-Reply-To: References: <1238598998.6472.8.camel@...40...> Message-ID: <1238602472.6472.15.camel@...40...> Am Mittwoch, den 01.04.2009, 18:55 +0300 schrieb vlahonick vlahonick: > > > > From: Karl.Reinl at ...9... > > To: gambas-user at lists.sourceforge.net > > Date: Wed, 1 Apr 2009 17:16:38 +0200 > > Subject: Re: [Gambas-user] (no subject) > > > > Am Mittwoch, den 01.04.2009, 17:06 +0300 schrieb vlahonick vlahonick: > > > Thanks you all for your replies.... > > > For those that they propuse me to put "end if" at the end of the code of course i did that!!!! > > > In the screenshot i send you all it was just a part of the code,the theme of the screenshot was to show u the error. > > > If i didnt close the code with as many end if were needed the language itself would give me other error that end if are needed. > > > The code i wrote was completely correct,i double-triple checked it... > > > In the screenshot i repeat is just a very small part of my code because i want u to see the error and not the code... > > > Anyway i tried to rewrite my code with the Select Case expression but is more difficult because there are many cases and ONLY > > > one have to be triggered per time and which case should be triggered depends from what the user will wirte... > > > I didnt really succeded to do that with the Select Case expression. > > > So here i give u an example and if someone could help me by writing the same example with the select case expression it will be very helpful. > > > > > > PUBLIC SUB Button1_Click > > > > > > if textbox1.text = "a" then > > > textbox2.text = "b" > > > else > > > if textbox1.text = "b" then > > > textbox2.text = "g" > > > end if > > > end if > > > > > > END > > > > > > (like the example is my program's code-and the events are triggered when the user press the OK button) > > > > > > ty in advance again...:D > > > > Salut, > > > > first: tell us what version of Gambas you are using. > > second: am I right, you are writing a kind of CONVERTER ? > > > > if so this is what I would write quickly. > > > > FUNCTION myConvert(sInChar AS String) AS String > > DIM sRetChar AS String = sInChar ' makes the return value to the given > > value > > ' now make you changes > > IF sInChar = "a" THEN sRetChar = "0" > > IF sInChar = "b" THEN sRetChar = "1" > > IF sInChar = "c" THEN sRetChar = "2" > > IF sInChar = "d" THEN sRetChar = "3" > > IF sInChar = "e" THEN sRetChar = "4" > > IF sInChar = "f" THEN sRetChar = "5" > > IF sInChar = "g" THEN sRetChar = "6" > > IF sInChar = "h" THEN sRetChar = "7" > > IF sInChar = "i" THEN sRetChar = "8" > > IF sInChar = "j" THEN sRetChar = "9" > > IF sInChar = "0" THEN sRetChar = "a" > > IF sInChar = "1" THEN sRetChar = "b" > > IF sInChar = "2" THEN sRetChar = "c" > > IF sInChar = "3" THEN sRetChar = "d" > > IF sInChar = "4" THEN sRetChar = "e" > > IF sInChar = "5" THEN sRetChar = "f" > > IF sInChar = "6" THEN sRetChar = "g" > > IF sInChar = "7" THEN sRetChar = "h" > > IF sInChar = "8" THEN sRetChar = "i" > > IF sInChar = "9" THEN sRetChar = "j" > > RETURN sRetChar > > END > > > > I attached you a test. > > > > -- > > Amicalment > > Charlie > > > I tried your test and it was really what i need :D > Faster in code with less writing and more simple :D > But when i try to modify it and put instead of number greek latters and then i run the program > the result in text box 2 is some boxes like |X|...so this means that for some reason the program doesnt respawn in greek or doesnt understand them? > How i can modify the code? > > ty a lot Salut, seams to be a UTF problem. make a NEW project, with one form, 2 NEW textboxs and a NEW button, then copy all the code from the .class from the Test-project to your new .class May be that helps. PS: I call that an converter. -- Amicalment Charlie From doriano.blengino at ...1909... Wed Apr 1 19:34:11 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Wed, 01 Apr 2009 19:34:11 +0200 Subject: [Gambas-user] (no subject) In-Reply-To: <1238602472.6472.15.camel@...40...> References: <1238598998.6472.8.camel@...40...> <1238602472.6472.15.camel@...40...> Message-ID: <49D3A593.2040002@...1909...> Charlie Reinl ha scritto: > >>> first: tell us what version of Gambas you are using. >>> second: am I right, you are writing a kind of CONVERTER ? >>> >>> if so this is what I would write quickly. >>> >>> FUNCTION myConvert(sInChar AS String) AS String >>> DIM sRetChar AS String = sInChar ' makes the return value to the given >>> value >>> ' now make you changes >>> IF sInChar = "a" THEN sRetChar = "0" >>> IF sInChar = "b" THEN sRetChar = "1" >>> IF sInChar = "c" THEN sRetChar = "2" >>> IF sInChar = "d" THEN sRetChar = "3" >>> IF sInChar = "e" THEN sRetChar = "4" >>> IF sInChar = "f" THEN sRetChar = "5" >>> IF sInChar = "g" THEN sRetChar = "6" >>> IF sInChar = "h" THEN sRetChar = "7" >>> IF sInChar = "i" THEN sRetChar = "8" >>> IF sInChar = "j" THEN sRetChar = "9" >>> IF sInChar = "0" THEN sRetChar = "a" >>> IF sInChar = "1" THEN sRetChar = "b" >>> IF sInChar = "2" THEN sRetChar = "c" >>> IF sInChar = "3" THEN sRetChar = "d" >>> IF sInChar = "4" THEN sRetChar = "e" >>> IF sInChar = "5" THEN sRetChar = "f" >>> IF sInChar = "6" THEN sRetChar = "g" >>> IF sInChar = "7" THEN sRetChar = "h" >>> IF sInChar = "8" THEN sRetChar = "i" >>> IF sInChar = "9" THEN sRetChar = "j" >>> RETURN sRetChar >>> END >>> One could also write a single long string, with couples of chars. Borrowing from the code above: sConvert = "?a0b1c2 d3e4f5g6 h7....." note the spaces in the middle. A routine then can do: pos=instr(sConvert, sInChar) return mid(sConvert, pos+1,1) ' if pos=0, then the first character is returned... This is faster to write... and perhaps easier to read/mantain. Of course, it works only for single characters; but variations on this theme could let it work for other kind of translations. Regards, Doriano From tsopanotragi at ...67... Wed Apr 1 19:52:56 2009 From: tsopanotragi at ...67... (vlahonick vlahonick) Date: Wed, 1 Apr 2009 20:52:56 +0300 Subject: [Gambas-user] (no subject) In-Reply-To: <1238602472.6472.15.camel@...40...> References: <1238598998.6472.8.camel@...40...> <1238602472.6472.15.camel@...40...> Message-ID: > From: Karl.Reinl at ...9... > To: gambas-user at lists.sourceforge.net > Date: Wed, 1 Apr 2009 18:14:32 +0200 > Subject: Re: [Gambas-user] (no subject) > > Am Mittwoch, den 01.04.2009, 18:55 +0300 schrieb vlahonick vlahonick: > > > > > > > From: Karl.Reinl at ...9... > > > To: gambas-user at lists.sourceforge.net > > > Date: Wed, 1 Apr 2009 17:16:38 +0200 > > > Subject: Re: [Gambas-user] (no subject) > > > > > > Am Mittwoch, den 01.04.2009, 17:06 +0300 schrieb vlahonick vlahonick: > > > > Thanks you all for your replies.... > > > > For those that they propuse me to put "end if" at the end of the code of course i did that!!!! > > > > In the screenshot i send you all it was just a part of the code,the theme of the screenshot was to show u the error. > > > > If i didnt close the code with as many end if were needed the language itself would give me other error that end if are needed. > > > > The code i wrote was completely correct,i double-triple checked it... > > > > In the screenshot i repeat is just a very small part of my code because i want u to see the error and not the code... > > > > Anyway i tried to rewrite my code with the Select Case expression but is more difficult because there are many cases and ONLY > > > > one have to be triggered per time and which case should be triggered depends from what the user will wirte... > > > > I didnt really succeded to do that with the Select Case expression. > > > > So here i give u an example and if someone could help me by writing the same example with the select case expression it will be very helpful. > > > > > > > > PUBLIC SUB Button1_Click > > > > > > > > if textbox1.text = "a" then > > > > textbox2.text = "b" > > > > else > > > > if textbox1.text = "b" then > > > > textbox2.text = "g" > > > > end if > > > > end if > > > > > > > > END > > > > > > > > (like the example is my program's code-and the events are triggered when the user press the OK button) > > > > > > > > ty in advance again...:D > > > > > > Salut, > > > > > > first: tell us what version of Gambas you are using. > > > second: am I right, you are writing a kind of CONVERTER ? > > > > > > if so this is what I would write quickly. > > > > > > FUNCTION myConvert(sInChar AS String) AS String > > > DIM sRetChar AS String = sInChar ' makes the return value to the given > > > value > > > ' now make you changes > > > IF sInChar = "a" THEN sRetChar = "0" > > > IF sInChar = "b" THEN sRetChar = "1" > > > IF sInChar = "c" THEN sRetChar = "2" > > > IF sInChar = "d" THEN sRetChar = "3" > > > IF sInChar = "e" THEN sRetChar = "4" > > > IF sInChar = "f" THEN sRetChar = "5" > > > IF sInChar = "g" THEN sRetChar = "6" > > > IF sInChar = "h" THEN sRetChar = "7" > > > IF sInChar = "i" THEN sRetChar = "8" > > > IF sInChar = "j" THEN sRetChar = "9" > > > IF sInChar = "0" THEN sRetChar = "a" > > > IF sInChar = "1" THEN sRetChar = "b" > > > IF sInChar = "2" THEN sRetChar = "c" > > > IF sInChar = "3" THEN sRetChar = "d" > > > IF sInChar = "4" THEN sRetChar = "e" > > > IF sInChar = "5" THEN sRetChar = "f" > > > IF sInChar = "6" THEN sRetChar = "g" > > > IF sInChar = "7" THEN sRetChar = "h" > > > IF sInChar = "8" THEN sRetChar = "i" > > > IF sInChar = "9" THEN sRetChar = "j" > > > RETURN sRetChar > > > END > > > > > > I attached you a test. > > > > > > -- > > > Amicalment > > > Charlie > > > > > > I tried your test and it was really what i need :D > > Faster in code with less writing and more simple :D > > But when i try to modify it and put instead of number greek latters and then i run the program > > the result in text box 2 is some boxes like |X|...so this means that for some reason the program doesnt respawn in greek or doesnt understand them? > > How i can modify the code? > > > > ty a lot > > Salut, > > seams to be a UTF problem. > > make a NEW project, with one form, 2 NEW textboxs and a NEW button, then > copy all the code from the .class from the Test-project to your > new .class > > May be that helps. > > PS: I call that an converter. > -- > Amicalment > Charlie > ty one more time for ur replies but still got problems... i tried to follow ur instructions but failed again by the result... i prefer the whole thing to be triggered when u press the ok button so i didnt put the code in the textbox1.text but at the button (doesnt mmater just told u) here is the code i wrote quickly...to try it.. PUBLIC SUB Button1_Click() DIM nI AS Integer DIM sAnyChar AS String TextBox2.text = "" FOR nI = 1 TO Len(TextBox1.Text) sAnyChar = Mid(TextBox1.Text, nI, 1) TextBox2.Text = TextBox2.Text & Gronverter(sAnyChar) NEXT END FUNCTION Gronverter(sInChar AS String) AS String DIM sRetChar AS String = sInChar IF sInChar = "?" THEN sRetChar = "a" IF sInChar = "?" THEN sRetChar = "v" IF sInChar = "?" THEN sRetChar = "g" IF sInChar = "?" THEN sRetChar = "d" IF sInChar = "?" THEN sRetChar = "e" IF sInChar = "?" THEN sRetChar = "z" IF sInChar = "?" THEN sRetChar = "?" IF sInChar = "?" THEN sRetChar = "th" IF sInChar = "?" THEN sRetChar = "i" IF sInChar = "?" THEN sRetChar = "k" IF sInChar = "?" THEN sRetChar = "l" IF sInChar = "?" THEN sRetChar = "m" IF sInChar = "?" THEN sRetChar = "n" IF sInChar = "?" THEN sRetChar = "x" IF sInChar = "?" THEN sRetChar = "o" IF sInChar = "?" THEN sRetChar = "p" IF sInChar = "?" THEN sRetChar = "r" IF sInChar = "?" THEN sRetChar = "s" IF sInChar = "?" THEN sRetChar = "t" IF sInChar = "?" THEN sRetChar = "i" IF sInChar = "?" THEN sRetChar = "f" IF sInChar = "?" THEN sRetChar = "h" IF sInChar = "?" THEN sRetChar = "ps" IF sInChar = "?" THEN sRetChar = "o" RETURN sRetChar END PUBLIC SUB Button2_Click() TextBox1.text = "" TextBox2.text = "" END i dont know what is my mistake but now when i press ok in the textbox2.text apperas exactrly what i wrote in the textbox1.text and not what i want... p.s. yes now i realize that is a converter...:D plz help me to find out what i had wrong in the code:( ty all in advance :D vlahonick :D (all the time i forgot to write my name) > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user _________________________________________________________________ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx From simonart.dominique at ...11... Wed Apr 1 20:11:51 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Wed, 01 Apr 2009 20:11:51 +0200 Subject: [Gambas-user] (no subject) In-Reply-To: References: <1238598998.6472.8.camel@...40...> <1238602472.6472.15.camel@...40...> Message-ID: <49D3AE67.2010002@...11...> vlahonick vlahonick a ?crit : > > >> From: Karl.Reinl at ...9... >> To: gambas-user at lists.sourceforge.net >> Date: Wed, 1 Apr 2009 18:14:32 +0200 >> Subject: Re: [Gambas-user] (no subject) >> >> Am Mittwoch, den 01.04.2009, 18:55 +0300 schrieb vlahonick vlahonick: >>> >>>> From: Karl.Reinl at ...9... >>>> To: gambas-user at lists.sourceforge.net >>>> Date: Wed, 1 Apr 2009 17:16:38 +0200 >>>> Subject: Re: [Gambas-user] (no subject) >>>> >>>> Am Mittwoch, den 01.04.2009, 17:06 +0300 schrieb vlahonick vlahonick: >>>>> Thanks you all for your replies.... >>>>> For those that they propuse me to put "end if" at the end of the code of course i did that!!!! >>>>> In the screenshot i send you all it was just a part of the code,the theme of the screenshot was to show u the error. >>>>> If i didnt close the code with as many end if were needed the language itself would give me other error that end if are needed. >>>>> The code i wrote was completely correct,i double-triple checked it... >>>>> In the screenshot i repeat is just a very small part of my code because i want u to see the error and not the code... >>>>> Anyway i tried to rewrite my code with the Select Case expression but is more difficult because there are many cases and ONLY >>>>> one have to be triggered per time and which case should be triggered depends from what the user will wirte... >>>>> I didnt really succeded to do that with the Select Case expression. >>>>> So here i give u an example and if someone could help me by writing the same example with the select case expression it will be very helpful. >>>>> >>>>> PUBLIC SUB Button1_Click >>>>> >>>>> if textbox1.text = "a" then >>>>> textbox2.text = "b" >>>>> else >>>>> if textbox1.text = "b" then >>>>> textbox2.text = "g" >>>>> end if >>>>> end if >>>>> >>>>> END >>>>> >>>>> (like the example is my program's code-and the events are triggered when the user press the OK button) >>>>> >>>>> ty in advance again...:D >>>> Salut, >>>> >>>> first: tell us what version of Gambas you are using. >>>> second: am I right, you are writing a kind of CONVERTER ? >>>> >>>> if so this is what I would write quickly. >>>> >>>> FUNCTION myConvert(sInChar AS String) AS String >>>> DIM sRetChar AS String = sInChar ' makes the return value to the given >>>> value >>>> ' now make you changes >>>> IF sInChar = "a" THEN sRetChar = "0" >>>> IF sInChar = "b" THEN sRetChar = "1" >>>> IF sInChar = "c" THEN sRetChar = "2" >>>> IF sInChar = "d" THEN sRetChar = "3" >>>> IF sInChar = "e" THEN sRetChar = "4" >>>> IF sInChar = "f" THEN sRetChar = "5" >>>> IF sInChar = "g" THEN sRetChar = "6" >>>> IF sInChar = "h" THEN sRetChar = "7" >>>> IF sInChar = "i" THEN sRetChar = "8" >>>> IF sInChar = "j" THEN sRetChar = "9" >>>> IF sInChar = "0" THEN sRetChar = "a" >>>> IF sInChar = "1" THEN sRetChar = "b" >>>> IF sInChar = "2" THEN sRetChar = "c" >>>> IF sInChar = "3" THEN sRetChar = "d" >>>> IF sInChar = "4" THEN sRetChar = "e" >>>> IF sInChar = "5" THEN sRetChar = "f" >>>> IF sInChar = "6" THEN sRetChar = "g" >>>> IF sInChar = "7" THEN sRetChar = "h" >>>> IF sInChar = "8" THEN sRetChar = "i" >>>> IF sInChar = "9" THEN sRetChar = "j" >>>> RETURN sRetChar >>>> END >>>> >>>> I attached you a test. >>>> >>>> -- >>>> Amicalment >>>> Charlie >>> >>> I tried your test and it was really what i need :D >>> Faster in code with less writing and more simple :D >>> But when i try to modify it and put instead of number greek latters and then i run the program >>> the result in text box 2 is some boxes like |X|...so this means that for some reason the program doesnt respawn in greek or doesnt understand them? >>> How i can modify the code? >>> >>> ty a lot >> Salut, >> >> seams to be a UTF problem. >> >> make a NEW project, with one form, 2 NEW textboxs and a NEW button, then >> copy all the code from the .class from the Test-project to your >> new .class >> >> May be that helps. >> >> PS: I call that an converter. >> -- >> Amicalment >> Charlie >> > ty one more time for ur replies but still got problems... > i tried to follow ur instructions but failed again by the result... > i prefer the whole thing to be triggered when u press the ok button so i didnt put the code in the textbox1.text but at the button (doesnt mmater just told u) > here is the code i wrote quickly...to try it.. > > > PUBLIC SUB Button1_Click() > DIM nI AS Integer > DIM sAnyChar AS String > TextBox2.text = "" > FOR nI = 1 TO Len(TextBox1.Text) > sAnyChar = Mid(TextBox1.Text, nI, 1) > TextBox2.Text = TextBox2.Text & Gronverter(sAnyChar) > NEXT > END > > FUNCTION Gronverter(sInChar AS String) AS String > DIM sRetChar AS String = sInChar > > IF sInChar = "?" THEN sRetChar = "a" > IF sInChar = "?" THEN sRetChar = "v" > IF sInChar = "?" THEN sRetChar = "g" > IF sInChar = "?" THEN sRetChar = "d" > IF sInChar = "?" THEN sRetChar = "e" > IF sInChar = "?" THEN sRetChar = "z" > IF sInChar = "?" THEN sRetChar = "?" > IF sInChar = "?" THEN sRetChar = "th" > IF sInChar = "?" THEN sRetChar = "i" > IF sInChar = "?" THEN sRetChar = "k" > IF sInChar = "?" THEN sRetChar = "l" > IF sInChar = "?" THEN sRetChar = "m" > IF sInChar = "?" THEN sRetChar = "n" > IF sInChar = "?" THEN sRetChar = "x" > IF sInChar = "?" THEN sRetChar = "o" > IF sInChar = "?" THEN sRetChar = "p" > IF sInChar = "?" THEN sRetChar = "r" > IF sInChar = "?" THEN sRetChar = "s" > IF sInChar = "?" THEN sRetChar = "t" > IF sInChar = "?" THEN sRetChar = "i" > IF sInChar = "?" THEN sRetChar = "f" > IF sInChar = "?" THEN sRetChar = "h" > IF sInChar = "?" THEN sRetChar = "ps" > IF sInChar = "?" THEN sRetChar = "o" > RETURN sRetChar > > END > > PUBLIC SUB Button2_Click() > > TextBox1.text = "" > TextBox2.text = "" > END > > i dont know what is my mistake but now when i press ok in the textbox2.text apperas exactrly what i wrote in the textbox1.text and not what i want... > p.s. yes now i realize that is a converter...:D > > plz help me to find out what i had wrong in the code:( > > ty all in advance :D > > vlahonick :D (all the time i forgot to write my name) > > Hi, I think that your greek characters are 2 bytes characters! If so, the one byte character you send to Gronverter routine is never equivalent to the greek cha and so you always return the initial char HTH Dominique Simonart From Karl.Reinl at ...9... Wed Apr 1 21:56:03 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Wed, 01 Apr 2009 21:56:03 +0200 Subject: [Gambas-user] (no subject) In-Reply-To: References: <1238598998.6472.8.camel@...40...> <1238602472.6472.15.camel@...40...> Message-ID: <1238615763.6474.3.camel@...40...> Am Mittwoch, den 01.04.2009, 20:52 +0300 schrieb vlahonick vlahonick: > > > > From: Karl.Reinl at ...9... > > To: gambas-user at lists.sourceforge.net > > Date: Wed, 1 Apr 2009 18:14:32 +0200 > > Subject: Re: [Gambas-user] (no subject) > > > > Am Mittwoch, den 01.04.2009, 18:55 +0300 schrieb vlahonick vlahonick: > > > > > > > > > > From: Karl.Reinl at ...9... > > > > To: gambas-user at lists.sourceforge.net > > > > Date: Wed, 1 Apr 2009 17:16:38 +0200 > > > > Subject: Re: [Gambas-user] (no subject) > > > > > > > > Am Mittwoch, den 01.04.2009, 17:06 +0300 schrieb vlahonick vlahonick: > > > > > Thanks you all for your replies.... > > > > > For those that they propuse me to put "end if" at the end of the code of course i did that!!!! > > > > > In the screenshot i send you all it was just a part of the code,the theme of the screenshot was to show u the error. > > > > > If i didnt close the code with as many end if were needed the language itself would give me other error that end if are needed. > > > > > The code i wrote was completely correct,i double-triple checked it... > > > > > In the screenshot i repeat is just a very small part of my code because i want u to see the error and not the code... > > > > > Anyway i tried to rewrite my code with the Select Case expression but is more difficult because there are many cases and ONLY > > > > > one have to be triggered per time and which case should be triggered depends from what the user will wirte... > > > > > I didnt really succeded to do that with the Select Case expression. > > > > > So here i give u an example and if someone could help me by writing the same example with the select case expression it will be very helpful. > > > > > > > > > > PUBLIC SUB Button1_Click > > > > > > > > > > if textbox1.text = "a" then > > > > > textbox2.text = "b" > > > > > else > > > > > if textbox1.text = "b" then > > > > > textbox2.text = "g" > > > > > end if > > > > > end if > > > > > > > > > > END > > > > > > > > > > (like the example is my program's code-and the events are triggered when the user press the OK button) > > > > > > > > > > ty in advance again...:D > > > > > > > > Salut, > > > > > > > > first: tell us what version of Gambas you are using. > > > > second: am I right, you are writing a kind of CONVERTER ? > > > > > > > > if so this is what I would write quickly. > > > > > > > > FUNCTION myConvert(sInChar AS String) AS String > > > > DIM sRetChar AS String = sInChar ' makes the return value to the given > > > > value > > > > ' now make you changes > > > > IF sInChar = "a" THEN sRetChar = "0" > > > > IF sInChar = "b" THEN sRetChar = "1" > > > > IF sInChar = "c" THEN sRetChar = "2" > > > > IF sInChar = "d" THEN sRetChar = "3" > > > > IF sInChar = "e" THEN sRetChar = "4" > > > > IF sInChar = "f" THEN sRetChar = "5" > > > > IF sInChar = "g" THEN sRetChar = "6" > > > > IF sInChar = "h" THEN sRetChar = "7" > > > > IF sInChar = "i" THEN sRetChar = "8" > > > > IF sInChar = "j" THEN sRetChar = "9" > > > > IF sInChar = "0" THEN sRetChar = "a" > > > > IF sInChar = "1" THEN sRetChar = "b" > > > > IF sInChar = "2" THEN sRetChar = "c" > > > > IF sInChar = "3" THEN sRetChar = "d" > > > > IF sInChar = "4" THEN sRetChar = "e" > > > > IF sInChar = "5" THEN sRetChar = "f" > > > > IF sInChar = "6" THEN sRetChar = "g" > > > > IF sInChar = "7" THEN sRetChar = "h" > > > > IF sInChar = "8" THEN sRetChar = "i" > > > > IF sInChar = "9" THEN sRetChar = "j" > > > > RETURN sRetChar > > > > END > > > > > > > > I attached you a test. > > > > > > > > -- > > > > Amicalment > > > > Charlie > > > > > > > > > I tried your test and it was really what i need :D > > > Faster in code with less writing and more simple :D > > > But when i try to modify it and put instead of number greek latters and then i run the program > > > the result in text box 2 is some boxes like |X|...so this means that for some reason the program doesnt respawn in greek or doesnt understand them? > > > How i can modify the code? > > > > > > ty a lot > > > > Salut, > > > > seams to be a UTF problem. > > > > make a NEW project, with one form, 2 NEW textboxs and a NEW button, then > > copy all the code from the .class from the Test-project to your > > new .class > > > > May be that helps. > > > > PS: I call that an converter. > > -- > > Amicalment > > Charlie > > > ty one more time for ur replies but still got problems... > i tried to follow ur instructions but failed again by the result... > i prefer the whole thing to be triggered when u press the ok button so i didnt put the code in the textbox1.text but at the button (doesnt mmater just told u) > here is the code i wrote quickly...to try it.. > > > PUBLIC SUB Button1_Click() > DIM nI AS Integer > DIM sAnyChar AS String > TextBox2.text = "" > FOR nI = 1 TO Len(TextBox1.Text) > sAnyChar = Mid(TextBox1.Text, nI, 1) > TextBox2.Text = TextBox2.Text & Gronverter(sAnyChar) > NEXT > END > > FUNCTION Gronverter(sInChar AS String) AS String > DIM sRetChar AS String = sInChar > > IF sInChar = "?" THEN sRetChar = "a" > IF sInChar = "?" THEN sRetChar = "v" > IF sInChar = "?" THEN sRetChar = "g" > IF sInChar = "?" THEN sRetChar = "d" > IF sInChar = "?" THEN sRetChar = "e" > IF sInChar = "?" THEN sRetChar = "z" > IF sInChar = "?" THEN sRetChar = "?" > IF sInChar = "?" THEN sRetChar = "th" > IF sInChar = "?" THEN sRetChar = "i" > IF sInChar = "?" THEN sRetChar = "k" > IF sInChar = "?" THEN sRetChar = "l" > IF sInChar = "?" THEN sRetChar = "m" > IF sInChar = "?" THEN sRetChar = "n" > IF sInChar = "?" THEN sRetChar = "x" > IF sInChar = "?" THEN sRetChar = "o" > IF sInChar = "?" THEN sRetChar = "p" > IF sInChar = "?" THEN sRetChar = "r" > IF sInChar = "?" THEN sRetChar = "s" > IF sInChar = "?" THEN sRetChar = "t" > IF sInChar = "?" THEN sRetChar = "i" > IF sInChar = "?" THEN sRetChar = "f" > IF sInChar = "?" THEN sRetChar = "h" > IF sInChar = "?" THEN sRetChar = "ps" > IF sInChar = "?" THEN sRetChar = "o" > RETURN sRetChar > > END > > PUBLIC SUB Button2_Click() > > TextBox1.text = "" > TextBox2.text = "" > END > > i dont know what is my mistake but now when i press ok in the textbox2.text apperas exactrly what i wrote in the textbox1.text and not what i want... > p.s. yes now i realize that is a converter...:D > > plz help me to find out what i had wrong in the code:( > > ty all in advance :D > > vlahonick :D (all the time i forgot to write my name) Salut, try this, this way only one lettre is in the TextBox1.Text PUBLIC SUB TextBox1_Change() IF TextBox1.Text <> "" THEN TextBox2.Text = "" TextBox2.Text = myConvert(TextBox1.Text) TextBox1.Text = "" END IF END -- Amicalment Charlie From Karl.Reinl at ...9... Wed Apr 1 22:14:47 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Wed, 01 Apr 2009 22:14:47 +0200 Subject: [Gambas-user] Function Len in gambas2 Message-ID: <1238616887.6474.11.camel@...40...> Salut, am I wrong? but I think thats use for nothing as LEN works actually in gambas2 from .....gambas2/help/help/lang/len.html Len Syntax iLength = Len ( sArg AS String ) AS Integer Returns the byte count which is occupied by the String sArg. Each ASCII character which has the code 0 to 127 requires one byte, UTF-8 characters as ???? require two or more bytes. Examples PRINT Len("Gambas"), Len("???")
6 6 PRINT Len("") 0 See also String Functions for what good that for? -- Amicalment Charlie From tsopanotragi at ...67... Wed Apr 1 22:46:39 2009 From: tsopanotragi at ...67... (vlahonick vlahonick) Date: Wed, 1 Apr 2009 23:46:39 +0300 Subject: [Gambas-user] Function Len in gambas2 In-Reply-To: <1238616887.6474.11.camel@...40...> References: <1238616887.6474.11.camel@...40...> Message-ID: > From: Karl.Reinl at ...9... > To: gambas-user at lists.sourceforge.net > Date: Wed, 1 Apr 2009 22:14:47 +0200 > Subject: [Gambas-user] Function Len in gambas2 > > Salut, > > am I wrong? but I think thats use for nothing as LEN works actually in > gambas2 > > from .....gambas2/help/help/lang/len.html > > Len > Syntax > iLength = Len ( sArg AS String ) AS Integer > > Returns the byte count which is occupied by the String sArg. Each ASCII > character which has the code 0 to 127 requires one byte, UTF-8 > characters as ???? require two or more bytes. > > Examples > PRINT Len("Gambas"), Len("???") >
6 6 > PRINT Len("") > 0 > > See also > String Functions > > for what good that for? > > -- > Amicalment > Charlie hi again...sorry about the delay in my reply :D but i really didnt understand ur example here.... of course now i realise that even the textbox2.text had the reasult i wanted the problem will be in the letters appering because of their bytes... but the main problem is not solved yet.... still in the textbox2.text appears what i am writing in the textbox1.text and not what i want... and abou the example u gave me with if then else end if is a bad idea because if for example we want to converter a word i have to put many boxes and the user to write a letter in every box to have in that many other boxes a result.... (anyway i tried this but just didnt work...) so plz if u can tell me how i can make with two boxes every character i wrote in the first box to appear what i want in the second box.... what i wrote wrong???why at the 2nd box appears what i am writing in the 1st box??? plz solve this and then if this problem is solved but in the second or first textbox the charactes doesnt appears in the way the should i will try to set somehow that they are UTF-8 characters so they have more bytes... ty again for ur replies :D:D:D vlahonick...LOVE AND GREETINGS FROM GREECE :D also u can see some of my work in the www.vlahonick.freehost.gr (of course u dont gonna understand many because site is in greek but u can try download my games->www.vlahonick.freehost.gr/downloads.html and press ?????????=games) here my code for one more time : ' Gambas class file PUBLIC SUB _new() END PUBLIC SUB Form_Open() END PUBLIC SUB Button1_Click() DIM nI AS Integer DIM sAnyChar AS String TextBox2.text = "" FOR nI = 1 TO Len(TextBox1.Text) sAnyChar = Mid(TextBox1.Text, nI, 1) TextBox2.Text = TextBox2.Text & Gronverter(sAnyChar) NEXT END FUNCTION Gronverter(sInChar AS String) AS String DIM sRetChar AS String = sInChar IF sInChar = "?" THEN sRetChar = "a" IF sInChar = "?" THEN sRetChar = "v" IF sInChar = "?" THEN sRetChar = "g" IF sInChar = "?" THEN sRetChar = "d" IF sInChar = "?" THEN sRetChar = "e" IF sInChar = "?" THEN sRetChar = "z" IF sInChar = "?" THEN sRetChar = "?" IF sInChar = "?" THEN sRetChar = "th" IF sInChar = "?" THEN sRetChar = "i" IF sInChar = "?" THEN sRetChar = "k" IF sInChar = "?" THEN sRetChar = "l" IF sInChar = "?" THEN sRetChar = "m" IF sInChar = "?" THEN sRetChar = "n" IF sInChar = "?" THEN sRetChar = "x" IF sInChar = "?" THEN sRetChar = "o" IF sInChar = "?" THEN sRetChar = "p" IF sInChar = "?" THEN sRetChar = "r" IF sInChar = "?" THEN sRetChar = "s" IF sInChar = "?" THEN sRetChar = "t" IF sInChar = "?" THEN sRetChar = "i" IF sInChar = "?" THEN sRetChar = "f" IF sInChar = "?" THEN sRetChar = "h" IF sInChar = "?" THEN sRetChar = "ps" IF sInChar = "?" THEN sRetChar = "o" RETURN sRetChar END PUBLIC SUB Button2_Click() TextBox1.text = "" TextBox2.text = "" END > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user _________________________________________________________________ Drag n? drop?Get easy photo sharing with Windows Live? Photos. http://www.microsoft.com/windows/windowslive/products/photos.aspx From simonart.dominique at ...11... Wed Apr 1 23:50:15 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Wed, 01 Apr 2009 23:50:15 +0200 Subject: [Gambas-user] Function Len in gambas2 In-Reply-To: References: <1238616887.6474.11.camel@...40...> Message-ID: <49D3E197.6010900@...11...> vlahonick vlahonick a ?crit : > > hi again...sorry about the delay in my reply :D > but i really didnt understand ur example here.... > of course now i realise that even the textbox2.text had the reasult i wanted the problem will > be in the letters appering because of their bytes... > but the main problem is not solved yet.... > still in the textbox2.text appears what i am writing in the textbox1.text and not what i want... > and abou the example u gave me with if then else end if is a bad idea because if for example we want to > converter a word i have to put many boxes and the user to write a letter in every box to have in that many other boxes a result.... > (anyway i tried this but just didnt work...) > so plz if u can tell me how i can make with two boxes every character i wrote in the first box to appear what i want in the second box.... > what i wrote wrong???why at the 2nd box appears what i am writing in the 1st box??? > plz solve this and then if this problem is solved but in the second or first textbox the charactes doesnt appears in the way the should i will try to set somehow that they are UTF-8 characters so they have more bytes... > ty again for ur replies :D:D:D > > vlahonick...LOVE AND GREETINGS FROM GREECE :D > also u can see some of my work in the www.vlahonick.freehost.gr (of course u dont gonna understand many because site is in greek but u can try download my games->www.vlahonick.freehost.gr/downloads.html and press ?????????=games) > > here my code for one more time : > > ' Gambas class file > > PUBLIC SUB _new() > > END > > PUBLIC SUB Form_Open() > > END > > PUBLIC SUB Button1_Click() > DIM nI AS Integer > DIM sAnyChar AS String > TextBox2.text = "" > FOR nI = 1 TO Len(TextBox1.Text) > sAnyChar = Mid(TextBox1.Text, nI, 1) > TextBox2.Text = TextBox2.Text & Gronverter(sAnyChar) > NEXT > END > > FUNCTION Gronverter(sInChar AS String) AS String > DIM sRetChar AS String = sInChar > > IF sInChar = "?" THEN sRetChar = "a" > IF sInChar = "?" THEN sRetChar = "v" > IF sInChar = "?" THEN sRetChar = "g" > IF sInChar = "?" THEN sRetChar = "d" > IF sInChar = "?" THEN sRetChar = "e" > IF sInChar = "?" THEN sRetChar = "z" > IF sInChar = "?" THEN sRetChar = "?" > IF sInChar = "?" THEN sRetChar = "th" > IF sInChar = "?" THEN sRetChar = "i" > IF sInChar = "?" THEN sRetChar = "k" > IF sInChar = "?" THEN sRetChar = "l" > IF sInChar = "?" THEN sRetChar = "m" > IF sInChar = "?" THEN sRetChar = "n" > IF sInChar = "?" THEN sRetChar = "x" > IF sInChar = "?" THEN sRetChar = "o" > IF sInChar = "?" THEN sRetChar = "p" > IF sInChar = "?" THEN sRetChar = "r" > IF sInChar = "?" THEN sRetChar = "s" > IF sInChar = "?" THEN sRetChar = "t" > IF sInChar = "?" THEN sRetChar = "i" > IF sInChar = "?" THEN sRetChar = "f" > IF sInChar = "?" THEN sRetChar = "h" > IF sInChar = "?" THEN sRetChar = "ps" > IF sInChar = "?" THEN sRetChar = "o" > RETURN sRetChar > > END > > PUBLIC SUB Button2_Click() > > TextBox1.text = "" > TextBox2.text = "" > END > >> Hi, You have to use the String class because each greek character is 2 bytes long. Change the SUB Button1_Click() as below and all will be fine! (I've tested it) PUBLIC SUB Button1_Click() DIM nI AS Integer DIM sAnyChar AS String TextBox2.text = "" FOR nI = 1 TO String.Len(TextBox1.Text) sAnyChar = String.Mid(TextBox1.Text, nI, 1) TextBox2.Text = TextBox2.Text & Gronverter(sAnyChar) NEXT END From Karl.Reinl at ...9... Thu Apr 2 00:18:36 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Thu, 02 Apr 2009 00:18:36 +0200 Subject: [Gambas-user] Function Len in gambas2 In-Reply-To: References: <1238616887.6474.11.camel@...40...> Message-ID: <1238624316.6474.17.camel@...40...> Am Mittwoch, den 01.04.2009, 23:46 +0300 schrieb vlahonick vlahonick: > > > > From: Karl.Reinl at ...9... > > To: gambas-user at lists.sourceforge.net > > Date: Wed, 1 Apr 2009 22:14:47 +0200 > > Subject: [Gambas-user] Function Len in gambas2 > > > > Salut, > > > > am I wrong? but I think thats use for nothing as LEN works actually in > > gambas2 > > > > from .....gambas2/help/help/lang/len.html > > > > Len > > Syntax > > iLength = Len ( sArg AS String ) AS Integer > > > > Returns the byte count which is occupied by the String sArg. Each ASCII > > character which has the code 0 to 127 requires one byte, UTF-8 > > characters as ???? require two or more bytes. > > > > Examples > > PRINT Len("Gambas"), Len("???") > >
6 6 > > PRINT Len("") > > 0 > > > > See also > > String Functions > > > > for what good that for? > > > > -- > > Amicalment > > Charlie > > > hi again...sorry about the delay in my reply :D > but i really didnt understand ur example here.... > of course now i realise that even the textbox2.text had the reasult i wanted the problem will > be in the letters appering because of their bytes... > but the main problem is not solved yet.... > still in the textbox2.text appears what i am writing in the textbox1.text and not what i want... > and abou the example u gave me with if then else end if is a bad idea because if for example we want to > converter a word i have to put many boxes and the user to write a letter in every box to have in that many other boxes a result.... > (anyway i tried this but just didnt work...) > so plz if u can tell me how i can make with two boxes every character i wrote in the first box to appear what i want in the second box.... > what i wrote wrong???why at the 2nd box appears what i am writing in the 1st box??? > plz solve this and then if this problem is solved but in the second or first textbox the charactes doesnt appears in the way the should i will try to set somehow that they are UTF-8 characters so they have more bytes... > ty again for ur replies :D:D:D > > vlahonick...LOVE AND GREETINGS FROM GREECE :D > also u can see some of my work in the www.vlahonick.freehost.gr (of course u dont gonna understand many because site is in greek but u can try download my games->www.vlahonick.freehost.gr/downloads.html and press ?????????=games) > > here my code for one more time : > > ' Gambas class file > > PUBLIC SUB _new() > > END > > PUBLIC SUB Form_Open() > > END > > PUBLIC SUB Button1_Click() > DIM nI AS Integer > DIM sAnyChar AS String > TextBox2.text = "" > FOR nI = 1 TO Len(TextBox1.Text) > sAnyChar = Mid(TextBox1.Text, nI, 1) > TextBox2.Text = TextBox2.Text & Gronverter(sAnyChar) > NEXT > END > > FUNCTION Gronverter(sInChar AS String) AS String > DIM sRetChar AS String = sInChar > > IF sInChar = "?" THEN sRetChar = "a" > IF sInChar = "?" THEN sRetChar = "v" > IF sInChar = "?" THEN sRetChar = "g" > IF sInChar = "?" THEN sRetChar = "d" > IF sInChar = "?" THEN sRetChar = "e" > IF sInChar = "?" THEN sRetChar = "z" > IF sInChar = "?" THEN sRetChar = "?" > IF sInChar = "?" THEN sRetChar = "th" > IF sInChar = "?" THEN sRetChar = "i" > IF sInChar = "?" THEN sRetChar = "k" > IF sInChar = "?" THEN sRetChar = "l" > IF sInChar = "?" THEN sRetChar = "m" > IF sInChar = "?" THEN sRetChar = "n" > IF sInChar = "?" THEN sRetChar = "x" > IF sInChar = "?" THEN sRetChar = "o" > IF sInChar = "?" THEN sRetChar = "p" > IF sInChar = "?" THEN sRetChar = "r" > IF sInChar = "?" THEN sRetChar = "s" > IF sInChar = "?" THEN sRetChar = "t" > IF sInChar = "?" THEN sRetChar = "i" > IF sInChar = "?" THEN sRetChar = "f" > IF sInChar = "?" THEN sRetChar = "h" > IF sInChar = "?" THEN sRetChar = "ps" > IF sInChar = "?" THEN sRetChar = "o" > RETURN sRetChar > > END > > PUBLIC SUB Button2_Click() > > TextBox1.text = "" > TextBox2.text = "" > END Salut, Dominique Simonart has the UTF-8 Solution for your problem. PS: the origin of mail was not the answer to your questions -- Amicalment Charlie From admin at ...1080... Thu Apr 2 01:00:51 2009 From: admin at ...1080... (admin at ...1080...) Date: Thu, 02 Apr 2009 01:00:51 +0200 Subject: [Gambas-user] (no subject) In-Reply-To: References: Message-ID: <49D3F223.7020609@...1080...> First you set the Return String to the Input value and none of the If's is proceed. So, what goes In is coming Out. Regards, Werner FUNCTION Gronverter(sInChar AS String) AS String DIM sRetChar AS String = sInChar IF sInChar = "?" THEN sRetChar = "a" IF sInChar = "?" THEN sRetChar = "v" IF sInChar = "?" THEN sRetChar = "g" IF sInChar = "?" THEN sRetChar = "d" IF sInChar = "?" THEN sRetChar = "e" IF sInChar = "?" THEN sRetChar = "z" IF sInChar = "?" THEN sRetChar = "?" IF sInChar = "?" THEN sRetChar = "th" IF sInChar = "?" THEN sRetChar = "i" IF sInChar = "?" THEN sRetChar = "k" IF sInChar = "?" THEN sRetChar = "l" IF sInChar = "?" THEN sRetChar = "m" IF sInChar = "?" THEN sRetChar = "n" IF sInChar = "?" THEN sRetChar = "x" IF sInChar = "?" THEN sRetChar = "o" IF sInChar = "?" THEN sRetChar = "p" IF sInChar = "?" THEN sRetChar = "r" IF sInChar = "?" THEN sRetChar = "s" IF sInChar = "?" THEN sRetChar = "t" IF sInChar = "?" THEN sRetChar = "i" IF sInChar = "?" THEN sRetChar = "f" IF sInChar = "?" THEN sRetChar = "h" IF sInChar = "?" THEN sRetChar = "ps" IF sInChar = "?" THEN sRetChar = "o" RETURN sRetChar END From tsopanotragi at ...67... Thu Apr 2 01:25:20 2009 From: tsopanotragi at ...67... (vlahonick vlahonick) Date: Thu, 2 Apr 2009 02:25:20 +0300 Subject: [Gambas-user] Function Len in gambas2 In-Reply-To: <49D3E197.6010900@...11...> References: <1238616887.6474.11.camel@...40...> <49D3E197.6010900@...11...> Message-ID: > Date: Wed, 1 Apr 2009 23:50:15 +0200 > From: simonart.dominique at ...11... > To: gambas-user at lists.sourceforge.net > Subject: Re: [Gambas-user] Function Len in gambas2 > > vlahonick vlahonick a ?crit : > > > > hi again...sorry about the delay in my reply :D > > but i really didnt understand ur example here.... > > of course now i realise that even the textbox2.text had the reasult i wanted the problem will > > be in the letters appering because of their bytes... > > but the main problem is not solved yet.... > > still in the textbox2.text appears what i am writing in the textbox1.text and not what i want... > > and abou the example u gave me with if then else end if is a bad idea because if for example we want to > > converter a word i have to put many boxes and the user to write a letter in every box to have in that many other boxes a result.... > > (anyway i tried this but just didnt work...) > > so plz if u can tell me how i can make with two boxes every character i wrote in the first box to appear what i want in the second box.... > > what i wrote wrong???why at the 2nd box appears what i am writing in the 1st box??? > > plz solve this and then if this problem is solved but in the second or first textbox the charactes doesnt appears in the way the should i will try to set somehow that they are UTF-8 characters so they have more bytes... > > ty again for ur replies :D:D:D > > > > vlahonick...LOVE AND GREETINGS FROM GREECE :D > > also u can see some of my work in the www.vlahonick.freehost.gr (of course u dont gonna understand many because site is in greek but u can try download my games->www.vlahonick.freehost.gr/downloads.html and press ?????????=games) > > > > here my code for one more time : > > > > ' Gambas class file > > > > PUBLIC SUB _new() > > > > END > > > > PUBLIC SUB Form_Open() > > > > END > > > > PUBLIC SUB Button1_Click() > > DIM nI AS Integer > > DIM sAnyChar AS String > > TextBox2.text = "" > > FOR nI = 1 TO Len(TextBox1.Text) > > sAnyChar = Mid(TextBox1.Text, nI, 1) > > TextBox2.Text = TextBox2.Text & Gronverter(sAnyChar) > > NEXT > > END > > > > FUNCTION Gronverter(sInChar AS String) AS String > > DIM sRetChar AS String = sInChar > > > > IF sInChar = "?" THEN sRetChar = "a" > > IF sInChar = "?" THEN sRetChar = "v" > > IF sInChar = "?" THEN sRetChar = "g" > > IF sInChar = "?" THEN sRetChar = "d" > > IF sInChar = "?" THEN sRetChar = "e" > > IF sInChar = "?" THEN sRetChar = "z" > > IF sInChar = "?" THEN sRetChar = "?" > > IF sInChar = "?" THEN sRetChar = "th" > > IF sInChar = "?" THEN sRetChar = "i" > > IF sInChar = "?" THEN sRetChar = "k" > > IF sInChar = "?" THEN sRetChar = "l" > > IF sInChar = "?" THEN sRetChar = "m" > > IF sInChar = "?" THEN sRetChar = "n" > > IF sInChar = "?" THEN sRetChar = "x" > > IF sInChar = "?" THEN sRetChar = "o" > > IF sInChar = "?" THEN sRetChar = "p" > > IF sInChar = "?" THEN sRetChar = "r" > > IF sInChar = "?" THEN sRetChar = "s" > > IF sInChar = "?" THEN sRetChar = "t" > > IF sInChar = "?" THEN sRetChar = "i" > > IF sInChar = "?" THEN sRetChar = "f" > > IF sInChar = "?" THEN sRetChar = "h" > > IF sInChar = "?" THEN sRetChar = "ps" > > IF sInChar = "?" THEN sRetChar = "o" > > RETURN sRetChar > > > > END > > > > PUBLIC SUB Button2_Click() > > > > TextBox1.text = "" > > TextBox2.text = "" > > END > > > >> > > Hi, > > You have to use the String class because each greek > character is 2 bytes long. > Change the SUB Button1_Click() as below and all will be > fine! (I've tested it) > > PUBLIC SUB Button1_Click() > DIM nI AS Integer > DIM sAnyChar AS String > TextBox2.text = "" > FOR nI = 1 TO String.Len(TextBox1.Text) > sAnyChar = String.Mid(TextBox1.Text, nI, 1) > TextBox2.Text = TextBox2.Text & Gronverter(sAnyChar) > NEXT > END > THANK YOU ALL VERY MUCH FOR YOUR REPLIES... SPECIAL THANKS TO DOMINIQUE AND CHARLIE because they have been very very helpful :D:D:D when i finish the program i will send you :D (of course i have many things to do before it finished because it will except converting words will have planty of texts about the greek alphabet and more...and maybe is a good time for u if u are interested to learn some greek :D,u maybe come in Greece for vacation so it will be helpful :D) TY ALL AGAIN :D > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user _________________________________________________________________ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx From tsopanotragi at ...67... Thu Apr 2 04:01:41 2009 From: tsopanotragi at ...67... (vlahonick vlahonick) Date: Thu, 2 Apr 2009 05:01:41 +0300 Subject: [Gambas-user] (no subject) Message-ID: thanks to all of you (special thanks to dominique tha solved the previous problem) the project going on :D but now another problem appears... THE DIFTHONGS and the finishing greek sigma... the code below is about the sigma but in greek is one more "?" tha goes only if a word ENDS with SIGMA (?/?/?) IF sInChar = "?" THEN sRetChar = "s" so how i can write tha if the last letter in the textbox1.text is "s" that textbox2.text have to write "?" ??? this is the first problem of the part... and now how i can write that if in the textbox1.text the user writes "??" it should appear "u" ???? because is different if the tou letters "?" and "?" are the one after other and other if they dont. example : ????????->ugada , ??????????->pulimenos | ??????????->ipsolotatos so u see tha in ugada and pulimenos example if the two leters (?,?) are one after other the pronoced like "u" so how i can do that? because i already had write : IF sInChar = "?" THEN sRetChar = "i" IF sInChar = "?" THEN sRetChar = "o" so at this moment the program understand them different example : if i wrote ???????? program gives oigada but the correct is UGADA (ugada is how Uganda(the country) is pronaunced in greek) so now somehow i have to write that if these two letter are together (one after other|?,?|) they should give the result "u". of course doesnt matter if a word stars or ends or if these two letters are in the middle of the word. their result is always "u". ANY HELP??? ty in advance... VLAHONICK (www.vlahonick.freehost.gr) :D _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx From doriano.blengino at ...1909... Thu Apr 2 07:51:35 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Thu, 02 Apr 2009 07:51:35 +0200 Subject: [Gambas-user] (no subject) In-Reply-To: References: Message-ID: <49D45267.40104@...1909...> vlahonick vlahonick ha scritto: > thanks to all of you (special thanks to dominique tha solved the previous problem) the project going on :D > but now another problem appears... > THE DIFTHONGS and the finishing greek sigma... > the code below is about the sigma but in greek is one more "?" tha goes only if a word ENDS with SIGMA (?/?/?) > > IF sInChar = "?" THEN sRetChar = "s" > > so how i can write tha if the last letter in the textbox1.text is "s" that textbox2.text have to write "?" ??? > > this is the first problem of the part... > > and now how i can write that if in the textbox1.text the user writes "??" it should appear "u" ???? > because is different if the tou letters "?" and "?" are the one after other and other if they dont. > example : ????????->ugada , ??????????->pulimenos | ??????????->ipsolotatos > so u see tha in ugada and pulimenos example if the two leters (?,?) are one after other the pronoced like "u" > so how i can do that? > because i already had write : > > IF sInChar = "?" THEN sRetChar = "i" > IF sInChar = "?" THEN sRetChar = "o" > > so at this moment the program understand them different > > example : > > if i wrote ???????? program gives oigada but the correct is UGADA > > (ugada is how Uganda(the country) is pronaunced in greek) > > so now somehow i have to write that if these two letter are together (one after other|?,?|) they should give the > result "u". > of course doesnt matter if a word stars or ends or if these two letters are in the middle of the word. > their result is always "u". > > ANY HELP??? > I am not sure to have got it rightly, but I am sure about this: if you can explain something to a person, then you can explain the same thing to gambas. You just said that if a O is followed by a U, (sorry for using latin letters - you understand), then the output is a single U. So write it in gambas: you take an input word, and analyze it letter by letter. If a letter is TAU, you output "T"; if a letter is OMEGA, you: 1) peek at the next letter. 1a) If it is "U", you output "U" and increment the scanning index 1b) If it is not "U", you output "O" 2) increment index and loop ...and so on. Another way, which works if your input text *does not* contain latin letters, is to substitute it piece by piece, starting with exceptions like diphtongs. Take your Uganda: "????????". Search for all the diphtongs - start with "??": found in position one. Delete two chars, and put in place "U". Now you have "U??????". Search for other diphtongs - none found. Then, search for single letters. "?" found in position 7; delete it and place an "A"; you get "U?????A". And so on... May be things can get more complicated if you take whole sentences; in Italian the correct pronunciation sometimes changes slightly depending on the words. For example, "to Milan" becomes "a Milano", and it is pronounced normally. But "to Rome" becomes "a Roma", but should be pronounced "arroma", with a geminated "R" present only when speaked. I suppose Greek has these exceptions too... Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From emil at ...1913... Thu Apr 2 08:35:25 2009 From: emil at ...1913... (Emil Tchekov) Date: Thu, 2 Apr 2009 08:35:25 +0200 Subject: [Gambas-user] (no subject) In-Reply-To: <49D3F223.7020609@...1080...> Message-ID: I am not so fluent in Gambas, but have made many char converters in the past... Instead of using IFs it is better to work with char codes (ASCII, UTFxx). Create Array with suitable char width (8, 16, 32 Byte) and fill in with what you need. As example: on InChar "A" should be shown sth. other. put in your array's 65-th element what you wish to have as "answer". Than the whole code reduces to: sRetChar=YOURARRAY(ASC(sInChar)) It is much faster than multiple IFs kind regards Emil -----Ursprungliche Nachricht----- Von: admin at ...1080... [mailto:admin at ...1080...] Gesendet: Donnerstag, 2. April 2009 01:01 An: gambas-user at lists.sourceforge.net Betreff: Re: [Gambas-user] (no subject) First you set the Return String to the Input value and none of the If's is proceed. So, what goes In is coming Out. Regards, Werner FUNCTION Gronverter(sInChar AS String) AS String DIM sRetChar AS String = sInChar IF sInChar = "?" THEN sRetChar = "a" IF sInChar = "?" THEN sRetChar = "v" IF sInChar = "?" THEN sRetChar = "g" IF sInChar = "?" THEN sRetChar = "d" IF sInChar = "?" THEN sRetChar = "e" IF sInChar = "?" THEN sRetChar = "z" IF sInChar = "?" THEN sRetChar = "?" IF sInChar = "?" THEN sRetChar = "th" IF sInChar = "?" THEN sRetChar = "i" IF sInChar = "?" THEN sRetChar = "k" IF sInChar = "?" THEN sRetChar = "l" IF sInChar = "?" THEN sRetChar = "m" IF sInChar = "?" THEN sRetChar = "n" IF sInChar = "?" THEN sRetChar = "x" IF sInChar = "?" THEN sRetChar = "o" IF sInChar = "?" THEN sRetChar = "p" IF sInChar = "?" THEN sRetChar = "r" IF sInChar = "?" THEN sRetChar = "s" IF sInChar = "?" THEN sRetChar = "t" IF sInChar = "?" THEN sRetChar = "i" IF sInChar = "?" THEN sRetChar = "f" IF sInChar = "?" THEN sRetChar = "h" IF sInChar = "?" THEN sRetChar = "ps" IF sInChar = "?" THEN sRetChar = "o" RETURN sRetChar END ---------------------------------------------------------------------------- -- _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From dosida at ...626... Thu Apr 2 12:26:38 2009 From: dosida at ...626... (Dimitris Anogiatis) Date: Thu, 2 Apr 2009 04:26:38 -0600 Subject: [Gambas-user] (no subject) In-Reply-To: <49D45267.40104@...1909...> References: <49D45267.40104@...1909...> Message-ID: <82bffccf0904020326u41a6a8d2tbf804a20192825b1@...627...> For the trailing S problem since the nouns with male gender and our verbs always end in "?" you can either do an rInstr (reverse Instr) or you can use right$ to get the trailing character of your word and check if it is a trailing s or not. as for the difthongs you can always do an instr(tmpString, "??") to see whether there exists one set of difthongs or not within the given string and just replace all of its occurrences with u. OR you could use replace(tmpString,"??","u") to replace every difthong you find in the whole string. gambasdoc link for rinstr http://www.gambasdoc.org/help/lang/rinstr gambasdoc link for rinstr http://www.gambasdoc.org/help/lang/replace I hope this helps. Since I do speak Greek if you want, send me an email directly so I can get a better idea of what you're trying to accomplish here. Regards Dimitris 2009/4/1 Doriano Blengino > vlahonick vlahonick ha scritto: > > thanks to all of you (special thanks to dominique tha solved the previous > problem) the project going on :D > > but now another problem appears... > > THE DIFTHONGS and the finishing greek sigma... > > the code below is about the sigma but in greek is one more "?" tha goes > only if a word ENDS with SIGMA (?/?/?) > > > > IF sInChar = "?" THEN sRetChar = "s" > > > > so how i can write tha if the last letter in the textbox1.text is "s" > that textbox2.text have to write "?" ??? > > > > this is the first problem of the part... > > > > and now how i can write that if in the textbox1.text the user writes "??" > it should appear "u" ???? > > because is different if the tou letters "?" and "?" are the one after > other and other if they dont. > > example : ????????->ugada , ??????????->pulimenos | > ??????????->ipsolotatos > > so u see tha in ugada and pulimenos example if the two leters (?,?) are > one after other the pronoced like "u" > > so how i can do that? > > because i already had write : > > > > IF sInChar = "?" THEN sRetChar = "i" > > IF sInChar = "?" THEN sRetChar = "o" > > > > so at this moment the program understand them different > > > > example : > > > > if i wrote ???????? program gives oigada but the correct is UGADA > > > > (ugada is how Uganda(the country) is pronaunced in greek) > > > > so now somehow i have to write that if these two letter are together (one > after other|?,?|) they should give the > > result "u". > > of course doesnt matter if a word stars or ends or if these two letters > are in the middle of the word. > > their result is always "u". > > > > ANY HELP??? > > > I am not sure to have got it rightly, but I am sure about this: if you > can explain something to a person, then you can explain the same thing > to gambas. You just said that if a O is followed by a U, (sorry for > using latin letters - you understand), then the output is a single U. So > write it in gambas: you take an input word, and analyze it letter by > letter. If a letter is TAU, you output "T"; if a letter is OMEGA, you: > > 1) peek at the next letter. > 1a) If it is "U", you output "U" and increment the scanning index > 1b) If it is not "U", you output "O" > > 2) increment index and loop > > ...and so on. > > Another way, which works if your input text *does not* contain latin > letters, is to substitute it piece by piece, starting with exceptions > like diphtongs. Take your Uganda: "????????". Search for all the > diphtongs - start with "??": found in position one. Delete two chars, > and put in place "U". Now you have "U??????". Search for other diphtongs > - none found. Then, search for single letters. "?" found in position 7; > delete it and place an "A"; you get "U?????A". And so on... > > May be things can get more complicated if you take whole sentences; in > Italian the correct pronunciation sometimes changes slightly depending > on the words. For example, "to Milan" becomes "a Milano", and it is > pronounced normally. But "to Rome" becomes "a Roma", but should be > pronounced "arroma", with a geminated "R" present only when speaked. I > suppose Greek has these exceptions too... > > Regards, > > -- > Doriano Blengino > > "Listen twice before you speak. > This is why we have two ears, but only one mouth." > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From weldon_gary at ...67... Thu Apr 2 14:56:29 2009 From: weldon_gary at ...67... (CelticBhoy) Date: Thu, 2 Apr 2009 05:56:29 -0700 (PDT) Subject: [Gambas-user] Is there an Lprint equivalent Message-ID: <22847224.post@...1379...> The last time I coded i used the old QuickBasic under windows 3.1. What I want to know is if there is an equivalent to the Lprint command to send a line to the printer? If not how do I print to the printer ??? I had a look at the documentation but couldn't find anything. -- View this message in context: http://www.nabble.com/Is-there-an-Lprint-equivalent-tp22847224p22847224.html Sent from the gambas-user mailing list archive at Nabble.com. From jussi.lahtinen at ...626... Thu Apr 2 18:16:47 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Thu, 2 Apr 2009 19:16:47 +0300 Subject: [Gambas-user] Gambas 3 revision 1917 In-Reply-To: <384d3900903311200l6be2f66ct16b88391b57b44a7@...627...> References: <384d3900903311200l6be2f66ct16b88391b57b44a7@...627...> Message-ID: <384d3900904020916w57c64334vc9320fff220a9357@...627...> Hello again! I managed to "solve" my compilation problem. I had error message; CGLarea.h:34:16: error: gl.h: No such file or directory Which is confusing, because there IS /usr/include/GL/gl.h file. I tried to copy gl.h to "/trunk/gb.qt4/src/opengl" and to "/trunk", and now it compiles. How do I set include paths correctly? Or what else is wrong? Thanks! Jussi On Tue, Mar 31, 2009 at 22:00, Jussi Lahtinen wrote: > Hi! > > I can't compile latest revision... > > First I got this: > THESE COMPONENTS ARE DISABLED: > - gb.opengl > - gb.qte > > And make fails with error: gl.h: No such file or directory > Gambas 2 and Gambas 3 revision 1885 compiled fine. > > I removed Gambas3 with commands: > sudo rm -f /usr/local/bin/gbx3 /usr/local/bin/gbc3 /usr/local/bin/gba3 > /usr/local/bin/gbi3 > sudo rm -rf /usr/local/lib/gambas3 > sudo rm -rf /usr/local/share/gambas3 > Did I miss something? > > Or do I need to install something from somewhere? > > I did: > ( ./configure; make; sudo make install ) > output.txt 2>&1 > See attachment. > > I'm still badly in learning phase with GNU build system. > Any hints? > Thanks! > > > Jussi > Ubuntu 8.10 64bit > From nando_f at ...951... Thu Apr 2 20:25:02 2009 From: nando_f at ...951... (nando) Date: Thu, 2 Apr 2009 13:25:02 -0500 Subject: [Gambas-user] Is there an Lprint equivalent In-Reply-To: <22847224.post@...1379...> References: <22847224.post@...1379...> Message-ID: <20090402182025.M19139@...951...> Same issue for me but it was for a printer connected serially (a point of sale printer) I used the serial component, created an instance and WRITE to it directly. I did this with computers with serial ports and without where I used a USB to serial converter. Works wonderful. As for parallel, for direct chars out, I think it is easier to use a USB to parallel port converter and WRITE chars to the USB port. This is closest to the old QB days of direct printing. When you plug in a usb to something, it becomes a device names something like /dev/ttyUSB0 (or 1 or 2...) -Fernando ---------- Original Message ----------- From: CelticBhoy To: gambas-user at lists.sourceforge.net Sent: Thu, 2 Apr 2009 05:56:29 -0700 (PDT) Subject: [Gambas-user] Is there an Lprint equivalent > The last time I coded i used the old QuickBasic under windows 3.1. What I > want to know is if there is an equivalent to the Lprint command to send a > line to the printer? > > If not how do I print to the printer ??? > > I had a look at the documentation but couldn't find anything. > -- > View this message in context: http://www.nabble.com/Is-there-an-Lprint- > equivalent-tp22847224p22847224.html Sent from the gambas-user mailing list > archive at Nabble.com. > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From nando_f at ...951... Thu Apr 2 20:30:20 2009 From: nando_f at ...951... (nando) Date: Thu, 2 Apr 2009 13:30:20 -0500 Subject: [Gambas-user] Timer question In-Reply-To: <200904010745.35249.rterry@...1946...> References: <200904010745.35249.rterry@...1946...> Message-ID: <20090402182559.M68373@...951...> One way to do this is to use an Int kptimer and set it to 10 every keypress. Inside the timer (if set at 1 second ticks) IF kptimer >= 0 then DEC kptimer 'decrement if kptimer = 0 then 'timeout 10 seconds..do something. 'kptimer will stay at -1 after that until reset to 10. So, the timer control always runs. -Fernando ---------- Original Message ----------- From: richard terry To: mailing list for gambas users Sent: Wed, 1 Apr 2009 07:45:35 +1100 Subject: [Gambas-user] Timer question > I want to be able to reset the timers time to 0 at will, without stopping the > timer, so that I can link it to the keypress of a textbox. Every time the > user hits a key, the place the timer is up to is reset, once they lag, then > the timer event fires. > > Dosn't seem to be such a property. > > Thanks. > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From jbskaggs at ...1871... Fri Apr 3 06:38:41 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Thu, 2 Apr 2009 21:38:41 -0700 (PDT) Subject: [Gambas-user] Maybe off topic: but have anyone dealt with domain transfer issues? Message-ID: <22861782.post@...1379...> One of my main sites the one I had put the Gambas school on had a domain registered with siteground. Last month I transferred the domain on 3/19 to rubyringtech. The domain was not expired was paid and would not expire until the April 1st. Today siteground somehow refused to transfer my account and so my gambas school site and some others went down. Siteground said that I cannot transfer a site with fifteen days of expiration- that I had to pay for another year just to finish the transfer! Is this legal or even normal? I have used webhosting for almost ten years now and never had anything like this. SO I paid the registration fee for a domain I paid to have transferred away from on the 19th- and its not a huge amount of money but it seems well crooked. JB -- View this message in context: http://www.nabble.com/Maybe-off-topic%3A-but-have-anyone-dealt-with-domain-transfer-issues--tp22861782p22861782.html Sent from the gambas-user mailing list archive at Nabble.com. From jbskaggs at ...1871... Fri Apr 3 07:09:07 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Thu, 2 Apr 2009 22:09:07 -0700 (PDT) Subject: [Gambas-user] Maybe off topic: but have anyone dealt with domain transfer issues? In-Reply-To: <22861782.post@...1379...> References: <22861782.post@...1379...> Message-ID: <22862054.post@...1379...> I just checked my bank and siteground withdrew $95 on my debit card instaed of $7.95! The theiving weasles! I am so angry I feel like gnashing my teeth!. jbskaggs wrote: > > One of my main sites the one I had put the Gambas school on had a domain > registered with siteground. Last month I transferred the domain on 3/19 to > rubyringtech. The domain was not expired was paid and would not expire > until the April 1st. > > Today siteground somehow refused to transfer my account and so my gambas > school site and some others went down. > > Siteground said that I cannot transfer a site with fifteen days of > expiration- that I had to pay for another year just to finish the > transfer! > > Is this legal or even normal? I have used webhosting for almost ten years > now and never had anything like this. > > SO I paid the registration fee for a domain I paid to have transferred > away from on the 19th- and its not a huge amount of money but it seems > well crooked. > > JB > -- View this message in context: http://www.nabble.com/Maybe-off-topic%3A-but-have-anyone-dealt-with-domain-transfer-issues--tp22861782p22862054.html Sent from the gambas-user mailing list archive at Nabble.com. From tsopanotragi at ...67... Fri Apr 3 07:53:10 2009 From: tsopanotragi at ...67... (vlahonick vlahonick) Date: Fri, 3 Apr 2009 08:53:10 +0300 Subject: [Gambas-user] icon... Message-ID: hello all :D does anybody knows how to change the icon that appears in the left of the program's name after u installed programs .deb package? (i use ubuntu 8.10) (i am not talking about the icon that appears at the left of programs window when u run it-this one we can put it from the icon option when we creating the form) example : i wrote a program,i made the .deb package and then installed it. but then when i press applications->others(or whatever here)->my_program's_name in the left of my programs name appears gambas logo...how can i put another icon there? thanks you all in advance :D:D:D vlahonick _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx From joshiggins at ...1601... Fri Apr 3 09:41:13 2009 From: joshiggins at ...1601... (Joshua Higgins) Date: Fri, 3 Apr 2009 08:41:13 +0100 Subject: [Gambas-user] icon... In-Reply-To: References: Message-ID: <4247f5440904030041rfa24375rb7bf9d982329db5f@...627...> I think if you set the icon in Project > Project properties it should use that for the deb package... although I have never tried it. 2009/4/3 vlahonick vlahonick > > > > hello all :D > > does anybody knows how to change the icon that appears in the left of the > program's name after u installed > programs .deb package? > > (i use ubuntu 8.10) > > (i am not talking about the icon that appears at the left of programs > window when u run it-this one we can put it from the icon option when we > creating the form) > > example : > > i wrote a program,i made the .deb package and then installed it. > > but then when i press applications->others(or whatever > here)->my_program's_name in the left of my programs name > appears gambas logo...how can i put another icon there? > > thanks you all in advance :D:D:D > > vlahonick > > _________________________________________________________________ > News, entertainment and everything you care about at Live.com. Get it now! > http://www.live.com/getstarted.aspx > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- joshua higgins >>>>>>------ From tsopanotragi at ...67... Fri Apr 3 10:56:21 2009 From: tsopanotragi at ...67... (vlahonick vlahonick) Date: Fri, 3 Apr 2009 11:56:21 +0300 Subject: [Gambas-user] icon... In-Reply-To: <4247f5440904030041rfa24375rb7bf9d982329db5f@...627...> References: <4247f5440904030041rfa24375rb7bf9d982329db5f@...627...> Message-ID: > Date: Fri, 3 Apr 2009 08:41:13 +0100 > From: joshiggins at ...1601... > To: gambas-user at lists.sourceforge.net > Subject: Re: [Gambas-user] icon... > > I think if you set the icon in Project > Project properties it should use > that for the deb package... although I have never tried it. > > 2009/4/3 vlahonick vlahonick > > > > > > > > > hello all :D > > > > does anybody knows how to change the icon that appears in the left of the > > program's name after u installed > > programs .deb package? > > > > (i use ubuntu 8.10) > > > > (i am not talking about the icon that appears at the left of programs > > window when u run it-this one we can put it from the icon option when we > > creating the form) > > > > example : > > > > i wrote a program,i made the .deb package and then installed it. > > > > but then when i press applications->others(or whatever > > here)->my_program's_name in the left of my programs name > > appears gambas logo...how can i put another icon there? > > > > thanks you all in advance :D:D:D > > > > vlahonick > > > > you were so right....................... i dont even check project options before i ask... i feel that stupud now :( anyway really thanks :D:D vlahonick _________________________________________________________ > > News, entertainment and everything you care about at Live.com. Get it now! > > http://www.live.com/getstarted.aspx > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > -- > joshua higgins > >>>>>>------ > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user _________________________________________________________________ Drag n? drop?Get easy photo sharing with Windows Live? Photos. http://www.microsoft.com/windows/windowslive/products/photos.aspx From jbskaggs at ...1871... Fri Apr 3 11:02:52 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Fri, 3 Apr 2009 02:02:52 -0700 (PDT) Subject: [Gambas-user] Sdl vs qt drawing area how much performance difference? Message-ID: <22864611.post@...1379...> IN my current project it has equal widgets and equal game graphics. With that said how much performance difference is there between the two? I read sdl is faster and but is it a 10%, 20% improvement, enough to give up the widgets? JB SKaggs -- View this message in context: http://www.nabble.com/Sdl-vs-qt-drawing-area--how-much-performance-difference--tp22864611p22864611.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas at ...1... Fri Apr 3 11:07:22 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Fri, 3 Apr 2009 11:07:22 +0200 Subject: [Gambas-user] Gambas 3 revision 1917 In-Reply-To: <384d3900904020916w57c64334vc9320fff220a9357@...627...> References: <384d3900903311200l6be2f66ct16b88391b57b44a7@...627...> <384d3900904020916w57c64334vc9320fff220a9357@...627...> Message-ID: <200904031107.22814.gambas@...1...> > Hello again! > > I managed to "solve" my compilation problem. > I had error message; > CGLarea.h:34:16: error: gl.h: No such file or directory > Which is confusing, because there IS /usr/include/GL/gl.h file. > I tried to copy gl.h to "/trunk/gb.qt4/src/opengl" and to "/trunk", > and now it compiles. > > How do I set include paths correctly? > Or what else is wrong? > Thanks! > > > Jussi > > On Tue, Mar 31, 2009 at 22:00, Jussi Lahtinen wrote: > > Hi! > > > > I can't compile latest revision... > > > > First I got this: > > THESE COMPONENTS ARE DISABLED: > > - gb.opengl > > - gb.qte > > > > And make fails with error: gl.h: No such file or directory > > Gambas 2 and Gambas 3 revision 1885 compiled fine. > > > > I removed Gambas3 with commands: > > sudo rm -f /usr/local/bin/gbx3 /usr/local/bin/gbc3 /usr/local/bin/gba3 > > /usr/local/bin/gbi3 > > sudo rm -rf /usr/local/lib/gambas3 > > sudo rm -rf /usr/local/share/gambas3 > > Did I miss something? > > > > Or do I need to install something from somewhere? > > > > I did: > > ( ./configure; make; sudo make install ) > output.txt 2>&1 > > See attachment. > > > > I'm still badly in learning phase with GNU build system. > > Any hints? > > Thanks! > > > > > > Jussi > > Ubuntu 8.10 64bit > Can you send the output of ./configure, especially in the gb.opengl directory? -- Beno?t From gambas at ...1... Fri Apr 3 11:12:03 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Fri, 3 Apr 2009 11:12:03 +0200 Subject: [Gambas-user] Dynamic Objects In-Reply-To: <49D33E35.8070506@...1909...> References: <49D33E35.8070506@...1909...> Message-ID: <200904031112.03872.gambas@...1...> > Rodney Rundstrom ha scritto: > > Thanks for that I'll work thought over the next few day. One last > > question on dynamic object (I think) how do we delete them and release > > the memory? > > This is a matter unclear to me, anyway: an object is freed when no > reference to it are in effect. What is unclear in the last sentence? > When you instantiate a visual control, > its parent gets a reference to the object. I don't know how to delete > that reference (perhaps a Delete() method of its Children property?). > For forms, a Persistent property says what to do when the form is > closed, either hide it or destroy it. For other objects, I don't know - > better someone else replies to you. > > Regards, > Doriano > When an object exists only in the Gambas interpreter, like a Collection for example, then it is referenced only by other Gambas objects. It is destroyed when you release the last reference on it. But for objects existing outside of the Gambas interpreter, it is different. GUI controls are in that case: they are internally referenced by the QT library, so they are not destroyed when you have no reference on them anymore: the GUI widget must be destroyed too. Hopefully, as you noticed, there is a Delete() method that asks the GUI to destroy a widget if you need. Hope things are clearer... Regards, -- Beno?t From doriano.blengino at ...1909... Fri Apr 3 12:51:19 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Fri, 03 Apr 2009 12:51:19 +0200 Subject: [Gambas-user] Dynamic Objects In-Reply-To: <200904031112.03872.gambas@...1...> References: <49D33E35.8070506@...1909...> <200904031112.03872.gambas@...1...> Message-ID: <49D5EA27.9090409@...1909...> Beno?t Minisini ha scritto: >> Rodney Rundstrom ha scritto: >> >>> Thanks for that I'll work thought over the next few day. One last >>> question on dynamic object (I think) how do we delete them and release >>> the memory? >>> >> This is a matter unclear to me, anyway: an object is freed when no >> reference to it are in effect. >> > > What is unclear in the last sentence? > "How to release objects", is slightly unclear to me; this is because I am coming from another language, where objects have explicit Destroy and Free methods. I did little of this matter in gambas: for most situations, the automatic mechanism is pretty good; I did run in trouble when I used Observers, and I had to use an ugly hack. I also asked you about it, if you remember... anyway I solved. >> When you instantiate a visual control, >> its parent gets a reference to the object. I don't know how to delete >> that reference (perhaps a Delete() method of its Children property?). >> For forms, a Persistent property says what to do when the form is >> closed, either hide it or destroy it. For other objects, I don't know - >> better someone else replies to you. >> >> Regards, >> Doriano >> >> > > When an object exists only in the Gambas interpreter, like a Collection for > example, then it is referenced only by other Gambas objects. It is destroyed > when you release the last reference on it. > > But for objects existing outside of the Gambas interpreter, it is different. > GUI controls are in that case: they are internally referenced by the QT > library, so they are not destroyed when you have no reference on them anymore: > the GUI widget must be destroyed too. Hopefully, as you noticed, there is a > Delete() method that asks the GUI to destroy a widget if you need. > > Hope things are clearer... > Yes, it is what I thinked... it is simply a matter of explanations. The best would be to have a uniform mechanism (and, in fact, it is already so, but it could seem unclear). What I want to say is: in object pascal, there is no automatic freeing of objects, but when you destroy an object which owns other objects, they are destroyed too (this makes sense). It does not matter if objects are GUI or non-GUI, the behaviour is always the same: if you don't touch them, they live. If you destroy them, they die. This is uniform. In gambas this is not possible, because if you instantiate a label at runtime, and then exit the routine, you don't want your label to be destroyed. But if instead of a label you instantiate a Collection, then you loose it, and probably this is what you want. Problem is, this is not uniform - ok, I understand that it is the only way to go: the automatic memory management of gambas is more important. Regards, Doriano From gambas at ...1... Fri Apr 3 12:57:51 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Fri, 3 Apr 2009 12:57:51 +0200 Subject: [Gambas-user] Dynamic Objects In-Reply-To: <49D5EA27.9090409@...1909...> References: <200904031112.03872.gambas@...1...> <49D5EA27.9090409@...1909...> Message-ID: <200904031257.51981.gambas@...1...> > Yes, it is what I thinked... it is simply a matter of explanations. The > best would be to have a uniform mechanism (and, in fact, it is already > so, but it could seem unclear). What I want to say is: in object pascal, > there is no automatic freeing of objects, but when you destroy an object > which owns other objects, they are destroyed too (this makes sense). It > does not matter if objects are GUI or non-GUI, the behaviour is always > the same: if you don't touch them, they live. If you destroy them, they > die. This is uniform. In gambas this is not possible, because if you > instantiate a label at runtime, and then exit the routine, you don't > want your label to be destroyed. But if instead of a label you > instantiate a Collection, then you loose it, and probably this is what > you want. Problem is, this is not uniform - Just because a GUI widget is owned by its parent, and a GUI top-level window is owned by a window list. Otherwise things are uniform. :-) -- Beno?t From simonart.dominique at ...11... Fri Apr 3 13:53:50 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Fri, 03 Apr 2009 13:53:50 +0200 Subject: [Gambas-user] (no subject) In-Reply-To: References: Message-ID: <49D5F8CE.60807@...11...> Hi, vlahonick vlahonick a ?crit : > thanks to all of you (special thanks to dominique tha solved the previous problem) the project going on :D > but now another problem appears... > THE DIFTHONGS and the finishing greek sigma... > the code below is about the sigma but in greek is one more "?" tha goes only if a word ENDS with SIGMA (?/?/?) > > IF sInChar = "?" THEN sRetChar = "s" > > so how i can write tha if the last letter in the textbox1.text is "s" that textbox2.text have to write "?" ??? > > this is the first problem of the part... IF sInChar = "yourSigmaHere" THEN sRetChar = "s" IF nI=TheLastPositionHere THEN sRetChar = "?" ENDIF > > and now how i can write that if in the textbox1.text the user writes "??" it should appear "u" ???? > because is different if the tou letters "?" and "?" are the one after other and other if they dont. > example : ????????->ugada , ??????????->pulimenos | ??????????->ipsolotatos > so u see tha in ugada and pulimenos example if the two leters (?,?) are one after other the pronoced like "u" > so how i can do that? > because i already had write : > > IF sInChar = "?" THEN sRetChar = "i" > IF sInChar = "?" THEN sRetChar = "o" > > so at this moment the program understand them different > > example : > > if i wrote ???????? program gives oigada but the correct is UGADA > > (ugada is how Uganda(the country) is pronaunced in greek) > > so now somehow i have to write that if these two letter are together (one after other|?,?|) they should give the > result "u". > of course doesnt matter if a word stars or ends or if these two letters are in the middle of the word. > their result is always "u". > > ANY HELP??? before to enter in the FOR .. NEXT loop you have to replace the "ou" group by a one-character wich give "u" in the Gconverter routine. Do not do that in TextBox1.Text because the user would not be happy to see his text changed! :) > > ty in advance... > > VLAHONICK (www.vlahonick.freehost.gr) :D > DDominique Simonart From admin at ...2122... Fri Apr 3 15:40:51 2009 From: admin at ...2122... (Isaac Buch) Date: Fri, 3 Apr 2009 15:40:51 +0200 Subject: [Gambas-user] TableView control, howto edit cells? Message-ID: <200904031540.51917.admin@...2122...> Hello list, I am a newbee in gambas trying to use TableView control to allow user to modify data on cells by clicking on it. I tried to move to a row&column and modify the tableview.current.text, (that works fine in a button click event) but not in the tableview_save event (Null object error). Source Code: PUBLIC SUB Button1_Click() TableView1.Columns.count = 4 TableView1.Rows.count = 4 TableView1.MoveTo(1, 1) TableView1.Current.Text = "TEST" END PUBLIC SUB TableView1_Click() TableView1.Edit END PUBLIC SUB TableView1_Save(Row AS Integer, Column AS Integer, Value AS String) TableView1.MoveTo(Row, Column) TableView1.Current.Text = Value END Any suggestion ? thanks you all in advance :) From jussi.lahtinen at ...626... Fri Apr 3 19:05:21 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Fri, 3 Apr 2009 20:05:21 +0300 Subject: [Gambas-user] Gambas 3 revision 1917 In-Reply-To: <200904031107.22814.gambas@...1...> References: <384d3900903311200l6be2f66ct16b88391b57b44a7@...627...> <384d3900904020916w57c64334vc9320fff220a9357@...627...> <200904031107.22814.gambas@...1...> Message-ID: <384d3900904031005yb1fcea1s1b3ca8b59b65de07@...627...> This; ( ./configure; make; sudo make install ) > output.txt 2>&1 from failed compilation attempt is already attached, if you didn't notice... I didn't take output of the successful compile, but I compiled it again just for the output: ( ./configure ) > new-output.txt 2>&1 Configuring gb.opengl starts at line 3614. And this, just in case.... ( make; sudo make install ) > rest-output.txt 2>&1 Notice that gl.h is copied to "/trunk" and to "/trunk/gb.qt4/src/opengl" (I'm not sure where it was needed). Seems to work, but opengl is disabled. Luckily I don't use it... Thanks! Jussi 2009/4/3 Beno?t Minisini : >> Hello again! >> >> I managed to "solve" my compilation problem. >> I had error message; >> CGLarea.h:34:16: error: gl.h: No such file or directory >> Which is confusing, because there IS /usr/include/GL/gl.h file. >> I tried to copy gl.h to "/trunk/gb.qt4/src/opengl" and to "/trunk", >> and now it compiles. >> >> How do I set include paths correctly? >> Or what else is wrong? >> Thanks! >> >> >> Jussi >> >> On Tue, Mar 31, 2009 at 22:00, Jussi Lahtinen > wrote: >> > Hi! >> > >> > I can't compile latest revision... >> > >> > First I got this: >> > THESE COMPONENTS ARE DISABLED: >> > - gb.opengl >> > - gb.qte >> > >> > And make fails with error: gl.h: No such file or directory >> > Gambas 2 and Gambas 3 revision 1885 compiled fine. >> > >> > I removed Gambas3 with commands: >> > sudo rm -f /usr/local/bin/gbx3 /usr/local/bin/gbc3 /usr/local/bin/gba3 >> > /usr/local/bin/gbi3 >> > sudo rm -rf /usr/local/lib/gambas3 >> > sudo rm -rf /usr/local/share/gambas3 >> > Did I miss something? >> > >> > Or do I need to install something from somewhere? >> > >> > I did: >> > ( ./configure; make; sudo make install ) > output.txt 2>&1 >> > See attachment. >> > >> > I'm still badly in learning phase with GNU build system. >> > Any hints? >> > Thanks! >> > >> > >> > Jussi >> > Ubuntu 8.10 64bit >> > > Can you send the output of ./configure, especially in the gb.opengl directory? > > -- > Beno?t > > ------------------------------------------------------------------------------ > _______________________________________________ > 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: outputs.tar.gz Type: application/x-gzip Size: 49745 bytes Desc: not available URL: From jussi.lahtinen at ...626... Fri Apr 3 22:14:02 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Fri, 3 Apr 2009 23:14:02 +0300 Subject: [Gambas-user] Gambas3 rev. 1917 bug with DrawingArea (Qt) Message-ID: <384d3900904031314t157b9807l4a700b523f544b47@...627...> Hi! DrawingArea locks up if you change Form.Enabled = False and then back to Form.Enabled = True. I did demo project, see attachment. 1. Click on DrawingArea press any key to get random circles to drawn on it. 2. Then press button1, now try to do step 1 again. I'll get blank DrawingArea, no circles. With GTK+ everything works ok. Notice that DrawingArea properties are not all default. Jussi -------------- next part -------------- A non-text attachment was scrubbed... Name: Testi-0.0.1.tar.gz Type: application/x-gzip Size: 7789 bytes Desc: not available URL: From gambas at ...1... Sat Apr 4 01:11:50 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Sat, 4 Apr 2009 01:11:50 +0200 Subject: [Gambas-user] Gambas 3 revision 1917 In-Reply-To: <384d3900904031005yb1fcea1s1b3ca8b59b65de07@...627...> References: <384d3900903311200l6be2f66ct16b88391b57b44a7@...627...> <200904031107.22814.gambas@...1...> <384d3900904031005yb1fcea1s1b3ca8b59b65de07@...627...> Message-ID: <200904040111.50968.gambas@...1...> > This; > ( ./configure; make; sudo make install ) > output.txt 2>&1 > from failed compilation attempt is already attached, if you didn't > notice... > Sorry, I didn't notice. ./configure cannot find the libGL.so shared library symbolic link. Is it installed on your system? If it is, where? -- Beno?t From jguardon at ...2035... Sat Apr 4 01:28:17 2009 From: jguardon at ...2035... (Jesus Guardon) Date: Sat, 04 Apr 2009 01:28:17 +0200 Subject: [Gambas-user] Print gridview content Message-ID: <49D69B91.1060002@...2035...> Hi all Is there a quick method to print out as plain formatted text the content of a populated gridview? I've been thinking about iterate across all rows and cells, but I wonder if may have other ways to do that. Regards Jes?s From doriano.blengino at ...1909... Sat Apr 4 08:38:48 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sat, 04 Apr 2009 08:38:48 +0200 Subject: [Gambas-user] TableView control, howto edit cells? In-Reply-To: <200904031540.51917.admin@...2122...> References: <200904031540.51917.admin@...2122...> Message-ID: <49D70078.70708@...1909...> Isaac Buch ha scritto: > Hello list, > > I am a newbee in gambas trying to use TableView control to allow user to > modify data on cells by clicking on it. > > I tried to move to a row&column and modify the tableview.current.text, (that > works fine in a button click event) but not in the tableview_save event (Null > object error). > > Source Code: > > PUBLIC SUB Button1_Click() > TableView1.Columns.count = 4 > TableView1.Rows.count = 4 > TableView1.MoveTo(1, 1) > TableView1.Current.Text = "TEST" > END > > PUBLIC SUB TableView1_Click() > TableView1.Edit > END > > PUBLIC SUB TableView1_Save(Row AS Integer, Column AS Integer, Value AS String) > TableView1.MoveTo(Row, Column) > TableView1.Current.Text = Value > END > > Any suggestion ? > I think that you, in Button1_Click(), should use something like: TableView1[1,1].text = "TEST" It is more simple and clean than using MoveTo(). Moreover, I am not sure, but if you use MoveTo() inside a Save event handler may be gambas gets confused. In the event handler you should use: TableView1[Row,Column].text = Value Hope this works, I didn't try. Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From jguardon at ...2035... Sat Apr 4 10:42:08 2009 From: jguardon at ...2035... (Jesus Guardon) Date: Sat, 04 Apr 2009 10:42:08 +0200 Subject: [Gambas-user] Print gridview content In-Reply-To: <49D69B91.1060002@...2035...> References: <49D69B91.1060002@...2035...> Message-ID: <49D71D60.6040208@...2035...> I've changed the question, so it will be more understandable: How can I export the gridview content to a printable format preserving its structure, colors, etc? Thanks in advance Jes?s Jesus Guardon escribi?: > Hi all > > Is there a quick method to print out as plain formatted text the content > of a populated gridview? > > I've been thinking about iterate across all rows and cells, but I wonder > if may have other ways to do that. > > Regards > > Jes?s > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From tomas.eroles at ...277... Sat Apr 4 12:08:12 2009 From: tomas.eroles at ...277... (Tomas Eroles i Forner) Date: Sat, 04 Apr 2009 12:08:12 +0200 Subject: [Gambas-user] DrawingArea capabilities Message-ID: <1238839693.4437.7.camel@...2014...> Hi all Is there any way to draw mobile objects on a DrawingArea? That is, is it possible to draw something and after to move it with mouse? The idea is to draw things in a drawingarea? and when required, to move them using the mouse Thanks in advance From leonardo at ...1237... Sat Apr 4 12:51:47 2009 From: leonardo at ...1237... (Leonardo Miliani) Date: Sat, 04 Apr 2009 04:51:47 -0600 Subject: [Gambas-user] IDE bugs Message-ID: I've discovered a (new? old? I don't know) bug in the IDE. Look at the screenshot below: I was scrolling the properties of a project of mine and a dropdown menu appeared over the info box. P.S.: when will the new official release of Gambas be published? Am I wrong or I remember that these IDE bugs will be fixed in it? -- Leonardo Miliani Web: http://www.leonardomiliani.com E-mail: leonardo at ...1237... Scegli software opensource - Choose opensource software Co-fondatore di Gambas-it.org Il sito di riferimento della comunit? italiana degli utenti di Gambas http://www.gambas-it.org -------------- next part -------------- A non-text attachment was scrubbed... Name: screeshot.jpg Type: image/jpeg Size: 47029 bytes Desc: not available URL: From jussi.lahtinen at ...626... Sat Apr 4 15:12:57 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 4 Apr 2009 16:12:57 +0300 Subject: [Gambas-user] Gambas 3 revision 1917 In-Reply-To: <200904040111.50968.gambas@...1...> References: <384d3900903311200l6be2f66ct16b88391b57b44a7@...627...> <200904031107.22814.gambas@...1...> <384d3900904031005yb1fcea1s1b3ca8b59b65de07@...627...> <200904040111.50968.gambas@...1...> Message-ID: <384d3900904040612y13453018hafc6274784ff1e47@...627...> There is link of libGL.so in /usr/lib32, which point to /usr/lib/libGL.so.180.11. Also there is link of libGL.so.1 in both /usr/lib and in /usr/lib32, which all points to /usr/lib/libGL.so.180.11. And it really is there. So, with spesific file name "libGL.so", it is found only from /usr/lib32, and this is 64bit system... something to do with that? Jussi 2009/4/4 Beno?t Minisini : >> This; >> ( ./configure; make; sudo make install ) > output.txt 2>&1 >> from failed compilation attempt is already attached, if you didn't >> notice... >> > > Sorry, I didn't notice. > > ./configure cannot find the libGL.so shared library symbolic link. Is it > installed on your system? If it is, where? > > -- > Beno?t > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Sat Apr 4 17:23:05 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 4 Apr 2009 18:23:05 +0300 Subject: [Gambas-user] TextArea scrolling Message-ID: <384d3900904040823ldf4d06du81710a7e94dbb8c6@...627...> Hi! How I can automatically scroll down textarea? So that the last message printed to textarea is always showing, without user have to scroll down? Regards, Jussi From jussi.lahtinen at ...626... Sat Apr 4 17:46:50 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 4 Apr 2009 18:46:50 +0300 Subject: [Gambas-user] DrawingArea capabilities In-Reply-To: <1238839693.4437.7.camel@...2014...> References: <1238839693.4437.7.camel@...2014...> Message-ID: <384d3900904040846i2f192bc8wd54c5091a5518860@...627...> Hi! It is possible but you need to do work to do it... AFAIK there is no method in drawingarea to know what different pictures are drawed into. So drawingarea handles only graphics, and you have to write engine to move them. Jussi On Sat, Apr 4, 2009 at 13:08, Tomas Eroles i Forner wrote: > Hi all > Is there any way to draw mobile objects on a DrawingArea? > That is, is it possible to draw something and after to move it with > mouse? > > The idea is to draw things in a drawingarea? and when required, to move > them using the mouse > > Thanks in advance > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Sat Apr 4 17:50:15 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 4 Apr 2009 18:50:15 +0300 Subject: [Gambas-user] IDE bugs In-Reply-To: References: Message-ID: <384d3900904040850q7ffd0ffbnd5f3d82531b559f9@...627...> Hi! Seems to be old bug... At least I can't reproduce it on Gambas 2.10. Please inform version you are using when doing bug reports. Jussi On Sat, Apr 4, 2009 at 13:51, Leonardo Miliani wrote: > I've discovered a (new? old? I don't know) bug in the IDE. > Look at the screenshot below: I was scrolling the properties of a project > of mine and a dropdown menu appeared over the info box. > > P.S.: > when will the new official release of Gambas be published? Am I wrong or I > remember that these IDE bugs will be fixed in it? > > -- > Leonardo Miliani > > Web: http://www.leonardomiliani.com > E-mail: leonardo at ...1237... > Scegli software opensource - Choose opensource software > > Co-fondatore di Gambas-it.org > Il sito di riferimento della comunit? italiana degli utenti di Gambas > http://www.gambas-it.org > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From jussi.lahtinen at ...626... Sat Apr 4 18:01:30 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 4 Apr 2009 19:01:30 +0300 Subject: [Gambas-user] Sdl vs qt drawing area how much performance difference? In-Reply-To: <22864611.post@...1379...> References: <22864611.post@...1379...> Message-ID: <384d3900904040901y6effb12cle510231b6aed3038@...627...> Hi! I had same problem with one of my project. And I think the best way to resolve it, is doing prototype. Start with widgets (Qt is faster than GTK+) and test with worst case scenario, if it's too slow think why! There is big possibility that your code is slow, not the graphics methods. DrawingArea with Qt seems to be pretty fast! Jussi On Fri, Apr 3, 2009 at 12:02, jbskaggs wrote: > > IN my current project it has equal widgets and equal game graphics. > > With that said how much performance difference is there between the two? > I read sdl is faster and but is it a 10%, 20% improvement, ?enough to give > up the widgets? > > JB SKaggs > -- > View this message in context: http://www.nabble.com/Sdl-vs-qt-drawing-area--how-much-performance-difference--tp22864611p22864611.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jbskaggs at ...1871... Sat Apr 4 19:25:42 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sat, 4 Apr 2009 10:25:42 -0700 (PDT) Subject: [Gambas-user] Sdl vs qt drawing area how much performance difference? In-Reply-To: <384d3900904040901y6effb12cle510231b6aed3038@...627...> References: <22864611.post@...1379...> <384d3900904040901y6effb12cle510231b6aed3038@...627...> Message-ID: <22885712.post@...1379...> Well In my program I wrote one version to use qt.drawing area and one to use sdl (by calling the sdl as a shell) The sdl outperformed the qt hands down- not only speed but in the qt drawing version I get a weird vertical refresh distortion that runs down thru the display and looks bad- in sdl I do not have this. You are probably correct that it might be my programming skills- but so far sdl seems the way to go for my graphics output. JB SKaggs Jussi Lahtinen wrote: > > Hi! > I had same problem with one of my project. And I think the best way to > resolve it, is doing prototype. > Start with widgets (Qt is faster than GTK+) and test with worst case > scenario, if it's too slow think why! > There is big possibility that your code is slow, not the graphics methods. > DrawingArea with Qt seems to be pretty fast! > > > Jussi > > > On Fri, Apr 3, 2009 at 12:02, jbskaggs wrote: >> >> IN my current project it has equal widgets and equal game graphics. >> >> With that said how much performance difference is there between the two? >> I read sdl is faster and but is it a 10%, 20% improvement, ?enough to >> give >> up the widgets? >> >> JB SKaggs >> -- >> View this message in context: >> http://www.nabble.com/Sdl-vs-qt-drawing-area--how-much-performance-difference--tp22864611p22864611.html >> Sent from the gambas-user mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > ------------------------------------------------------------------------------ > _______________________________________________ > 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/Sdl-vs-qt-drawing-area--how-much-performance-difference--tp22864611p22885712.html Sent from the gambas-user mailing list archive at Nabble.com. From jbskaggs at ...1871... Sat Apr 4 19:54:00 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sat, 4 Apr 2009 10:54:00 -0700 (PDT) Subject: [Gambas-user] DrawingArea capabilities In-Reply-To: <1238839693.4437.7.camel@...2014...> References: <1238839693.4437.7.camel@...2014...> Message-ID: <22886113.post@...1379...> On every screen refresh the computer redraws the area. So you only need to change the x and y points of your picture being drawn. so something like : Mind you I only did the x coordinate you will have to do the y, and I also did a example with the right arrow key. public_sub drawingarea1_keypress() ' check for keypress if key.code=key.right then yourgraphicx = 3 ''distance to move graphic, yourgraphicx is a integer you have to define as a public integer and depending on your sprite size and refresh rate will have to be adjusted. end public_sub drawingarea1_keyrelease() ' check for keyrelease for reference using keys if key.code=key.right then yourgraphicx = 0 'sets the space to move the grapphic to zero so it will stay in place end PUBLIC SUB drawingarea1_MouseDown() ' this initiates my mouse movement IF Mouse.x < moveyourgraphicx THEN yourgraphicx = -3 IF Mouse.x > moveyourgraphicx THEN yourgraphicx = 3 mousemovetox = Mouse.X PRINT Mouse.X ' this checks to see if my control is reading the mouse mouseactive = 1' tells that I have an active mouse goto point END public sub redrawarea_click() IF mouseactive = 1 'see if mouse is in control IF impmoving = -3 'for mouse control IF imposx < mousemovetox yourgraphicx = 0 mouseactive = 0 ENDIF END IF IF mouseactive = 1 'see if mouse is in control IF yourgraphicx = -3 'for mouse control IF moveyourgraphicx < mousemovetox yourgraphicx = 0 mouseactive = 0 ENDIF END IF moveyourgraphic+=yourgraphicx 'moveyourgraphic is a integer that needs to be declared, like any interger variable it can have any name draw.begin(... Draw.Image(image, moveyourgraphicx, y) draw.end I haven't checked this for syntax or whatever just typed from memory so you will need to make sure the commands are correct but I use this in games alot. JB Skaggs Tomas Eroles i Forner wrote: > > Hi all > Is there any way to draw mobile objects on a DrawingArea? > That is, is it possible to draw something and after to move it with > mouse? > > The idea is to draw things in a drawingarea? and when required, to move > them using the mouse > > Thanks in advance > ------------------------------------------------------------------------------ > _______________________________________________ > 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/DrawingArea-capabilities-tp22881901p22886113.html Sent from the gambas-user mailing list archive at Nabble.com. From juergen.linder at ...17... Sat Apr 4 20:10:53 2009 From: juergen.linder at ...17... (juelin) Date: Sat, 4 Apr 2009 11:10:53 -0700 (PDT) Subject: [Gambas-user] DRAWEREA Message-ID: <22882689.post@...1379...> hello, I'm new and I have a question. I would like to draw some points in defferent colors in a drawarea. But my program dosn't work. (see source) There is nothing to see. (no points) Can somebody help me? Source: DrawingArea1.Clear DrawingArea1.Show DrawingArea1.Visible = TRUE DrawingArea1.Foreground = Color.Black DrawingArea1.Background = Color.White DrawingArea1.Refresh Draw.Begin(DrawingArea1) Draw.Transparent = FALSE Draw.ForeColor = Color.Black Draw.Foreground = Color.Black Draw.BackColor = Color.White Draw.Background = Color.White Draw.FillStyle = 1 f = &HFF00 FOR x = 10 TO 50 STEP 1 Draw.ForeColor = f Draw Foreground = f FOR y = 10 TO 50 STEP 1 Draw.Point(x, y) NEXT f = f + 4 NEXT Draw.End DrawingArea1.Refresh -- View this message in context: http://www.nabble.com/DRAWEREA-tp22882689p22882689.html Sent from the gambas-user mailing list archive at Nabble.com. From jussi.lahtinen at ...626... Sat Apr 4 20:19:31 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 4 Apr 2009 21:19:31 +0300 Subject: [Gambas-user] DRAWEREA In-Reply-To: <22882689.post@...1379...> References: <22882689.post@...1379...> Message-ID: <384d3900904041119r3941b611uf2dacdd673981c82@...627...> Hi! If you wan't to use refresh like that, you must set drawingarea propertie "cached" to true. Jussi On Sat, Apr 4, 2009 at 21:10, juelin wrote: > > hello, > I'm new and I have a question. > I would like to draw some points in defferent colors in a drawarea. > But my program dosn't work. (see source) There is nothing to see. (no > points) > Can somebody help me? > > Source: > ?DrawingArea1.Clear > ?DrawingArea1.Show > ?DrawingArea1.Visible = TRUE > ?DrawingArea1.Foreground = Color.Black > ?DrawingArea1.Background = Color.White > ?DrawingArea1.Refresh > ?Draw.Begin(DrawingArea1) > ? ?Draw.Transparent = FALSE > ? ?Draw.ForeColor = Color.Black > ? ?Draw.Foreground = Color.Black > ? ?Draw.BackColor = Color.White > ? ?Draw.Background = Color.White > ? ?Draw.FillStyle = 1 > ? ?f = &HFF00 > ? ?FOR x = 10 TO 50 STEP 1 > ? ? ?Draw.ForeColor = f > ? ? ?Draw Foreground = f > ? ? ?FOR y = 10 TO 50 STEP 1 > ? ? ? ?Draw.Point(x, y) > ? ? ?NEXT > ? ? ?f = f + 4 > ? ?NEXT > ?Draw.End > ?DrawingArea1.Refresh > > -- > View this message in context: http://www.nabble.com/DRAWEREA-tp22882689p22882689.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Sat Apr 4 20:18:51 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Sat, 4 Apr 2009 20:18:51 +0200 Subject: [Gambas-user] DRAWEREA In-Reply-To: <22882689.post@...1379...> References: <22882689.post@...1379...> Message-ID: <200904042018.52025.gambas@...1...> > hello, > I'm new and I have a question. > I would like to draw some points in defferent colors in a drawarea. > But my program dosn't work. (see source) There is nothing to see. (no > points) > Can somebody help me? > > Source: > DrawingArea1.Clear > DrawingArea1.Show > DrawingArea1.Visible = TRUE > DrawingArea1.Foreground = Color.Black > DrawingArea1.Background = Color.White > DrawingArea1.Refresh > Draw.Begin(DrawingArea1) > Draw.Transparent = FALSE > Draw.ForeColor = Color.Black > Draw.Foreground = Color.Black > Draw.BackColor = Color.White > Draw.Background = Color.White > Draw.FillStyle = 1 > f = &HFF00 > FOR x = 10 TO 50 STEP 1 > Draw.ForeColor = f > Draw Foreground = f > FOR y = 10 TO 50 STEP 1 > Draw.Point(x, y) > NEXT > f = f + 4 > NEXT > Draw.End > DrawingArea1.Refresh A DrawingArea has two possible behaviours: 1) When its Cached property is set to False (the default). Then you must draw inside the DrawingArea Draw event handler. This event will be raised each time X11 tells your application that the drawing area has to be redrawn. You don't have to call Draw.Begin() and Draw.End() inside the event handler, this is done automatically. In that case, drawing outside of the Draw event handler is useless. 2) When its Cached property is set to True. Then drawing on the DrawingArea is done inside a internal bitmap buffer. Then you can draw when you want, and the internal bitmap buffer will be used to refresh the DrawingArea contents as needed. Regards, -- Beno?t From jbskaggs at ...1871... Sat Apr 4 22:02:12 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sat, 4 Apr 2009 13:02:12 -0700 (PDT) Subject: [Gambas-user] A way to compile, make exec, and create package from outside IDE? Message-ID: <22887283.post@...1379...> I am working a game maker program- and I am trying to determine my next step which is how to export the game from the compiled program? I have already created a qt ide that will take non scripted gui only drag and drop commands and create objects that run and behave properly in both qt.drawingarea and sdl window, sound effects, collision, keyboard mouse controls, timers, scoreboards etc are done now I need the best way to export the games created in the ide to the linux world. What I want to do is have my program write all the code into a class file and then shell to Gambas load the file compile, make exec and package. IS there a way to do this in my program at runtime or does this have to be done in the Gambas IDE Console only? I read a post awhile back where someone else said they did this but I can't find it now. So what is the best way to do this? JB Skaggs -- View this message in context: http://www.nabble.com/A-way-to-compile%2C-make-exec%2C-and-create-package-from-outside-IDE--tp22887283p22887283.html Sent from the gambas-user mailing list archive at Nabble.com. From sourceforge-raindog2 at ...94... Sat Apr 4 22:34:30 2009 From: sourceforge-raindog2 at ...94... (Rob) Date: Sat, 4 Apr 2009 16:34:30 -0400 Subject: [Gambas-user] A way to compile, make exec, and create package from outside IDE? In-Reply-To: <22887283.post@...1379...> References: <22887283.post@...1379...> Message-ID: <200904041634.30352.sourceforge-raindog2@...94...> On Saturday 04 April 2009 16:02, jbskaggs wrote: > I am working a game maker program- and I am trying to determine my next This sounds like a good idea, since Linux doesn't have too many tools like this and I don't think any are free software. > What I want to do is have my program write all the code into a class > file and then shell to Gambas load the file compile, make exec and > package. > > IS there a way to do this in my program at runtime or does this have to > be done in the Gambas IDE Console only? Some of it can be done pretty easily through shell commands. You generate your Gambas project (I think it needs to be a whole project, including a .project file, not just a class file), then change to that directory and run these commands: gbc2 gba2 gbc2 compiles the project, gba2 makes the executable. However, building packages is another story. You may want to try to copy the package building code out of the Gambas IDE and integrate it into yours... or maybe work on making it into a component to be used by all Gambas programs. Rob From jbskaggs at ...1871... Sat Apr 4 23:25:01 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sat, 4 Apr 2009 14:25:01 -0700 (PDT) Subject: [Gambas-user] A way to compile, make exec, and create package from outside IDE? In-Reply-To: <200904041634.30352.sourceforge-raindog2@...94...> References: <22887283.post@...1379...> <200904041634.30352.sourceforge-raindog2@...94...> Message-ID: <22887920.post@...1379...> Thanks this was what I was thinking. But I could not remember the compile commands JB Rob Kudla wrote: > > On Saturday 04 April 2009 16:02, jbskaggs wrote: >> I am working a game maker program- and I am trying to determine my next > > This sounds like a good idea, since Linux doesn't have too many tools like > this and I don't think any are free software. > >> What I want to do is have my program write all the code into a class >> file and then shell to Gambas load the file compile, make exec and >> package. >> >> IS there a way to do this in my program at runtime or does this have to >> be done in the Gambas IDE Console only? > > Some of it can be done pretty easily through shell commands. You generate > your Gambas project (I think it needs to be a whole project, including > a .project file, not just a class file), then change to that directory and > run these commands: > > gbc2 > gba2 > > gbc2 compiles the project, gba2 makes the executable. > > However, building packages is another story. You may want to try to copy > the package building code out of the Gambas IDE and integrate it into > yours... or maybe work on making it into a component to be used by all > Gambas programs. > > Rob > > ------------------------------------------------------------------------------ > _______________________________________________ > 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/A-way-to-compile%2C-make-exec%2C-and-create-package-from-outside-IDE--tp22887283p22887920.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas at ...1... Sat Apr 4 23:31:46 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Sat, 4 Apr 2009 23:31:46 +0200 Subject: [Gambas-user] Problem with 32 bits library on 64 bits Ubuntu (was Re: Gambas 3 revision 1917) In-Reply-To: <384d3900904040612y13453018hafc6274784ff1e47@...627...> References: <384d3900903311200l6be2f66ct16b88391b57b44a7@...627...> <200904040111.50968.gambas@...1...> <384d3900904040612y13453018hafc6274784ff1e47@...627...> Message-ID: <200904042331.46533.gambas@...1...> > There is link of libGL.so in /usr/lib32, which point to > /usr/lib/libGL.so.180.11. > Also there is link of libGL.so.1 in both /usr/lib and in /usr/lib32, which > all points to /usr/lib/libGL.so.180.11. And it really is there. > > So, with spesific file name "libGL.so", it is found only from > /usr/lib32, and this is > 64bit system... something to do with that? > > > Jussi > What a mess... Until recently, I thought that the standard on 64 bits system was that 64 bits libraries go to /usr/lib64, and 32 bits libraries go to /usr/lib. Did that change, or Ubuntu tries to do on its own? -- Beno?t From linuxos at ...1896... Sun Apr 5 00:16:42 2009 From: linuxos at ...1896... (Olivier Cruilles) Date: Sun, 5 Apr 2009 00:16:42 +0200 Subject: [Gambas-user] Fwd: PB using tableview object References: <7732C734-84CE-4A3C-B052-AC41DCC0076A@...1896...> Message-ID: Benoit, Sorry for the explications, I'm not really good in english. So, I used a TableView because I did find in the GridView how o edit a single Cell. Second part, I don't know how to attach for exemple a TextBox inside a Cell of an object (like a GridView), if it's possible of curse. So, to be more clear: This is the Tableview in edition mode after double clicking in the 'FlowIn1' cell: -------------- next part -------------- A non-text attachment was scrubbed... Name: Panneau_Preferences_Edition.jpg Type: image/jpeg Size: 72223 bytes Desc: not available URL: -------------- next part -------------- This is the TableView problem that I have with the left column (normaly locked for edition) -------------- next part -------------- A non-text attachment was scrubbed... Name: Panneau_Preferences_Erreur.jpg Type: image/jpeg Size: 75653 bytes Desc: not available URL: -------------- next part -------------- This is a part of the code for the Tableview: PUBLIC SUB Creation_Tableau_Variable_Netflow() ' Tableau Liste des variables associ?es aux groupes de ports DIM INDEXTABLEAU AS Integer DIM NewFont AS Font DIM NOMVARIABLE AS String TableView1.Clear TableView2.Clear NewFont = NEW Font NewFont = Font["Sans,Bold,9"] ' Tableau des Variables Flow IN TableView1.Columns.Count = 2 TableView1.Rows.Count = 30 TableView1.Columns[0].Title = ("Groupe Ports") TableView1.Columns[0].Width = (TableView1.Width / 10) * 4.5 TableView1.Columns[1].Title = ("Variables") TableView1.Columns[1].Width = (TableView1.Width / 10) * 4 ' Tableau des Variables Flow OUT TableView2.Columns.Count = 2 TableView2.Rows.Count = 30 TableView2.Columns[0].Title = ("Groupe Ports") TableView2.Columns[0].Width = (TableView2.Width / 10) * 4.5 TableView2.Columns[1].Title = ("Variables") TableView2.Columns[1].Width = (TableView2.Width / 10) * 4 ' Remplissage Tableau FlowIn FOR EACH NOMVARIABLE IN ClassVariables.VARIABLEFLOWIN TableView1[ClassVariables.VARIABLEFLOWIN.key, 0].Text = ("GroupPortIn") & Str(ClassVariables.VARIABLEFLOWIN.key + 1) TableView1[ClassVariables.VARIABLEFLOWIN.key, 0].Font = NewFont TableView1[ClassVariables.VARIABLEFLOWIN.key, 0].BackColor = Val("&HDFFFEF&") TableView1[ClassVariables.VARIABLEFLOWIN.key, 1].Text = NOMVARIABLE NEXT ' Remplissage Tableau FlowIn FOR EACH NOMVARIABLE IN ClassVariables.VARIABLEFLOWOUT TableView2[ClassVariables.VARIABLEFLOWOUT.key, 0].Text = ("GroupPortOut") & Str(ClassVariables.VARIABLEFLOWOUT.key + 1) TableView2[ClassVariables.VARIABLEFLOWOUT.key, 0].Font = NewFont TableView2[ClassVariables.VARIABLEFLOWOUT.key, 0].BackColor = Val("&HDFEFFF&") TableView2[ClassVariables.VARIABLEFLOWOUT.key, 1].Text = NOMVARIABLE NEXT END PUBLIC SUB TableView1_Activate() ' Procedure quand on click dans le TableView1 IF TableView1.Column = 1 THEN TRY TableView1.Edit() END IF END PUBLIC SUB TableView2_Activate() ' Procedure quand on click dans le TableView2 IF TableView2.Column = 1 THEN TRY TableView2.Edit() END IF END PUBLIC SUB TableView1_Save(Row1 AS Integer, Column1 AS Integer, Value1 AS String) IF Column1 = 1 THEN TableView1[row1, Column1].Text = Value1 TableView1[row1, Column1].BackColor = Val("&HFFFFDF&") END IF END PUBLIC SUB TableView2_Save(Row2 AS Integer, Column2 AS Integer, Value2 AS String) IF Column2 = 1 THEN TableView2[row2, Column2].Text = Value2 TableView2[row2, Column2].BackColor = Val("&HFFFFDF&") END IF END Thank you in advance, Olivier Cruilles Mail: linuxos at ...1896... Le 27 mars 09 ? 11:28, Beno??t Minisini a ??crit : >> Hi, >> >> I'm trying to use the Tableview object in a project and I have 2 >> Columns configured. >> >> I have configured the TableView to be able to edit each Cell in the >> right column and lock the left Column >> but in real, by using the key, in edition mode, I can always acces >> to >> the left Column that is locked and write text inside. >> >> >> I don't know how to lock completly the left column as in the Gambas >> IDE => Object Properties Panel ? >> >> Does anyone can help me please ? >> >> Olivier Cruilles >> Mail: linuxos at ...1896... >> > > You are not very clear: please provide your source code! > > The TableView won't edit any cell unless you explicitely call its > Edit (or > EditWith) method during a Select event. Just don't call Edit() if > the current > column is zero. > > And the object properties panel uses a GridView, not a TableView. > > Regards, > > -- > Beno??t > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > Olivier Cruilles Mail: linuxos at ...1896... Olivier Cruilles Mail: linuxos at ...1896... From jussi.lahtinen at ...626... Sun Apr 5 03:09:40 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sun, 5 Apr 2009 04:09:40 +0300 Subject: [Gambas-user] Headache causing misplaced error message. Message-ID: <384d3900904041809x6d6d9f39y31f994b1335f3ed7@...627...> Hi! Here is very simplified example of the bug I found (Gambas 2.10 and Gambas3 rev. 1917). >From that you can easily see what is wrong, but in real life code... This bug seems to be generally in "else if", error doesn't have to be division by zero, it could be any. And there could be many lines of "else if", still the error message goes to the first line. Dim x As Integer If x = -1 Then '<--- YOU GOT ERROR MESSAGE FROM THIS LINE. 'nothing Else If 1 / 0 Then 'nothing Endif Regards, Jussi From jussi.lahtinen at ...626... Sun Apr 5 03:38:55 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sun, 5 Apr 2009 04:38:55 +0300 Subject: [Gambas-user] Problem with 32 bits library on 64 bits Ubuntu (was Re: Gambas 3 revision 1917) In-Reply-To: <200904042331.46533.gambas@...1...> References: <384d3900903311200l6be2f66ct16b88391b57b44a7@...627...> <200904040111.50968.gambas@...1...> <384d3900904040612y13453018hafc6274784ff1e47@...627...> <200904042331.46533.gambas@...1...> Message-ID: <384d3900904041838p74ce33e3l21ef098dd398e65c@...627...> I don't know... in my system /usr/lib64 is just link to /usr/lib. Either way it is little weird... I think there should be /usr/lib32 and /usr/lib64, and there should not be /usr/lib at all. But maybe there is good reason that I don't know... Jussi 2009/4/5 Beno?t Minisini : >> There is link of libGL.so in /usr/lib32, which point to >> /usr/lib/libGL.so.180.11. >> Also there is link of libGL.so.1 in both /usr/lib and in /usr/lib32, which >> all points to /usr/lib/libGL.so.180.11. And it really is there. >> >> So, with spesific file name "libGL.so", it is found only from >> /usr/lib32, and this is >> 64bit system... something to do with that? >> >> >> Jussi >> > > What a mess... Until recently, I thought that the standard on 64 bits system > was that 64 bits libraries go to /usr/lib64, and 32 bits libraries go to > /usr/lib. > > Did that change, or Ubuntu tries to do on its own? > > -- > Beno?t > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jbskaggs at ...1871... Sun Apr 5 07:37:58 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sat, 4 Apr 2009 22:37:58 -0700 (PDT) Subject: [Gambas-user] On ver 2.12 Form tool box properties why doesn't valubox have a value property? Message-ID: <22890701.post@...1379...> I know valuebox has a value property that can be set in code- but why isn't there one on the Form designer toolbox? For forms with default values it should be there when you are making the controls on the form like textbox or label. Was this intentional or just overlooked? JB SKaggs -- View this message in context: http://www.nabble.com/On-ver-2.12-Form-tool-box-properties-why-doesn%27t-valubox-have-a-value-property--tp22890701p22890701.html Sent from the gambas-user mailing list archive at Nabble.com. From leonardo at ...1237... Sun Apr 5 11:34:44 2009 From: leonardo at ...1237... (Leonardo Miliani) Date: Sun, 05 Apr 2009 11:34:44 +0200 Subject: [Gambas-user] IDE bugs In-Reply-To: <384d3900904040850q7ffd0ffbnd5f3d82531b559f9@...627...> References: <384d3900904040850q7ffd0ffbnd5f3d82531b559f9@...627...> Message-ID: <49D87B34.2030502@...1237...> Jussi Lahtinen ha scritto: > Hi! > Seems to be old bug... At least I can't reproduce it on Gambas 2.10. > Please inform version you are using when doing bug reports. > > > Jussi I usually last versions, now 2.12 on Ubuntu 8.10 (as I said in other posts). Anyway, there are other bugs that have appeared in the IDE in this version (see my old posts) that are a little bit annoying. -- Ciao. Leo. Web: www.leonardomiliani.com E-mail: leonardo at ...1237... Scegli software opensource - Choose opensource software Co-fondatore di Gambas-it.org Il sito di riferimento della comunit? italiana degli utenti di Gambas www.gambas-it.org From gambas at ...1... Sun Apr 5 12:49:44 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Sun, 5 Apr 2009 12:49:44 +0200 Subject: [Gambas-user] Ugly gtk warnings with tabstrip object In-Reply-To: <20090324122432.3c06de73.M0E.lnx@...626...> References: <20090324122432.3c06de73.M0E.lnx@...626...> Message-ID: <200904051249.44535.gambas@...1...> > I Just noticed when I added a tabstrip to my form, when the form loads I > see this output on the terminal > > (speedy:14712): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to > allocate widget with width -5 and height 0 > > This appears to be related to the tabstrip only. If I remove the tabstrip > from the form, I dont get this message. > > This is gambas2-2.12 running on GTK+2-2.14.7 > > I know it's just warning.. but it's annoying and i'm trying to keep my > stdout as clean as possible for debugging purposes. I don't have this warning, it should depend on the theme. Which GTK+ theme do you use? -- Beno?t From leonardo at ...1237... Sun Apr 5 15:35:10 2009 From: leonardo at ...1237... (Leonardo Miliani) Date: Sun, 05 Apr 2009 15:35:10 +0200 Subject: [Gambas-user] Gambas freezes with Qt apps Message-ID: <49D8B38E.5000207@...1237...> Starting from 2.11 Gambas usually manifests some freezes when Qt applications are run on some systems. With release 2.12 things seem not to be changed: freezes still continue to randomly appear. For "freeze" I mean that even I click on the "Run" button from the IDE or when trying to start the application from console, the program never start and no message is displaied. If I run it from the IDE, I have to click on the "Stop" button and click on "Run" again. Regarding this problem, I've noticed a little thing... Sometimes a Qt application that starts from the IDE writes in the console the following message: "kbuildsycoca running...". Sometimes it doesn't. If the application displays that message it is sure that the first time that I try to run it, it will randomly freeze during start. Next time it will run fine. I don't know which KDE component displays that message: maybe finding it will help to resolve the freezing problems. I use Ubuntu 8.10 with Gnome but I know about other people with different systems that have had the same problem (i.e. Slackware). I hope this will help developers to fix the bug. -- Ciao. Leo. Web: www.leonardomiliani.com E-mail: leonardo at ...1237... Scegli software opensource - Choose opensource software Co-fondatore di Gambas-it.org Il sito di riferimento della comunit? italiana degli utenti di Gambas www.gambas-it.org From jguardon at ...2035... Sun Apr 5 18:00:35 2009 From: jguardon at ...2035... (Jesus Guardon) Date: Sun, 05 Apr 2009 18:00:35 +0200 Subject: [Gambas-user] Panning a picturebox inside a scrollview with mouse Message-ID: <49D8D5A3.8040406@...2035...> I need some help about this issue, because I'm unable to get it working. What I want to do is panning a picturebox inside a scrollview when I click RMB and move the mouse around. BTW, something usual in a lot of graphical apps. Can anyone help me, please? Attached is the basic project in Gambas2, but without the picture (size too big to be accepted by the list) Regards Jes?s -------------- next part -------------- A non-text attachment was scrubbed... Name: mapDX.tar.gz Type: application/x-gzip Size: 9671 bytes Desc: not available URL: From gambas at ...1... Sun Apr 5 20:10:44 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Sun, 5 Apr 2009 20:10:44 +0200 Subject: [Gambas-user] Gambas freezes with Qt apps In-Reply-To: <49D8B38E.5000207@...1237...> References: <49D8B38E.5000207@...1237...> Message-ID: <200904052010.44724.gambas@...1...> > Starting from 2.11 Gambas usually manifests some freezes when Qt > applications are run on some systems. With release 2.12 things seem not > to be changed: freezes still continue to randomly appear. > For "freeze" I mean that even I click on the "Run" button from the IDE > or when trying to start the application from console, the program never > start and no message is displaied. If I run it from the IDE, I have to > click on the "Stop" button and click on "Run" again. > > Regarding this problem, I've noticed a little thing... > Sometimes a Qt application that starts from the IDE writes in the > console the following message: > "kbuildsycoca running...". > Sometimes it doesn't. > > If the application displays that message it is sure that the first time > that I try to run it, it will randomly freeze during start. Next time it > will run fine. I don't know which KDE component displays that message: > maybe finding it will help to resolve the freezing problems. > > I use Ubuntu 8.10 with Gnome but I know about other people with > different systems that have had the same problem (i.e. Slackware). > > I hope this will help developers to fix the bug. kbuildsycoca is a KDE program, so either you have gb.qt.kde selected in your project, or maybe you are using a specific Qt theme that depends on KDE. Do you know what Qt theme is used by your freezing applications on your Ubuntu system? Use the "qtconfig" program for that, or look for the "Style=" entry in the ~/.qt/qtrc file. You can help me too by using 'gdb' on the frozen process. Find the PID of the frozen process, and run 'gdb gbx2 '. gdb will stop and debug it. Then you can use the 'bt' command to get the stack backtrace and send me the result. Note that Gambas must have been compiled with debugging information enabled. Regards, -- Beno?t From gambas at ...1... Sun Apr 5 20:14:14 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Sun, 5 Apr 2009 20:14:14 +0200 Subject: [Gambas-user] On ver 2.12 Form tool box properties why doesn't valubox have a value property? In-Reply-To: <22890701.post@...1379...> References: <22890701.post@...1379...> Message-ID: <200904052014.14874.gambas@...1...> > I know valuebox has a value property that can be set in code- but why isn't > there one on the Form designer toolbox? For forms with default values it > should be there when you are making the controls on the form like textbox > or label. > > Was this intentional or just overlooked? > > JB SKaggs Value is a Variant property, so I didn't put it in the property list used by the IDE, as the IDE does not know how to handle Variant properties. But ValueBox.Value can take a string instead, so maybe I will find a hack. But you will get it only in Gambas 3! -- Beno?t From gambas at ...1... Sun Apr 5 20:15:47 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Sun, 5 Apr 2009 20:15:47 +0200 Subject: [Gambas-user] Headache causing misplaced error message. In-Reply-To: <384d3900904041809x6d6d9f39y31f994b1335f3ed7@...627...> References: <384d3900904041809x6d6d9f39y31f994b1335f3ed7@...627...> Message-ID: <200904052015.47821.gambas@...1...> > Hi! > Here is very simplified example of the bug I found (Gambas 2.10 and > Gambas3 rev. 1917). > > >From that you can easily see what is wrong, but in real life code... > > This bug seems to be generally in "else if", error doesn't have to be > division by zero, it could be any. > And there could be many lines of "else if", still the error message > goes to the first line. > > > Dim x As Integer > > If x = -1 Then '<--- YOU GOT ERROR MESSAGE FROM THIS LINE. > 'nothing > Else If 1 / 0 Then > 'nothing > Endif > > > Regards, > Jussi > A very old well-known bug... :-) I will look at it if I have time. -- Beno?t From jbskaggs at ...1871... Sun Apr 5 20:44:34 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sun, 5 Apr 2009 11:44:34 -0700 (PDT) Subject: [Gambas-user] On ver 2.12 Form tool box properties why doesn't valubox have a value property? In-Reply-To: <200904052014.14874.gambas@...1...> References: <22890701.post@...1379...> <200904052014.14874.gambas@...1...> Message-ID: <22897164.post@...1379...> Cool- I just learned something. JB Bugzilla from gambas at ...1... wrote: > >> I know valuebox has a value property that can be set in code- but why >> isn't >> there one on the Form designer toolbox? For forms with default values it >> should be there when you are making the controls on the form like textbox >> or label. >> >> Was this intentional or just overlooked? >> >> JB SKaggs > > Value is a Variant property, so I didn't put it in the property list used > by > the IDE, as the IDE does not know how to handle Variant properties. > > But ValueBox.Value can take a string instead, so maybe I will find a hack. > But > you will get it only in Gambas 3! > > -- > Beno?t > > ------------------------------------------------------------------------------ > _______________________________________________ > 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/On-ver-2.12-Form-tool-box-properties-why-doesn%27t-valubox-have-a-value-property--tp22890701p22897164.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas at ...1... Sun Apr 5 20:51:53 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Sun, 5 Apr 2009 20:51:53 +0200 Subject: [Gambas-user] Fwd: PB using tableview object In-Reply-To: References: <7732C734-84CE-4A3C-B052-AC41DCC0076A@...1896...> Message-ID: <200904052051.53829.gambas@...1...> > Benoit, > > Sorry for the explications, I'm not really good in english. > > So, I used a TableView because I did find in the GridView how o edit a > single Cell. > > Second part, I don't know how to attach for exemple a TextBox inside a > Cell of an object (like a GridView), > if it's possible of curse. > > So, to be more clear: > > This is the Tableview in edition mode after double clicking in the > 'FlowIn1' cell: The bug should be fixed in revision #1922 for Gambas 3. With another bug too: did you notice that the cell editor did not have the same font as the TableView? But beware that now the TableView ask for editing by raising the Click event. So if you don't call Edit inside the Click event, the arrow keys and the ENTER key will not have any effect. Is is what you need? I think I will backport the fix to Gambas 2, as these are only internal changes. Regards, -- Beno?t From linuxos at ...1896... Sun Apr 5 21:46:45 2009 From: linuxos at ...1896... (Olivier Cruilles) Date: Sun, 5 Apr 2009 21:46:45 +0200 Subject: [Gambas-user] Fwd: PB using tableview object In-Reply-To: <200904052051.53829.gambas@...1...> References: <7732C734-84CE-4A3C-B052-AC41DCC0076A@...1896...> <200904052051.53829.gambas@...1...> Message-ID: Thank you for the answer. For the moment I don't use Gambas 3 for my project, just to try some features that are not present in the Gambas 2. So as you said, if you backport the fix in the Gambas 2.x, it wil be great for me but not essential because it's only a visual bug for me. I locked the left Column in the Tableview by doing a backup of the Cell. In real if someone change the Right Cell, I cancel this change. So I will change the Tableview when Gambas 3 will be the official release. In all cases, thank you to develop Gambas, It's very very great to use it, sincerely, and I'm just at the beginning... Olivier Cruilles Mail: linuxos at ...1896... Le 5 avr. 09 ? 20:51, Beno?t Minisini a ?crit : >> Benoit, >> >> Sorry for the explications, I'm not really good in english. >> >> So, I used a TableView because I did find in the GridView how o >> edit a >> single Cell. >> >> Second part, I don't know how to attach for exemple a TextBox >> inside a >> Cell of an object (like a GridView), >> if it's possible of curse. >> >> So, to be more clear: >> >> This is the Tableview in edition mode after double clicking in the >> 'FlowIn1' cell: > > The bug should be fixed in revision #1922 for Gambas 3. With another > bug too: > did you notice that the cell editor did not have the same font as the > TableView? > > But beware that now the TableView ask for editing by raising the > Click event. > So if you don't call Edit inside the Click event, the arrow keys and > the ENTER > key will not have any effect. > > Is is what you need? > > I think I will backport the fix to Gambas 2, as these are only > internal > changes. > > Regards, > > -- > Beno?t > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From gambas at ...1... Mon Apr 6 00:02:24 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Mon, 6 Apr 2009 00:02:24 +0200 Subject: [Gambas-user] Headache causing misplaced error message. In-Reply-To: <384d3900904041809x6d6d9f39y31f994b1335f3ed7@...627...> References: <384d3900904041809x6d6d9f39y31f994b1335f3ed7@...627...> Message-ID: <200904060002.24775.gambas@...1...> > Hi! > Here is very simplified example of the bug I found (Gambas 2.10 and > Gambas3 rev. 1917). > > >From that you can easily see what is wrong, but in real life code... > > This bug seems to be generally in "else if", error doesn't have to be > division by zero, it could be any. > And there could be many lines of "else if", still the error message > goes to the first line. > > > Dim x As Integer > > If x = -1 Then '<--- YOU GOT ERROR MESSAGE FROM THIS LINE. > 'nothing > Else If 1 / 0 Then > 'nothing > Endif > > > Regards, > Jussi > Finally fixed in revision #1924! Regards, -- Beno?t From leonardo at ...1237... Mon Apr 6 01:35:39 2009 From: leonardo at ...1237... (Leonardo Miliani) Date: Sun, 05 Apr 2009 17:35:39 -0600 Subject: [Gambas-user] Bug in code parser Message-ID: <0d1eb74263b1088de762308eb2901d8d@...1237...> I discovered a funny bug in the code parser... If I write: DIM s AS Integer s = Int(Rnd(0, 10)) MOD 3 I get: Type mystmatch: wanted integer, got float instead. But Int() should return an integer... But if I write: DIM s AS Integer s = Int(Rnd(0, 10)) s = s MOD 3 the code is executed without problems :-) -- Leonardo Miliani Web: http://www.leonardomiliani.com E-mail: leonardo at ...1237... Scegli software opensource - Choose opensource software Co-fondatore di Gambas-it.org Il sito di riferimento della comunit? italiana degli utenti di Gambas http://www.gambas-it.org From gambas at ...1... Mon Apr 6 01:41:12 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Mon, 6 Apr 2009 01:41:12 +0200 Subject: [Gambas-user] Bug in code parser In-Reply-To: <0d1eb74263b1088de762308eb2901d8d@...1237...> References: <0d1eb74263b1088de762308eb2901d8d@...1237...> Message-ID: <200904060141.12825.gambas@...1...> > I discovered a funny bug in the code parser... > If I write: > > DIM s AS Integer > s = Int(Rnd(0, 10)) MOD 3 > > I get: > Type mystmatch: wanted integer, got float instead. But Int() should return > an integer... > > But if I write: > > DIM s AS Integer > s = Int(Rnd(0, 10)) > s = s MOD 3 > > the code is executed without problems :-) This is not a bug: Int() really returns a float. This float has no decimal part, but it is a float anyway. The MOD operator just does not convert its argument by default, and so always expect a pure integer. It may change in the future, as there is a request for having a MOD operator that deals with Float too. REgards, -- Beno?t From jbskaggs at ...1871... Mon Apr 6 05:15:22 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sun, 5 Apr 2009 20:15:22 -0700 (PDT) Subject: [Gambas-user] In simple English could someone explain what the h does in instanciation? Message-ID: <22901580.post@...1379...> when I am adding new objects what specifically does the h do? As in: dim hTextbox1 as Textbox vesus dim myTextbox1 as Textbox What is happening with these two different statements? Thanks for your help. -- View this message in context: http://www.nabble.com/In-simple-English-could-someone-explain-what-the-h-does-in-instanciation--tp22901580p22901580.html Sent from the gambas-user mailing list archive at Nabble.com. From steven at ...2097... Mon Apr 6 06:00:25 2009 From: steven at ...2097... (Steven James Drinnan) Date: Mon, 06 Apr 2009 12:00:25 +0800 Subject: [Gambas-user] Panning a picturebox inside a scrollview with mouse In-Reply-To: <49D8D5A3.8040406@...2035...> References: <49D8D5A3.8040406@...2035...> Message-ID: <1238990425.3784.29.camel@...37...> Hi here is an example. In this example, you can embed the ocphotoview into a form. It is from a project that I am working on, so . Some of the code comes from the web camera example. There are some use full functions there as well. To load a picture right click. You can select. By file or Web camera or even from a scanner. Once loaded you can move the picture around by left clicking. You can easily modify the code by checking which button is pressed (but then you will loose the menu feature.) I hope it helps. Its a bit overloaded for what you need but it will hopefully get you pointed in the right direction. If you need any help please ask. Steven Drinnan On Sun, 2009-04-05 at 18:00 +0200, Jesus Guardon wrote: > I need some help about this issue, because I'm unable to get it working. > What I want to do is panning a picturebox inside a scrollview when I > click RMB and move the mouse around. BTW, something usual in a lot of > graphical apps. > > Can anyone help me, please? > > Attached is the basic project in Gambas2, but without the picture (size > too big to be accepted by the list) > > Regards > > Jes?s > > ------------------------------------------------------------------------------ > _______________________________________________ > 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: SJDSoftpicscroll.tar.gz Type: application/x-compressed-tar Size: 21756 bytes Desc: not available URL: From sourceforge-raindog2 at ...94... Mon Apr 6 06:13:23 2009 From: sourceforge-raindog2 at ...94... (Rob) Date: Mon, 6 Apr 2009 00:13:23 -0400 Subject: [Gambas-user] In simple English could someone explain what the h does in instanciation? In-Reply-To: <22901580.post@...1379...> References: <22901580.post@...1379...> Message-ID: <200904060013.23913.sourceforge-raindog2@...94...> On Sunday 05 April 2009 23:15, jbskaggs wrote: > dim hTextbox1 as Textbox > vesus > dim myTextbox1 as Textbox > What is happening with these two different statements? The first one creates a new textbox object called hTextbox1. The second creates a new textbox object called myTextbox1. The use of "h" in object variable names is just a convention ("h" usually meaning "handle", like "p" or "ptr" in C programs usually means "pointer"), not syntactically significant. Rob From jbskaggs at ...1871... Mon Apr 6 06:37:56 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sun, 5 Apr 2009 21:37:56 -0700 (PDT) Subject: [Gambas-user] In simple English could someone explain what the h does in instanciation? In-Reply-To: <200904060013.23913.sourceforge-raindog2@...94...> References: <22901580.post@...1379...> <200904060013.23913.sourceforge-raindog2@...94...> Message-ID: <22902059.post@...1379...> Thanks. JB Skaggs Rob Kudla wrote: > > On Sunday 05 April 2009 23:15, jbskaggs wrote: >> dim hTextbox1 as Textbox >> vesus >> dim myTextbox1 as Textbox >> What is happening with these two different statements? > > The first one creates a new textbox object called hTextbox1. The second > creates a new textbox object called myTextbox1. > > The use of "h" in object variable names is just a convention ("h" usually > meaning "handle", like "p" or "ptr" in C programs usually > means "pointer"), not syntactically significant. > > Rob > > ------------------------------------------------------------------------------ > _______________________________________________ > 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/In-simple-English-could-someone-explain-what-the-h-does-in-instanciation--tp22901580p22902059.html Sent from the gambas-user mailing list archive at Nabble.com. From wdahn at ...1000... Mon Apr 6 06:51:20 2009 From: wdahn at ...1000... (Werner) Date: Mon, 06 Apr 2009 12:51:20 +0800 Subject: [Gambas-user] In simple English could someone explain what the h does in instanciation? In-Reply-To: <22902059.post@...1379...> References: <22901580.post@...1379...> <200904060013.23913.sourceforge-raindog2@...94...> <22902059.post@...1379...> Message-ID: <49D98A48.3070700@...1000...> jbskaggs wrote: > Thanks. > > JB Skaggs > > Rob Kudla wrote: > >> On Sunday 05 April 2009 23:15, jbskaggs wrote: >> >>> dim hTextbox1 as Textbox >>> vesus >>> dim myTextbox1 as Textbox >>> What is happening with these two different statements? >>> >> The first one creates a new textbox object called hTextbox1. The second >> creates a new textbox object called myTextbox1. >> >> The use of "h" in object variable names is just a convention ("h" usually >> meaning "handle", like "p" or "ptr" in C programs usually >> means "pointer"), not syntactically significant. >> >> Rob The full proposed naming convention is here: http://www.gambasdoc.org/help/doc/naming?en and another suggestion is here: http://gambasdoc.org/help/doc/namingconvention?view From m0e.lnx at ...626... Mon Apr 6 14:53:04 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Mon, 6 Apr 2009 07:53:04 -0500 Subject: [Gambas-user] Ugly gtk warnings with tabstrip object In-Reply-To: <200904051249.44535.gambas@...1...> References: <20090324122432.3c06de73.M0E.lnx@...626...> <200904051249.44535.gambas@...1...> Message-ID: <20090406075304.2126fbfb@...2125...> I run clearlooks with tango for icons. From jussi.lahtinen at ...626... Mon Apr 6 15:39:21 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 6 Apr 2009 16:39:21 +0300 Subject: [Gambas-user] Headache causing misplaced error message. In-Reply-To: <200904060002.24775.gambas@...1...> References: <384d3900904041809x6d6d9f39y31f994b1335f3ed7@...627...> <200904060002.24775.gambas@...1...> Message-ID: <384d3900904060639o111477cch16875f86a32f89db@...627...> Thanks!!! Jussi 2009/4/6 Beno?t Minisini : >> Hi! >> Here is very simplified example of the bug I found (Gambas 2.10 and >> Gambas3 rev. 1917). >> >> >From that you can easily see what is wrong, but in real life code... >> >> This bug seems to be generally in "else if", error doesn't have to be >> division by zero, it could be any. >> And there could be many lines of "else if", still the error message >> goes to the first line. >> >> >> Dim x As Integer >> >> If x = -1 Then '<--- ?YOU GOT ERROR MESSAGE FROM THIS LINE. >> 'nothing >> Else If 1 / 0 Then >> 'nothing >> Endif >> >> >> Regards, >> Jussi >> > > Finally fixed in revision #1924! > > Regards, > > -- > Beno?t > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From joshiggins at ...1601... Mon Apr 6 16:13:37 2009 From: joshiggins at ...1601... (Joshua Higgins) Date: Mon, 6 Apr 2009 15:13:37 +0100 Subject: [Gambas-user] TextArea scrolling In-Reply-To: <384d3900904040823ldf4d06du81710a7e94dbb8c6@...627...> References: <384d3900904040823ldf4d06du81710a7e94dbb8c6@...627...> Message-ID: <4247f5440904060713u30bda80xacdb97288c8067de@...627...> Did you find a solution? 2009/4/4 Jussi Lahtinen > Hi! > > How I can automatically scroll down textarea? > So that the last message printed to textarea is always showing, > without user have to scroll down? > > Regards, > Jussi > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- joshua higgins >>>>>>------ From jussi.lahtinen at ...626... Mon Apr 6 16:44:10 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 6 Apr 2009 17:44:10 +0300 Subject: [Gambas-user] TextArea scrolling In-Reply-To: <4247f5440904060713u30bda80xacdb97288c8067de@...627...> References: <384d3900904040823ldf4d06du81710a7e94dbb8c6@...627...> <4247f5440904060713u30bda80xacdb97288c8067de@...627...> Message-ID: <384d3900904060744y2a4472eejdfa98b4b0ec433d9@...627...> I was just writing about this issue! It turn out to be bug! This works on GTK+, but not with Qt; TextArea1.EnsureVisible() So, if you are using GTK+ you have your solution... If not, you must wait for fix. Jussi On Mon, Apr 6, 2009 at 17:13, Joshua Higgins wrote: > Did you find a solution? > > 2009/4/4 Jussi Lahtinen > >> Hi! >> >> How I can automatically scroll down textarea? >> So that the last message printed to textarea is always showing, >> without user have to scroll down? >> >> Regards, >> Jussi >> >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > > > -- > joshua higgins >>>>>>>------ > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Mon Apr 6 16:51:34 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Mon, 6 Apr 2009 16:51:34 +0200 Subject: [Gambas-user] TextArea scrolling In-Reply-To: <384d3900904060744y2a4472eejdfa98b4b0ec433d9@...627...> References: <384d3900904040823ldf4d06du81710a7e94dbb8c6@...627...> <4247f5440904060713u30bda80xacdb97288c8067de@...627...> <384d3900904060744y2a4472eejdfa98b4b0ec433d9@...627...> Message-ID: <200904061651.34739.gambas@...1...> > I was just writing about this issue! > It turn out to be bug! > > This works on GTK+, but not with Qt; > TextArea1.EnsureVisible() > > So, if you are using GTK+ you have your solution... If not, you must > wait for fix. > > > Jussi > It's the contrary: The EnsureVisible() method should not be there. :-) But just moving the cursor should make it automatically visible both with Qt and GTK+. Regards, -- Beno?t From gambas at ...1... Mon Apr 6 16:52:54 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Mon, 6 Apr 2009 16:52:54 +0200 Subject: [Gambas-user] TextArea scrolling In-Reply-To: <384d3900904060744y2a4472eejdfa98b4b0ec433d9@...627...> References: <384d3900904040823ldf4d06du81710a7e94dbb8c6@...627...> <4247f5440904060713u30bda80xacdb97288c8067de@...627...> <384d3900904060744y2a4472eejdfa98b4b0ec433d9@...627...> Message-ID: <200904061652.54339.gambas@...1...> > I was just writing about this issue! > It turn out to be bug! > > This works on GTK+, but not with Qt; > TextArea1.EnsureVisible() > > So, if you are using GTK+ you have your solution... If not, you must > wait for fix. > > > Jussi > Forget my other mail: the EnsureVisible() method is perfectly valid, but I don't see why it would not work with Qt. -- Beno?t From jussi.lahtinen at ...626... Mon Apr 6 17:02:39 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 6 Apr 2009 18:02:39 +0300 Subject: [Gambas-user] TextArea scrolling In-Reply-To: <200904061652.54339.gambas@...1...> References: <384d3900904040823ldf4d06du81710a7e94dbb8c6@...627...> <4247f5440904060713u30bda80xacdb97288c8067de@...627...> <384d3900904060744y2a4472eejdfa98b4b0ec433d9@...627...> <200904061652.54339.gambas@...1...> Message-ID: <384d3900904060802q325d7cabyfb335ae91df1ce6b@...627...> Absolutely nothing happens in Qt, but with GTK+ it works as expected. It works in your system? Jussi 2009/4/6 Beno?t Minisini : >> I was just writing about this issue! >> It turn out to be bug! >> >> This works on GTK+, but not with Qt; >> TextArea1.EnsureVisible() >> >> So, if you are using GTK+ you have your solution... If not, you must >> wait for fix. >> >> >> Jussi >> > > Forget my other mail: the EnsureVisible() method is perfectly valid, but I > don't see why it would not work with Qt. > > -- > Beno?t > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jguardon at ...2035... Mon Apr 6 18:40:37 2009 From: jguardon at ...2035... (Jesus Guardon) Date: Mon, 06 Apr 2009 18:40:37 +0200 Subject: [Gambas-user] Panning a picturebox inside a scrollview with mouse In-Reply-To: <1238990425.3784.29.camel@...37...> References: <49D8D5A3.8040406@...2035...> <1238990425.3784.29.camel@...37...> Message-ID: <49DA3085.9040405@...2035...> Many thanks Steven for your input I have solved this issue using a drawingarea object instead a picturebox. I've stated than it is much less cpu consuming, because the image --a big world map-- I want to show, needs to be updated periodically by other shell command that modifies it with texts and lines, and must be loaded everytime. After a bit of thinking, I prefer don't update the map itself, and draw over it, instead. Here is what I've done so far; you can use the mouse to pan the image around. #See attached project# In the meantime I will take a look to your example, I'm sure it will be very helpfull. Thanks again Regards Jes?s Steven James Drinnan escribi?: > Hi here is an example. > > In this example, you can embed the ocphotoview into a form. It is from a > project that I am working on, so . Some of the code comes from the web > camera example. > > There are some use full functions there as well. > > To load a picture right click. You can select. By file or Web camera or > even from a scanner. > > > Once loaded you can move the picture around by left clicking. > > You can easily modify the code by checking which button is pressed (but > then you will loose the menu feature.) > > I hope it helps. Its a bit overloaded for what you need but it will > hopefully get you pointed in the right direction. > > If you need any help please ask. > > Steven Drinnan > On Sun, 2009-04-05 at 18:00 +0200, Jesus Guardon wrote: >> I need some help about this issue, because I'm unable to get it working. >> What I want to do is panning a picturebox inside a scrollview when I >> click RMB and move the mouse around. BTW, something usual in a lot of >> graphical apps. >> >> Can anyone help me, please? >> >> Attached is the basic project in Gambas2, but without the picture (size >> too big to be accepted by the list) >> >> Regards >> >> Jes?s >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> 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: mapDX.tar.gz Type: application/x-gzip Size: 8630 bytes Desc: not available URL: From leonardo at ...1237... Mon Apr 6 18:59:42 2009 From: leonardo at ...1237... (Leonardo Miliani) Date: Mon, 06 Apr 2009 18:59:42 +0200 Subject: [Gambas-user] Gambas freezes with Qt apps In-Reply-To: <200904052010.44724.gambas@...1...> References: <49D8B38E.5000207@...1237...> <200904052010.44724.gambas@...1...> Message-ID: <49DA34FE.1050403@...1237...> Beno?t Minisini ha scritto: > kbuildsycoca is a KDE program, so either you have gb.qt.kde selected in your > project, or maybe you are using a specific Qt theme that depends on KDE. > > Do you know what Qt theme is used by your freezing applications on your Ubuntu > system? Use the "qtconfig" program for that, or look for the "Style=" entry in > the ~/.qt/qtrc file. Plastik theme. > > You can help me too by using 'gdb' on the frozen process. Find the PID of the > frozen process, and run 'gdb gbx2 '. gdb will stop and debug it. Then you > can use the 'bt' command to get the stack backtrace and send me the result. > Note that Gambas must have been compiled with debugging information enabled. > > Regards, > I'll try this procedure. But "freeze" maybe is not the correct term. The IDE still runs quite and fine. Simply, the applications seems not to start, waiting for some events that don't happen... In fact, if I press the "Stop" button, the IDE terminates the program without error messages. -- Ciao. Leo. Web: www.leonardomiliani.com E-mail: leonardo at ...1237... Scegli software opensource - Choose opensource software Co-fondatore di Gambas-it.org Il sito di riferimento della comunit? italiana degli utenti di Gambas www.gambas-it.org From leonardo at ...1237... Mon Apr 6 19:03:56 2009 From: leonardo at ...1237... (Leonardo Miliani) Date: Mon, 06 Apr 2009 19:03:56 +0200 Subject: [Gambas-user] Gambas freezes with Qt apps In-Reply-To: <200904052010.44724.gambas@...1...> References: <49D8B38E.5000207@...1237...> <200904052010.44724.gambas@...1...> Message-ID: <49DA35FC.2000705@...1237...> Here is the output of the gdb program. -- Ciao. Leo. Web: www.leonardomiliani.com E-mail: leonardo at ...1237... Scegli software opensource - Choose opensource software Co-fondatore di Gambas-it.org Il sito di riferimento della comunit? italiana degli utenti di Gambas www.gambas-it.org -------------- next part -------------- GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-linux-gnu"... (no debugging symbols found) Attaching to program: /usr/bin/gbx2, process 7013 Reading symbols from /usr/lib/libqt-mt.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libqt-mt.so.3 Reading symbols from /lib/tls/i686/cmov/libm.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/tls/i686/cmov/libm.so.6 Reading symbols from /lib/tls/i686/cmov/libdl.so.2... (no debugging symbols found)...done. Loaded symbols for /lib/tls/i686/cmov/libdl.so.2 Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...(no debugging symbols found)...done. [Thread debugging using libthread_db enabled] [New Thread 0xb72ca6c0 (LWP 7013)] Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0 Reading symbols from /usr/lib/libffi.so.5... (no debugging symbols found)...done. Loaded symbols for /usr/lib/libffi.so.5 Reading symbols from /lib/tls/i686/cmov/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/tls/i686/cmov/libc.so.6 Reading symbols from /usr/lib/libfontconfig.so.1... (no debugging symbols found)...done. Loaded symbols for /usr/lib/libfontconfig.so.1 Reading symbols from /usr/lib/libaudio.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libaudio.so.2 Reading symbols from /usr/lib/libXt.so.6... (no debugging symbols found)...done. Loaded symbols for /usr/lib/libXt.so.6 Reading symbols from /usr/lib/libjpeg.so.62...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libjpeg.so.62 Reading symbols from /usr/lib/libpng12.so.0... (no debugging symbols found)...done. Loaded symbols for /usr/lib/libpng12.so.0 Reading symbols from /usr/lib/libz.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libz.so.1 Reading symbols from /usr/lib/libXi.so.6... (no debugging symbols found)...done. Loaded symbols for /usr/lib/libXi.so.6 Reading symbols from /usr/lib/libXrender.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libXrender.so.1 Reading symbols from /usr/lib/libXrandr.so.2... (no debugging symbols found)...done. Loaded symbols for /usr/lib/libXrandr.so.2 Reading symbols from /usr/lib/libXcursor.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libXcursor.so.1 Reading symbols from /usr/lib/libXinerama.so.1... (no debugging symbols found)...done. Loaded symbols for /usr/lib/libXinerama.so.1 Reading symbols from /usr/lib/libXft.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libXft.so.2 Reading symbols from /usr/lib/libfreetype.so.6... (no debugging symbols found)...done. Loaded symbols for /usr/lib/libfreetype.so.6 Reading symbols from /usr/lib/libXext.so.6...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libXext.so.6 Reading symbols from /usr/lib/libX11.so.6... (no debugging symbols found)...done. Loaded symbols for /usr/lib/libX11.so.6 Reading symbols from /usr/lib/libSM.so.6...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libSM.so.6 Reading symbols from /usr/lib/libICE.so.6... (no debugging symbols found)...done. Loaded symbols for /usr/lib/libICE.so.6 Reading symbols from /usr/lib/libstdc++.so.6...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libstdc++.so.6 Reading symbols from /lib/libgcc_s.so.1... (no debugging symbols found)...done. Loaded symbols for /lib/libgcc_s.so.1 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /usr/lib/libexpat.so.1... (no debugging symbols found)...done. Loaded symbols for /usr/lib/libexpat.so.1 Reading symbols from /usr/lib/libXfixes.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libXfixes.so.3 Reading symbols from /usr/lib/libXau.so.6... (no debugging symbols found)...done. Loaded symbols for /usr/lib/libXau.so.6 Reading symbols from /usr/lib/libxcb-xlib.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libxcb-xlib.so.0 Reading symbols from /usr/lib/libxcb.so.1... ---Type to continue, or q to quit--- (no debugging symbols found)...done. Loaded symbols for /usr/lib/libxcb.so.1 Reading symbols from /usr/lib/libXdmcp.so.6...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libXdmcp.so.6 Reading symbols from /lib/tls/i686/cmov/libnss_compat.so.2... (no debugging symbols found)...done. Loaded symbols for /lib/tls/i686/cmov/libnss_compat.so.2 Reading symbols from /lib/tls/i686/cmov/libnsl.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/tls/i686/cmov/libnsl.so.1 Reading symbols from /lib/tls/i686/cmov/libnss_nis.so.2... (no debugging symbols found)...done. Loaded symbols for /lib/tls/i686/cmov/libnss_nis.so.2 Reading symbols from /lib/tls/i686/cmov/libnss_files.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/tls/i686/cmov/libnss_files.so.2 Reading symbols from /usr/lib/gambas2/gb.qt.so... (no debugging symbols found)...done. Loaded symbols for /usr/lib/gambas2/gb.qt.so Reading symbols from /usr/lib/gambas2/gb.draw.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/gambas2/gb.draw.so Reading symbols from /usr/lib/gambas2/gb.debug.so... (no debugging symbols found)...done. Loaded symbols for /usr/lib/gambas2/gb.debug.so Reading symbols from /usr/lib/gambas2/gb.desktop.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/gambas2/gb.desktop.so Reading symbols from /usr/lib/libXtst.so.6... (no debugging symbols found)...done. Loaded symbols for /usr/lib/libXtst.so.6 Reading symbols from /usr/lib/gambas2/gb.eval.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/gambas2/gb.eval.so Reading symbols from /usr/lib/gambas2/gb.qt.ext.so... (no debugging symbols found)...done. Loaded symbols for /usr/lib/gambas2/gb.qt.ext.so Reading symbols from /usr/lib/qt3/plugins/imageformats/libqmng.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/qt3/plugins/imageformats/libqmng.so Reading symbols from /usr/lib/libmng.so.1... (no debugging symbols found)...done. Loaded symbols for /usr/lib/libmng.so.1 Reading symbols from /usr/lib/liblcms.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/lib/liblcms.so.1 Reading symbols from /usr/lib/kde3/plugins/styles/plastik.so... (no debugging symbols found)...done. Loaded symbols for /usr/lib/kde3/plugins/styles/plastik.so Reading symbols from /usr/lib/libkdefx.so.4...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libkdefx.so.4 Reading symbols from /usr/lib/qt3/plugins/inputmethods/libqimsw-multi.so... (no debugging symbols found)...done. Loaded symbols for /usr/lib/qt3/plugins/inputmethods/libqimsw-multi.so Reading symbols from /usr/lib/qt3/plugins/inputmethods/libqimsw-none.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/qt3/plugins/inputmethods/libqimsw-none.so Reading symbols from /usr/lib/qt3/plugins/inputmethods/libqsimple.so... (no debugging symbols found)...done. Loaded symbols for /usr/lib/qt3/plugins/inputmethods/libqsimple.so Reading symbols from /usr/lib/qt3/plugins/inputmethods/libqxim.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/qt3/plugins/inputmethods/libqxim.so (no debugging symbols found) 0xb7ffa430 in __kernel_vsyscall () (gdb) bt #0 0xb7ffa430 in __kernel_vsyscall () #1 0xb77b9dbd in select () from /lib/tls/i686/cmov/libc.so.6 #2 0xb7a6ebe8 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3 #3 0xb70246cf in ?? () from /usr/lib/gambas2/gb.qt.so #4 0xb7adcf00 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3 #5 0xb7adcdc6 in QEventLoop::exec () from /usr/lib/libqt-mt.so.3 #6 0xb7ac4b8f in QApplication::exec () from /usr/lib/libqt-mt.so.3 #7 0xb7023d18 in ?? () from /usr/lib/gambas2/gb.qt.so #8 0x08061c52 in ?? () #9 0xb76f6685 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6 #10 0x0804aec1 in ?? () From weldon_gary at ...67... Mon Apr 6 22:19:27 2009 From: weldon_gary at ...67... (CelticBhoy) Date: Mon, 6 Apr 2009 13:19:27 -0700 (PDT) Subject: [Gambas-user] Printer not found Message-ID: <22916441.post@...1379...> I have writen a small stock prog, and want to print various reports, but when I use the printer.begin function it does not see my printer. The printer works fine in any other app I try to print from. I am using Ubuntu with Gnome and have the gb, gb.db, gb.db.form, gb.form, gb.qt, and gb.qt.ext modules loaded. Why wont my app find my printer ???? ps. if I print to file it works fine. http://www.nabble.com/file/p22916441/FMain.class FMain.class -- View this message in context: http://www.nabble.com/Printer-not-found-tp22916441p22916441.html Sent from the gambas-user mailing list archive at Nabble.com. From iecltd at ...2113... Mon Apr 6 22:32:19 2009 From: iecltd at ...2113... (Rodney Rundstrom) Date: Tue, 7 Apr 2009 08:32:19 +1200 Subject: [Gambas-user] Dynamic Objects In-Reply-To: <49D33E35.8070506@...1909...> Message-ID: <34CE78B0C13A4B06A91BA26C4BA338AD@...2114...> Thanks for all your help. It seems to delete the object you set its reference to null. You need however to turn the visibility off first as the image seems to persist. I don't know how that affect memory? Is there any information on memory mapping and stack control within Gambas? Rodney -----Original Message----- From: Doriano Blengino [mailto:doriano.blengino at ...1909...] Sent: Wednesday, 1 April 2009 11:13 p.m. To: mailing list for gambas users Subject: Re: [Gambas-user] Dynamic Objects Rodney Rundstrom ha scritto: > Thanks for that I'll work thought over the next few day. One last question > on dynamic object (I think) how do we delete them and release the memory? > This is a matter unclear to me, anyway: an object is freed when no reference to it are in effect. When you instantiate a visual control, its parent gets a reference to the object. I don't know how to delete that reference (perhaps a Delete() method of its Children property?). For forms, a Persistent property says what to do when the form is closed, either hide it or destroy it. For other objects, I don't know - better someone else replies to you. Regards, Doriano ---------------------------------------------------------------------------- -- _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From rterry at ...1946... Mon Apr 6 23:35:09 2009 From: rterry at ...1946... (richard terry) Date: Tue, 7 Apr 2009 07:35:09 +1000 Subject: [Gambas-user] Simple file dialog question Message-ID: <200904070735.09645.rterry@...1946...> If you select a file using a file dialog and get back dialog.path, is there any instant way to ret extract just the file name on the end of a long path without having to do any parsing? thanks Richard From gambas at ...1... Mon Apr 6 23:40:55 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Mon, 6 Apr 2009 23:40:55 +0200 Subject: [Gambas-user] Simple file dialog question In-Reply-To: <200904070735.09645.rterry@...1946...> References: <200904070735.09645.rterry@...1946...> Message-ID: <200904062340.55361.gambas@...1...> > If you select a file using a file dialog and get back dialog.path, is there > any instant way to ret extract just the file name on the end of a long path > without having to do any parsing? > > thanks > > Richard > File.Name(TheLongPath) ? -- Beno?t From jbskaggs at ...1871... Tue Apr 7 01:55:08 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Mon, 6 Apr 2009 16:55:08 -0700 (PDT) Subject: [Gambas-user] A random sort of listview Message-ID: <22919766.post@...1379...> I came up with a way to random sort listview. (Iuse this for random shuffling card slots on games) But it isnt efficient some pointers if you dont mind? I use two listviews one to sort from and one to sort to: I first copy all the listitems from list 1 to list 2 EXCEPT the key for listview2 items = the integer from my for next loop eg for i = 0 to listview1.count -1 step 1 listview2.add(i, listview1.item.text) next then with a for next loop based on the length of list1 I copy the listview.item key to a string A and listview.item.text to second string B Then I calculate a random number the count of listview2 and add that to a integer C thenadd it to listview2 listview2.add("n"&A, B,,C) "n"&A creates a key of n1, n2, etc ... AFter the loop ends I run a second loop and run for i = 0 to listview1.count -1 step 1 listview.moveto(i) listview2.item.delete next This gives me a random sorted list in viewlist2 of viewlist1 with no duplicates etc- But is there a more efficient way of doing this? here is total code: PUBLIC SUB button3_click() DIM a AS String DIM d AS Integer DIM e AS Integer DIM i AS Integer DIM c AS Integer listview1.Clear 'clears the list FOR i = 0 TO 199 STEP 1 'number of items to add listview2.Add(i, "Slot" & i) 'adds items to sort to list NEXT 'next item i = 0 FOR i = 0 TO 199 STEP 1 'number of items e = 0 listview1.MoveTo(i) 'goto item a = listview1.Item.Text 'get text PRINT a d = listview1.Key 'get key PRINT "old key", d listview1.Item.Delete 'delete item (the cut part of cut and paste) e = Round(Rnd(200)) ' make sure old key doesNOT equal NEW Key PRINT e, "<<<< the randomimzed number" IF e >= 200 THEN e = 199 listview2.Add("n" & d, "n" & a,, e) 'adds cut items after randomly chosen item listview3.Add("n" & d, "n" & a) PRINT "new key", e NEXT 'next item down FOR i = 0 TO 199 STEP 1 'number of items listview2.MoveTo(i) listview2.Item.Delete NEXT ValueBox1.value = listview1.Count END JB SKaggs -- View this message in context: http://www.nabble.com/A-random-sort-of-listview-tp22919766p22919766.html Sent from the gambas-user mailing list archive at Nabble.com. From simonart.dominique at ...11... Tue Apr 7 03:05:44 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Tue, 07 Apr 2009 03:05:44 +0200 Subject: [Gambas-user] A random sort of listview In-Reply-To: <22919766.post@...1379...> References: <22919766.post@...1379...> Message-ID: <49DAA6E8.4050402@...11...> jbskaggs a ?crit : > > I came up with a way to random sort listview. (Iuse this for random > shuffling card slots on games) But it isnt efficient some pointers if you > dont mind? > > I use two listviews one to sort from and one to sort to: > > I first copy all the listitems from list 1 to list 2 EXCEPT the key for > listview2 items = the integer from my for next loop > > eg > for i = 0 to listview1.count -1 step 1 > listview2.add(i, listview1.item.text) > next > > then with a for next loop based on the length of list1 I copy the > listview.item key to a string A and listview.item.text to second string B > > Then I calculate a random number the count of listview2 and add that to a > integer C > thenadd it to listview2 > listview2.add("n"&A, B,,C) "n"&A creates a key of n1, n2, etc ... > > > AFter the loop ends > > I run a second loop > > and run > for i = 0 to listview1.count -1 step 1 > listview.moveto(i) > listview2.item.delete > next > > This gives me a random sorted list in viewlist2 of viewlist1 with no > duplicates etc- > > But is there a more efficient way of doing this? > > here is total code: > > PUBLIC SUB button3_click() > DIM a AS String > DIM d AS Integer > DIM e AS Integer > DIM i AS Integer > DIM c AS Integer > listview1.Clear 'clears the list > FOR i = 0 TO 199 STEP 1 'number of items to add > listview2.Add(i, "Slot" & i) 'adds items to sort to list > NEXT 'next item > i = 0 > > FOR i = 0 TO 199 STEP 1 'number of items > e = 0 > listview1.MoveTo(i) 'goto item > a = listview1.Item.Text 'get text > PRINT a > d = listview1.Key 'get key > PRINT "old key", d > listview1.Item.Delete 'delete item (the cut part of cut and paste) > e = Round(Rnd(200)) ' make sure old key doesNOT equal NEW Key > PRINT e, "<<<< the randomimzed number" > > IF e >= 200 THEN e = 199 > listview2.Add("n" & d, "n" & a,, e) 'adds cut items after randomly > chosen item > listview3.Add("n" & d, "n" & a) > PRINT "new key", e > NEXT 'next item down > > FOR i = 0 TO 199 STEP 1 'number of items > listview2.MoveTo(i) > listview2.Item.Delete > NEXT > > ValueBox1.value = listview1.Count > END > > JB SKaggs Hi, Let say you want to populate an array with 0-199 randomly (please note that I write this directly, so check carefully the syntax) dim myArray as integer[200] dim A as integer dim i as integer FOR i=0 to 199 A=int(Rnd(200-i)) ' I think we could use a Swap instruction ' instead of the 2 instructions below myArray[i]=A myArray[A]=i NEXT That's all If these numbers was the keys of the initial Listview you just have to populate the second Listview in the new order Hope this help Dominique Simonart From simonart.dominique at ...11... Tue Apr 7 03:54:57 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Tue, 07 Apr 2009 03:54:57 +0200 Subject: [Gambas-user] A random sort of listview In-Reply-To: <49DAA6E8.4050402@...11...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> Message-ID: <49DAB271.3020807@...11...> Simonart Dominique a ?crit : > jbskaggs a ?crit : >> I came up with a way to random sort listview. (Iuse this for random >> shuffling card slots on games) But it isnt efficient some pointers if you >> dont mind? >> >> I use two listviews one to sort from and one to sort to: >> >> I first copy all the listitems from list 1 to list 2 EXCEPT the key for >> listview2 items = the integer from my for next loop >> >> eg >> for i = 0 to listview1.count -1 step 1 >> listview2.add(i, listview1.item.text) >> next >> >> then with a for next loop based on the length of list1 I copy the >> listview.item key to a string A and listview.item.text to second string B >> >> Then I calculate a random number the count of listview2 and add that to a >> integer C >> thenadd it to listview2 >> listview2.add("n"&A, B,,C) "n"&A creates a key of n1, n2, etc ... >> >> >> AFter the loop ends >> >> I run a second loop >> >> and run >> for i = 0 to listview1.count -1 step 1 >> listview.moveto(i) >> listview2.item.delete >> next >> >> This gives me a random sorted list in viewlist2 of viewlist1 with no >> duplicates etc- >> >> But is there a more efficient way of doing this? >> >> here is total code: >> >> PUBLIC SUB button3_click() >> DIM a AS String >> DIM d AS Integer >> DIM e AS Integer >> DIM i AS Integer >> DIM c AS Integer >> listview1.Clear 'clears the list >> FOR i = 0 TO 199 STEP 1 'number of items to add >> listview2.Add(i, "Slot" & i) 'adds items to sort to list >> NEXT 'next item >> i = 0 >> >> FOR i = 0 TO 199 STEP 1 'number of items >> e = 0 >> listview1.MoveTo(i) 'goto item >> a = listview1.Item.Text 'get text >> PRINT a >> d = listview1.Key 'get key >> PRINT "old key", d >> listview1.Item.Delete 'delete item (the cut part of cut and paste) >> e = Round(Rnd(200)) ' make sure old key doesNOT equal NEW Key >> PRINT e, "<<<< the randomimzed number" >> >> IF e >= 200 THEN e = 199 >> listview2.Add("n" & d, "n" & a,, e) 'adds cut items after randomly >> chosen item >> listview3.Add("n" & d, "n" & a) >> PRINT "new key", e >> NEXT 'next item down >> >> FOR i = 0 TO 199 STEP 1 'number of items >> listview2.MoveTo(i) >> listview2.Item.Delete >> NEXT >> >> ValueBox1.value = listview1.Count >> END >> >> JB SKaggs > Hi, > > Let say you want to populate an array with 0-199 randomly > (please note that I write this directly, so check carefully > the syntax) > > dim myArray as integer[200] > dim A as integer > dim i as integer > > FOR i=0 to 199 > A=int(Rnd(200-i)) > ' I think we could use a Swap instruction > ' instead of the 2 instructions below > myArray[i]=A > myArray[A]=i > NEXT > > That's all > If these numbers was the keys of the initial Listview you > just have to populate the second Listview in the new order > > Hope this help > Dominique Simonart > > Well, never write directly like that!! I make some mistake in my sample, here is a new one: DIM myArray AS Integer[200] DIM A AS Integer DIM i AS Integer 'initialize the array FOR i=0 TO 199 myArray[i]=i NEXT 'Randomize the order of the array FOR i = 199 TO 0 STEP -1 A = Int(Rnd(i + 1)) SWAP myArray[i], myArray[A] NEXT From jbskaggs at ...1871... Tue Apr 7 06:36:34 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Mon, 6 Apr 2009 21:36:34 -0700 (PDT) Subject: [Gambas-user] A random sort of listview In-Reply-To: <49DAB271.3020807@...11...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> Message-ID: <22922075.post@...1379...> using your suggestions and the swap command vs manual swapping this is my code: public b as string 'optional string used to hold the array data for file or split later PUBLIC SUB button4_click() ' initialize array DIM myArray AS Integer[200] DIM a AS Integer DIM i AS Integer FOR i = 0 TO 199 STEP 1 'add array items myArray[i] = i NEXT FOR i = 0 TO 199 STEP 1 ' random swap array items a = Int(Rnd(i + 1)) SWAP myArray[i], myArray[a] NEXT FOR i = 0 TO 199 STEP 1 ' write items in listview2 listview1.MoveTo(myArray[i]) c = listview1.Item.Key listview2.add(c, listview1.item.text) NEXT FOR i = 0 TO 199 STEP 1 'optional step to write array as a string for file or whatever use b &= "slot" & myArray[i] & "," NEXT PRINT b END PUBLIC SUB Button1_Click() 'an optional way to load the array values from the variable b and / or a file if b was file loaded DIM egg AS String[] DIM c AS String listview1.Clear egg = Split(b, ",") FOR EACH c IN egg TRY listview1.Add(c, c) IF ERROR THEN RETURN NEXT IF listview1.Count >= 200 THEN RETURN END JB Skaggs Simonart Dominique wrote: > > Simonart Dominique a ?crit : >> jbskaggs a ?crit : >>> I came up with a way to random sort listview. (Iuse this for random >>> shuffling card slots on games) But it isnt efficient some pointers if >>> you >>> dont mind? >>> >>> I use two listviews one to sort from and one to sort to: >>> >>> I first copy all the listitems from list 1 to list 2 EXCEPT the key for >>> listview2 items = the integer from my for next loop >>> >>> eg >>> for i = 0 to listview1.count -1 step 1 >>> listview2.add(i, listview1.item.text) >>> next >>> >>> then with a for next loop based on the length of list1 I copy the >>> listview.item key to a string A and listview.item.text to second string >>> B >>> >>> Then I calculate a random number the count of listview2 and add that to >>> a >>> integer C >>> thenadd it to listview2 >>> listview2.add("n"&A, B,,C) "n"&A creates a key of n1, n2, etc ... >>> >>> >>> AFter the loop ends >>> >>> I run a second loop >>> >>> and run >>> for i = 0 to listview1.count -1 step 1 >>> listview.moveto(i) >>> listview2.item.delete >>> next >>> >>> This gives me a random sorted list in viewlist2 of viewlist1 with no >>> duplicates etc- >>> >>> But is there a more efficient way of doing this? >>> >>> here is total code: >>> >>> PUBLIC SUB button3_click() >>> DIM a AS String >>> DIM d AS Integer >>> DIM e AS Integer >>> DIM i AS Integer >>> DIM c AS Integer >>> listview1.Clear 'clears the list >>> FOR i = 0 TO 199 STEP 1 'number of items to add >>> listview2.Add(i, "Slot" & i) 'adds items to sort to list >>> NEXT 'next item >>> i = 0 >>> >>> FOR i = 0 TO 199 STEP 1 'number of items >>> e = 0 >>> listview1.MoveTo(i) 'goto item >>> a = listview1.Item.Text 'get text >>> PRINT a >>> d = listview1.Key 'get key >>> PRINT "old key", d >>> listview1.Item.Delete 'delete item (the cut part of cut and paste) >>> e = Round(Rnd(200)) ' make sure old key doesNOT equal NEW Key >>> PRINT e, "<<<< the randomimzed number" >>> >>> IF e >= 200 THEN e = 199 >>> listview2.Add("n" & d, "n" & a,, e) 'adds cut items after >>> randomly >>> chosen item >>> listview3.Add("n" & d, "n" & a) >>> PRINT "new key", e >>> NEXT 'next item down >>> >>> FOR i = 0 TO 199 STEP 1 'number of items >>> listview2.MoveTo(i) >>> listview2.Item.Delete >>> NEXT >>> >>> ValueBox1.value = listview1.Count >>> END >>> >>> JB SKaggs >> Hi, >> >> Let say you want to populate an array with 0-199 randomly >> (please note that I write this directly, so check carefully >> the syntax) >> >> dim myArray as integer[200] >> dim A as integer >> dim i as integer >> >> FOR i=0 to 199 >> A=int(Rnd(200-i)) >> ' I think we could use a Swap instruction >> ' instead of the 2 instructions below >> myArray[i]=A >> myArray[A]=i >> NEXT >> >> That's all >> If these numbers was the keys of the initial Listview you >> just have to populate the second Listview in the new order >> >> Hope this help >> Dominique Simonart >> >> > Well, never write directly like that!! > I make some mistake in my sample, here is a new one: > > DIM myArray AS Integer[200] > DIM A AS Integer > DIM i AS Integer > > 'initialize the array > FOR i=0 TO 199 > myArray[i]=i > NEXT > > 'Randomize the order of the array > FOR i = 199 TO 0 STEP -1 > A = Int(Rnd(i + 1)) > SWAP myArray[i], myArray[A] > NEXT > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > 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/A-random-sort-of-listview-tp22919766p22922075.html Sent from the gambas-user mailing list archive at Nabble.com. From doriano.blengino at ...1909... Tue Apr 7 08:27:54 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Tue, 07 Apr 2009 08:27:54 +0200 Subject: [Gambas-user] Printer not found In-Reply-To: <22916441.post@...1379...> References: <22916441.post@...1379...> Message-ID: <49DAF26A.9020908@...1909...> CelticBhoy ha scritto: > I have writen a small stock prog, and want to print various reports, but when > I use the printer.begin function it does not see my printer. The printer > works fine in any other app I try to print from. I am using Ubuntu with > Gnome and have the gb, gb.db, gb.db.form, gb.form, gb.qt, and gb.qt.ext > modules loaded. Why wont my app find my printer ???? > > ps. if I print to file it works fine. > It happened to me too, on a machine running the latest K-Ubuntu (don't remember the version, I don't use Ubuntu). There was no way to see installed printers from gambas, but every other program worked perfectly. I used the strace(1) utility to see what was happening, and discovered that gambas was reading a file in /etc, perhaps printcap, or similar, where there was no mention of installed printers. The printers was instead reported in another file. I renamed printcaps, or deleted it, and all went well: gambas started to read the correct file, probably because it was finding no more the erroneous one. I am sorry about not remembering things - it is not my machine. You can go in /etc and see which file contains the names of installed printers, and check that gambas reads that file. Moreover that machine was a Kubuntu one, not using Gnome; so things can be even more different. Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From simonart.dominique at ...11... Tue Apr 7 12:42:14 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Tue, 07 Apr 2009 12:42:14 +0200 Subject: [Gambas-user] A random sort of listview In-Reply-To: <22922075.post@...1379...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> Message-ID: <49DB2E06.10204@...11...> Hi, Hmm, did you run exactly this code? If so, there is something wrong with the second FOR NEXT loop jbskaggs a ?crit : > using your suggestions and the swap command vs manual swapping this is my > code: > > public b as string 'optional string used to hold the array data for file or > split later > > PUBLIC SUB button4_click() ' initialize array > DIM myArray AS Integer[200] > DIM a AS Integer > DIM i AS Integer > > FOR i = 0 TO 199 STEP 1 'add array items > myArray[i] = i > NEXT > > FOR i = 0 TO 199 STEP 1 ' random swap array items > a = Int(Rnd(i + 1)) > SWAP myArray[i], myArray[a] > NEXT > the right code is: FOR i = 199 TO 0 STEP -1 ... NEXT > > FOR i = 0 TO 199 STEP 1 ' write items in listview2 > listview1.MoveTo(myArray[i]) > c = listview1.Item.Key > listview2.add(c, listview1.item.text) > NEXT > > > > FOR i = 0 TO 199 STEP 1 'optional step to write array as a string for file > or whatever use > b &= "slot" & myArray[i] & "," > NEXT > PRINT b > END > > PUBLIC SUB Button1_Click() 'an optional way to load the array values from > the variable b and / or a file if b was file loaded > DIM egg AS String[] > DIM c AS String > listview1.Clear > egg = Split(b, ",") > FOR EACH c IN egg > TRY listview1.Add(c, c) > IF ERROR THEN RETURN > NEXT > IF listview1.Count >= 200 THEN RETURN > END > > JB Skaggs > Dominique Simonart From shordi at ...626... Tue Apr 7 14:18:52 2009 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Tue, 7 Apr 2009 14:18:52 +0200 Subject: [Gambas-user] Printer not found In-Reply-To: <49DAF26A.9020908@...1909...> References: <22916441.post@...1379...> <49DAF26A.9020908@...1909...> Message-ID: I had same problem with Ubuntu 8.04 and I found that gambas searchs for libcups.so and Ubuntu has libcups.so.2. So I made a simbolic link (sudo ln -s libcups.so.2 libcups.so) to thas library and all goes fine. Hope this helps. 2009/4/7 Doriano Blengino > CelticBhoy ha scritto: > > I have writen a small stock prog, and want to print various reports, but > when > > I use the printer.begin function it does not see my printer. The printer > > works fine in any other app I try to print from. I am using Ubuntu with > > Gnome and have the gb, gb.db, gb.db.form, gb.form, gb.qt, and gb.qt.ext > > modules loaded. Why wont my app find my printer ???? > > > > ps. if I print to file it works fine. > > > It happened to me too, on a machine running the latest K-Ubuntu (don't > remember the version, I don't use Ubuntu). > There was no way to see installed printers from gambas, but every other > program worked perfectly. > I used the strace(1) utility to see what was happening, and discovered > that gambas was reading a file in /etc, perhaps printcap, or similar, > where there was no mention of installed printers. The printers was > instead reported in another file. I renamed printcaps, or deleted it, > and all went well: gambas started to read the correct file, probably > because it was finding no more the erroneous one. > > I am sorry about not remembering things - it is not my machine. You can > go in /etc and see which file contains the names of installed printers, > and check that gambas reads that file. Moreover that machine was a > Kubuntu one, not using Gnome; so things can be even more different. > > Regards, > > -- > Doriano Blengino > > "Listen twice before you speak. > This is why we have two ears, but only one mouth." > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From simonart.dominique at ...11... Tue Apr 7 14:30:48 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Tue, 07 Apr 2009 14:30:48 +0200 Subject: [Gambas-user] A random sort of listview In-Reply-To: <49DB2E06.10204@...11...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> <49DB2E06.10204@...11...> Message-ID: <49DB4778.6050902@...11...> Simonart Dominique a ?crit : > Hi, > > Hmm, did you run exactly this code? If so, there is > something wrong with the second FOR NEXT loop > > jbskaggs a ?crit : >> using your suggestions and the swap command vs manual swapping this is my >> code: >> >> public b as string 'optional string used to hold the array data for file or >> split later >> >> PUBLIC SUB button4_click() ' initialize array >> DIM myArray AS Integer[200] >> DIM a AS Integer >> DIM i AS Integer >> >> FOR i = 0 TO 199 STEP 1 'add array items >> myArray[i] = i >> NEXT >> >> FOR i = 0 TO 199 STEP 1 ' random swap array items >> a = Int(Rnd(i + 1)) >> SWAP myArray[i], myArray[a] >> NEXT >> > > the right code is: > > FOR i = 199 TO 0 STEP -1 > ... > NEXT But if you prefer incremental loop, you could write: FOR i = 0 TO 199 A = Int(Rnd(i,200)) SWAP ... NEXT > >> FOR i = 0 TO 199 STEP 1 ' write items in listview2 >> listview1.MoveTo(myArray[i]) >> c = listview1.Item.Key >> listview2.add(c, listview1.item.text) >> NEXT >> >> >> >> FOR i = 0 TO 199 STEP 1 'optional step to write array as a string for file >> or whatever use >> b &= "slot" & myArray[i] & "," >> NEXT >> PRINT b >> END >> >> PUBLIC SUB Button1_Click() 'an optional way to load the array values from >> the variable b and / or a file if b was file loaded >> DIM egg AS String[] >> DIM c AS String >> listview1.Clear >> egg = Split(b, ",") >> FOR EACH c IN egg >> TRY listview1.Add(c, c) >> IF ERROR THEN RETURN >> NEXT >> IF listview1.Count >= 200 THEN RETURN >> END >> >> JB Skaggs >> > > Dominique Simonart > From gambas at ...1... Tue Apr 7 15:11:47 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Tue, 7 Apr 2009 15:11:47 +0200 Subject: [Gambas-user] Printer not found In-Reply-To: References: <22916441.post@...1379...> <49DAF26A.9020908@...1909...> Message-ID: <200904071511.47711.gambas@...1...> > I had same problem with Ubuntu 8.04 and I found that gambas searchs for > libcups.so and Ubuntu has libcups.so.2. So I made a simbolic link (sudo ln > -s libcups.so.2 libcups.so) to thas library and all goes fine. > Hope this helps. > > Don't rely on the Printer class to find your printer. Qt 3 is not very good at that... -- Beno?t From jbskaggs at ...1871... Tue Apr 7 16:48:06 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Tue, 7 Apr 2009 07:48:06 -0700 (PDT) Subject: [Gambas-user] A random sort of listview In-Reply-To: <49DB2E06.10204@...11...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> <49DB2E06.10204@...11...> Message-ID: <22930824.post@...1379...> When I ran the code it ran fine- why is it important to have it count backwards in the random swap? ie for i =199 to 0 step -1 instead of for i=0 to 199 step 1? JB SKaggs Simonart Dominique wrote: > > Hi, > > Hmm, did you run exactly this code? If so, there is > something wrong with the second FOR NEXT loop > > jbskaggs a ?crit : >> using your suggestions and the swap command vs manual swapping this is my >> code: >> >> public b as string 'optional string used to hold the array data for file >> or >> split later >> >> PUBLIC SUB button4_click() ' initialize array >> DIM myArray AS Integer[200] >> DIM a AS Integer >> DIM i AS Integer >> >> FOR i = 0 TO 199 STEP 1 'add array items >> myArray[i] = i >> NEXT >> >> FOR i = 0 TO 199 STEP 1 ' random swap array items >> a = Int(Rnd(i + 1)) >> SWAP myArray[i], myArray[a] >> NEXT >> > > the right code is: > > FOR i = 199 TO 0 STEP -1 > ... > NEXT > >> >> FOR i = 0 TO 199 STEP 1 ' write items in listview2 >> listview1.MoveTo(myArray[i]) >> c = listview1.Item.Key >> listview2.add(c, listview1.item.text) >> NEXT >> >> >> >> FOR i = 0 TO 199 STEP 1 'optional step to write array as a string for >> file >> or whatever use >> b &= "slot" & myArray[i] & "," >> NEXT >> PRINT b >> END >> >> PUBLIC SUB Button1_Click() 'an optional way to load the array values from >> the variable b and / or a file if b was file loaded >> DIM egg AS String[] >> DIM c AS String >> listview1.Clear >> egg = Split(b, ",") >> FOR EACH c IN egg >> TRY listview1.Add(c, c) >> IF ERROR THEN RETURN >> NEXT >> IF listview1.Count >= 200 THEN RETURN >> END >> >> JB Skaggs >> > > Dominique Simonart > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > 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/A-random-sort-of-listview-tp22919766p22930824.html Sent from the gambas-user mailing list archive at Nabble.com. From simonart.dominique at ...11... Tue Apr 7 17:20:09 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Tue, 07 Apr 2009 17:20:09 +0200 Subject: [Gambas-user] A random sort of listview In-Reply-To: <22930824.post@...1379...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> <49DB2E06.10204@...11...> <22930824.post@...1379...> Message-ID: <49DB6F29.7080500@...11...> Hi, jbskaggs a ?crit : > When I ran the code it ran fine- why is it important to have it count > backwards in the random swap? > > ie for i =199 to 0 step -1 instead of for i=0 to 199 step 1? > > JB SKaggs > Strange, because it should not :) run a test with 10 numbers 0-9 and fixe the seed with RANDOMIZE 12345 If you run the forward FOR NEXT you will get: 0 0 2 3 1 1 2 6 3 8 which is wrong! but if you run the backward FOR NEXT you will get: 5 1 9 6 0 3 8 7 2 4 which is right! May be you did not notice it because 200 is long enough before you get the same number twice, and before you remark that some are missing? Dominique Simonart > > Simonart Dominique wrote: >> Hi, >> >> Hmm, did you run exactly this code? If so, there is >> something wrong with the second FOR NEXT loop >> >> jbskaggs a ?crit : >>> using your suggestions and the swap command vs manual swapping this is my >>> code: >>> >>> public b as string 'optional string used to hold the array data for file >>> or >>> split later >>> >>> PUBLIC SUB button4_click() ' initialize array >>> DIM myArray AS Integer[200] >>> DIM a AS Integer >>> DIM i AS Integer >>> >>> FOR i = 0 TO 199 STEP 1 'add array items >>> myArray[i] = i >>> NEXT >>> >>> FOR i = 0 TO 199 STEP 1 ' random swap array items >>> a = Int(Rnd(i + 1)) >>> SWAP myArray[i], myArray[a] >>> NEXT >>> >> the right code is: >> >> FOR i = 199 TO 0 STEP -1 >> ... >> NEXT >> >>> FOR i = 0 TO 199 STEP 1 ' write items in listview2 >>> listview1.MoveTo(myArray[i]) >>> c = listview1.Item.Key >>> listview2.add(c, listview1.item.text) >>> NEXT >>> >>> >>> >>> FOR i = 0 TO 199 STEP 1 'optional step to write array as a string for >>> file >>> or whatever use >>> b &= "slot" & myArray[i] & "," >>> NEXT >>> PRINT b >>> END >>> >>> PUBLIC SUB Button1_Click() 'an optional way to load the array values from >>> the variable b and / or a file if b was file loaded >>> DIM egg AS String[] >>> DIM c AS String >>> listview1.Clear >>> egg = Split(b, ",") >>> FOR EACH c IN egg >>> TRY listview1.Add(c, c) >>> IF ERROR THEN RETURN >>> NEXT >>> IF listview1.Count >= 200 THEN RETURN >>> END >>> >>> JB Skaggs >>> >> Dominique Simonart >> Dominique Simonart From m0e.lnx at ...626... Tue Apr 7 19:34:14 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Tue, 7 Apr 2009 12:34:14 -0500 Subject: [Gambas-user] Proper use of containers Message-ID: <20090407123414.639f0355@...2125...> So I'm trying to put all my objects in containers for easy handling of window resizing, but I've ran into a problem. Here is the problem. Hpanel1 ( expand=true) |- Frame1 (expand=true) |- Hbox1 (expand=true) | - Textlabel1 (expand=true), |- Combobox1 (expand=true) the frame resizes just fine, which tells me the Hpanel is resizing fine. but the Hbox which is a child to Frame1 does not resize. I'm using gambas2-2.12.0 My app uses gb.gtk I've noticed that when you use more than 2 containers, there are resizing issues. Has anyone seen this? or can anyone suggest a better approach?. From jbskaggs at ...1871... Tue Apr 7 20:44:19 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Tue, 7 Apr 2009 11:44:19 -0700 (PDT) Subject: [Gambas-user] A random sort of listview In-Reply-To: <49DB6F29.7080500@...11...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> <49DB2E06.10204@...11...> <22930824.post@...1379...> <49DB6F29.7080500@...11...> Message-ID: <22935370.post@...1379...> Okay, But why does it do that? I don't see why the direction should matter what am I missing ? Becuase maybe this is something that has plagued me and caused me headaches for a while. JB Skaggs Simonart Dominique wrote: > > Hi, > > jbskaggs a ?crit : >> When I ran the code it ran fine- why is it important to have it count >> backwards in the random swap? >> >> ie for i =199 to 0 step -1 instead of for i=0 to 199 step 1? >> >> JB SKaggs >> > Strange, because it should not :) > run a test with 10 numbers 0-9 and fixe the seed with > RANDOMIZE 12345 > If you run the forward FOR NEXT you will get: > 0 0 2 3 1 1 2 6 3 8 > which is wrong! > but if you run the backward FOR NEXT you will get: > 5 1 9 6 0 3 8 7 2 4 > which is right! > > May be you did not notice it because 200 is long enough > before you get the same number twice, and before you remark > that some are missing? > > Dominique Simonart > >> >> Simonart Dominique wrote: >>> Hi, >>> >>> Hmm, did you run exactly this code? If so, there is >>> something wrong with the second FOR NEXT loop >>> >>> jbskaggs a ?crit : >>>> using your suggestions and the swap command vs manual swapping this is >>>> my >>>> code: >>>> >>>> public b as string 'optional string used to hold the array data for >>>> file >>>> or >>>> split later >>>> >>>> PUBLIC SUB button4_click() ' initialize array >>>> DIM myArray AS Integer[200] >>>> DIM a AS Integer >>>> DIM i AS Integer >>>> >>>> FOR i = 0 TO 199 STEP 1 'add array items >>>> myArray[i] = i >>>> NEXT >>>> >>>> FOR i = 0 TO 199 STEP 1 ' random swap array items >>>> a = Int(Rnd(i + 1)) >>>> SWAP myArray[i], myArray[a] >>>> NEXT >>>> >>> the right code is: >>> >>> FOR i = 199 TO 0 STEP -1 >>> ... >>> NEXT >>> >>>> FOR i = 0 TO 199 STEP 1 ' write items in listview2 >>>> listview1.MoveTo(myArray[i]) >>>> c = listview1.Item.Key >>>> listview2.add(c, listview1.item.text) >>>> NEXT >>>> >>>> >>>> >>>> FOR i = 0 TO 199 STEP 1 'optional step to write array as a string for >>>> file >>>> or whatever use >>>> b &= "slot" & myArray[i] & "," >>>> NEXT >>>> PRINT b >>>> END >>>> >>>> PUBLIC SUB Button1_Click() 'an optional way to load the array values >>>> from >>>> the variable b and / or a file if b was file loaded >>>> DIM egg AS String[] >>>> DIM c AS String >>>> listview1.Clear >>>> egg = Split(b, ",") >>>> FOR EACH c IN egg >>>> TRY listview1.Add(c, c) >>>> IF ERROR THEN RETURN >>>> NEXT >>>> IF listview1.Count >= 200 THEN RETURN >>>> END >>>> >>>> JB Skaggs >>>> >>> Dominique Simonart >>> > Dominique Simonart > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > 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/A-random-sort-of-listview-tp22919766p22935370.html Sent from the gambas-user mailing list archive at Nabble.com. From simonart.dominique at ...11... Tue Apr 7 23:12:56 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Tue, 07 Apr 2009 23:12:56 +0200 Subject: [Gambas-user] A random sort of listview In-Reply-To: <22935370.post@...1379...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> <49DB2E06.10204@...11...> <22930824.post@...1379...> <49DB6F29.7080500@...11...> <22935370.post@...1379...> Message-ID: <49DBC1D8.40106@...11...> Hi, jbskaggs a ?crit : > Okay, > > But why does it do that? I don't see why the direction should matter what > am I missing ? Becuase maybe this is something that has plagued me and > caused me headaches for a while. > > JB Skaggs > You're right! Thanks! My mistake is that I listed the myArray values inside the SAME for next loop that the swap! But of course, the values could change at each next step However, there is differences. Let see a step by step sample CASE 1: Forward FOR NEXT loop * i=0 -> Int(Rnd(i+1)) = 0! you could affect only myArray[0] to myArray[0] * i=1 -> Int(Rnd(i+1)) = 0-1 you could affect myArray[0] once more * i=2 -> Inn(Rnd(i+1)) = 0-2 idem * i=3 ... at each step, ALWAYS you could affect an already selected value CASE 2: Backward FOR NEXT loop * i=199 -> Int(Rnd(i+1)) = 0-199 myArray[199] could be any value * i=198 -> Int(Rnd(i+1)) = 0-198 myArray[198] could be any of the non selected values myArray[199] will never be affected anymore * i=197 ... at each step, NEVER you could affect an already selected value I found the second case more satisfying for my mind! :) Hope this send your headache away! :) Dominique Simonart > > > > Simonart Dominique wrote: >> Hi, >> >> jbskaggs a ?crit : >>> When I ran the code it ran fine- why is it important to have it count >>> backwards in the random swap? >>> >>> ie for i =199 to 0 step -1 instead of for i=0 to 199 step 1? >>> >>> JB SKaggs >>> >> Strange, because it should not :) >> run a test with 10 numbers 0-9 and fixe the seed with >> RANDOMIZE 12345 >> If you run the forward FOR NEXT you will get: >> 0 0 2 3 1 1 2 6 3 8 >> which is wrong! >> but if you run the backward FOR NEXT you will get: >> 5 1 9 6 0 3 8 7 2 4 >> which is right! >> >> May be you did not notice it because 200 is long enough >> before you get the same number twice, and before you remark >> that some are missing? >> >> Dominique Simonart >> >>> Simonart Dominique wrote: >>>> Hi, >>>> >>>> Hmm, did you run exactly this code? If so, there is >>>> something wrong with the second FOR NEXT loop >>>> >>>> jbskaggs a ?crit : >>>>> using your suggestions and the swap command vs manual swapping this is >>>>> my >>>>> code: >>>>> >>>>> public b as string 'optional string used to hold the array data for >>>>> file >>>>> or >>>>> split later >>>>> >>>>> PUBLIC SUB button4_click() ' initialize array >>>>> DIM myArray AS Integer[200] >>>>> DIM a AS Integer >>>>> DIM i AS Integer >>>>> >>>>> FOR i = 0 TO 199 STEP 1 'add array items >>>>> myArray[i] = i >>>>> NEXT >>>>> >>>>> FOR i = 0 TO 199 STEP 1 ' random swap array items >>>>> a = Int(Rnd(i + 1)) >>>>> SWAP myArray[i], myArray[a] >>>>> NEXT >>>>> >>>> the right code is: >>>> >>>> FOR i = 199 TO 0 STEP -1 >>>> ... >>>> NEXT >>>> >>>>> FOR i = 0 TO 199 STEP 1 ' write items in listview2 >>>>> listview1.MoveTo(myArray[i]) >>>>> c = listview1.Item.Key >>>>> listview2.add(c, listview1.item.text) >>>>> NEXT >>>>> >>>>> >>>>> >>>>> FOR i = 0 TO 199 STEP 1 'optional step to write array as a string for >>>>> file >>>>> or whatever use >>>>> b &= "slot" & myArray[i] & "," >>>>> NEXT >>>>> PRINT b >>>>> END >>>>> >>>>> PUBLIC SUB Button1_Click() 'an optional way to load the array values >>>>> from >>>>> the variable b and / or a file if b was file loaded >>>>> DIM egg AS String[] >>>>> DIM c AS String >>>>> listview1.Clear >>>>> egg = Split(b, ",") >>>>> FOR EACH c IN egg >>>>> TRY listview1.Add(c, c) >>>>> IF ERROR THEN RETURN >>>>> NEXT >>>>> IF listview1.Count >= 200 THEN RETURN >>>>> END >>>>> >>>>> JB Skaggs >>>>> >>>> Dominique Simonart >>>> >> Dominique Simonart >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by: >> High Quality Requirements in a Collaborative Environment. >> Download a free trial of Rational Requirements Composer Now! >> http://p.sf.net/sfu/www-ibm-com >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> > From rterry at ...1946... Tue Apr 7 23:36:07 2009 From: rterry at ...1946... (richard terry) Date: Wed, 8 Apr 2009 07:36:07 +1000 Subject: [Gambas-user] Proper use of containers In-Reply-To: <20090407123414.639f0355@...2125...> References: <20090407123414.639f0355@...2125...> Message-ID: <200904080736.07480.rterry@...1946...> On Wed, 8 Apr 2009 03:34:14 am M0E Lnx wrote: > So I'm trying to put all my objects in containers for easy handling of > window resizing, but I've ran into a problem. > > Here is the problem. > > Hpanel1 ( expand=true) > > |- Frame1 (expand=true) > | > |- Hbox1 (expand=true) > | > | - Textlabel1 (expand=true), |- Combobox1 (expand=true) > > the frame resizes just fine, which tells me the Hpanel is resizing fine. > but the Hbox which is a child to Frame1 does not resize. > I'm using gambas2-2.12.0 > My app uses gb.gtk > > I've noticed that when you use more than 2 containers, there are > resizing issues. > > Has anyone seen this? or can anyone suggest a better > approach?. As always, send a mini program. I've encountered very few probalem with containers and the nest and and nest and nest and nest and nest!!!!. Please send some code so others can try it out. ie zip your project or a sample from the menu and attatch the file. Richard > > --------------------------------------------------------------------------- >--- This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From agr1971gal at ...397... Tue Apr 7 23:50:35 2009 From: agr1971gal at ...397... (agrgal) Date: Tue, 7 Apr 2009 14:50:35 -0700 (PDT) Subject: [Gambas-user] MySQL problem Message-ID: <22939033.post@...1379...> First of all, excuse my poor English. I'm still studying it. :-) I've experienced a problem within an application. It works well under Gambas Environment but when I pack a debian package in order to install it later, I get a mistake. It seems not to have suitable permissions when it connects to MySQL server. All parameters are OK since it runs under Gambas, that's not the point. Thank you for your answer in advance. -- View this message in context: http://www.nabble.com/MySQL-problem-tp22939033p22939033.html Sent from the gambas-user mailing list archive at Nabble.com. From shordi at ...626... Wed Apr 8 10:31:36 2009 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Wed, 8 Apr 2009 10:31:36 +0200 Subject: [Gambas-user] MySQL problem In-Reply-To: <22939033.post@...1379...> References: <22939033.post@...1379...> Message-ID: I've found same problem. The myapplication_all.deb does not include de gambas2-gb-db-mysql package. I don't know why. You should install it by hand after install you application. Perhaps sombody can explain this... 2009/4/7 agrgal > > First of all, excuse my poor English. I'm still studying it. :-) > I've experienced a problem within an application. It works well under > Gambas > Environment but when I pack a debian package in order to install it later, > I > get a mistake. It seems not to have suitable permissions when it connects > to > MySQL server. All parameters are OK since it runs under Gambas, that's not > the point. > Thank you for your answer in advance. > -- > View this message in context: > http://www.nabble.com/MySQL-problem-tp22939033p22939033.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From agr1971gal at ...397... Wed Apr 8 13:04:58 2009 From: agr1971gal at ...397... (agrgal) Date: Wed, 8 Apr 2009 04:04:58 -0700 (PDT) Subject: [Gambas-user] MySQL problem In-Reply-To: References: <22939033.post@...1379...> Message-ID: <22948027.post@...1379...> So does it mean that I have to install the package gambas2-gb-db-mysql plus gambas2 itself and any application will run later in another computer where installed without gambas2? Or does it mean that I must install my application got along with the package gambas2-gb-db-mysql in each installation? Thank you. shordi wrote: > > I've found same problem. The myapplication_all.deb does not include de > gambas2-gb-db-mysql package. I don't know why. > You should install it by hand after install you application. > Perhaps sombody can explain this... > > > 2009/4/7 agrgal > >> >> First of all, excuse my poor English. I'm still studying it. :-) >> I've experienced a problem within an application. It works well under >> Gambas >> Environment but when I pack a debian package in order to install it >> later, >> I >> get a mistake. It seems not to have suitable permissions when it connects >> to >> MySQL server. All parameters are OK since it runs under Gambas, that's >> not >> the point. >> Thank you for your answer in advance. >> -- >> View this message in context: >> http://www.nabble.com/MySQL-problem-tp22939033p22939033.html >> Sent from the gambas-user mailing list archive at Nabble.com. >> >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by: >> High Quality Requirements in a Collaborative Environment. >> Download a free trial of Rational Requirements Composer Now! >> http://p.sf.net/sfu/www-ibm-com >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > 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/MySQL-problem-tp22939033p22948027.html Sent from the gambas-user mailing list archive at Nabble.com. From m0e.lnx at ...626... Wed Apr 8 15:22:48 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Wed, 8 Apr 2009 08:22:48 -0500 Subject: [Gambas-user] Proper use of containers In-Reply-To: <200904080736.07480.rterry@...1946...> References: <20090407123414.639f0355@...2125...> <200904080736.07480.rterry@...1946...> Message-ID: <20090408082248.7d925a91@...2125...> See attached project. I think the problem is in the frame object. It doesn't resize it's child objects. Since the hbox inside the frame does not get resized, the hbox cannot resize it's children objects. From m0e.lnx at ...626... Wed Apr 8 15:23:28 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Wed, 8 Apr 2009 08:23:28 -0500 Subject: [Gambas-user] Proper use of containers In-Reply-To: <200904080736.07480.rterry@...1946...> References: <20090407123414.639f0355@...2125...> <200904080736.07480.rterry@...1946...> Message-ID: <20090408082328.097abbfc@...2125...> Whooops... forgot to actually attach the project.... Here it is now -------------- next part -------------- A non-text attachment was scrubbed... Name: nester-0.0.1.tar.gz Type: application/x-gzip Size: 7809 bytes Desc: not available URL: From gambas at ...1... Wed Apr 8 15:35:18 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Wed, 8 Apr 2009 15:35:18 +0200 Subject: [Gambas-user] Proper use of containers In-Reply-To: <20090408082248.7d925a91@...2125...> References: <20090407123414.639f0355@...2125...> <200904080736.07480.rterry@...1946...> <20090408082248.7d925a91@...2125...> Message-ID: <200904081535.19076.gambas@...1...> > See attached project. > > I think the problem is in the frame object. It doesn't resize it's > child objects. > Since the hbox inside the frame does not get resized, the hbox cannot > resize it's children objects. > The Frame control is the only container that does not arrange its contents at all. Maybe it was not a good idea... -- Beno?t From jussi.lahtinen at ...626... Wed Apr 8 16:42:43 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 8 Apr 2009 17:42:43 +0300 Subject: [Gambas-user] A random sort of listview In-Reply-To: <49DBC1D8.40106@...11...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> <49DB2E06.10204@...11...> <22930824.post@...1379...> <49DB6F29.7080500@...11...> <22935370.post@...1379...> <49DBC1D8.40106@...11...> Message-ID: <384d3900904080742q60ce713ud732d1605756918c@...627...> Hi! I can't reproduce your problem. Randomize with seed 12345, I got; >From 0 to 9: 4 0 7 9 5 1 2 6 3 8 >From 9 to 0: 4 2 7 8 3 0 6 9 1 5 Both correct. So maybe there is a bug in SWAP command with Gambas version... what are you using? With Gambas 2.10 it is working. Jussi P.S. Code I used to test: DIM ii AS Integer DIM jj AS Integer DIM a AS Integer DIM myArray AS Integer[200] DIM checkArray AS NEW Integer[] RANDOMIZE 12345 FOR ii = 0 TO 9 '199 myArray[ii] = ii NEXT FOR ii = 0 TO 9 '199 ' random swap array items a = Int(Rnd(ii + 1)) SWAP myArray[ii], myArray[a] NEXT FOR ii = 0 TO 9 '199 ' Check against duplicates. PRINT myArray[ii] FOR jj = 0 TO 9 '199 IF myArray[ii] = jj THEN IF checkArray.Exist(jj) = FALSE THEN checkArray.Add(jj) ELSE Message.Error("Error!") RETURN ENDIF ENDIF NEXT NEXT PRINT checkArray.Count On Wed, Apr 8, 2009 at 00:12, Simonart Dominique wrote: > Hi, > > jbskaggs a ?crit : >> Okay, >> >> But why does it do that? ?I don't see why the direction should matter what >> am I missing ? ?Becuase maybe this is something that has plagued me and >> caused me headaches for a while. >> >> JB Skaggs >> > > You're right! Thanks! > My mistake is that I listed the myArray values inside the > SAME for next loop that the swap! But of course, the values > could change at each next step > > However, there is differences. Let see a step by step sample > > CASE 1: Forward FOR NEXT loop > > * i=0 -> Int(Rnd(i+1)) = 0! > you could affect only myArray[0] to myArray[0] > * i=1 -> Int(Rnd(i+1)) = 0-1 > you could affect myArray[0] once more > * i=2 -> Inn(Rnd(i+1)) = 0-2 > idem > * i=3 ... > at each step, ALWAYS you could affect an already selected value > > CASE 2: Backward FOR NEXT loop > > * i=199 -> Int(Rnd(i+1)) = 0-199 > myArray[199] could be any value > * i=198 -> Int(Rnd(i+1)) = 0-198 > myArray[198] could be any of the non selected values > myArray[199] will never be affected anymore > * i=197 ... > at each step, NEVER you could affect an already selected value > > I found the second case more satisfying for my mind! :) > > Hope this send your headache away! :) > Dominique Simonart >> >> >> >> Simonart Dominique wrote: >>> Hi, >>> >>> jbskaggs a ?crit : >>>> When I ran the code it ran fine- why is it important to have it ?count >>>> backwards in the random swap? >>>> >>>> ie for i =199 to 0 step -1 instead of for i=0 to 199 step 1? >>>> >>>> JB SKaggs >>>> >>> Strange, because it should not ?:) >>> run a test with 10 numbers 0-9 and fixe the seed with >>> RANDOMIZE 12345 >>> If you run the forward FOR NEXT you will get: >>> 0 0 2 3 1 1 2 6 3 8 >>> which is wrong! >>> but if you run the backward FOR NEXT you will get: >>> 5 1 9 6 0 3 8 7 2 4 >>> which is right! >>> >>> May be you did not notice it because 200 is long enough >>> before you get the same number twice, and before you remark >>> that some are missing? >>> >>> Dominique Simonart >>> >>>> Simonart Dominique wrote: >>>>> Hi, >>>>> >>>>> Hmm, did you run exactly this code? If so, there is >>>>> something wrong with the second FOR NEXT loop >>>>> >>>>> jbskaggs a ?crit : >>>>>> using your suggestions and the swap command vs manual swapping this is >>>>>> my >>>>>> code: >>>>>> >>>>>> public b as string ?'optional string used to hold the array data for >>>>>> file >>>>>> or >>>>>> split later >>>>>> >>>>>> PUBLIC SUB button4_click() ' initialize array >>>>>> DIM myArray AS Integer[200] >>>>>> DIM a AS Integer >>>>>> DIM i AS Integer >>>>>> >>>>>> FOR i = 0 TO 199 STEP 1 'add array items >>>>>> ?myArray[i] = i >>>>>> NEXT >>>>>> >>>>>> FOR i = 0 TO 199 STEP 1 ' random swap array items >>>>>> a = Int(Rnd(i + 1)) >>>>>> SWAP myArray[i], myArray[a] >>>>>> NEXT >>>>>> >>>>> the right code is: >>>>> >>>>> FOR i = 199 TO 0 STEP -1 >>>>> ? ? ... >>>>> NEXT >>>>> >>>>>> FOR i = 0 TO 199 STEP 1 ' write items in listview2 >>>>>> listview1.MoveTo(myArray[i]) >>>>>> c = listview1.Item.Key >>>>>> listview2.add(c, listview1.item.text) >>>>>> NEXT >>>>>> >>>>>> >>>>>> >>>>>> FOR i = 0 TO 199 STEP 1 'optional step to write array as a string for >>>>>> file >>>>>> or whatever use >>>>>> b &= "slot" & myArray[i] & "," >>>>>> NEXT >>>>>> PRINT b >>>>>> END >>>>>> >>>>>> PUBLIC SUB Button1_Click() 'an optional way to load the array values >>>>>> from >>>>>> the variable b and / or a file if b was file loaded >>>>>> DIM egg AS String[] >>>>>> DIM c AS String >>>>>> ?listview1.Clear >>>>>> ?egg = Split(b, ",") >>>>>> ?FOR EACH c IN egg >>>>>> TRY listview1.Add(c, c) >>>>>> IF ERROR THEN RETURN >>>>>> NEXT >>>>>> IF listview1.Count >= 200 THEN RETURN >>>>>> END >>>>>> >>>>>> JB Skaggs >>>>>> >>>>> Dominique Simonart >>>>> >>> Dominique Simonart >>> >>> >>> ------------------------------------------------------------------------------ >>> This SF.net email is sponsored by: >>> High Quality Requirements in a Collaborative Environment. >>> Download a free trial of Rational Requirements Composer Now! >>> http://p.sf.net/sfu/www-ibm-com >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >>> >> > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From m0e.lnx at ...626... Wed Apr 8 17:34:56 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Wed, 8 Apr 2009 10:34:56 -0500 Subject: [Gambas-user] Proper use of containers In-Reply-To: <200904081535.19076.gambas@...1...> References: <20090407123414.639f0355@...2125...> <200904080736.07480.rterry@...1946...> <20090408082248.7d925a91@...2125...> <200904081535.19076.gambas@...1...> Message-ID: <20090408103456.3ec4672c@...2125...> That's what I've noticed. I really need it to arrange, and the only way I can manage that right now is to add other containers inside the frame control and resize these containers manually using the form_resize() event. But this really shouldn't be necessary. Will this be fixed? From simonart.dominique at ...11... Wed Apr 8 17:38:32 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Wed, 08 Apr 2009 17:38:32 +0200 Subject: [Gambas-user] A random sort of listview In-Reply-To: <384d3900904080742q60ce713ud732d1605756918c@...627...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> <49DB2E06.10204@...11...> <22930824.post@...1379...> <49DB6F29.7080500@...11...> <22935370.post@...1379...> <49DBC1D8.40106@...11...> <384d3900904080742q60ce713ud732d1605756918c@...627...> Message-ID: <49DCC4F8.50603@...11...> Hi Jussi, NO, there is no bug, it's my mistake!! I listed the myArray values just after the SWAP instruction. But, as you can see it in a preceeding answer to jbskaggs, this is a bad idea because in the "forward FOR NEXT loop" case, these values could change any time. You don't make this error :) so you got the good result! Since these values cannot change after they were selected in the "Backward FOR NEXT loop" case, my mistake had no consequence. We could consider this as a more efficient method since the correct result is available sooner! Dominique Simonart Jussi Lahtinen a ?crit : > Hi! > > I can't reproduce your problem. > Randomize with seed 12345, I got; >>From 0 to 9: 4 0 7 9 5 1 2 6 3 8 >>From 9 to 0: 4 2 7 8 3 0 6 9 1 5 > Both correct. > > So maybe there is a bug in SWAP command with Gambas version... what > are you using? > With Gambas 2.10 it is working. > > > Jussi > > > P.S. Code I used to test: > > DIM ii AS Integer > DIM jj AS Integer > DIM a AS Integer > DIM myArray AS Integer[200] > DIM checkArray AS NEW Integer[] > > RANDOMIZE 12345 > > FOR ii = 0 TO 9 '199 > myArray[ii] = ii > NEXT > > FOR ii = 0 TO 9 '199 ' random swap array items > a = Int(Rnd(ii + 1)) > SWAP myArray[ii], myArray[a] > NEXT > > > FOR ii = 0 TO 9 '199 ' Check against duplicates. > PRINT myArray[ii] > FOR jj = 0 TO 9 '199 > IF myArray[ii] = jj THEN > IF checkArray.Exist(jj) = FALSE THEN > checkArray.Add(jj) > ELSE > Message.Error("Error!") > RETURN > ENDIF > ENDIF > NEXT > NEXT > > > PRINT checkArray.Count > > > > On Wed, Apr 8, 2009 at 00:12, Simonart Dominique > wrote: >> Hi, >> >> jbskaggs a ?crit : >>> Okay, >>> >>> But why does it do that? I don't see why the direction should matter what >>> am I missing ? Becuase maybe this is something that has plagued me and >>> caused me headaches for a while. >>> >>> JB Skaggs >>> >> You're right! Thanks! >> My mistake is that I listed the myArray values inside the >> SAME for next loop that the swap! But of course, the values >> could change at each next step >> >> However, there is differences. Let see a step by step sample >> >> CASE 1: Forward FOR NEXT loop >> >> * i=0 -> Int(Rnd(i+1)) = 0! >> you could affect only myArray[0] to myArray[0] >> * i=1 -> Int(Rnd(i+1)) = 0-1 >> you could affect myArray[0] once more >> * i=2 -> Inn(Rnd(i+1)) = 0-2 >> idem >> * i=3 ... >> at each step, ALWAYS you could affect an already selected value >> >> CASE 2: Backward FOR NEXT loop >> >> * i=199 -> Int(Rnd(i+1)) = 0-199 >> myArray[199] could be any value >> * i=198 -> Int(Rnd(i+1)) = 0-198 >> myArray[198] could be any of the non selected values >> myArray[199] will never be affected anymore >> * i=197 ... >> at each step, NEVER you could affect an already selected value >> >> I found the second case more satisfying for my mind! :) >> >> Hope this send your headache away! :) >> Dominique Simonart >>> >>> >>> Simonart Dominique wrote: >>>> Hi, >>>> >>>> jbskaggs a ?crit : >>>>> When I ran the code it ran fine- why is it important to have it count >>>>> backwards in the random swap? >>>>> >>>>> ie for i =199 to 0 step -1 instead of for i=0 to 199 step 1? >>>>> >>>>> JB SKaggs >>>>> >>>> Strange, because it should not :) >>>> run a test with 10 numbers 0-9 and fixe the seed with >>>> RANDOMIZE 12345 >>>> If you run the forward FOR NEXT you will get: >>>> 0 0 2 3 1 1 2 6 3 8 >>>> which is wrong! >>>> but if you run the backward FOR NEXT you will get: >>>> 5 1 9 6 0 3 8 7 2 4 >>>> which is right! >>>> >>>> May be you did not notice it because 200 is long enough >>>> before you get the same number twice, and before you remark >>>> that some are missing? >>>> >>>> Dominique Simonart >>>> >>>>> Simonart Dominique wrote: >>>>>> Hi, >>>>>> >>>>>> Hmm, did you run exactly this code? If so, there is >>>>>> something wrong with the second FOR NEXT loop >>>>>> >>>>>> jbskaggs a ?crit : >>>>>>> using your suggestions and the swap command vs manual swapping this is >>>>>>> my >>>>>>> code: >>>>>>> >>>>>>> public b as string 'optional string used to hold the array data for >>>>>>> file >>>>>>> or >>>>>>> split later >>>>>>> >>>>>>> PUBLIC SUB button4_click() ' initialize array >>>>>>> DIM myArray AS Integer[200] >>>>>>> DIM a AS Integer >>>>>>> DIM i AS Integer >>>>>>> >>>>>>> FOR i = 0 TO 199 STEP 1 'add array items >>>>>>> myArray[i] = i >>>>>>> NEXT >>>>>>> >>>>>>> FOR i = 0 TO 199 STEP 1 ' random swap array items >>>>>>> a = Int(Rnd(i + 1)) >>>>>>> SWAP myArray[i], myArray[a] >>>>>>> NEXT >>>>>>> >>>>>> the right code is: >>>>>> >>>>>> FOR i = 199 TO 0 STEP -1 >>>>>> ... >>>>>> NEXT >>>>>> >>>>>>> FOR i = 0 TO 199 STEP 1 ' write items in listview2 >>>>>>> listview1.MoveTo(myArray[i]) >>>>>>> c = listview1.Item.Key >>>>>>> listview2.add(c, listview1.item.text) >>>>>>> NEXT >>>>>>> >>>>>>> >>>>>>> >>>>>>> FOR i = 0 TO 199 STEP 1 'optional step to write array as a string for >>>>>>> file >>>>>>> or whatever use >>>>>>> b &= "slot" & myArray[i] & "," >>>>>>> NEXT >>>>>>> PRINT b >>>>>>> END >>>>>>> >>>>>>> PUBLIC SUB Button1_Click() 'an optional way to load the array values >>>>>>> from >>>>>>> the variable b and / or a file if b was file loaded >>>>>>> DIM egg AS String[] >>>>>>> DIM c AS String >>>>>>> listview1.Clear >>>>>>> egg = Split(b, ",") >>>>>>> FOR EACH c IN egg >>>>>>> TRY listview1.Add(c, c) >>>>>>> IF ERROR THEN RETURN >>>>>>> NEXT >>>>>>> IF listview1.Count >= 200 THEN RETURN >>>>>>> END >>>>>>> >>>>>>> JB Skaggs >>>>>>> >>>>>> Dominique Simonart >>>>>> >>>> Dominique Simonart From juergen.linder at ...17... Wed Apr 8 17:49:49 2009 From: juergen.linder at ...17... (juelin) Date: Wed, 8 Apr 2009 08:49:49 -0700 (PDT) Subject: [Gambas-user] working with many formulares Message-ID: <22953596.post@...1379...> hi, I'm new at Gambas. I'm writting an application with many windows (formulares). I create two formulares at my application. the first formular work's. 1. When I push a button in formular1 I want change to formular 2. What must I do? 2. when the work is done in formular2 I want go back to formular1 and close formular2 What must I do? Can anybody help me? with examples please kind regards J?rgen -- View this message in context: http://www.nabble.com/working-with-many-formulares-tp22953596p22953596.html Sent from the gambas-user mailing list archive at Nabble.com. From juergen.linder at ...17... Wed Apr 8 17:56:18 2009 From: juergen.linder at ...17... (juelin) Date: Wed, 8 Apr 2009 08:56:18 -0700 (PDT) Subject: [Gambas-user] shared librarry into gambas Message-ID: <22953732.post@...1379...> hi, I'm new at Gambas. I'm writting an application for Laser. So I need to use the function from a shared librarry into gambas (libFTD2XX.so at /usr/lib). I'm using SuSE Open Linux 11.1 kernel 2.6 How can I fix the problem. Can anybody help with example please. Thank you and kind regards J?rgen -- View this message in context: http://www.nabble.com/shared-librarry-into-gambas-tp22953732p22953732.html Sent from the gambas-user mailing list archive at Nabble.com. From shordi at ...626... Wed Apr 8 19:08:01 2009 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Wed, 8 Apr 2009 19:08:01 +0200 Subject: [Gambas-user] MySQL problem In-Reply-To: <22948027.post@...1379...> References: <22939033.post@...1379...> <22948027.post@...1379...> Message-ID: It means that you must provide your clients with you _all.deb package and gambas2_gb_db_mysql.deb package (or tell him how to install it from ubuntu repositories). 2009/4/8 agrgal > > So does it mean that I have to install the package gambas2-gb-db-mysql plus > gambas2 itself and any application will run later in another computer where > installed without gambas2? Or does it mean that I must install my > application got along with the package gambas2-gb-db-mysql in each > installation? > Thank you. > > > shordi wrote: > > > > I've found same problem. The myapplication_all.deb does not include de > > gambas2-gb-db-mysql package. I don't know why. > > You should install it by hand after install you application. > > Perhaps sombody can explain this... > > > > > > 2009/4/7 agrgal > > > >> > >> First of all, excuse my poor English. I'm still studying it. :-) > >> I've experienced a problem within an application. It works well under > >> Gambas > >> Environment but when I pack a debian package in order to install it > >> later, > >> I > >> get a mistake. It seems not to have suitable permissions when it > connects > >> to > >> MySQL server. All parameters are OK since it runs under Gambas, that's > >> not > >> the point. > >> Thank you for your answer in advance. > >> -- > >> View this message in context: > >> http://www.nabble.com/MySQL-problem-tp22939033p22939033.html > >> Sent from the gambas-user mailing list archive at Nabble.com. > >> > >> > >> > >> > ------------------------------------------------------------------------------ > >> This SF.net email is sponsored by: > >> High Quality Requirements in a Collaborative Environment. > >> Download a free trial of Rational Requirements Composer Now! > >> http://p.sf.net/sfu/www-ibm-com > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > > > ------------------------------------------------------------------------------ > > This SF.net email is sponsored by: > > High Quality Requirements in a Collaborative Environment. > > Download a free trial of Rational Requirements Composer Now! > > http://p.sf.net/sfu/www-ibm-com > > _______________________________________________ > > 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/MySQL-problem-tp22939033p22948027.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From shordi at ...626... Wed Apr 8 19:12:46 2009 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Wed, 8 Apr 2009 19:12:46 +0200 Subject: [Gambas-user] working with many formulares In-Reply-To: <22953596.post@...1379...> References: <22953596.post@...1379...> Message-ID: In the click event of button in form 1: PUBLIC SUB button1_Click() DIM frForm2 AS NEW formu2 frForm2.ShowModal END 2009/4/8 juelin > > hi, > I'm new at Gambas. > I'm writting an application with many windows (formulares). > I create two formulares at my application. > the first formular work's. > 1. When I push a button in formular1 I want change to formular 2. > What must I do? > 2. when the work is done in formular2 I want go back to formular1 and close > formular2 > What must I do? > Can anybody help me? > with examples please > > kind regards > J?rgen > > -- > View this message in context: > http://www.nabble.com/working-with-many-formulares-tp22953596p22953596.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Wed Apr 8 19:22:19 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 8 Apr 2009 20:22:19 +0300 Subject: [Gambas-user] shared librarry into gambas In-Reply-To: <22953732.post@...1379...> References: <22953732.post@...1379...> Message-ID: <384d3900904081022i1903e4d5wcba50e4efbcc5c19@...627...> Hi! Here is my old test project attached: http://www.mail-archive.com/gambas-user at lists.sourceforge.net/msg02551.html Here you can find documentation about External Function Declaration: http://gambasdoc.org/help/lang/extdecl?v3 Hope that helps! Jussi On Wed, Apr 8, 2009 at 18:56, juelin wrote: > > hi, > I'm new at Gambas. > I'm writting an application for Laser. > So I need to use the function from a shared librarry into gambas > (libFTD2XX.so at /usr/lib). > I'm using SuSE Open Linux 11.1 kernel 2.6 > How can I fix the problem. > Can anybody help with example please. > Thank you and kind regards > J?rgen > > -- > View this message in context: http://www.nabble.com/shared-librarry-into-gambas-tp22953732p22953732.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From m0e.lnx at ...626... Wed Apr 8 22:48:03 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Wed, 8 Apr 2009 15:48:03 -0500 Subject: [Gambas-user] shared librarry into gambas In-Reply-To: <384d3900904081022i1903e4d5wcba50e4efbcc5c19@...627...> References: <22953732.post@...1379...> <384d3900904081022i1903e4d5wcba50e4efbcc5c19@...627...> Message-ID: <20090408154803.03a76a6f@...2125...> I always wandered myself how this works. For instance... in python, you can code something like import gtk import glade import pygtk And use the methods in these modules throughout your app. could this be done in gambas somehow? I have had instances in gambas where I could really use a shared library but i'm unable to import it... the Extern method is beyond my scope of skills ATM, and the documentation is sort of hard for me to understand. From agr1971gal at ...397... Wed Apr 8 23:16:14 2009 From: agr1971gal at ...397... (agrgal) Date: Wed, 8 Apr 2009 14:16:14 -0700 (PDT) Subject: [Gambas-user] MySQL problem In-Reply-To: <22939033.post@...1379...> References: <22939033.post@...1379...> Message-ID: <22959735.post@...1379...> I self-reply my comment: I didn't actually have a bug with MySQL. It turned out to be a wrong access to a non-allowed directory because in the same routine I kept the conection data into a binary file. Anyway, I have another question to get answered, but I think I must open new threads. Thank you. agrgal wrote: > > First of all, excuse my poor English. I'm still studying it. :-) > I've experienced a problem within an application. It works well under > Gambas Environment but when I pack a debian package in order to install it > later, I get a mistake. It seems not to have suitable permissions when it > connects to MySQL server. All parameters are OK since it runs under > Gambas, that's not the point. > Thank you for your answer in advance. > -- View this message in context: http://www.nabble.com/MySQL-problem-tp22939033p22959735.html Sent from the gambas-user mailing list archive at Nabble.com. From agr1971gal at ...397... Wed Apr 8 23:19:02 2009 From: agr1971gal at ...397... (agrgal) Date: Wed, 8 Apr 2009 14:19:02 -0700 (PDT) Subject: [Gambas-user] Access to an specific directory. Message-ID: <22959798.post@...1379...> Any quick way to get the user directory programatically? -- View this message in context: http://www.nabble.com/Access-to-an-specific-directory.-tp22959798p22959798.html Sent from the gambas-user mailing list archive at Nabble.com. From richard.j.walker at ...247... Wed Apr 8 23:25:49 2009 From: richard.j.walker at ...247... (Richard) Date: Wed, 8 Apr 2009 22:25:49 +0100 Subject: [Gambas-user] Access to an specific directory. In-Reply-To: <22959798.post@...1379...> References: <22959798.post@...1379...> Message-ID: <200904082225.49481.richard.j.walker@...247...> On Wednesday 08 April 2009 22:19:02 agrgal wrote: > Any quick way to get the user directory programatically? Try User.Home. That should get it for you as in: Dim my_dir AS String my_dir = User.Home From doriano.blengino at ...1909... Thu Apr 9 08:26:11 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Thu, 09 Apr 2009 08:26:11 +0200 Subject: [Gambas-user] shared librarry into gambas In-Reply-To: <20090408154803.03a76a6f@...2125...> References: <22953732.post@...1379...> <384d3900904081022i1903e4d5wcba50e4efbcc5c19@...627...> <20090408154803.03a76a6f@...2125...> Message-ID: <49DD9503.6060809@...1909...> M0E Lnx ha scritto: > I always wandered myself how this works. > > For instance... in python, you can code something like > > import gtk > import glade > import pygtk > Doing so, you are not using 'external libraries' (shared objects) - you are merely using a python library located somewhere in /usr/lib/pythonXXX which, in turn, loads a .so object tailored specifically for python. > And use the methods in these modules throughout your app. > could this be done in gambas somehow? > In this respect gambas is well more powerful than python: gambas permits to load *any* (or almost any) external shared object using pure gambas. Python can not do this, if I am not wrong: it can interface only to .so objects written especially for that purpose. > I have had instances in gambas where I could really use a shared > library but i'm unable to import it... the Extern method is beyond my > scope of skills ATM, and the documentation is sort of hard for me to > understand. > Strangely enough, this was the least problematic thing in my approach to gambas. The documentation is straight, even if some more examples could help. Simply locate the library you need, read its man page, and put the corresponding declaration somewhere in your source. For example, I needed the ldap library. I wrote this: LIBRARY "libldap:2" ' to initialize the ldap client library PRIVATE EXTERN ldap_init(host AS String, port AS Integer) AS Pointer ...other necessary declarations ... The declaration was taken from ldap man page, and only changed "char *" to "string". I had some problem with pointers, which are slightly "hidden" in gambas, but finally I succeded. At the end, and in a unexpected easy way, I had a list of records, each with variable attribute list, each with several values in it (a list of lists of lists). Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From joshiggins at ...1601... Thu Apr 9 13:23:20 2009 From: joshiggins at ...1601... (Joshua Higgins) Date: Thu, 9 Apr 2009 12:23:20 +0100 Subject: [Gambas-user] disallow characters in TextBox Message-ID: <4247f5440904090423u51467a40s33de4e5f314dde45@...627...> Hi, Is it possible to disallow certain characters from being entered in a TextBox? I'm splitting the data from the textbox and don't want the user to type in the character (~) that is being used to split. Thanks. -- joshua higgins >>>>>>------ From joshiggins at ...1601... Thu Apr 9 13:34:04 2009 From: joshiggins at ...1601... (Joshua Higgins) Date: Thu, 9 Apr 2009 12:34:04 +0100 Subject: [Gambas-user] catching errors Message-ID: <4247f5440904090434l616d3b60lc8b6c61faf8439e2@...627...> Hi, I've been using CATCH as a sort of rudimentary catch all error handling in my code. Just got a small question about when Gambas will run this code: Example code follows PUBLIC SUB ihaserror() ' the error happens in here CATCH PRINT "OH NO!" END PUBLIC SUB Main() ihaserror() CATCH PRINT "ERROR" END In this silly example, if the error happens in ihaserror(), the catch there will print oh no. But because it was called from Main(), will the catch there fire too so both oh no and error get printed? -- joshua higgins >>>>>>------ From joshiggins at ...1601... Thu Apr 9 14:09:58 2009 From: joshiggins at ...1601... (joshiggins) Date: Thu, 9 Apr 2009 05:09:58 -0700 (PDT) Subject: [Gambas-user] catching errors In-Reply-To: <4247f5440904090434l616d3b60lc8b6c61faf8439e2@...627...> References: <4247f5440904090434l616d3b60lc8b6c61faf8439e2@...627...> Message-ID: <22969611.post@...1379...> Just got back and tried it... only the catch in ihaserror() runs. Makes sense. -- View this message in context: http://www.nabble.com/catching-errors-tp22969154p22969611.html Sent from the gambas-user mailing list archive at Nabble.com. From Karl.Reinl at ...9... Thu Apr 9 14:42:40 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Thu, 09 Apr 2009 14:42:40 +0200 Subject: [Gambas-user] disallow characters in TextBox In-Reply-To: <4247f5440904090423u51467a40s33de4e5f314dde45@...627...> References: <4247f5440904090423u51467a40s33de4e5f314dde45@...627...> Message-ID: <1239280960.6383.6.camel@...40...> Am Donnerstag, den 09.04.2009, 12:23 +0100 schrieb Joshua Higgins: > Hi, > > Is it possible to disallow certain characters from being entered in a > TextBox? > > I'm splitting the data from the textbox and don't want the user to type in > the character (~) that is being used to split. > > Thanks. Salut, here the KeyPress Event from TextBox1 looks for valid Keys (this is out of a gambas1 project) PUBLIC SUB TextBox1_KeyPress() IF key.Code >= 48 AND key.Code <= 57 THEN ELSE IF key.Code = key.BackSpace THEN ELSE IF key.Code = key.Delete THEN ELSE STOP EVENT ENDIF END So, you have to write something like : (this is not tested) IF key.Code = "~" THEN STOP EVENT ENDIF -- Amicalment Charlie From m0e.lnx at ...626... Thu Apr 9 14:42:55 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Thu, 9 Apr 2009 07:42:55 -0500 Subject: [Gambas-user] shared librarry into gambas In-Reply-To: <49DD9503.6060809@...1909...> References: <22953732.post@...1379...> <384d3900904081022i1903e4d5wcba50e4efbcc5c19@...627...> <20090408154803.03a76a6f@...2125...> <49DD9503.6060809@...1909...> Message-ID: <20090409074255.0e032137@...2125...> Huh!. I wouldn't be surprised at all if your arguments are true, but for someone like myself, I feel that the documentation on this subject very limited. I will try to look at some examples. I need to access the libparted library, in the mean time, if you want to work up a sample for me that accesses the library, that would be swell! ;) From gambas at ...1... Thu Apr 9 15:04:55 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Thu, 9 Apr 2009 15:04:55 +0200 Subject: [Gambas-user] disallow characters in TextBox In-Reply-To: <1239280960.6383.6.camel@...40...> References: <4247f5440904090423u51467a40s33de4e5f314dde45@...627...> <1239280960.6383.6.camel@...40...> Message-ID: <200904091504.55650.gambas@...1...> > > So, you have to write something like : > (this is not tested) > IF key.Code = "~" THEN > STOP EVENT > ENDIF If you want to check a key against a real string, you can't do that, you must use the Key.Text property. Key.Text is different from Key.Code! Key.Code identifies the keyboard key, whereas Key.Text is the text associated with the key. Regards, -- Beno?t From gambas at ...1... Thu Apr 9 15:10:08 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Thu, 9 Apr 2009 15:10:08 +0200 Subject: [Gambas-user] shared librarry into gambas In-Reply-To: <20090408154803.03a76a6f@...2125...> References: <22953732.post@...1379...> <384d3900904081022i1903e4d5wcba50e4efbcc5c19@...627...> <20090408154803.03a76a6f@...2125...> Message-ID: <200904091510.08582.gambas@...1...> > I always wandered myself how this works. > > For instance... in python, you can code something like > > import gtk > import glade > import pygtk > > And use the methods in these modules throughout your app. > could this be done in gambas somehow? > > I have had instances in gambas where I could really use a shared > library but i'm unable to import it... the Extern method is beyond my > scope of skills ATM, and the documentation is sort of hard for me to > understand. > Actually, "import" in Python is the same as checking a component in the Gambas IDE project property dialog. Note that you can load components at runtime too, with the Component.Load() method. Regards, -- Beno?t From jeff at ...2103... Thu Apr 9 17:39:03 2009 From: jeff at ...2103... (Jeff) Date: Fri, 10 Apr 2009 01:39:03 +1000 Subject: [Gambas-user] MoveFirst MoveNext etc Message-ID: <1239291543.5859.12.camel@...2104...> What is the thinking behind a Result.MoveFirst() and MoveNext() returning a false if a record is there? So, to read round a result set I end up using a Boolean with a double negative: noMoreRows = myResult.MoveFirst() WHILE NOT noMoreRows PRINT myResult!id noMoreRows = myResult.MoveNext() WEND I would have expected the MoveFirst() and MoveNext() return true if a record found, so I'm wondering why it's that way round. Or, is there a better loop structure to use so that it reads better? From ronstk at ...239... Thu Apr 9 18:27:54 2009 From: ronstk at ...239... (Ron_1st) Date: Thu, 9 Apr 2009 18:27:54 +0200 Subject: [Gambas-user] MoveFirst MoveNext etc In-Reply-To: <1239291543.5859.12.camel@...2104...> References: <1239291543.5859.12.camel@...2104...> Message-ID: <200904091827.55241.ronstk@...239...> On Thursday 09 April 2009, Jeff wrote: > What is the thinking behind a Result.MoveFirst() and MoveNext() > returning a false if a record is there? > > So, to read round a result set I end up using a Boolean with a double > negative: > > noMoreRows = myResult.MoveFirst() > WHILE NOT noMoreRows > PRINT myResult!id > noMoreRows = myResult.MoveNext() > WEND > > I would have expected the MoveFirst() and MoveNext() return true if a > record found, so I'm wondering why it's that way round. > Or, is there a better loop structure to use so that it reads better? > > The only logic I see is the way it is done in C/C++ If result returned is 0 means OK else the value other then 0 means the error code for the occured error. -1 means i.e. syntax -2 means i.e. invalid something In C/C++ the IF THEN use a value instead the Basic boolean True/False Symbolic 0 equals to False, other value to True Just in good old practice for Basic a question in IF ... THEN was/is always true. So your way the next code is right IF myResults.MoveNext() then ' ok the movenext was OK ELSE ' oops a error ENDIF For gambas in relation to the MoveXXX() this is reversed by Benoit. It means with false ( equals to 0) there was no error IF myResults.MoveNext() then ' returned not 0 (zero) ' oops a error ELSE ' ok the movenext was OK ' return was 0 (zero) ENDIF So you can use: Const NOERROR as boolean=false IF myResults.MoveNext() = NOERROR THEN ' ok the movenext was OK ' return was 0 (zero) ENDIF Personal I do not like the Gambas way, IMHO the myReult.MoveNext() should return TRUE if succes and FALSE when error occured. I use now the method with NOERRO to get a clean Basic readable code. NOERROR makes more sence then False here. Best regards, Ron_1st From doriano.blengino at ...1909... Thu Apr 9 22:38:56 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Thu, 09 Apr 2009 22:38:56 +0200 Subject: [Gambas-user] MoveFirst MoveNext etc In-Reply-To: <200904091827.55241.ronstk@...239...> References: <1239291543.5859.12.camel@...2104...> <200904091827.55241.ronstk@...239...> Message-ID: <49DE5CE0.3080307@...1909...> Ron_1st ha scritto: > On Thursday 09 April 2009, Jeff wrote: > >> What is the thinking behind a Result.MoveFirst() and MoveNext() >> returning a false if a record is there? >> >> So, to read round a result set I end up using a Boolean with a double >> negative: >> >> noMoreRows = myResult.MoveFirst() >> WHILE NOT noMoreRows >> PRINT myResult!id >> noMoreRows = myResult.MoveNext() >> WEND >> >> I would have expected the MoveFirst() and MoveNext() return true if a >> record found, so I'm wondering why it's that way round. >> Or, is there a better loop structure to use so that it reads better? >> >> >> > > The only logic I see is the way it is done in C/C++ > I think it could be pretty the same, but I like it this way; I think that the normal flow of code is when normal things happen, and when something exceptional happens, branches are taken. So, the code above could be written: if myResult.MoveFirst() then print "No records" return endif repeat print myresult!id until myresult.MoveNext() ...no "NOT" used. I agree that "if MoveNext()" could signify "if MoveNext succeeded", but if the functions worked this way, one should write: if not movefirst then ... endif print myresult.id while movenext printd ...!id wend or, even worse, if movefirst then print ..!id while ... wend else print "no records" endif It is a matter of taste. Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From gambas at ...1... Thu Apr 9 22:40:18 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Thu, 9 Apr 2009 22:40:18 +0200 Subject: [Gambas-user] MoveFirst MoveNext etc In-Reply-To: <200904091827.55241.ronstk@...239...> References: <1239291543.5859.12.camel@...2104...> <200904091827.55241.ronstk@...239...> Message-ID: <200904092240.18105.gambas@...1...> > On Thursday 09 April 2009, Jeff wrote: > > What is the thinking behind a Result.MoveFirst() and MoveNext() > > returning a false if a record is there? > > > > So, to read round a result set I end up using a Boolean with a double > > negative: > > > > noMoreRows = myResult.MoveFirst() > > WHILE NOT noMoreRows > > PRINT myResult!id > > noMoreRows = myResult.MoveNext() > > WEND > > > > I would have expected the MoveFirst() and MoveNext() return true if a > > record found, so I'm wondering why it's that way round. > > Or, is there a better loop structure to use so that it reads better? > > The only logic I see is the way it is done in C/C++ > > If result returned is 0 means OK else the value other then > 0 means the error code for the occured error. > -1 means i.e. syntax > -2 means i.e. invalid something > > In C/C++ the IF THEN use a value instead the Basic boolean True/False > Symbolic 0 equals to False, other value to True > > Just in good old practice for Basic a question in IF ... THEN > was/is always true. > So your way the next code is right > IF myResults.MoveNext() then > ' ok the movenext was OK > ELSE > ' oops a error > ENDIF > > For gambas in relation to the MoveXXX() this is reversed by Benoit. > It means with false ( equals to 0) there was no error > > IF myResults.MoveNext() then > ' returned not 0 (zero) > ' oops a error > ELSE > ' ok the movenext was OK > ' return was 0 (zero) > ENDIF > > So you can use: > > Const NOERROR as boolean=false > > IF myResults.MoveNext() = NOERROR THEN > ' ok the movenext was OK > ' return was 0 (zero) > ENDIF > > > > Personal I do not like the Gambas way, IMHO the myReult.MoveNext() > should return TRUE if succes and FALSE when error occured. > > I use now the method with NOERRO to get a clean Basic readable code. > NOERROR makes more sence then False here. > > > Best regards, > > Ron_1st > Usually, languages and libraries use TRUE to mean success and FALSE to mean error. But during the long years now I have written programs :-) I found that we most often test for errors than success. So using TRUE for errors leads to less lines of code. It is just a matter of habit. And changing habits is a good thing, it keeps you young. :-) You can write your loop this way: MyResult.MoveFirst() WHILE MyResult.Available ... myResult.MoveNext() WEND Regards, -- Beno?t From doriano.blengino at ...1909... Thu Apr 9 23:31:03 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Thu, 09 Apr 2009 23:31:03 +0200 Subject: [Gambas-user] shared librarry into gambas In-Reply-To: <20090409074255.0e032137@...2125...> References: <22953732.post@...1379...> <384d3900904081022i1903e4d5wcba50e4efbcc5c19@...627...> <20090408154803.03a76a6f@...2125...> <49DD9503.6060809@...1909...> <20090409074255.0e032137@...2125...> Message-ID: <49DE6917.3010206@...1909...> M0E Lnx ha scritto: > Huh!. > > I wouldn't be surprised at all if your arguments are true, but for > someone like myself, I feel that the documentation on this subject very > limited. I will try to look at some examples. > > I need to access the libparted library, in the mean time, if you want > to work up a sample for me that accesses the library, that would be > swell! ;) > Well, it took half an hour to install libparted and write some code. No documentation about this lib: ldap was well documented instead. I attach a sample project which calls just three libparted functions; I had to consult the include files. It is not so simple, but hey! You want to fiddle with not-so-easy things... The big problem is with strings - I don't know why gambas strings don't map exactly to char* in C, but there must be good reasons (well I readed something about, but can remember well). You can pass gambas string straightforward to C char*, but you can't do the inverse. Anyway, in the attached project you can see two or three useful things: how to declare external calls, how to read C strings, and how to cope with pointers to structures. I suspect the structure must be freed, but I didn't have the lust to read all the .h about parted... :-) The project simply tries to open /dev/hda, hdb, hdc and hdd. Perhaps you have these newer SATA disks... if so, you have to change the source. Have fun; if I can help I will try - but I don't want to read all that libparted documentation (well, *no* docs, only C include files...) Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." -------------- next part -------------- A non-text attachment was scrubbed... Name: Parted-0.0.1.tar.gz Type: application/x-tgz Size: 8002 bytes Desc: not available URL: From jeff at ...2103... Fri Apr 10 05:46:36 2009 From: jeff at ...2103... (Jeff) Date: Fri, 10 Apr 2009 13:46:36 +1000 Subject: [Gambas-user] MoveFirst MoveNext etc In-Reply-To: <200904092240.18105.gambas@...1...> References: <1239291543.5859.12.camel@...2104...> <200904091827.55241.ronstk@...239...> <200904092240.18105.gambas@...1...> Message-ID: <1239335196.5897.2.camel@...2104...> > But during the long years now I have written programs :-) I found that we most > often test for errors than success. So using TRUE for errors leads to less > lines of code. > > It is just a matter of habit. And changing habits is a good thing, it keeps > you young. :-) > I need something to keep me young :-) > You can write your loop this way: > > MyResult.MoveFirst() > WHILE MyResult.Available > ... > myResult.MoveNext() > WEND > Aaaahh - the available property. Yes that's what I was looking for. Obvious now. Thanks. From jbskaggs at ...1871... Fri Apr 10 07:10:03 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Thu, 9 Apr 2009 22:10:03 -0700 (PDT) Subject: [Gambas-user] In Plain English- A definition of the Datatypes please? Message-ID: <22983213.post@...1379...> Earlier this week I was given an excellent definition oh Hungarian Convetion naming ie the h in hObjects. Could someone either point me to a resource in plain English or explain to me in plain English the Datatypes? Integer Long Short Array etc... this is what I found on the documentation: Datatype Description Default value Size in memory Boolean True or false. FALSE 1 byte Byte 0...255 0 1 byte Short -32.768...+32.767 0 2 bytes Integer -2.147.483.648...+2.147.483.647 0 4 bytes Long -9.223.372.036.854.775.808...+9.223.372.036.854.775.807 0 8 bytes Single Like the float datatype in C. 0.0 4 bytes Float Like the double datatype in C. 0.0 8 bytes Date Date and time, each stored in an integer. NULL 8 bytes String A variable length string of characters. NULL 4 bytes Variant Any datatype. NULL 12 bytes Object Anonymous reference to any object. NULL 4 bytes Pointer A memory address. 0 4 bytes on 32 bits systems, 8 bytes on 64 bits systems. For a novice like me I have made assumptions for the past year that turned out to be wrong and I would like to make sure I grasp what this is saying and not assume I do. Thanks JB -- View this message in context: http://www.nabble.com/In-Plain-English--A-definition-of-the-Datatypes-please--tp22983213p22983213.html Sent from the gambas-user mailing list archive at Nabble.com. From tomas.eroles at ...277... Fri Apr 10 18:07:48 2009 From: tomas.eroles at ...277... (Tomas Eroles i Forner) Date: Fri, 10 Apr 2009 18:07:48 +0200 Subject: [Gambas-user] Form refresh problem Message-ID: <1239379668.4478.11.camel@...2014...> Hi all I'm writing a program to present the results of the ping command in a TableView. The user can select the amount of times the program has to repeat the process. The program executes a While..Wend loop in which executes the ping command, analyzes the result, and inserts a row in the TableView. The problem is that I want that it writes each line before execute the next ping, and it presents the information when it finishes all the loops, if it's made using GTK, but it seems to refresh if made using Qt. I've added the Requery method, both for TableView and for all the form, but I would like it shows the real progress and the real adding rows each loop, and not like this. Is there any way to do it? Thanks in advance From gambas at ...1... Fri Apr 10 23:05:13 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Fri, 10 Apr 2009 23:05:13 +0200 Subject: [Gambas-user] Proper use of containers In-Reply-To: <20090408103456.3ec4672c@...2125...> References: <20090407123414.639f0355@...2125...> <200904081535.19076.gambas@...1...> <20090408103456.3ec4672c@...2125...> Message-ID: <200904102305.13091.gambas@...1...> > That's what I've noticed. > I really need it to arrange, and the only way I can manage that right > now is to add other containers inside the frame control and resize > these containers manually using the form_resize() event. > > But this really shouldn't be necessary. > > Will this be fixed? > Mmm. I think so, but in the development version only. -- Beno?t From gambas at ...1... Fri Apr 10 23:07:20 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Fri, 10 Apr 2009 23:07:20 +0200 Subject: [Gambas-user] Gambas freezes with Qt apps In-Reply-To: <49DA35FC.2000705@...1237...> References: <49D8B38E.5000207@...1237...> <200904052010.44724.gambas@...1...> <49DA35FC.2000705@...1237...> Message-ID: <200904102307.20555.gambas@...1...> > Here is the output of the gdb program. Alas it is not very useful. Can you run the program that freeze in the console with the strace command, and send me the output? $ cd /path/to/my/project $ strace gbx2 > strace.out 2>&1 Thanks in advance. -- Beno?t From jshackney at ...626... Sat Apr 11 02:26:41 2009 From: jshackney at ...626... (Jason Hackney) Date: Fri, 10 Apr 2009 20:26:41 -0400 Subject: [Gambas-user] Compiling Error Message-ID: <799be1690904101726l2110260k73ba6d873ba39b77@...627...> reconf and configure work, but running make gives me this: make[4]: Entering directory `/home/hackney/trunk/gb.db.odbc/src' make[4]: Leaving directory `/home/hackney/trunk/gb.db.odbc/src' make[3]: Leaving directory `/home/hackney/trunk/gb.db.odbc' make[2]: Leaving directory `/home/hackney/trunk/gb.db.odbc' make[1]: Leaving directory `/home/hackney/trunk' make[4]: *** No rule to make target `gb.db.odbc.component', needed by `all-am'. Stop. make[3]: *** [all-recursive] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 hackney at ...2129...:~$ Everything seemed to work prior to this, so I'm confused a bit. What happened? Also, there was no installation of Gambas on this computer prior to this. The libraries (2.2.11-16 Ubuntu) are installed, I double-checked. From gambas at ...1... Sat Apr 11 09:12:11 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Sat, 11 Apr 2009 09:12:11 +0200 Subject: [Gambas-user] Compiling Error In-Reply-To: <799be1690904101726l2110260k73ba6d873ba39b77@...627...> References: <799be1690904101726l2110260k73ba6d873ba39b77@...627...> Message-ID: <200904110912.11889.gambas@...1...> > reconf and configure work, but running make gives me this: > > make[4]: Entering directory `/home/hackney/trunk/gb.db.odbc/src' > make[4]: Leaving directory `/home/hackney/trunk/gb.db.odbc/src' > make[3]: Leaving directory `/home/hackney/trunk/gb.db.odbc' > make[2]: Leaving directory `/home/hackney/trunk/gb.db.odbc' > make[1]: Leaving directory `/home/hackney/trunk' > make[4]: *** No rule to make target `gb.db.odbc.component', needed by > `all-am'. Stop. > make[3]: *** [all-recursive] Error 1 > make[2]: *** [all] Error 2 > make[1]: *** [all-recursive] Error 1 > make: *** [all] Error 2 > hackney at ...2129...:~$ > > Everything seemed to work prior to this, so I'm confused a bit. What > happened? Also, there was no installation of Gambas on this computer prior > to this. > > The libraries (2.2.11-16 Ubuntu) are installed, I double-checked. It should be fixed now. Just some missing files I forgot to commit. -- Beno?t From jeff at ...2103... Sat Apr 11 09:41:26 2009 From: jeff at ...2103... (Jeff) Date: Sat, 11 Apr 2009 17:41:26 +1000 Subject: [Gambas-user] LinkedIn Message-ID: <1239435686.9880.2.camel@...2104...> Hey Benoit I thought about setting up a group on LinkedIn for Gambas users. Could help to spread the word. Are you ok with it or would you rather not? From doriano.blengino at ...1909... Sat Apr 11 09:53:10 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sat, 11 Apr 2009 09:53:10 +0200 Subject: [Gambas-user] Form refresh problem In-Reply-To: <1239379668.4478.11.camel@...2014...> References: <1239379668.4478.11.camel@...2014...> Message-ID: <49E04C66.5050601@...1909...> Tomas Eroles i Forner ha scritto: > Hi all > > I'm writing a program to present the results of the ping command in a > TableView. > The user can select the amount of times the program has to repeat the > process. > The program executes a While..Wend loop in which executes the ping > command, analyzes the result, and inserts a row in the TableView. > The problem is that I want that it writes each line before execute the > next ping, and it presents the information when it finishes all the > loops, if it's made using GTK, but it seems to refresh if made using Qt. > I've added the Requery method, both for TableView and for all the form, > but I would like it shows the real progress and the real adding rows > each loop, and not like this. > > Is there any way to do it? > It seems you only need to add a WAIT instruction inside the loop, just after finished to update the table. Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From jshackney at ...626... Sat Apr 11 16:46:52 2009 From: jshackney at ...626... (Jason Hackney) Date: Sat, 11 Apr 2009 10:46:52 -0400 Subject: [Gambas-user] Compiling Error In-Reply-To: <200904110912.11889.gambas@...1...> References: <799be1690904101726l2110260k73ba6d873ba39b77@...627...> <200904110912.11889.gambas@...1...> Message-ID: <799be1690904110746r37ff4145x4f4dd54c905edc20@...627...> Thanks, Beno?t. :-) From tomas.eroles at ...277... Sat Apr 11 19:58:48 2009 From: tomas.eroles at ...277... (Tomas Eroles i Forner) Date: Sat, 11 Apr 2009 19:58:48 +0200 Subject: [Gambas-user] Form refresh problem In-Reply-To: <49E04C66.5050601@...1909...> References: <1239379668.4478.11.camel@...2014...> <49E04C66.5050601@...1909...> Message-ID: <1239472729.4397.1.camel@...2014...> Grazie mille It seems it works I hope add more things and then publish the program for if anyone wants to add something Thanks Doriano El ds 11 de 04 del 2009 a les 09:53 +0200, en/na Doriano Blengino va escriure: > Tomas Eroles i Forner ha scritto: > > Hi all > > > > I'm writing a program to present the results of the ping command in a > > TableView. > > The user can select the amount of times the program has to repeat the > > process. > > The program executes a While..Wend loop in which executes the ping > > command, analyzes the result, and inserts a row in the TableView. > > The problem is that I want that it writes each line before execute the > > next ping, and it presents the information when it finishes all the > > loops, if it's made using GTK, but it seems to refresh if made using Qt. > > I've added the Requery method, both for TableView and for all the form, > > but I would like it shows the real progress and the real adding rows > > each loop, and not like this. > > > > Is there any way to do it? > > > It seems you only need to add a WAIT instruction inside the loop, just > after finished to update the table. > > Regards, > From gambas at ...1... Sat Apr 11 21:41:13 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Sat, 11 Apr 2009 21:41:13 +0200 Subject: [Gambas-user] LinkedIn In-Reply-To: <1239435686.9880.2.camel@...2104...> References: <1239435686.9880.2.camel@...2104...> Message-ID: <200904112141.13746.gambas@...1...> > Hey Benoit > I thought about setting up a group on LinkedIn for Gambas users. Could > help to spread the word. Are you ok with it or would you rather not? > LinkedIn? What's that? -- Beno?t From Karl.Reinl at ...9... Sat Apr 11 22:25:54 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Sat, 11 Apr 2009 22:25:54 +0200 Subject: [Gambas-user] LinkedIn In-Reply-To: <200904112141.13746.gambas@...1...> References: <1239435686.9880.2.camel@...2104...> <200904112141.13746.gambas@...1...> Message-ID: <1239481554.6400.0.camel@...40...> Am Samstag, den 11.04.2009, 21:41 +0200 schrieb Beno?t Minisini: > > Hey Benoit > > I thought about setting up a group on LinkedIn for Gambas users. Could > > help to spread the word. Are you ok with it or would you rather not? > > > > LinkedIn? What's that? > try http://www.linkedin.com and see -- Amicalment Charlie From gambas at ...1... Sat Apr 11 22:28:57 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Sat, 11 Apr 2009 22:28:57 +0200 Subject: [Gambas-user] LinkedIn In-Reply-To: <1239435686.9880.2.camel@...2104...> References: <1239435686.9880.2.camel@...2104...> Message-ID: <200904112228.57862.gambas@...1...> > Hey Benoit > I thought about setting up a group on LinkedIn for Gambas users. Could > help to spread the word. Are you ok with it or would you rather not? > I am ok. :-) -- Beno?t From jbskaggs at ...1871... Sat Apr 11 23:45:46 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sat, 11 Apr 2009 14:45:46 -0700 (PDT) Subject: [Gambas-user] A random sort of listview In-Reply-To: <49DB4778.6050902@...11...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> <49DB2E06.10204@...11...> <49DB4778.6050902@...11...> Message-ID: <23005690.post@...1379...> Okay I thought this was worked out but its still not working- I always end up losing the last two list items. Here is the console output from my print statements: This first list is printing i, a from this command SWAP myArray[i], myArray[a] 21 21 20 13 19 0 18 13 17 11 16 4 15 9 14 12 13 4 12 2 11 6 10 2 9 4 8 0 7 5 6 1 5 3 4 3 3 0 2 0 1 0 0 0 This list shows where listview1 is being copied into listview2: listview1.item.key 21 counter i: 21 total count: 22 listview1.item.key 13 counter i: 20 total count: 22 listview1.item.key 13 counter i: 19 total count: 22 listview1.item.key 20 counter i: 18 total count: 22 listview1.item.key 11 counter i: 17 total count: 22 listview1.item.key 4 counter i: 16 total count: 22 listview1.item.key 9 counter i: 15 total count: 22 listview1.item.key 12 counter i: 14 total count: 22 listview1.item.key 16 counter i: 13 total count: 22 listview1.item.key 2 counter i: 12 total count: 22 listview1.item.key 6 counter i: 11 total count: 22 listview1.item.key 14 counter i: 10 total count: 22 listview1.item.key 18 counter i: 9 total count: 22 listview1.item.key 19 counter i: 8 total count: 22 listview1.item.key 5 counter i: 7 total count: 22 listview1.item.key 5 counter i: 6 total count: 22 listview1.item.key 3 counter i: 5 total count: 22 listview1.item.key 7 counter i: 4 total count: 22 listview1.item.key 8 counter i: 3 total count: 22 listview1.item.key 15 counter i: 2 total count: 22 listview1.item.key 10 counter i: 1 total count: 22 listview1.item.key 17 counter i: 0 total count: 22 here is a screen shot of the two lists: listview1 is on the left, you will notice that the last two items are not on the random sorted list on the right. http://www.nabble.com/file/p23005690/ScreenshotBug.png Here is my code: PUBLIC SUB button4_click() DIM myArray AS Integer[ListView1.count] DIM a AS Integer DIM i AS Integer DIM c AS String FOR i = 0 TO ListView1.count - 1 STEP 1 myArray[i] = i NEXT FOR i = ListView1.count - 1 TO 0 STEP -1 a = Int(Rnd(i + 1)) SWAP myArray[i], myArray[a] PRINT i, a NEXT FOR i = ListView1.count - 1 TO 0 STEP -1 ' write items in listview2 -<<<<< I have also tried running this counting up as well but it changed nothing. listview1.MoveTo(myArray[i]) TRY c = listview1.Item.Key TRY PRINT "listview1.item.key ", c, " counter i: ", i, " total count: ", listview1.Count TRY listview2.add(c, listview1.item.text) NEXT 'fGlobal.show 'FRolldice.Show 'ME.Hide END Sincerly JB SKaggs Simonart Dominique wrote: > > Simonart Dominique a ?crit : >> Hi, >> >> Hmm, did you run exactly this code? If so, there is >> something wrong with the second FOR NEXT loop >> >> jbskaggs a ?crit : >>> using your suggestions and the swap command vs manual swapping this is >>> my >>> code: >>> >>> public b as string 'optional string used to hold the array data for >>> file or >>> split later >>> >>> PUBLIC SUB button4_click() ' initialize array >>> DIM myArray AS Integer[200] >>> DIM a AS Integer >>> DIM i AS Integer >>> >>> FOR i = 0 TO 199 STEP 1 'add array items >>> myArray[i] = i >>> NEXT >>> >>> FOR i = 0 TO 199 STEP 1 ' random swap array items >>> a = Int(Rnd(i + 1)) >>> SWAP myArray[i], myArray[a] >>> NEXT >>> >> >> the right code is: >> >> FOR i = 199 TO 0 STEP -1 >> ... >> NEXT > > But if you prefer incremental loop, you could write: > > FOR i = 0 TO 199 > A = Int(Rnd(i,200)) > SWAP ... > NEXT > >> >>> FOR i = 0 TO 199 STEP 1 ' write items in listview2 >>> listview1.MoveTo(myArray[i]) >>> c = listview1.Item.Key >>> listview2.add(c, listview1.item.text) >>> NEXT >>> >>> >>> >>> FOR i = 0 TO 199 STEP 1 'optional step to write array as a string for >>> file >>> or whatever use >>> b &= "slot" & myArray[i] & "," >>> NEXT >>> PRINT b >>> END >>> >>> PUBLIC SUB Button1_Click() 'an optional way to load the array values >>> from >>> the variable b and / or a file if b was file loaded >>> DIM egg AS String[] >>> DIM c AS String >>> listview1.Clear >>> egg = Split(b, ",") >>> FOR EACH c IN egg >>> TRY listview1.Add(c, c) >>> IF ERROR THEN RETURN >>> NEXT >>> IF listview1.Count >= 200 THEN RETURN >>> END >>> >>> JB Skaggs >>> >> >> Dominique Simonart >> > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > 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/A-random-sort-of-listview-tp22919766p23005690.html Sent from the gambas-user mailing list archive at Nabble.com. From rterry at ...2130... Sun Apr 12 00:32:47 2009 From: rterry at ...2130... (richard terry) Date: Sun, 12 Apr 2009 08:32:47 +1000 Subject: [Gambas-user] Using a list container Message-ID: <200904120832.47408.rterry@...2130...> Just noticed a control I've not used - the listcontainer but I cannot see a method to add another control to it. I wonder if someone could point out how. thanks. From gambas at ...1... Sun Apr 12 00:54:05 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Sun, 12 Apr 2009 00:54:05 +0200 Subject: [Gambas-user] Using a list container In-Reply-To: <200904120832.47408.rterry@...2130...> References: <200904120832.47408.rterry@...2130...> Message-ID: <200904120054.05544.gambas@...1...> > Just noticed a control I've not used - the listcontainer but I cannot see a > method to add another control to it. > > I wonder if someone could point out how. > > thanks. > It's a container. Just use it as parent for other controls. Regards, -- Beno?t From simonart.dominique at ...11... Sun Apr 12 02:30:25 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Sun, 12 Apr 2009 02:30:25 +0200 Subject: [Gambas-user] A random sort of listview In-Reply-To: <23005690.post@...1379...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> <49DB2E06.10204@...11...> <49DB4778.6050902@...11...> <23005690.post@...1379...> Message-ID: <49E13621.4070907@...11...> Hi, jbskaggs a ?crit : > Okay I thought this was worked out but its still not working- I always end up > losing the last two list items. > > Here is the console output from my print statements: > This first list is printing i, a from this command SWAP myArray[i], > myArray[a] > > 21 21 > 20 13 > 19 0 > 18 13 > 17 11 > 16 4 > 15 9 > 14 12 > 13 4 > 12 2 > 11 6 > 10 2 > 9 4 > 8 0 > 7 5 > 6 1 > 5 3 > 4 3 > 3 0 > 2 0 > 1 0 > 0 0 > Here, you listed i and a but the interesting values are i and myArray[i] instead > This list shows where listview1 is being copied into listview2: > > listview1.item.key 21 counter i: 21 total count: 22 > listview1.item.key 13 counter i: 20 total count: 22 > listview1.item.key 13 counter i: 19 total count: 22 > listview1.item.key 20 counter i: 18 total count: 22 > listview1.item.key 11 counter i: 17 total count: 22 > listview1.item.key 4 counter i: 16 total count: 22 > listview1.item.key 9 counter i: 15 total count: 22 > listview1.item.key 12 counter i: 14 total count: 22 > listview1.item.key 16 counter i: 13 total count: 22 > listview1.item.key 2 counter i: 12 total count: 22 > listview1.item.key 6 counter i: 11 total count: 22 > listview1.item.key 14 counter i: 10 total count: 22 > listview1.item.key 18 counter i: 9 total count: 22 > listview1.item.key 19 counter i: 8 total count: 22 > listview1.item.key 5 counter i: 7 total count: 22 > listview1.item.key 5 counter i: 6 total count: 22 > listview1.item.key 3 counter i: 5 total count: 22 > listview1.item.key 7 counter i: 4 total count: 22 > listview1.item.key 8 counter i: 3 total count: 22 > listview1.item.key 15 counter i: 2 total count: 22 > listview1.item.key 10 counter i: 1 total count: 22 > listview1.item.key 17 counter i: 0 total count: 22 > > here is a screen shot of the two lists: listview1 is on the left, you will > notice that the last two items are not on the random sorted list on the > right. > First, is it correct that you have twice the keys 13 and 5 in ListView1 and that keys 0 and 1 are missing? I tried to reproduce exactly your keys sequence but as soon as I want to add an identical key, I get a message and the programme stop immediatly. > http://www.nabble.com/file/p23005690/ScreenshotBug.png > > > Here is my code: > > PUBLIC SUB button4_click() > DIM myArray AS Integer[ListView1.count] > DIM a AS Integer > DIM i AS Integer > DIM c AS String > > FOR i = 0 TO ListView1.count - 1 STEP 1 > myArray[i] = i > NEXT > > FOR i = ListView1.count - 1 TO 0 STEP -1 > a = Int(Rnd(i + 1)) > SWAP myArray[i], myArray[a] > PRINT i, a > NEXT > > FOR i = ListView1.count - 1 TO 0 STEP -1 ' write items in listview2 -<<<<< I > have also tried running this counting up as well but it changed nothing. > > listview1.MoveTo(myArray[i]) > TRY c = listview1.Item.Key > TRY PRINT "listview1.item.key ", c, " counter i: ", i, " total count: ", > listview1.Count > TRY listview2.add(c, listview1.item.text) > NEXT > 'fGlobal.show > 'FRolldice.Show > > 'ME.Hide > > END > > > Sincerly JB SKaggs > I run your code and it works quite fine! I think your missing items come from the duplicated keys Dominique Simonart From jbskaggs at ...1871... Sun Apr 12 08:25:39 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sat, 11 Apr 2009 23:25:39 -0700 (PDT) Subject: [Gambas-user] A random sort of listview In-Reply-To: <49E13621.4070907@...11...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> <49DB2E06.10204@...11...> <49DB4778.6050902@...11...> <23005690.post@...1379...> <49E13621.4070907@...11...> Message-ID: <23008540.post@...1379...> Hi yourself! Here is the problem in the code: FOR i = 0 TO ListView1.Count - 1 ' write items in listview2 TRY PRINT myArray[i] listview1.MoveTo(myArray[i]) TRY c = listview1.Item.Key TRY PRINT myArray[i], "listview1.item.key ", c, " counter i: ", i, " total count: ", listview1.Count TRY listview2.add(c, listview1.item.text) NEXT When the counter i reaches Listview1.Count -1 it gives an error and does not write the last record! I have compensated by writing an extra dummy record to the data file- but how do I code this properly to write the whole list? I have tried several things and they just give different errors. Thanks JB Simonart Dominique wrote: > > Hi, > > jbskaggs a ?crit : >> Okay I thought this was worked out but its still not working- I always >> end up >> losing the last two list items. >> >> Here is the console output from my print statements: >> This first list is printing i, a from this command SWAP myArray[i], >> myArray[a] >> >> 21 21 >> 20 13 >> 19 0 >> 18 13 >> 17 11 >> 16 4 >> 15 9 >> 14 12 >> 13 4 >> 12 2 >> 11 6 >> 10 2 >> 9 4 >> 8 0 >> 7 5 >> 6 1 >> 5 3 >> 4 3 >> 3 0 >> 2 0 >> 1 0 >> 0 0 >> > > Here, you listed i and a but the interesting values are i > and myArray[i] instead > >> This list shows where listview1 is being copied into listview2: >> >> listview1.item.key 21 counter i: 21 total count: >> 22 >> listview1.item.key 13 counter i: 20 total count: >> 22 >> listview1.item.key 13 counter i: 19 total count: >> 22 >> listview1.item.key 20 counter i: 18 total count: >> 22 >> listview1.item.key 11 counter i: 17 total count: >> 22 >> listview1.item.key 4 counter i: 16 total count: >> 22 >> listview1.item.key 9 counter i: 15 total count: >> 22 >> listview1.item.key 12 counter i: 14 total count: >> 22 >> listview1.item.key 16 counter i: 13 total count: >> 22 >> listview1.item.key 2 counter i: 12 total count: >> 22 >> listview1.item.key 6 counter i: 11 total count: >> 22 >> listview1.item.key 14 counter i: 10 total count: >> 22 >> listview1.item.key 18 counter i: 9 total count: >> 22 >> listview1.item.key 19 counter i: 8 total count: >> 22 >> listview1.item.key 5 counter i: 7 total count: >> 22 >> listview1.item.key 5 counter i: 6 total count: >> 22 >> listview1.item.key 3 counter i: 5 total count: >> 22 >> listview1.item.key 7 counter i: 4 total count: >> 22 >> listview1.item.key 8 counter i: 3 total count: >> 22 >> listview1.item.key 15 counter i: 2 total count: >> 22 >> listview1.item.key 10 counter i: 1 total count: >> 22 >> listview1.item.key 17 counter i: 0 total count: >> 22 >> >> here is a screen shot of the two lists: listview1 is on the left, you >> will >> notice that the last two items are not on the random sorted list on the >> right. >> > > First, is it correct that you have twice the keys 13 and 5 > in ListView1 and that keys 0 and 1 are missing? > I tried to reproduce exactly your keys sequence but as soon > as I want to add an identical key, I get a message and the > programme stop immediatly. > >> http://www.nabble.com/file/p23005690/ScreenshotBug.png >> >> >> Here is my code: >> >> PUBLIC SUB button4_click() >> DIM myArray AS Integer[ListView1.count] >> DIM a AS Integer >> DIM i AS Integer >> DIM c AS String >> >> FOR i = 0 TO ListView1.count - 1 STEP 1 >> myArray[i] = i >> NEXT >> >> FOR i = ListView1.count - 1 TO 0 STEP -1 >> a = Int(Rnd(i + 1)) >> SWAP myArray[i], myArray[a] >> PRINT i, a >> NEXT >> >> FOR i = ListView1.count - 1 TO 0 STEP -1 ' write items in listview2 >> -<<<<< I >> have also tried running this counting up as well but it changed nothing. >> >> listview1.MoveTo(myArray[i]) >> TRY c = listview1.Item.Key >> TRY PRINT "listview1.item.key ", c, " counter i: ", i, " total count: ", >> listview1.Count >> TRY listview2.add(c, listview1.item.text) >> NEXT >> 'fGlobal.show >> 'FRolldice.Show >> >> 'ME.Hide >> >> END >> >> >> Sincerly JB SKaggs >> > > I run your code and it works quite fine! > I think your missing items come from the duplicated keys > > Dominique Simonart > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > 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/A-random-sort-of-listview-tp22919766p23008540.html Sent from the gambas-user mailing list archive at Nabble.com. From doriano.blengino at ...1909... Sun Apr 12 09:51:21 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sun, 12 Apr 2009 09:51:21 +0200 Subject: [Gambas-user] A random sort of listview In-Reply-To: <23008540.post@...1379...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> <49DB2E06.10204@...11...> <49DB4778.6050902@...11...> <23005690.post@...1379...> <49E13621.4070907@...11...> <23008540.post@...1379...> Message-ID: <49E19D79.6060607@...1909...> jbskaggs ha scritto: > >>> FOR i = 0 TO ListView1.count - 1 STEP 1 >>> myArray[i] = i >>> NEXT >>> >>> FOR i = ListView1.count - 1 TO 0 STEP -1 >>> a = Int(Rnd(i + 1)) >>> SWAP myArray[i], myArray[a] >>> PRINT i, a >>> NEXT >>> Apart from the problem of missing records, there could be also a "randomness" problem in the algorithm... I am really not sure, but it seems that certain slots have more chances to be swapped than other - myarray[0] can be swapped COUNT times, while myarray[count-1] gets only a chance. I am not sure of what this signifies: it is true that the swap affects the values contained in slots, and not the slots themselves, but anyway there could be another method. One could also do this: for i = 0 to 1000 ' arbitrary value, large enough (>100?) c1 = int(rnd(listview1.count)) c2 = int(rnd(listview1.count)) swap myarray[c1], myarray[c2] next This way, every slot gets the same chances to be swapped; for sufficient loops, it should make a good job... perhaps more random than before. And perhaps, as the algorthm is different, it could solve the problem of missing records (which I didn't understand...). Cheers, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From simonart.dominique at ...11... Sun Apr 12 12:08:35 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Sun, 12 Apr 2009 12:08:35 +0200 Subject: [Gambas-user] A random sort of listview In-Reply-To: <23008540.post@...1379...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> <49DB2E06.10204@...11...> <49DB4778.6050902@...11...> <23005690.post@...1379...> <49E13621.4070907@...11...> <23008540.post@...1379...> Message-ID: <49E1BDA3.7050907@...11...> Hi again :) May be you did not see the last sentence of my answer wich is written in 3 places? Your code is just fine and I don't have any problem with the ListViews. Of course, I had to initialize the ListView1 with my own data like this: FOR i = 0 to 21 ListView1.Add(Str(i), "number " & Str(i)) NEXT After that, I run your code and all is fine! If you have problem, this is therefore with the content of your Listview1. I think it is not correct to have identical keys in a ListView because if I attempt to do it the program stop immediatly. I even don't understand how you could get this situation! Here is what I tried: FOR i = 0 to 21 SELECT CASE i CASE 0 ListView1.Add("5", "number " & Str(i)) CASE 1 ListView1.Add("13", "number " & Str(i)) CASE ELSE ListView1.Add(Str(i), "number " & Str(i)) END SELECT NEXT this code stop with i=5 and say that the key is already used! Could you make a try with unique keys only? Plus, could you run it without TRY? Hope we could identify the error Dominique Simonart jbskaggs a ?crit : > Hi yourself! Here is the problem in the code: > > FOR i = 0 TO ListView1.Count - 1 ' write items in listview2 > TRY PRINT myArray[i] > listview1.MoveTo(myArray[i]) > TRY c = listview1.Item.Key > TRY PRINT myArray[i], "listview1.item.key ", c, " counter i: ", i, " total > count: ", listview1.Count > TRY listview2.add(c, listview1.item.text) > NEXT > > When the counter i reaches Listview1.Count -1 it gives an error and does > not write the last record! I have compensated by writing an extra dummy > record to the data file- but how do I code this properly to write the whole > list? I have tried several things and they just give different errors. > > Thanks > > JB > > Simonart Dominique wrote: >> Hi, >> >> jbskaggs a ?crit : >>> Okay I thought this was worked out but its still not working- I always >>> end up >>> losing the last two list items. >>> >>> Here is the console output from my print statements: >>> This first list is printing i, a from this command SWAP myArray[i], >>> myArray[a] >>> >>> 21 21 >>> 20 13 >>> 19 0 >>> 18 13 >>> 17 11 >>> 16 4 >>> 15 9 >>> 14 12 >>> 13 4 >>> 12 2 >>> 11 6 >>> 10 2 >>> 9 4 >>> 8 0 >>> 7 5 >>> 6 1 >>> 5 3 >>> 4 3 >>> 3 0 >>> 2 0 >>> 1 0 >>> 0 0 >>> >> Here, you listed i and a but the interesting values are i >> and myArray[i] instead >> >>> This list shows where listview1 is being copied into listview2: >>> >>> listview1.item.key 21 counter i: 21 total count: >>> 22 >>> listview1.item.key 13 counter i: 20 total count: >>> 22 >>> listview1.item.key 13 counter i: 19 total count: >>> 22 >>> listview1.item.key 20 counter i: 18 total count: >>> 22 >>> listview1.item.key 11 counter i: 17 total count: >>> 22 >>> listview1.item.key 4 counter i: 16 total count: >>> 22 >>> listview1.item.key 9 counter i: 15 total count: >>> 22 >>> listview1.item.key 12 counter i: 14 total count: >>> 22 >>> listview1.item.key 16 counter i: 13 total count: >>> 22 >>> listview1.item.key 2 counter i: 12 total count: >>> 22 >>> listview1.item.key 6 counter i: 11 total count: >>> 22 >>> listview1.item.key 14 counter i: 10 total count: >>> 22 >>> listview1.item.key 18 counter i: 9 total count: >>> 22 >>> listview1.item.key 19 counter i: 8 total count: >>> 22 >>> listview1.item.key 5 counter i: 7 total count: >>> 22 >>> listview1.item.key 5 counter i: 6 total count: >>> 22 >>> listview1.item.key 3 counter i: 5 total count: >>> 22 >>> listview1.item.key 7 counter i: 4 total count: >>> 22 >>> listview1.item.key 8 counter i: 3 total count: >>> 22 >>> listview1.item.key 15 counter i: 2 total count: >>> 22 >>> listview1.item.key 10 counter i: 1 total count: >>> 22 >>> listview1.item.key 17 counter i: 0 total count: >>> 22 >>> >>> here is a screen shot of the two lists: listview1 is on the left, you >>> will >>> notice that the last two items are not on the random sorted list on the >>> right. >>> >> First, is it correct that you have twice the keys 13 and 5 >> in ListView1 and that keys 0 and 1 are missing? >> I tried to reproduce exactly your keys sequence but as soon >> as I want to add an identical key, I get a message and the >> programme stop immediatly. >> >>> http://www.nabble.com/file/p23005690/ScreenshotBug.png >>> >>> >>> Here is my code: >>> >>> PUBLIC SUB button4_click() >>> DIM myArray AS Integer[ListView1.count] >>> DIM a AS Integer >>> DIM i AS Integer >>> DIM c AS String >>> >>> FOR i = 0 TO ListView1.count - 1 STEP 1 >>> myArray[i] = i >>> NEXT >>> >>> FOR i = ListView1.count - 1 TO 0 STEP -1 >>> a = Int(Rnd(i + 1)) >>> SWAP myArray[i], myArray[a] >>> PRINT i, a >>> NEXT >>> >>> FOR i = ListView1.count - 1 TO 0 STEP -1 ' write items in listview2 >>> -<<<<< I >>> have also tried running this counting up as well but it changed nothing. >>> >>> listview1.MoveTo(myArray[i]) >>> TRY c = listview1.Item.Key >>> TRY PRINT "listview1.item.key ", c, " counter i: ", i, " total count: ", >>> listview1.Count >>> TRY listview2.add(c, listview1.item.text) >>> NEXT >>> 'fGlobal.show >>> 'FRolldice.Show >>> >>> 'ME.Hide >>> >>> END >>> >>> >>> Sincerly JB SKaggs >>> >> I run your code and it works quite fine! >> I think your missing items come from the duplicated keys >> >> Dominique Simonart >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by: >> High Quality Requirements in a Collaborative Environment. >> Download a free trial of Rational Requirements Composer Now! >> http://p.sf.net/sfu/www-ibm-com >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> > From jeff at ...2103... Sun Apr 12 13:22:12 2009 From: jeff at ...2103... (Jeff) Date: Sun, 12 Apr 2009 21:22:12 +1000 Subject: [Gambas-user] LinkedIn In-Reply-To: <200904112228.57862.gambas@...1...> References: <1239435686.9880.2.camel@...2104...> <200904112228.57862.gambas@...1...> Message-ID: <1239535332.7837.0.camel@...2104...> Cool. I have set it up. It will be interesting to see how many join. On Sat, 2009-04-11 at 22:28 +0200, Beno?t Minisini wrote: > > Hey Benoit > > I thought about setting up a group on LinkedIn for Gambas users. Could > > help to spread the word. Are you ok with it or would you rather not? > > > > I am ok. :-) > From abarzuaf at ...626... Sun Apr 12 19:54:42 2009 From: abarzuaf at ...626... (cristian abarzua) Date: Sun, 12 Apr 2009 13:54:42 -0400 Subject: [Gambas-user] sticker Message-ID: <7481ab230904121054h4c3c5b61y5317b8df05697adc@...627...> Hello. I sent you a sticker for their programs. I hope I do not bother Benoit Greetings -------------- next part -------------- A non-text attachment was scrubbed... Name: sticker-gambas-programas.svg Type: image/svg+xml Size: 43352 bytes Desc: not available URL: From wdahn at ...1000... Sun Apr 12 20:01:37 2009 From: wdahn at ...1000... (Werner) Date: Mon, 13 Apr 2009 02:01:37 +0800 Subject: [Gambas-user] sticker In-Reply-To: <7481ab230904121054h4c3c5b61y5317b8df05697adc@...627...> References: <7481ab230904121054h4c3c5b61y5317b8df05697adc@...627...> Message-ID: <49E22C81.4080801@...1000...> cristian abarzua wrote: > Hello. > > I sent you a sticker for their programs. > I hope I do not bother Benoit > > Greetings > nice :-) From jbskaggs at ...1871... Sun Apr 12 20:31:54 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sun, 12 Apr 2009 11:31:54 -0700 (PDT) Subject: [Gambas-user] A random sort of listview In-Reply-To: <49E19D79.6060607@...1909...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> <49DB2E06.10204@...11...> <49DB4778.6050902@...11...> <23005690.post@...1379...> <49E13621.4070907@...11...> <23008540.post@...1379...> <49E19D79.6060607@...1909...> Message-ID: <23013584.post@...1379...> This works much better at getting a more shuffled list! Thanks Doriano Blengino wrote: > > jbskaggs ha scritto: >> >>>> FOR i = 0 TO ListView1.count - 1 STEP 1 >>>> myArray[i] = i >>>> NEXT >>>> >>>> FOR i = ListView1.count - 1 TO 0 STEP -1 >>>> a = Int(Rnd(i + 1)) >>>> SWAP myArray[i], myArray[a] >>>> PRINT i, a >>>> NEXT >>>> > Apart from the problem of missing records, there could be also a > "randomness" problem in the algorithm... I am really not sure, but it > seems that certain slots have more chances to be swapped than other - > myarray[0] can be swapped COUNT times, while myarray[count-1] gets only > a chance. I am not sure of what this signifies: it is true that the > swap affects the values contained in slots, and not the slots > themselves, but anyway there could be another method. One could also do > this: > > for i = 0 to 1000 ' arbitrary value, large enough (>100?) > c1 = int(rnd(listview1.count)) > c2 = int(rnd(listview1.count)) > swap myarray[c1], myarray[c2] > next > > This way, every slot gets the same chances to be swapped; for sufficient > loops, it should make a good job... perhaps more random than before. > And perhaps, as the algorthm is different, it could solve the problem of > missing records (which I didn't understand...). > > Cheers, > > -- > Doriano Blengino > > "Listen twice before you speak. > This is why we have two ears, but only one mouth." > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > 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/A-random-sort-of-listview-tp22919766p23013584.html Sent from the gambas-user mailing list archive at Nabble.com. From jbskaggs at ...1871... Sun Apr 12 20:34:10 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sun, 12 Apr 2009 11:34:10 -0700 (PDT) Subject: [Gambas-user] A random sort of listview In-Reply-To: <49E1BDA3.7050907@...11...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> <49DB2E06.10204@...11...> <49DB4778.6050902@...11...> <23005690.post@...1379...> <49E13621.4070907@...11...> <23008540.post@...1379...> <49E1BDA3.7050907@...11...> Message-ID: <23013605.post@...1379...> You were correct! There was a extra comma in the data file that was breaking the loop! BTW to you an everyone else if you celebrate it, Happy Easter! If not ignore me. ;) JB SKaggs Simonart Dominique wrote: > > Hi again :) > > May be you did not see the last sentence of my answer wich > is written in 3 places? Your code is just fine and I don't > have any problem with the ListViews. Of course, I had to > initialize the ListView1 with my own data like this: > > FOR i = 0 to 21 > ListView1.Add(Str(i), "number " & Str(i)) > NEXT > After that, I run your code and all is fine! > If you have problem, this is therefore with the content of > your Listview1. I think it is not correct to have identical > keys in a ListView because if I attempt to do it the program > stop immediatly. I even don't understand how you could get > this situation! Here is what I tried: > > FOR i = 0 to 21 > SELECT CASE i > CASE 0 > ListView1.Add("5", "number " & Str(i)) > CASE 1 > ListView1.Add("13", "number " & Str(i)) > CASE ELSE > ListView1.Add(Str(i), "number " & Str(i)) > END SELECT > NEXT > this code stop with i=5 and say that the key is already used! > > Could you make a try with unique keys only? > Plus, could you run it without TRY? > > Hope we could identify the error > Dominique Simonart > > jbskaggs a ?crit : >> Hi yourself! Here is the problem in the code: >> >> FOR i = 0 TO ListView1.Count - 1 ' write items in listview2 >> TRY PRINT myArray[i] >> listview1.MoveTo(myArray[i]) >> TRY c = listview1.Item.Key >> TRY PRINT myArray[i], "listview1.item.key ", c, " counter i: ", i, " >> total >> count: ", listview1.Count >> TRY listview2.add(c, listview1.item.text) >> NEXT >> >> When the counter i reaches Listview1.Count -1 it gives an error and does >> not write the last record! I have compensated by writing an extra >> dummy >> record to the data file- but how do I code this properly to write the >> whole >> list? I have tried several things and they just give different errors. >> >> Thanks >> >> JB >> >> Simonart Dominique wrote: >>> Hi, >>> >>> jbskaggs a ?crit : >>>> Okay I thought this was worked out but its still not working- I always >>>> end up >>>> losing the last two list items. >>>> >>>> Here is the console output from my print statements: >>>> This first list is printing i, a from this command SWAP myArray[i], >>>> myArray[a] >>>> >>>> 21 21 >>>> 20 13 >>>> 19 0 >>>> 18 13 >>>> 17 11 >>>> 16 4 >>>> 15 9 >>>> 14 12 >>>> 13 4 >>>> 12 2 >>>> 11 6 >>>> 10 2 >>>> 9 4 >>>> 8 0 >>>> 7 5 >>>> 6 1 >>>> 5 3 >>>> 4 3 >>>> 3 0 >>>> 2 0 >>>> 1 0 >>>> 0 0 >>>> >>> Here, you listed i and a but the interesting values are i >>> and myArray[i] instead >>> >>>> This list shows where listview1 is being copied into listview2: >>>> >>>> listview1.item.key 21 counter i: 21 total count: >>>> 22 >>>> listview1.item.key 13 counter i: 20 total count: >>>> 22 >>>> listview1.item.key 13 counter i: 19 total count: >>>> 22 >>>> listview1.item.key 20 counter i: 18 total count: >>>> 22 >>>> listview1.item.key 11 counter i: 17 total count: >>>> 22 >>>> listview1.item.key 4 counter i: 16 total count: >>>> 22 >>>> listview1.item.key 9 counter i: 15 total count: >>>> 22 >>>> listview1.item.key 12 counter i: 14 total count: >>>> 22 >>>> listview1.item.key 16 counter i: 13 total count: >>>> 22 >>>> listview1.item.key 2 counter i: 12 total count: >>>> 22 >>>> listview1.item.key 6 counter i: 11 total count: >>>> 22 >>>> listview1.item.key 14 counter i: 10 total count: >>>> 22 >>>> listview1.item.key 18 counter i: 9 total count: >>>> 22 >>>> listview1.item.key 19 counter i: 8 total count: >>>> 22 >>>> listview1.item.key 5 counter i: 7 total count: >>>> 22 >>>> listview1.item.key 5 counter i: 6 total count: >>>> 22 >>>> listview1.item.key 3 counter i: 5 total count: >>>> 22 >>>> listview1.item.key 7 counter i: 4 total count: >>>> 22 >>>> listview1.item.key 8 counter i: 3 total count: >>>> 22 >>>> listview1.item.key 15 counter i: 2 total count: >>>> 22 >>>> listview1.item.key 10 counter i: 1 total count: >>>> 22 >>>> listview1.item.key 17 counter i: 0 total count: >>>> 22 >>>> >>>> here is a screen shot of the two lists: listview1 is on the left, you >>>> will >>>> notice that the last two items are not on the random sorted list on the >>>> right. >>>> >>> First, is it correct that you have twice the keys 13 and 5 >>> in ListView1 and that keys 0 and 1 are missing? >>> I tried to reproduce exactly your keys sequence but as soon >>> as I want to add an identical key, I get a message and the >>> programme stop immediatly. >>> >>>> http://www.nabble.com/file/p23005690/ScreenshotBug.png >>>> >>>> >>>> Here is my code: >>>> >>>> PUBLIC SUB button4_click() >>>> DIM myArray AS Integer[ListView1.count] >>>> DIM a AS Integer >>>> DIM i AS Integer >>>> DIM c AS String >>>> >>>> FOR i = 0 TO ListView1.count - 1 STEP 1 >>>> myArray[i] = i >>>> NEXT >>>> >>>> FOR i = ListView1.count - 1 TO 0 STEP -1 >>>> a = Int(Rnd(i + 1)) >>>> SWAP myArray[i], myArray[a] >>>> PRINT i, a >>>> NEXT >>>> >>>> FOR i = ListView1.count - 1 TO 0 STEP -1 ' write items in listview2 >>>> -<<<<< I >>>> have also tried running this counting up as well but it changed >>>> nothing. >>>> >>>> listview1.MoveTo(myArray[i]) >>>> TRY c = listview1.Item.Key >>>> TRY PRINT "listview1.item.key ", c, " counter i: ", i, " total count: >>>> ", >>>> listview1.Count >>>> TRY listview2.add(c, listview1.item.text) >>>> NEXT >>>> 'fGlobal.show >>>> 'FRolldice.Show >>>> >>>> 'ME.Hide >>>> >>>> END >>>> >>>> >>>> Sincerly JB SKaggs >>>> >>> I run your code and it works quite fine! >>> I think your missing items come from the duplicated keys >>> >>> Dominique Simonart >>> >>> >>> ------------------------------------------------------------------------------ >>> This SF.net email is sponsored by: >>> High Quality Requirements in a Collaborative Environment. >>> Download a free trial of Rational Requirements Composer Now! >>> http://p.sf.net/sfu/www-ibm-com >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >>> >> > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > 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/A-random-sort-of-listview-tp22919766p23013605.html Sent from the gambas-user mailing list archive at Nabble.com. From simonart.dominique at ...11... Sun Apr 12 20:35:03 2009 From: simonart.dominique at ...11... (Dominique SIMONART) Date: Sun, 12 Apr 2009 20:35:03 +0200 Subject: [Gambas-user] A random sort of listview In-Reply-To: <49E19D79.6060607@...1909...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> <49DB2E06.10204@...11...> <49DB4778.6050902@...11...> <23005690.post@...1379...> <49E13621.4070907@...11...> <23008540.post@...1379...> <49E19D79.6060607@...1909...> Message-ID: <49E23457.6040306@...11...> From agr1971gal at ...397... Sun Apr 12 20:44:37 2009 From: agr1971gal at ...397... (agrgal) Date: Sun, 12 Apr 2009 11:44:37 -0700 (PDT) Subject: [Gambas-user] Input box incorrect size of the text control. My first problem. Message-ID: <23013689.post@...1379...> Hi, everybody! Excuse my English. I've noticed an embarrasing 'bug' when I use an Input Box in my programs. Functionality isn't put at risk but looks horrible. I think an image is better than words... http://www.nabble.com/file/p23013689/inputbox.png How can I fix this problem? It happens whatever computer is used. -- View this message in context: http://www.nabble.com/Input-box-incorrect-size-of-the-text-control.-My-first-problem.-tp23013689p23013689.html Sent from the gambas-user mailing list archive at Nabble.com. From agr1971gal at ...397... Sun Apr 12 20:45:13 2009 From: agr1971gal at ...397... (agrgal) Date: Sun, 12 Apr 2009 11:45:13 -0700 (PDT) Subject: [Gambas-user] Input box incorrect size of the text control. My first problem. Message-ID: <23013689.post@...1379...> Hi, everybody! Excuse my English. I've noticed an embarrasing 'bug' when I use an Input Box in my programs. Functionality isn't put at risk but looks horrible. I think an image is better than words... http://www.nabble.com/file/p23013689/inputbox.png How can I fix this problem? It happens whatever computer is used. -- View this message in context: http://www.nabble.com/Input-box-incorrect-size-of-the-text-control.-My-first-problem.-tp23013689p23013689.html Sent from the gambas-user mailing list archive at Nabble.com. From agr1971gal at ...397... Sun Apr 12 20:45:36 2009 From: agr1971gal at ...397... (agrgal) Date: Sun, 12 Apr 2009 11:45:36 -0700 (PDT) Subject: [Gambas-user] Input box incorrect size of the text control. My first problem. Message-ID: <23013689.post@...1379...> Hi, everybody! Excuse my English. I've noticed an embarrasing 'bug' when I use an Input Box in my programs. Functionality isn't put at risk but looks horrible. I think an image is better than words... http://www.nabble.com/file/p23013689/inputbox.png How can I fix this problem? It happens whatever computer is used. -- View this message in context: http://www.nabble.com/Input-box-incorrect-size-of-the-text-control.-My-first-problem.-tp23013689p23013689.html Sent from the gambas-user mailing list archive at Nabble.com. From simonart.dominique at ...11... Sun Apr 12 20:54:12 2009 From: simonart.dominique at ...11... (Dominique SIMONART) Date: Sun, 12 Apr 2009 20:54:12 +0200 Subject: [Gambas-user] A random sort of listview In-Reply-To: <49E19D79.6060607@...1909...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> <49DB2E06.10204@...11...> <49DB4778.6050902@...11...> <23005690.post@...1379...> <49E13621.4070907@...11...> <23008540.post@...1379...> <49E19D79.6060607@...1909...> Message-ID: <49E238D4.8000202@...11...> Doriano Blengino a ?crit : > jbskaggs ha scritto: > >>>> FOR i = 0 TO ListView1.count - 1 STEP 1 >>>> myArray[i] = i >>>> NEXT >>>> >>>> FOR i = ListView1.count - 1 TO 0 STEP -1 >>>> a = Int(Rnd(i + 1)) >>>> SWAP myArray[i], myArray[a] >>>> PRINT i, a >>>> NEXT >>>> >>>> > Apart from the problem of missing records, there could be also a > "randomness" problem in the algorithm... I am really not sure, but it > seems that certain slots have more chances to be swapped than other - > myarray[0] can be swapped COUNT times, while myarray[count-1] gets only > a chance. I am not sure of what this signifies: it is true that the > swap affects the values contained in slots, and not the slots > themselves, but anyway there could be another method. One could also do > this: > > for i = 0 to 1000 ' arbitrary value, large enough (>100?) > c1 = int(rnd(listview1.count)) > c2 = int(rnd(listview1.count)) > swap myarray[c1], myarray[c2] > next > > This way, every slot gets the same chances to be swapped; for sufficient > loops, it should make a good job... perhaps more random than before. > And perhaps, as the algorthm is different, it could solve the problem of > missing records (which I didn't understand...). > > Cheers, > > => I resend my message because it seems the text is missing?! :-\ This is not really a problem. The Randomizing process could be explained like this: 1) You align a sorted card deck in front of you on a table 2) then, from all the cards on the table you take a random card in your hand so there is a place without card on the table 3) you put the last card on the table in this hole, so the hole is now at the last place 4) you continue by returning to 2 until you got all the cards in your hand Now you have a randomized deck of cards in your hand 5) you put the first card you got in the last place on the table and continue to do that until you have no card in your hand. Now the randomized deck of cards is on the table. If you examine carefully this process, you will remark that each time you filled a hole with the last remaining card on the table, you could place the card you got just before in the last place, because it is free! You only have to remember to not take these cards already selected. So you could do the 5) between 3) and 4) and this is exactly which is done by the SWAP instruction! It is true that some places will be selected several times, but their content change each time (there is another card on these places each time). In no way you could loose a card in this process!!. The JBskaggs' problem, I think, is that, before he starts the process, there are twice 2 identical cards in his deck and Gambas does not admit that, so when Gambas encounters the duplicated cards it reject them, (but since TRY is used, you don't see the error!!) and finally, 2 cards are missing. Hope this is clearer :) cheers Dominique Simonart From agr1971gal at ...397... Sun Apr 12 21:01:44 2009 From: agr1971gal at ...397... (agrgal) Date: Sun, 12 Apr 2009 12:01:44 -0700 (PDT) Subject: [Gambas-user] X coordinate of a Form Frame. My Second Problem. Message-ID: <23013834.post@...1379...> I wrote some code to center a Form window, even the Desktop Size is different. Here it is: FMain.X = Int((Desktop.Width - FMain.Width) / 2) FMain.Y = Int((Desktop.Height - FMain.Height) / 2) Meanwhile the Form is resized regarding to the Y coordinate, it doesn't work as well for the X coordinate. Why? It seems that FMain.X doesn't 'catch up' a number (FMain.X=100 won't work too) What's happening? Please, help me!!! :-) -- View this message in context: http://www.nabble.com/X-coordinate-of-a-Form-Frame.-My-Second-Problem.-tp23013834p23013834.html Sent from the gambas-user mailing list archive at Nabble.com. From rterry at ...1946... Mon Apr 13 00:42:41 2009 From: rterry at ...1946... (richard terry) Date: Mon, 13 Apr 2009 08:42:41 +1000 Subject: [Gambas-user] Input box incorrect size of the text control. My first problem. In-Reply-To: <23013689.post@...1379...> References: <23013689.post@...1379...> Message-ID: <200904130842.41270.rterry@...1946...> On Mon, 13 Apr 2009 04:45:13 am agrgal wrote: > Hi, everybody! Excuse my English. > > I've noticed an embarrasing 'bug' when I use an Input Box in my programs. > Functionality isn't put at risk but looks horrible. I think an image is > better than words... > > http://www.nabble.com/file/p23013689/inputbox.png > > > > How can I fix this problem? It happens whatever computer is used. This won't happen if you put the controls instide a container eg HBox1(here the dotted lines represent Hbox 1). See the pictures attatched. Note that the expand property of the textbox is set to true. ----------------------------------------------- | label1 textbox1 | ----------------------------------------------- However, if you simply gave the new form dialog properties when asked to create the form most of that (the button positioning) would be done for you, and you would only have to add the above. Of course you will have to make it look prettier than my pictures! Regards Richard -------------- next part -------------- A non-text attachment was scrubbed... Name: make_dialog.png Type: image/png Size: 16265 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: make_dialog1.png Type: image/png Size: 26265 bytes Desc: not available URL: From jbskaggs at ...1871... Mon Apr 13 03:48:10 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sun, 12 Apr 2009 18:48:10 -0700 (PDT) Subject: [Gambas-user] X coordinate of a Form Frame. My Second Problem. In-Reply-To: <23013834.post@...1379...> References: <23013834.post@...1379...> Message-ID: <23016773.post@...1379...> Have you tried "me.center"? agrgal wrote: > > I wrote some code to center a Form window, even the Desktop Size is > different. Here it is: > >

FMain.X = Int((Desktop.Width - FMain.Width) / 2)

>

FMain.Y = Int((Desktop.Height - FMain.Height) / 2)

> > Meanwhile the Form is resized regarding to the Y coordinate, it doesn't > work as well for the X coordinate. Why? It seems that FMain.X doesn't > 'catch up' a number (FMain.X=100 won't work too) > > What's happening? Please, help me!!! :-) > -- View this message in context: http://www.nabble.com/X-coordinate-of-a-Form-Frame.-My-Second-Problem.-tp23013834p23016773.html Sent from the gambas-user mailing list archive at Nabble.com. From doriano.blengino at ...1909... Mon Apr 13 08:46:04 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Mon, 13 Apr 2009 08:46:04 +0200 Subject: [Gambas-user] A random sort of listview In-Reply-To: <49E238D4.8000202@...11...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> <49DB2E06.10204@...11...> <49DB4778.6050902@...11...> <23005690.post@...1379...> <49E13621.4070907@...11...> <23008540.post@...1379...> <49E19D79.6060607@...1909...> <49E238D4.8000202@...11...> Message-ID: <49E2DFAC.7070205@...1909...> Dominique SIMONART ha scritto: > Doriano Blengino a ?crit : > >> jbskaggs ha scritto: >> >> >>>>> FOR i = 0 TO ListView1.count - 1 STEP 1 >>>>> myArray[i] = i >>>>> NEXT >>>>> >>>>> FOR i = ListView1.count - 1 TO 0 STEP -1 >>>>> a = Int(Rnd(i + 1)) >>>>> SWAP myArray[i], myArray[a] >>>>> PRINT i, a >>>>> NEXT >>>>> >>>>> >>>>> >> Apart from the problem of missing records, there could be also a >> "randomness" problem in the algorithm... I am really not sure, but it >> seems that certain slots have more chances to be swapped than other - >> myarray[0] can be swapped COUNT times, while myarray[count-1] gets only >> a chance. I am not sure of what this signifies: it is true that the >> swap affects the values contained in slots, and not the slots >> themselves, but anyway there could be another method. One could also do >> this: >> >> for i = 0 to 1000 ' arbitrary value, large enough (>100?) >> c1 = int(rnd(listview1.count)) >> c2 = int(rnd(listview1.count)) >> swap myarray[c1], myarray[c2] >> next >> >> This way, every slot gets the same chances to be swapped; for sufficient >> loops, it should make a good job... perhaps more random than before. >> And perhaps, as the algorthm is different, it could solve the problem of >> missing records (which I didn't understand...). >> >> Cheers, >> >> >> > => I resend my message because it seems the text is missing?! :-\ > > This is not really a problem. The Randomizing process could be explained > like this: > 1) You align a sorted card deck in front of you on a table > 2) then, from all the cards on the table you take a random card in your > hand so there is a place without card on the table > 3) you put the last card on the table in this hole, so the hole is now > at the last place > 4) you continue by returning to 2 until you got all the cards in your hand > Now you have a randomized deck of cards in your hand > 5) you put the first card you got in the last place on the table and > continue to do that until you have no card in your hand. > Now the randomized deck of cards is on the table. > If you examine carefully this process, you will remark that each time > you filled a hole with the last remaining card on the table, you could > place the card you got just before in the last place, because it is > free! You only have to remember to not take these cards already > selected. So you could do the 5) between 3) and 4) and this is exactly > which is done by the SWAP instruction! > > It is true that some places will be selected several times, but their > content change each time (there is another card on these places each time). > In no way you could loose a card in this process!!. The JBskaggs' > problem, I think, is that, before he starts the process, there are twice > 2 identical cards in his deck and Gambas does not admit that, so when > Gambas encounters the duplicated cards it reject them, (but since TRY is > used, you don't see the error!!) and finally, 2 cards are missing. > > Hope this is clearer :) > I agree to everything you wrote. The first algorithm, the one you explain, is the "more correct" because with the minimum number of swaps you obtain a random sequence. It is equivalent to build another list based on the first, without using two lists, and you expressed it very well. Without analyzing too much, I said "some slots get more chances than other", pointing out that the slots have different chances, and not the values inside the slots (which is different). Then, recalling to my mind the way a person shuffles cards by hand, I tried to express another algorithm, which in a certain way lets you to adjust the randomness: a person can shuffle very well, or not. But, thinking over, my algorithm does not fully respect this situation, because a true player shuffles cards in chunks, by taking the last part of a deck and scattering it in the middle of the remaining part... If someone wants to write a realistic card games, perhaps could consider this. Anyway, I repeat, you were right - the first algorithm is ok. Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From gambas at ...1... Mon Apr 13 10:22:13 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Mon, 13 Apr 2009 10:22:13 +0200 Subject: [Gambas-user] Input box incorrect size of the text control. My first problem. In-Reply-To: <23013689.post@...1379...> References: <23013689.post@...1379...> Message-ID: <200904131022.13610.gambas@...1...> > Hi, everybody! Excuse my English. > > I've noticed an embarrasing 'bug' when I use an Input Box in my programs. > Functionality isn't put at risk but looks horrible. I think an image is > better than words... > > http://www.nabble.com/file/p23013689/inputbox.png > > > > How can I fix this problem? It happens whatever computer is used. I think this is a bug in gb.gtk. To fix that at the moment, you can write your own InputBox. The source code of InputBox is in the gb.form component source code, so you can take it and modify it for your own use. I will look at it later. Regards, -- Beno?t From gambas at ...1... Mon Apr 13 10:31:58 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Mon, 13 Apr 2009 10:31:58 +0200 Subject: [Gambas-user] Busy with theatre... Message-ID: <200904131031.59009.gambas@...1...> Hi, I will play at the "festival du th??tre universitaire de Cabourg" (academic theatre festival of Cabourg - http://www.cabourg.net/spip.php?article388), and so won't be in front of my computer between Wednesday, 15th and Sunday, 19th. There are two or three pending bugs, so people must be patient. If some french reader leaving near Cabourg read that, maybe he can come to see me. :-) The play is "Les Justes", from Albert Camus. Regards, -- Beno?t From jbskaggs at ...1871... Mon Apr 13 11:23:25 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Mon, 13 Apr 2009 02:23:25 -0700 (PDT) Subject: [Gambas-user] Busy with theatre... In-Reply-To: <200904131031.59009.gambas@...1...> References: <200904131031.59009.gambas@...1...> Message-ID: <23019892.post@...1379...> Theatre and drama is hardwork- to do that and Gambas is impressive. Wish I could see the play - but Im stuck in Kansas. JB Bugzilla from gambas at ...1... wrote: > > Hi, > > I will play at the "festival du th??tre universitaire de Cabourg" > (academic > theatre festival of Cabourg - http://www.cabourg.net/spip.php?article388), > and > so won't be in front of my computer between Wednesday, 15th and Sunday, > 19th. > > There are two or three pending bugs, so people must be patient. > > If some french reader leaving near Cabourg read that, maybe he can come to > see > me. :-) The play is "Les Justes", from Albert Camus. > > Regards, > > -- > Beno?t > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > 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/Busy-with-theatre...-tp23019427p23019892.html Sent from the gambas-user mailing list archive at Nabble.com. From shordi at ...626... Mon Apr 13 13:27:58 2009 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Mon, 13 Apr 2009 13:27:58 +0200 Subject: [Gambas-user] Busy with theatre... In-Reply-To: <23019892.post@...1379...> References: <200904131031.59009.gambas@...1...> <23019892.post@...1379...> Message-ID: Good luck with the play 2009/4/13 jbskaggs > > Theatre and drama is hardwork- to do that and Gambas is impressive. > > Wish I could see the play - but Im stuck in Kansas. > > JB > > > Bugzilla from gambas at ...1... wrote: > > > > Hi, > > > > I will play at the "festival du th??tre universitaire de Cabourg" > > (academic > > theatre festival of Cabourg - http://www.cabourg.net/spip.php?article388 > ), > > and > > so won't be in front of my computer between Wednesday, 15th and Sunday, > > 19th. > > > > There are two or three pending bugs, so people must be patient. > > > > If some french reader leaving near Cabourg read that, maybe he can come > to > > see > > me. :-) The play is "Les Justes", from Albert Camus. > > > > Regards, > > > > -- > > Beno?t > > > > > ------------------------------------------------------------------------------ > > This SF.net email is sponsored by: > > High Quality Requirements in a Collaborative Environment. > > Download a free trial of Rational Requirements Composer Now! > > http://p.sf.net/sfu/www-ibm-com > > _______________________________________________ > > 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/Busy-with-theatre...-tp23019427p23019892.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From m0e.lnx at ...626... Mon Apr 13 15:05:27 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Mon, 13 Apr 2009 08:05:27 -0500 Subject: [Gambas-user] shared librarry into gambas In-Reply-To: <49DE6917.3010206@...1909...> References: <22953732.post@...1379...> <384d3900904081022i1903e4d5wcba50e4efbcc5c19@...627...> <20090408154803.03a76a6f@...2125...> <49DD9503.6060809@...1909...> <20090409074255.0e032137@...2125...> <49DE6917.3010206@...1909...> Message-ID: <20090413080527.37321ff5@...2125...> Thanks a lot man... This certainly helps. I'll see if I can follow your example into making something useful with libparted. I found the API references here http://www.gnu.org/software/parted/api/modules.html From simonart.dominique at ...11... Mon Apr 13 15:50:58 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Mon, 13 Apr 2009 15:50:58 +0200 Subject: [Gambas-user] A random sort of listview In-Reply-To: <49E2DFAC.7070205@...1909...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> <49DB2E06.10204@...11...> <49DB4778.6050902@...11...> <23005690.post@...1379...> <49E13621.4070907@...11...> <23008540.post@...1379...> <49E19D79.6060607@...1909...> <49E238D4.8000202@...11...> <49E2DFAC.7070205@...1909...> Message-ID: <49E34342.3000805@...11...> Hi Doriano, > I agree to everything you wrote. I thought the same about what you wrote! :) >... Then, recalling to my mind >the way a person shuffles cards by hand, I tried to express another >algorithm, which in a certain way lets you to adjust the randomness: a >person can shuffle very well, or not. But, thinking over, my algorithm >does not fully respect this situation, because a true player shuffles >cards in chunks, by taking the last part of a deck and scattering it in >the middle of the remaining part... If someone wants to write a >realistic card games, perhaps could consider this. It could be interesting to define a sort of "randomness evaluation", so we could compare several methods or evaluate the efficient limit to use. For exemple, you take 1000 in your method but may be 500 will be enough? I will take a 10 cards' deck as illustration I could think about 2 criters: 1) absolute difference between the initial and the final positions 2) absolute difference between 2 adjacent items The first criter is not fair because all the places are not equivalent! the 5th position could not exceed a 5 difference but the 0th position could be 9! So we have to consider the serie 0-9 as a ring were 0 is next to 9, so the maximum difference is 5. The same could be said about the second criter! Now, I will stop to talk about that because it's no more Gambas related :( cheers Dominique Simonart From jussi.lahtinen at ...626... Mon Apr 13 21:14:15 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 13 Apr 2009 22:14:15 +0300 Subject: [Gambas-user] In Plain English- A definition of the Datatypes please? In-Reply-To: <22983213.post@...1379...> References: <22983213.post@...1379...> Message-ID: <384d3900904131214v49412039r64cc4c3d2210a7f5@...627...> Hi! For me, because of my experience, documentation of datatypes is self evident. I think you should be more precise with your question. What you don't understand? Short, integer and long are pretty much all same thing, but they can hold different maximum (and minimum [negative]) values. Short, integer and long can contain only whole number, so example 3.1415 cannot be stored to integer type variable. Byte is like above, but it can't contain negative values. Byte is also used as size unit, because it always means 8 bit (bit means one state, which can be 1 or 0 [ see: http://en.wikipedia.org/wiki/Binary_numeral_system ]). So, if you need to store value of Pi, you need float type of variable. These are single and float. They are different not only for maximum values, but with accuracy to describe given value. See http://en.wikipedia.org/wiki/Floating_point . Rest are basically just different amount of bits too... but you need more deep understanding of computers. For this moment I can't figure how to explain concepts like pointers with simple terms. You must study. Wikipedia and google is your friend. Hope that helps! Jussi On Fri, Apr 10, 2009 at 08:10, jbskaggs wrote: > > Earlier this week I was given an excellent definition oh Hungarian Convetion > naming ie the h in hObjects. > > Could someone either point me to a resource in plain English or explain to > me in plain English the Datatypes? > > Integer > Long > Short > Array > etc... > > this is what I found on the documentation: > > Datatype ? ? ? ?Description ? ? Default value ? Size in memory > Boolean ? ? ? ? True or false. ?FALSE ? 1 byte > Byte ? ?0...255 ? ? ? ? 0 ? ? ? 1 byte > Short ? -32.768...+32.767 ? ? ? 0 ? ? ? 2 bytes > Integer ? ? ? ? -2.147.483.648...+2.147.483.647 ? ? ? ? 0 ? ? ? 4 bytes > Long ? ?-9.223.372.036.854.775.808...+9.223.372.036.854.775.807 ? ? ? ? 0 ? ? ? 8 bytes > Single ?Like the float datatype in C. ? 0.0 ? ? 4 bytes > Float ? Like the double datatype in C. ?0.0 ? ? 8 bytes > Date ? ?Date and time, each stored in an integer. ? ? ? NULL ? ?8 bytes > String ?A variable length string of characters. ? ? ? ? NULL ? ?4 bytes > Variant ? ? ? ? Any datatype. ? NULL ? ?12 bytes > Object ?Anonymous reference to any object. ? ? ?NULL ? ?4 bytes > Pointer ? ? ? ? A memory address. ? ? ? 0 ? ? ? 4 bytes on 32 bits systems, > 8 bytes on 64 bits systems. > > For a novice like me I have made assumptions for the past year that turned > out to be wrong and I would like to make sure I grasp what this is saying > and not assume I do. > > Thanks > JB > -- > View this message in context: http://www.nabble.com/In-Plain-English--A-definition-of-the-Datatypes-please--tp22983213p22983213.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jbskaggs at ...1871... Mon Apr 13 21:57:48 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Mon, 13 Apr 2009 12:57:48 -0700 (PDT) Subject: [Gambas-user] A random sort of listview In-Reply-To: <49E34342.3000805@...11...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> <49DB2E06.10204@...11...> <49DB4778.6050902@...11...> <23005690.post@...1379...> <49E13621.4070907@...11...> <23008540.post@...1379...> <49E19D79.6060607@...1909...> <49E238D4.8000202@...11...> <49E2DFAC.7070205@...1909...> <49E34342.3000805@...11...> Message-ID: <23027115.post@...1379...> It is Gambas related! Where else are noobs like me going to learn this? Please continue as you are both teaching me Maestros! To stop now would be like taking candy from a baby just after the wrapper was opened. JB SKaggs Simonart Dominique wrote: > > Hi Doriano, > > > I agree to everything you wrote. > > I thought the same about what you wrote! :) > > >... Then, recalling to my mind > >the way a person shuffles cards by hand, I tried to > express another > >algorithm, which in a certain way lets you to adjust the > randomness: a > >person can shuffle very well, or not. But, thinking over, > my algorithm > >does not fully respect this situation, because a true > player shuffles > >cards in chunks, by taking the last part of a deck and > scattering it in > >the middle of the remaining part... If someone wants to > write a > >realistic card games, perhaps could consider this. > > It could be interesting to define a sort of "randomness > evaluation", so we could compare several methods or evaluate > the efficient limit to use. > For exemple, you take 1000 in your method but may be 500 > will be enough? > I will take a 10 cards' deck as illustration > I could think about 2 criters: > 1) absolute difference between the initial and the final > positions > 2) absolute difference between 2 adjacent items > > The first criter is not fair because all the places are not > equivalent! the 5th position could not exceed a 5 difference > but the 0th position could be 9! So we have to consider the > serie 0-9 as a ring were 0 is next to 9, so the maximum > difference is 5. > The same could be said about the second criter! > > Now, I will stop to talk about that because it's no more > Gambas related :( > > cheers > Dominique Simonart > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > 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/A-random-sort-of-listview-tp22919766p23027115.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas at ...1... Mon Apr 13 23:19:07 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Mon, 13 Apr 2009 23:19:07 +0200 Subject: [Gambas-user] X coordinate of a Form Frame. My Second Problem. In-Reply-To: <23013834.post@...1379...> References: <23013834.post@...1379...> Message-ID: <200904132319.07072.gambas@...1...> > I wrote some code to center a Form window, even the Desktop Size is > different. Here it is: > > FMain.X = Int((Desktop.Width - FMain.Width) / 2) > > FMain.Y = Int((Desktop.Height - FMain.Height) / 2) > > > Meanwhile the Form is resized regarding to the Y coordinate, it doesn't > work as well for the X coordinate. Why? It seems that FMain.X doesn't > 'catch up' a number (FMain.X=100 won't work too) > > What's happening? Please, help me!!! :-) I tested a simple form with gb.gtk on KDE4, and everything seems to work as expected. Please: 1) Send your project. 2) Try with gb.qt to see the difference. 3) Check how your window manager moves newly opened windows. Regards, -- Beno?t From gambas at ...1... Mon Apr 13 23:22:23 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Mon, 13 Apr 2009 23:22:23 +0200 Subject: [Gambas-user] Input box incorrect size of the text control. My first problem. In-Reply-To: <200904131022.13610.gambas@...1...> References: <23013689.post@...1379...> <200904131022.13610.gambas@...1...> Message-ID: <200904132322.23221.gambas@...1...> > > Hi, everybody! Excuse my English. > > > > I've noticed an embarrasing 'bug' when I use an Input Box in my programs. > > Functionality isn't put at risk but looks horrible. I think an image is > > better than words... > > > > http://www.nabble.com/file/p23013689/inputbox.png > > > > > > > > How can I fix this problem? It happens whatever computer is used. > > I think this is a bug in gb.gtk. > > To fix that at the moment, you can write your own InputBox. The source code > of InputBox is in the gb.form component source code, so you can take it and > modify it for your own use. > > I will look at it later. > > Regards, I tested, and everything seems to be normal. Which version of Gambas do you use? -- Beno?t From jbskaggs at ...1871... Tue Apr 14 04:41:13 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Mon, 13 Apr 2009 19:41:13 -0700 (PDT) Subject: [Gambas-user] In Plain English- A definition of the Datatypes please? In-Reply-To: <384d3900904131214v49412039r64cc4c3d2210a7f5@...627...> References: <22983213.post@...1379...> <384d3900904131214v49412039r64cc4c3d2210a7f5@...627...> Message-ID: <23032277.post@...1379...> Thank you, I shall search more. One of the problems I find is that many of the terms have multiple meanings for example their meaning in mathmetics does not always equal the definition in gambas or basic and basic terms do not always match terms in other langauges so that finding meanings in wiki or google makes it hard- especially when I dont know which one applies. A good example: I was trying to find a command that changed the position in the order that components were drawn-I found that the command .raise did that- but I had previously thought the command raise meant to "raise the event flag". English is not the best language to program in- or speak for that matter because the words have so many different meanings in different contexts. It wasn't until I learned a little Greek in bible college how imprecise English is unfortunately it is the only language I speak with any understanding. JB Skaggs Jussi Lahtinen wrote: > > Hi! > For me, because of my experience, documentation of datatypes is self > evident. > I think you should be more precise with your question. > What you don't understand? > > Short, integer and long are pretty much all same thing, but they can > hold different maximum > (and minimum [negative]) values. Short, integer and long can contain > only whole number, so > example 3.1415 cannot be stored to integer type variable. > > Byte is like above, but it can't contain negative values. > Byte is also used as size unit, because it always means 8 bit (bit > means one state, which > can be 1 or 0 [ see: http://en.wikipedia.org/wiki/Binary_numeral_system > ]). > > So, if you need to store value of Pi, you need float type of variable. > These are single and float. They are different not only for maximum > values, but with > accuracy to describe given value. See > http://en.wikipedia.org/wiki/Floating_point . > > Rest are basically just different amount of bits too... but you need > more deep understanding > of computers. For this moment I can't figure how to explain concepts > like pointers with > simple terms. You must study. Wikipedia and google is your friend. > > Hope that helps! > > > Jussi > > > > On Fri, Apr 10, 2009 at 08:10, jbskaggs wrote: >> >> Earlier this week I was given an excellent definition oh Hungarian >> Convetion >> naming ie the h in hObjects. >> >> Could someone either point me to a resource in plain English or explain >> to >> me in plain English the Datatypes? >> >> Integer >> Long >> Short >> Array >> etc... >> >> this is what I found on the documentation: >> >> Datatype ? ? ? ?Description ? ? Default value ? Size in memory >> Boolean ? ? ? ? True or false. ?FALSE ? 1 byte >> Byte ? ?0...255 ? ? ? ? 0 ? ? ? 1 byte >> Short ? -32.768...+32.767 ? ? ? 0 ? ? ? 2 bytes >> Integer ? ? ? ? -2.147.483.648...+2.147.483.647 ? ? ? ? 0 ? ? ? 4 bytes >> Long ? ?-9.223.372.036.854.775.808...+9.223.372.036.854.775.807 ? ? ? ? 0 >> ? ? ? 8 bytes >> Single ?Like the float datatype in C. ? 0.0 ? ? 4 bytes >> Float ? Like the double datatype in C. ?0.0 ? ? 8 bytes >> Date ? ?Date and time, each stored in an integer. ? ? ? NULL ? ?8 bytes >> String ?A variable length string of characters. ? ? ? ? NULL ? ?4 bytes >> Variant ? ? ? ? Any datatype. ? NULL ? ?12 bytes >> Object ?Anonymous reference to any object. ? ? ?NULL ? ?4 bytes >> Pointer ? ? ? ? A memory address. ? ? ? 0 ? ? ? 4 bytes on 32 bits >> systems, >> 8 bytes on 64 bits systems. >> >> For a novice like me I have made assumptions for the past year that >> turned >> out to be wrong and I would like to make sure I grasp what this is saying >> and not assume I do. >> >> Thanks >> JB >> -- >> View this message in context: >> http://www.nabble.com/In-Plain-English--A-definition-of-the-Datatypes-please--tp22983213p22983213.html >> Sent from the gambas-user mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by: >> High Quality Requirements in a Collaborative Environment. >> Download a free trial of Rational Requirements Composer Now! >> http://p.sf.net/sfu/www-ibm-com >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > 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/In-Plain-English--A-definition-of-the-Datatypes-please--tp22983213p23032277.html Sent from the gambas-user mailing list archive at Nabble.com. From doriano.blengino at ...1909... Tue Apr 14 10:31:19 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Tue, 14 Apr 2009 10:31:19 +0200 Subject: [Gambas-user] shared librarry into gambas In-Reply-To: <20090413080527.37321ff5@...2125...> References: <22953732.post@...1379...> <384d3900904081022i1903e4d5wcba50e4efbcc5c19@...627...> <20090408154803.03a76a6f@...2125...> <49DD9503.6060809@...1909...> <20090409074255.0e032137@...2125...> <49DE6917.3010206@...1909...> <20090413080527.37321ff5@...2125...> Message-ID: <49E449D7.5050308@...1909...> M0E Lnx ha scritto: > Thanks a lot man... This certainly helps. > > I'll see if I can follow your example into making something useful with > libparted. > > I found the API references here > http://www.gnu.org/software/parted/api/modules.html > Ok, this documentation seems a big step forward... best wishes for your project! :-) Doriano From doriano.blengino at ...1909... Tue Apr 14 10:39:55 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Tue, 14 Apr 2009 10:39:55 +0200 Subject: [Gambas-user] A random sort of listview In-Reply-To: <23027115.post@...1379...> References: <22919766.post@...1379...> <49DAA6E8.4050402@...11...> <49DAB271.3020807@...11...> <22922075.post@...1379...> <49DB2E06.10204@...11...> <49DB4778.6050902@...11...> <23005690.post@...1379...> <49E13621.4070907@...11...> <23008540.post@...1379...> <49E19D79.6060607@...1909...> <49E238D4.8000202@...11...> <49E2DFAC.7070205@...1909...> <49E34342.3000805@...11...> <23027115.post@...1379...> Message-ID: <49E44BDB.2010701@...1909...> jbskaggs ha scritto: > It is Gambas related! Where else are noobs like me going to learn this? > > Please continue as you are both teaching me Maestros! To stop now would be > like taking candy from a baby just after the wrapper was opened. > Thanks for your appreciation words. What Dominique said, I think, is that when the "gambas" part of the discussion is over, it is best to continue the discussion elsewhere, if wanted, as this list is for gambas questions. Nobody wants to take away your candies - when you have questions, just post to this lists and, when you have experiences to share, post again - everyone in this list is here to exchange knowledge and advice (about gambas). Regarding the randomize algorithm, well, I think we reached the goal but, if you still have doubts, try to post again... Cheers, Doriano From doriano.blengino at ...1909... Tue Apr 14 10:51:41 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Tue, 14 Apr 2009 10:51:41 +0200 Subject: [Gambas-user] In Plain English- A definition of the Datatypes please? In-Reply-To: <23032277.post@...1379...> References: <22983213.post@...1379...> <384d3900904131214v49412039r64cc4c3d2210a7f5@...627...> <23032277.post@...1379...> Message-ID: <49E44E9D.5040205@...1909...> jbskaggs ha scritto: > Thank you, > > I shall search more. One of the problems I find is that many of the terms > have multiple meanings for example their meaning in mathmetics does not > always equal the definition in gambas or basic and basic terms do not always > match > terms in other langauges so that finding meanings in wiki or google makes it > hard- especially when I dont know which one applies. > > > A good example: > > I was trying to find a command that changed the position in the order that > components were drawn-I found that the command .raise did that- but I had > previously thought the command raise meant to "raise the event flag". > > English is not the best language to program in- or speak for that matter > because the words have so many different meanings in different contexts. It > wasn't until I learned a little Greek in bible college how imprecise > English is unfortunately it is the only language I speak with any > understanding. > Uhm... I don't like English, just like you, but perhaps you are too much critic. There are very precise words in English too, and "Raise" is one of them. If you put a control on the top of another, then you are effectively raising it; the fact in gambas RAISE has also another meaning is not an English fault (and nor a gambas one: think at raising an event like to throw it in the air, waiting for someone else to catch it. This figurates what the things actually are). Don't be in a hurry - take your time and you will discover, day after day, that for programming english is as good as many other languages, and in this very moment English is the mean by which you and me communicate. If you have questions about gambas, try to post: someone will reply and clarify things. Regards and cheers, Doriano From jbskaggs at ...1871... Tue Apr 14 11:00:48 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Tue, 14 Apr 2009 02:00:48 -0700 (PDT) Subject: [Gambas-user] In Plain English- A definition of the Datatypes please? In-Reply-To: <49E44E9D.5040205@...1909...> References: <22983213.post@...1379...> <384d3900904131214v49412039r64cc4c3d2210a7f5@...627...> <23032277.post@...1379...> <49E44E9D.5040205@...1909...> Message-ID: <23035746.post@...1379...> You are correct:) Thanks for your kind words. JB Doriano Blengino wrote: > > jbskaggs ha scritto: >> Thank you, >> >> I shall search more. One of the problems I find is that many of the >> terms >> have multiple meanings for example their meaning in mathmetics does not >> always equal the definition in gambas or basic and basic terms do not >> always >> match >> terms in other langauges so that finding meanings in wiki or google makes >> it >> hard- especially when I dont know which one applies. >> >> >> A good example: >> >> I was trying to find a command that changed the position in the order >> that >> components were drawn-I found that the command .raise did that- but I had >> previously thought the command raise meant to "raise the event flag". >> >> English is not the best language to program in- or speak for that matter >> because the words have so many different meanings in different contexts. >> It >> wasn't until I learned a little Greek in bible college how imprecise >> English is unfortunately it is the only language I speak with any >> understanding. >> > Uhm... I don't like English, just like you, but perhaps you are too much > critic. There are very precise words in English too, and "Raise" is one > of them. If you put a control on the top of another, then you are > effectively raising it; the fact in gambas RAISE has also another > meaning is not an English fault (and nor a gambas one: think at raising > an event like to throw it in the air, waiting for someone else to catch > it. This figurates what the things actually are). > > Don't be in a hurry - take your time and you will discover, day after > day, that for programming english is as good as many other languages, > and in this very moment English is the mean by which you and me > communicate. > > If you have questions about gambas, try to post: someone will reply and > clarify things. > > Regards and cheers, > Doriano > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > 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/In-Plain-English--A-definition-of-the-Datatypes-please--tp22983213p23035746.html Sent from the gambas-user mailing list archive at Nabble.com. From tsopanotragi at ...67... Tue Apr 14 11:21:34 2009 From: tsopanotragi at ...67... (vlahonick vlahonick) Date: Tue, 14 Apr 2009 12:21:34 +0300 Subject: [Gambas-user] binary numeral system Message-ID: hello all :D i am trying to create a program that calculates a number from the binary numeral system and gives a result example of what the program will do : we have the number (at binary numeral system) 10011 so to have result we have to do (1*2^4)+(0*2^3)+(0*2^2)+(1*2^1)+(1*2^0)= 16+0+0+2+1=19 to do that in a program first i have to calculate the powers so i have to write (y=number of digits) for the first of the digits y-1,second y-2etc so if i have 5 digits then the power for the first one will be y-1=5-1=4 this is done by the Len(textbox1.text) but HOW i will write Len(textbox1.text)=y ????? then how i can make the program to recognize that for the 1st digit entered in the Textbox1.text have to give (d*2^y-1) (d=the digit that can be 0 or 1 and y the number of the digits) for the second (d*2^y-2)etc... so the main question is how i can make JUST ONE TEXTBOX to understand that for every digits enter it will give something else for a result sorry about my english but it has been long time since i had english lessons... plz if u dont understand something let me know and i will try to explain better... if you want to contact me directly :tsopanotragi at ...67... | vlahonick at ...2136...6... | chris at ...2135... thanks in advance Vlahonick (all the truth is always in www.vlahonick.freehost.gr) _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx From emil at ...1913... Tue Apr 14 12:59:43 2009 From: emil at ...1913... (Emil Tchekov) Date: Tue, 14 Apr 2009 12:59:43 +0200 Subject: [Gambas-user] binary numeral system In-Reply-To: Message-ID: Hi, I do not have so much experience with Gambas, but a lot with VB What I will do in such case: Write a subroutine that gets string as input and converts it in a decimal number. Than create your control (text box) and bind the change event (AfterUpdate in VB) with your routine... That is all. On each character tipped in the box the subroutine is invoked and new result will be produced. Ofcourse you have to add some error handling (as Example: catch any other chars different from 0 and 1, avoid overflow trough accepting only defined number of chars etc.) Hope this helps kind regards Emil -----Ursprungliche Nachricht----- Von: vlahonick vlahonick [mailto:tsopanotragi at ...67...] Gesendet: Dienstag, 14. April 2009 11:22 An: gambas-user at lists.sourceforge.net Betreff: [Gambas-user] binary numeral system hello all :D i am trying to create a program that calculates a number from the binary numeral system and gives a result example of what the program will do : we have the number (at binary numeral system) 10011 so to have result we have to do (1*2^4)+(0*2^3)+(0*2^2)+(1*2^1)+(1*2^0)= 16+0+0+2+1=19 to do that in a program first i have to calculate the powers so i have to write (y=number of digits) for the first of the digits y-1,second y-2etc so if i have 5 digits then the power for the first one will be y-1=5-1=4 this is done by the Len(textbox1.text) but HOW i will write Len(textbox1.text)=y ????? then how i can make the program to recognize that for the 1st digit entered in the Textbox1.text have to give (d*2^y-1) (d=the digit that can be 0 or 1 and y the number of the digits) for the second (d*2^y-2)etc... so the main question is how i can make JUST ONE TEXTBOX to understand that for every digits enter it will give something else for a result sorry about my english but it has been long time since i had english lessons... plz if u dont understand something let me know and i will try to explain better... if you want to contact me directly :tsopanotragi at ...67... | vlahonick at ...626... | chris at ...2135... thanks in advance Vlahonick (all the truth is always in www.vlahonick.freehost.gr) _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx ---------------------------------------------------------------------------- -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From simonart.dominique at ...11... Tue Apr 14 14:04:06 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Tue, 14 Apr 2009 14:04:06 +0200 Subject: [Gambas-user] binary numeral system In-Reply-To: References: Message-ID: <49E47BB6.604@...11...> vlahonick vlahonick a ?crit : > > hello all :D > > i am trying to create a program that calculates a number from the binary numeral system and gives a result > > example of what the program will do : > > we have the number (at binary numeral system) 10011 > > so to have result we have to do (1*2^4)+(0*2^3)+(0*2^2)+(1*2^1)+(1*2^0)= > 16+0+0+2+1=19 > > to do that in a program first i have to calculate the powers > so i have to write (y=number of digits) for the first of the digits y-1,second y-2etc > > so if i have 5 digits then the power for the first one will be y-1=5-1=4 > > this is done by the Len(textbox1.text) > > but HOW i will write Len(textbox1.text)=y ????? > > then how i can make the program to recognize that for the 1st digit entered in the Textbox1.text have to > give (d*2^y-1) (d=the digit that can be 0 or 1 and y the number of the digits) for the second (d*2^y-2)etc... > > so the main question is how i can make JUST ONE TEXTBOX to understand that for every digits enter it will give something else for a result > > sorry about my english but it has been long time since i had english lessons... > plz if u dont understand something let me know and i will try to explain better... > if you want to contact me directly :tsopanotragi at ...67... | vlahonick at ...1107...626... | chris at ...2135... > > thanks in advance Vlahonick (all the truth is always in www.vlahonick.freehost.gr) > > _________________________________________________________________ > News, entertainment and everything you care about at Live.com. Get it now! > http://www.live.com/getstarted.aspx > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > Hi Vlahonick, I'm not sure to understand exactly what you want to do! 1) If you want to convert a bynary number to decimal value, you just have to write in Gambas exactly what you sayd in your message! :) 2) If you want to display the changing decimal value as soon as you enter a binary digit, this is not possible because you don't know what WILL be the final length of the binary number! For the 1) comprehension, here is an exemple (I took a TextArea because I want to start a new line in the text) PUBLIC SUB Button1_Click() DIM S AS String DIM i, y, N AS Integer S = TextArea1.Text y = Len(S) if y = 0 THEN RETURN N = 0 FOR i = 1 to y d = Val(Mid(S, i, 1)) ' I assume that d is 0 or 1 N += d * (2 ^ (y-i)) NEXT TextArea1.Text &= "\nBinary " & S & " = decimal " & Str(N) END Hope I understand you! Dominique Simonart From emil at ...1913... Tue Apr 14 14:24:06 2009 From: emil at ...1913... (Emil Tchekov) Date: Tue, 14 Apr 2009 14:24:06 +0200 Subject: [Gambas-user] binary numeral system In-Reply-To: <49E47BB6.604@...11...> Message-ID: Just checked the gambas online documentation. The TextBox does have "CHANGE" event - thus it is possible to make converter wich reacts on each additional letter typed as example here my "fast shoot" maded in VB6 - very simple and without error handling (BUT WORKING!) Private Sub txtBin_Change() Dim StrBin As String StrBin = Me.txtBin If StrBin <> "" Then Me.lblDec.Caption = CStr(dec(StrBin)) Else Me.lblDec.Caption = "n.a." End If End Sub Private Function dec(ByVal StrBin As String) As Long Dim i As Integer Dim l As Integer Dim c As String l = Len(StrBin) dec = 0 For i = 1 To l c = Mid(StrBin, i, 1) If c = "1" Then dec = dec + 2 ^ (l - i) End If Next i End Function very best regards Emil -----Urspr?ngliche Nachricht----- Von: Simonart Dominique [mailto:simonart.dominique at ...11...] Gesendet: Dienstag, 14. April 2009 14:04 An: mailing list for gambas users Betreff: Re: [Gambas-user] binary numeral system vlahonick vlahonick a ?crit : > > hello all :D > > i am trying to create a program that calculates a number from the binary numeral system and gives a result > > example of what the program will do : > > we have the number (at binary numeral system) 10011 > > so to have result we have to do (1*2^4)+(0*2^3)+(0*2^2)+(1*2^1)+(1*2^0)= > 16+0+0+2+1=19 > > to do that in a program first i have to calculate the powers > so i have to write (y=number of digits) for the first of the digits y-1,second y-2etc > > so if i have 5 digits then the power for the first one will be y-1=5-1=4 > > this is done by the Len(textbox1.text) > > but HOW i will write Len(textbox1.text)=y ????? > > then how i can make the program to recognize that for the 1st digit entered in the Textbox1.text have to > give (d*2^y-1) (d=the digit that can be 0 or 1 and y the number of the digits) for the second (d*2^y-2)etc... > > so the main question is how i can make JUST ONE TEXTBOX to understand that for every digits enter it will give something else for a result > > sorry about my english but it has been long time since i had english lessons... > plz if u dont understand something let me know and i will try to explain better... > if you want to contact me directly :tsopanotragi at ...67... | vlahonick at ...626... | chris at ...2135... > > thanks in advance Vlahonick (all the truth is always in www.vlahonick.freehost.gr) > > _________________________________________________________________ > News, entertainment and everything you care about at Live.com. Get it now! > http://www.live.com/getstarted.aspx > -------------------------------------------------------------------------- ---- > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > Hi Vlahonick, I'm not sure to understand exactly what you want to do! 1) If you want to convert a bynary number to decimal value, you just have to write in Gambas exactly what you sayd in your message! :) 2) If you want to display the changing decimal value as soon as you enter a binary digit, this is not possible because you don't know what WILL be the final length of the binary number! For the 1) comprehension, here is an exemple (I took a TextArea because I want to start a new line in the text) PUBLIC SUB Button1_Click() DIM S AS String DIM i, y, N AS Integer S = TextArea1.Text y = Len(S) if y = 0 THEN RETURN N = 0 FOR i = 1 to y d = Val(Mid(S, i, 1)) ' I assume that d is 0 or 1 N += d * (2 ^ (y-i)) NEXT TextArea1.Text &= "\nBinary " & S & " = decimal " & Str(N) END Hope I understand you! Dominique Simonart ---------------------------------------------------------------------------- -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From jeff at ...2103... Tue Apr 14 14:52:59 2009 From: jeff at ...2103... (Jeff) Date: Tue, 14 Apr 2009 22:52:59 +1000 Subject: [Gambas-user] binary numeral system In-Reply-To: References: Message-ID: <1239713579.5849.1.camel@...2104...> Gah - you just beat me :-) Mine is as follows. Interesting to see different styles/solutions: PRIVATE FUNCTION myBin(binString AS String) AS Long DIM i AS Integer DIM length AS Integer DIM binResult AS Long = 0 length = Len(binString) FOR i = length TO 1 STEP -1 binResult = binResult + CInt(Mid(binString, i, 1)) * Exp2(length - i) NEXT RETURN binResult END On Tue, 2009-04-14 at 14:24 +0200, Emil Tchekov wrote: > Just checked the gambas online documentation. > > The TextBox does have "CHANGE" event - thus it is possible to make converter > wich reacts on each additional letter typed > > as example here my "fast shoot" maded in VB6 - very simple and without error > handling (BUT WORKING!) > > > Private Sub txtBin_Change() > Dim StrBin As String > > StrBin = Me.txtBin > > If StrBin <> "" Then > > Me.lblDec.Caption = CStr(dec(StrBin)) > > Else > > Me.lblDec.Caption = "n.a." > > End If > > End Sub > > > Private Function dec(ByVal StrBin As String) As Long > Dim i As Integer > Dim l As Integer > Dim c As String > > > > l = Len(StrBin) > > dec = 0 > > For i = 1 To l > > c = Mid(StrBin, i, 1) > > If c = "1" Then > dec = dec + 2 ^ (l - i) > End If > > Next i > > End Function > > > > very best regards > > Emil > > > > > -----Urspr?ngliche Nachricht----- > Von: Simonart Dominique [mailto:simonart.dominique at ...11...] > Gesendet: Dienstag, 14. April 2009 14:04 > An: mailing list for gambas users > Betreff: Re: [Gambas-user] binary numeral system > > > vlahonick vlahonick a ?crit : > > > > hello all :D > > > > i am trying to create a program that calculates a number from the binary > numeral system and gives a result > > > > example of what the program will do : > > > > we have the number (at binary numeral system) 10011 > > > > so to have result we have to do (1*2^4)+(0*2^3)+(0*2^2)+(1*2^1)+(1*2^0)= > > 16+0+0+2+1=19 > > > > to do that in a program first i have to calculate the powers > > so i have to write (y=number of digits) for the first of the digits > y-1,second y-2etc > > > > so if i have 5 digits then the power for the first one will be y-1=5-1=4 > > > > this is done by the Len(textbox1.text) > > > > but HOW i will write Len(textbox1.text)=y ????? > > > > then how i can make the program to recognize that for the 1st digit > entered in the Textbox1.text have to > > give (d*2^y-1) (d=the digit that can be 0 or 1 and y the number of the > digits) for the second (d*2^y-2)etc... > > > > so the main question is how i can make JUST ONE TEXTBOX to understand that > for every digits enter it will give something else for a result > > > > sorry about my english but it has been long time since i had english > lessons... > > plz if u dont understand something let me know and i will try to explain > better... > > if you want to contact me directly :tsopanotragi at ...67... | > vlahonick at ...626... | chris at ...2135... > > > > thanks in advance Vlahonick (all the truth is always in > www.vlahonick.freehost.gr) > > > > _________________________________________________________________ > > News, entertainment and everything you care about at Live.com. Get it now! > > http://www.live.com/getstarted.aspx > > -------------------------------------------------------------------------- > ---- > > This SF.net email is sponsored by: > > High Quality Requirements in a Collaborative Environment. > > Download a free trial of Rational Requirements Composer Now! > > http://p.sf.net/sfu/www-ibm-com > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > Hi Vlahonick, > > I'm not sure to understand exactly what you want to do! > 1) If you want to convert a bynary number to decimal value, > you just have to write in Gambas exactly what you sayd in > your message! :) > 2) If you want to display the changing decimal value as soon > as you enter a binary digit, this is not possible because > you don't know what WILL be the final length of the binary > number! > > For the 1) comprehension, here is an exemple (I took a > TextArea because I want to start a new line in the text) > > PUBLIC SUB Button1_Click() > DIM S AS String > DIM i, y, N AS Integer > > S = TextArea1.Text > y = Len(S) > if y = 0 THEN RETURN > N = 0 > FOR i = 1 to y > d = Val(Mid(S, i, 1)) ' I assume that d is 0 or 1 > N += d * (2 ^ (y-i)) > NEXT > TextArea1.Text &= "\nBinary " & S & " = decimal " & Str(N) > END > > Hope I understand you! > Dominique Simonart > > > ---------------------------------------------------------------------------- > -- > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From tsopanotragi at ...67... Tue Apr 14 15:21:26 2009 From: tsopanotragi at ...67... (vlahonick vlahonick) Date: Tue, 14 Apr 2009 16:21:26 +0300 Subject: [Gambas-user] ty Message-ID: THANKS YOU ALL for your replies... every anwser was very interesting but the simplest and best solution was Dominique's (special thanks). here is the final code : ' Gambas class file ' Designed by Vlahonick PUBLIC SUB _new() END PUBLIC SUB Form_Open() END PUBLIC SUB Button1_Click() DIM S AS String DIM i, y, N, d AS Integer S = Textbox1.Text y = Len(S) IF y = 0 THEN RETURN N = 0 FOR i = 1 TO y d = Val(Mid(S, i, 1)) N += d * (2 ^ (y - i)) NEXT Textbox2.Text = N END PUBLIC SUB Button2_Click() ty all again , Vlahonick textbox1.text = "" TextBox2.text = "" END _________________________________________________________________ Drag n? drop?Get easy photo sharing with Windows Live? Photos. http://www.microsoft.com/windows/windowslive/products/photos.aspx From jussi.lahtinen at ...626... Tue Apr 14 17:19:50 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 14 Apr 2009 18:19:50 +0300 Subject: [Gambas-user] In Plain English- A definition of the Datatypes please? In-Reply-To: <23035746.post@...1379...> References: <22983213.post@...1379...> <384d3900904131214v49412039r64cc4c3d2210a7f5@...627...> <23032277.post@...1379...> <49E44E9D.5040205@...1909...> <23035746.post@...1379...> Message-ID: <384d3900904140819u7a677cbte22f243a58db01e2@...627...> Getting little off-topic but... My native language is Finnish, but my operating system and every program on my computer is in English. Because all (at least almost) the new words arising form computer world are first in English. I don't want to do double job to learn them also in Finnish. In fact, now days it is little confusing when I have to use computer with Finnish UI. And talking about multiple meanings... Completely valid sentence in Finnish (repeating words written uppercase for better notice); "Kun LAKKAA SATAMASTA, haetaan LAKKAA SATAMASTA." In English; "When it stop raining, let's bring cloudberry from harbor." or; "When it stop raining, let's bring varnish from harbor." Think about that! So, I'm happy with English, although it is not written phonetic... Jussi On Tue, Apr 14, 2009 at 12:00, jbskaggs wrote: > > You are correct:) > > Thanks for your kind words. > > JB > > Doriano Blengino wrote: >> >> jbskaggs ha scritto: >>> Thank you, >>> >>> I shall search more. ?One of the problems I find is that many of the >>> terms >>> have multiple meanings for example their meaning in mathmetics does not >>> always equal the definition in gambas or basic and basic terms do not >>> always >>> match >>> terms in other langauges so that finding meanings in wiki or google makes >>> it >>> hard- especially when I dont know which one applies. >>> >>> >>> A good example: >>> >>> I was trying to find a command that changed the position in the order >>> that >>> components were drawn-I found that the command .raise did that- but I had >>> previously thought the command raise meant to "raise the event flag". >>> >>> English is not the best language to program in- or speak for that matter >>> because the words have so many different meanings in different contexts. >>> It >>> wasn't until I learned ?a little Greek in bible college how imprecise >>> English is unfortunately it is the only language I speak with any >>> understanding. >>> >> Uhm... I don't like English, just like you, but perhaps you are too much >> critic. There are very precise words in English too, and "Raise" is one >> of them. If you put a control on the top of another, then you are >> effectively raising it; the fact in gambas RAISE has also another >> meaning is not an English fault (and nor a gambas one: think at raising >> an event like to throw it in the air, waiting for someone else to catch >> it. This figurates what the things actually are). >> >> Don't be in a hurry - take your time and you will discover, day after >> day, that for programming english is as good as many other languages, >> and in this very moment English is the mean by which you and me >> communicate. >> >> If you have questions about gambas, try to post: someone will reply and >> clarify things. >> >> Regards and cheers, >> Doriano >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by: >> High Quality Requirements in a Collaborative Environment. >> Download a free trial of Rational Requirements Composer Now! >> http://p.sf.net/sfu/www-ibm-com >> _______________________________________________ >> 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/In-Plain-English--A-definition-of-the-Datatypes-please--tp22983213p23035746.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From ronstk at ...239... Tue Apr 14 18:28:20 2009 From: ronstk at ...239... (Ron_1st) Date: Tue, 14 Apr 2009 18:28:20 +0200 Subject: [Gambas-user] binary numeral system In-Reply-To: <49E47BB6.604@...11...> References: <49E47BB6.604@...11...> Message-ID: <200904141828.20483.ronstk@...239...> On Tuesday 14 April 2009, Simonart Dominique wrote: > PUBLIC SUB Button1_Click() > DIM S AS String > DIM i, y, N AS Integer > > ? ? S = TextArea1.Text > ? ? y = Len(S) > ? ? if y = 0 THEN RETURN > ? ? N = 0 > ? ? FOR i = 1 to y > ? ? ? ?d = Val(Mid(S, i, 1)) ' I assume that d is 0 or 1 > ? ? ? ?N += d * (2 ^ (y-i)) > ? ? NEXT > ? ? TextArea1.Text &= "\nBinary " & S & " = decimal " & Str(N) > END > function bin2dec(sBin) as long dim r as long r=0 for i= 1 to len(sBin) r = r*2 + Val(Mid(sBin, i, 1)) next return r end > PUBLIC SUB Button1_Click() > TextArea1.Text = "\nBinary " & TextArea1.Text & " = decimal " & bin2dec(TextArea1.Text) > END for 10011 as sBin the sequence is as follows: r*2=0 +1 = 1 r*2=2 +0 = 2 r*2=4 +0 = 4 r*2=8 +1 = 9 r*2=18 +1 =19 I does not matter the size of input string. The only limit is r should of apropiate type to hold the result. Multiply is faster as Power Best regards, Ron_1st From juergen.linder at ...17... Tue Apr 14 18:31:17 2009 From: juergen.linder at ...17... (juelin) Date: Tue, 14 Apr 2009 09:31:17 -0700 (PDT) Subject: [Gambas-user] open office text document Message-ID: <23042958.post@...1379...> hello, how can I show an open office text document (odt) into gambas textarea or some object like this? the document include pictures. the object embeded is not possible, while the user do not change the document and the document is not open with open office. kind regards J?rgen -- View this message in context: http://www.nabble.com/open-office-text-document-tp23042958p23042958.html Sent from the gambas-user mailing list archive at Nabble.com. From nando at ...2137... Tue Apr 14 20:55:04 2009 From: nando at ...2137... (nando) Date: Tue, 14 Apr 2009 20:55:04 +0200 Subject: [Gambas-user] databrowser.delete and databrowser.filter Message-ID: <1239735304.6456.5.camel@...1706...> Hi, first sorry for my little english. i have two questions: can i change the way databrowser.delete works? I don't want it to really delete a register, i have a field called online (yes/no), and i want just to change that value. Is it posible with databrowser? the other question is about databrowser.filter. what is the problem with this: dim uno as string uno=datacontrol1.value databrowser1.filter ="clientcode=uno" i always get a sql error. Thanks From simonart.dominique at ...11... Tue Apr 14 21:02:23 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Tue, 14 Apr 2009 21:02:23 +0200 Subject: [Gambas-user] binary numeral system In-Reply-To: <200904141828.20483.ronstk@...239...> References: <49E47BB6.604@...11...> <200904141828.20483.ronstk@...239...> Message-ID: <49E4DDBF.5070404@...11...> Ron_1st a ?crit : > On Tuesday 14 April 2009, Simonart Dominique wrote: >> PUBLIC SUB Button1_Click() >> DIM S AS String >> DIM i, y, N AS Integer >> >> S = TextArea1.Text >> y = Len(S) >> if y = 0 THEN RETURN >> N = 0 >> FOR i = 1 to y >> d = Val(Mid(S, i, 1)) ' I assume that d is 0 or 1 >> N += d * (2 ^ (y-i)) >> NEXT >> TextArea1.Text &= "\nBinary " & S & " = decimal " & Str(N) >> END >> > > > > function bin2dec(sBin) as long > dim r as long > r=0 > for i= 1 to len(sBin) > r = r*2 + Val(Mid(sBin, i, 1)) > next > return r > end > >> PUBLIC SUB Button1_Click() >> TextArea1.Text = "\nBinary " & TextArea1.Text & " = decimal " & bin2dec(TextArea1.Text) >> END > for 10011 as sBin the sequence is as follows: > r*2=0 +1 = 1 > r*2=2 +0 = 2 > r*2=4 +0 = 4 > r*2=8 +1 = 9 > r*2=18 +1 =19 > > > I does not matter the size of input string. > The only limit is r should of apropiate type > to hold the result. > Multiply is faster as Power > > > Best regards, > > Ron_1st > Thanks Ron! You're right, there is no need to use the power factor at all! My mind was not opened enough to see that! From agr1971gal at ...397... Tue Apr 14 22:16:20 2009 From: agr1971gal at ...397... (agrgal) Date: Tue, 14 Apr 2009 13:16:20 -0700 (PDT) Subject: [Gambas-user] X coordinate of a Form Frame. My Second Problem. In-Reply-To: <200904132319.07072.gambas@...1...> References: <23013834.post@...1379...> <200904132319.07072.gambas@...1...> Message-ID: <23047163.post@...1379...> This solution...: Try with gb.qt to see the difference. worked! Thank you. If it's relevant, I developed my project using gambas in a ASUS EEEPC Ubuntu based on Ubuntu Hardy. I installed the project in a normal Ubuntu Hardy and run all the same with the same problem. The fact is that I posted another message about Input Box wrong size ( http://www.nabble.com/Input-box-incorrect-size-of-the-text-control.-My-first-problem.-td23013689.html here ) and this solution made it fixed as well. Best regards, -- View this message in context: http://www.nabble.com/X-coordinate-of-a-Form-Frame.-My-Second-Problem.-tp23013834p23047163.html Sent from the gambas-user mailing list archive at Nabble.com. From agr1971gal at ...397... Tue Apr 14 22:18:22 2009 From: agr1971gal at ...397... (agrgal) Date: Tue, 14 Apr 2009 13:18:22 -0700 (PDT) Subject: [Gambas-user] Input box incorrect size of the text control. My first problem. In-Reply-To: <200904132322.23221.gambas@...1...> References: <23013689.post@...1379...> <200904131022.13610.gambas@...1...> <200904132322.23221.gambas@...1...> Message-ID: <23047199.post@...1379...> Please, see this http://www.nabble.com/Re%3A-X-coordinate-of-a-Form-Frame.-My-Second-Problem.-p23047163.html reply . -- View this message in context: http://www.nabble.com/Input-box-incorrect-size-of-the-text-control.-My-first-problem.-tp23013689p23047199.html Sent from the gambas-user mailing list archive at Nabble.com. From agr1971gal at ...397... Tue Apr 14 22:27:05 2009 From: agr1971gal at ...397... (agrgal) Date: Tue, 14 Apr 2009 13:27:05 -0700 (PDT) Subject: [Gambas-user] Input box incorrect size of the text control. My first problem. In-Reply-To: <200904130842.41270.rterry@...1946...> References: <23013689.post@...1379...> <200904130842.41270.rterry@...1946...> Message-ID: <23047372.post@...1379...> Thank you Richard. Still learning GAMBAS! I'll test your solution when I could, but a standard Inputbox should look normal, shouldn't it? Anyway, I'll take it in consideration. -- View this message in context: http://www.nabble.com/Input-box-incorrect-size-of-the-text-control.-My-first-problem.-tp23013689p23047372.html Sent from the gambas-user mailing list archive at Nabble.com. From jbskaggs at ...1871... Tue Apr 14 22:28:58 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Tue, 14 Apr 2009 13:28:58 -0700 (PDT) Subject: [Gambas-user] open office text document In-Reply-To: <23042958.post@...1379...> References: <23042958.post@...1379...> Message-ID: <23047383.post@...1379...> I convert odt to HTML and display in a control such as TextEdit. Otherwise you will need to write a conversion code to convert ODT into HTML or Text for Gambas. IN Gambas that is what Rich Text editing is - it is basically HTML. Personally if you could write a ODT converter I would be very happy as I dont have the time or inclination to do so becuase I am just as happy with the HTML. JB SKaggs juelin wrote: > > hello, > how can I show an open office text document (odt) into gambas > textarea or some object like this? > the document include pictures. > > the object embeded is not possible, while the user do not change the > document > and the document is not open with open office. > > kind regards > J?rgen > -- View this message in context: http://www.nabble.com/open-office-text-document-tp23042958p23047383.html Sent from the gambas-user mailing list archive at Nabble.com. From jeff at ...2103... Wed Apr 15 00:49:37 2009 From: jeff at ...2103... (Jeff Gray) Date: Wed, 15 Apr 2009 08:49:37 +1000 Subject: [Gambas-user] binary numeral system In-Reply-To: <200904141828.20483.ronstk@...239...> References: <49E47BB6.604@...11...> <200904141828.20483.ronstk@...239...> Message-ID: That's pretty cool. My only comment would be that it took me a few goes at stepping through the code before I worked out how the blazes it worked, so perhaps less readable than the exponent version. But hey - I'm no rocket scientist :-) > From: ronstk at ...239... > > > > function bin2dec(sBin) as long > dim r as long > r=0 > for i= 1 to len(sBin) > r = r*2 + Val(Mid(sBin, i, 1)) > next > return r > end > _________________________________________________________________ Need a new place to rent, share or buy? Let ninemsn property search for you. http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Edomain%2Ecom%2Eau%2F%3Fs%5Fcid%3DFDMedia%3ANineMSN%5FHotmail%5FTagline&_t=774152450&_r=Domain_tagline&_m=EXT From ronstk at ...239... Wed Apr 15 02:53:59 2009 From: ronstk at ...239... (Ron_1st) Date: Wed, 15 Apr 2009 02:53:59 +0200 Subject: [Gambas-user] binary numeral system In-Reply-To: References: <200904141828.20483.ronstk@...239...> Message-ID: <200904150253.59538.ronstk@...239...> On Wednesday 15 April 2009, Jeff Gray wrote: > > That's pretty cool. > > My only comment would be that it took me a few goes at stepping through the > code before I worked out how the blazes it worked, so perhaps less readable > than the exponent version. > > But hey - I'm no rocket scientist :-) I'm just a ordinary Dutch cheese eating man on wooden shoes :) > > > From: ronstk at ...239... > > > > > > > > function bin2dec(sBin) as long > > dim r as long > > r=0 > > for i= 1 to len(sBin) > > r = r*2 + Val(Mid(sBin, i, 1)) > > next > > return r > > end You did forget the remainder. > for 10011 as sBin the sequence is as follows: > r*2=0 ?+1 = 1 > r*2=2 ?+0 = 2 > r*2=4 ?+0 = 4 > r*2=8 ?+1 = 9 > r*2=18 +1 =19 That was showing the way it works. r is your value to return +0/+1 are your bits in the string and last is the value computed each for/next loop. Best regards, Ron_1st From ronstk at ...239... Wed Apr 15 02:57:50 2009 From: ronstk at ...239... (Ron_1st) Date: Wed, 15 Apr 2009 02:57:50 +0200 Subject: [Gambas-user] databrowser.delete and databrowser.filter In-Reply-To: <1239735304.6456.5.camel@...1706...> References: <1239735304.6456.5.camel@...1706...> Message-ID: <200904150257.50360.ronstk@...239...> On Tuesday 14 April 2009, nando wrote: > dim uno as string > uno=datacontrol1.value > databrowser1.filter ="clientcode=uno" > Chane it to databrowser1.filter ="clientcode=" & uno Best regards, Ron_1st -- From dosida at ...626... Wed Apr 15 05:33:47 2009 From: dosida at ...626... (Dimitris Anogiatis) Date: Tue, 14 Apr 2009 21:33:47 -0600 Subject: [Gambas-user] Gambas Server Pages & mysql Message-ID: <82bffccf0904142033t2b0337d6ya589a8a96055f320@...627...> Hey guys, With the example below Gambas Server Pages were introduced. My question is: 1) how would I achieve a connection to a mysql database or any database for that matter? 2) where in the code below would I put the necessary statements? 3) if no direct reference to any database objects can be made is the alternative, by lets say, using an external gambas module or some other trick? --8<-------------------------------------------------------------------------------------------------------------------------------------- #!/usr/bin/env gbw2 <% DIM sEnv AS String %>

CGI script environmental variables

<% FOR EACH sEnv IN Application.Env %> <% NEXT %>
Name Value
<%= sEnv %> <%= Application.Env[sEnv] %>
--8<-------------------------------------------------------------------------------------------------------------------------------------- Thanks in advance Regards Dimitris From doriano.blengino at ...1909... Wed Apr 15 07:48:56 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Wed, 15 Apr 2009 07:48:56 +0200 Subject: [Gambas-user] open office text document In-Reply-To: <23042958.post@...1379...> References: <23042958.post@...1379...> Message-ID: <49E57548.8070002@...1909...> juelin ha scritto: > hello, > how can I show an open office text document (odt) into gambas > textarea or some object like this? > the document include pictures. > > the object embeded is not possible, while the user do not change the > document > and the document is not open with open office. > > kind regards > J?rgen > Perhaps it is possible to invoke oowrite with some command line switch to put it in read-only mode; or, if not, perhaps you can copy the original file somewhere else (/tmp?), change its permissions to read-only, and open it with oowrite. Seeing that the file is read-only, openoffice will not let the user to modify it. Cheers, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From bbruen at ...2090... Wed Apr 15 09:27:38 2009 From: bbruen at ...2090... (Bruce) Date: Wed, 15 Apr 2009 17:27:38 +1000 Subject: [Gambas-user] handling database nulls Message-ID: <200904151727.39849.bbruen@...2090...> This has sort of been asked before. However, the answers I have found haven't helped. My database has a LOT of integer fields, arranged into sets of fieldwork results. The majority of them contain nulls, quite validly as the data for a particular set may not have been entered or even collected yet. My Gambas problem is creating the classes for the various plot types. Within Gambas the data items are integers. When I try and read the existing datum point into the class (as in dp.rangeheight=$dbresult!rangeheight ) it is complaining that the value is a null not an integer, as in "wanted integer, got null instead"). Now, coercing the value of the object data to zero is NOT valid, as in the above example, the rangeheight is null not zero, as zero means 0m above the basepoint. Similarly, coercing it to a negative value wont work either, as that means meters below the base point. Is there any way to set the value of an integer variable to an "uninitalised" state? bruce From wdahn at ...1000... Wed Apr 15 10:19:48 2009 From: wdahn at ...1000... (Werner) Date: Wed, 15 Apr 2009 16:19:48 +0800 Subject: [Gambas-user] handling database nulls In-Reply-To: <200904151727.39849.bbruen@...2090...> References: <200904151727.39849.bbruen@...2090...> Message-ID: <49E598A4.5040309@...1000...> Bruce wrote: > This has sort of been asked before. However, the answers I have found haven't > helped. > > My database has a LOT of integer fields, arranged into sets of fieldwork > results. The majority of them contain nulls, quite validly as the data for a > particular set may not have been entered or even collected yet. > > My Gambas problem is creating the classes for the various plot types. Within > Gambas the data items are integers. When I try and read the existing datum > point into the class (as in dp.rangeheight=$dbresult!rangeheight ) it is > complaining that the value is a null not an integer, as in "wanted integer, > got null instead"). > > Now, coercing the value of the object data to zero is NOT valid, as in the > above example, the rangeheight is null not zero, as zero means 0m above the > basepoint. Similarly, coercing it to a negative value wont work either, as > that means meters below the base point. > > Is there any way to set the value of an integer variable to an "uninitalised" > state? > > bruce > A solution might be to use the Variant data type instead of Integer. Alternatively, you could define a class that holds a data point plus a flag whether the data is valid. Werner From nando at ...2137... Wed Apr 15 10:35:55 2009 From: nando at ...2137... (nando) Date: Wed, 15 Apr 2009 10:35:55 +0200 Subject: [Gambas-user] databrowser.delete and databrowser.filter In-Reply-To: <200904150257.50360.ronstk@...239...> References: <1239735304.6456.5.camel@...1706...> <200904150257.50360.ronstk@...239...> Message-ID: <1239784555.5168.0.camel@...1706...> Thank you, now it really works El mi?, 15-04-2009 a las 02:57 +0200, Ron_1st escribi?: > On Tuesday 14 April 2009, nando wrote: > > dim uno as string > > uno=datacontrol1.value > > databrowser1.filter ="clientcode=uno" > > > Chane it to > > databrowser1.filter ="clientcode=" & uno > > > Best regards, > > Ron_1st From wdahn at ...1000... Wed Apr 15 10:45:56 2009 From: wdahn at ...1000... (Werner) Date: Wed, 15 Apr 2009 16:45:56 +0800 Subject: [Gambas-user] handling database nulls In-Reply-To: <49E598A4.5040309@...1000...> References: <200904151727.39849.bbruen@...2090...> <49E598A4.5040309@...1000...> Message-ID: <49E59EC4.1050907@...1000...> Werner wrote: > Bruce wrote: > >> This has sort of been asked before. However, the answers I have found haven't >> helped. >> >> My database has a LOT of integer fields, arranged into sets of fieldwork >> results. The majority of them contain nulls, quite validly as the data for a >> particular set may not have been entered or even collected yet. >> >> My Gambas problem is creating the classes for the various plot types. Within >> Gambas the data items are integers. When I try and read the existing datum >> point into the class (as in dp.rangeheight=$dbresult!rangeheight ) it is >> complaining that the value is a null not an integer, as in "wanted integer, >> got null instead"). >> >> Now, coercing the value of the object data to zero is NOT valid, as in the >> above example, the rangeheight is null not zero, as zero means 0m above the >> basepoint. Similarly, coercing it to a negative value wont work either, as >> that means meters below the base point. >> >> Is there any way to set the value of an integer variable to an "uninitalised" >> state? >> >> bruce >> >> > A solution might be to use the Variant data type instead of Integer. > Alternatively, you could define a class that holds a data point plus a > flag whether the data is valid. > > Werner > ...or you could set empty data points to -0 which is most significant bit set to 1 all other bits 0 ...or you might be able to use TRY whenever accessing a data point to catch the exception. In any case there needs to be a test whether the data is valid. As you said, the majority of data fields is empty. If you have a humongous amount of data it might be worth looking into "spare matrix" compression (what spreadsheets do) Werner From bbruen at ...2090... Wed Apr 15 14:00:33 2009 From: bbruen at ...2090... (Bruce) Date: Wed, 15 Apr 2009 22:00:33 +1000 Subject: [Gambas-user] handling database nulls In-Reply-To: <49E59EC4.1050907@...1000...> References: <200904151727.39849.bbruen@...2090...> <49E598A4.5040309@...1000...> <49E59EC4.1050907@...1000...> Message-ID: <200904152200.33394.bbruen@...2090...> On Wednesday 15 April 2009 18:45:56 Werner wrote: > Werner wrote: > > Bruce wrote: > >> This has sort of been asked before. However, the answers I have found > >> haven't helped. > >> > >> My database has a LOT of integer fields, arranged into sets of fieldwork > >> results. The majority of them contain nulls, quite validly as the data > >> for a particular set may not have been entered or even collected yet. > >> > >> My Gambas problem is creating the classes for the various plot types. > >> Within Gambas the data items are integers. When I try and read the > >> existing datum point into the class (as in > >> dp.rangeheight=$dbresult!rangeheight ) it is complaining that the value > >> is a null not an integer, as in "wanted integer, got null instead"). > >> > >> Now, coercing the value of the object data to zero is NOT valid, as in > >> the above example, the rangeheight is null not zero, as zero means 0m > >> above the basepoint. Similarly, coercing it to a negative value wont > >> work either, as that means meters below the base point. > >> > >> Is there any way to set the value of an integer variable to an > >> "uninitalised" state? > >> > >> bruce > > > > A solution might be to use the Variant data type instead of Integer. > > Alternatively, you could define a class that holds a data point plus a > > flag whether the data is valid. > > > > Werner > > ...or you could set empty data points to -0 which is most significant > bit set to 1 all other bits 0 > > ...or you might be able to use TRY whenever accessing a data point to > catch the exception. > > In any case there needs to be a test whether the data is valid. > > As you said, the majority of data fields is empty. If you have a > humongous amount of data it might be worth looking into "spare matrix" > compression (what spreadsheets do) > > Werner > > > --------------------------------------------------------------------------- >--- This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user Werner, Brilliant!! Both ideas I like. The internal representation can be a variant that presents a special case externally. I wil have a look at how this will work, but I think you've hit on the solution. Thanks bruce btw: the sparce matrix idea doesn't really apply here as the instantiated objects are really quite simple with around 6 to 8 properties each depending on the field type. In any realised instance we only need to be able to observe these 6-8 properties. The database design is not the issue, it was just the problem within the derivative fieldcount classes. Sometimes it just needs the application of a third eye! Thanks again. From jussi.lahtinen at ...626... Wed Apr 15 14:49:28 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 15 Apr 2009 15:49:28 +0300 Subject: [Gambas-user] Bug or intended pointer behavior? (in Gambas3) Message-ID: <384d3900904150549j41b4103bl49039253349a1bd1@...627...> Hi! I have code like this; Dim Points As New POINT[] Dim pResult As Pointer ....some initialization of variable Points.... pResult = Alloc(8, 10) functionX(pResult) .... Class POINT: Public x As Short Public y As Short This way code works fine. But way this fails? functionX(Points.Data) It gives Signal 11 (when accessing Points again), and I think it is because allocation is not done correctly. If POINT[] would be Object[] instead, it would make more sense... If I understand correctly, Interpreter should know how to allocate pointer to POINT[], just like it will allocate pointer to Integer[] correctly, when using .Data. Do I need to do this with old Gambas2 way (with Alloc & Read & Write) or is this bug? Jussi From jeff at ...2103... Wed Apr 15 15:24:17 2009 From: jeff at ...2103... (Jeff) Date: Wed, 15 Apr 2009 23:24:17 +1000 Subject: [Gambas-user] handling database nulls In-Reply-To: <49E598A4.5040309@...1000...> References: <200904151727.39849.bbruen@...2090...> <49E598A4.5040309@...1000...> Message-ID: <1239801857.5903.26.camel@...2104...> On Wed, 2009-04-15 at 16:19 +0800, Werner wrote: > Bruce wrote: > > This has sort of been asked before. However, the answers I have found haven't > > helped. > > > > My database has a LOT of integer fields, arranged into sets of fieldwork > > results. The majority of them contain nulls, quite validly as the data for a > > particular set may not have been entered or even collected yet. > > > > My Gambas problem is creating the classes for the various plot types. Within > > Gambas the data items are integers. When I try and read the existing datum > > point into the class (as in dp.rangeheight=$dbresult!rangeheight ) it is > > complaining that the value is a null not an integer, as in "wanted integer, > > got null instead"). > > > > Now, coercing the value of the object data to zero is NOT valid, as in the > > above example, the rangeheight is null not zero, as zero means 0m above the > > basepoint. Similarly, coercing it to a negative value wont work either, as > > that means meters below the base point. > > > > Is there any way to set the value of an integer variable to an "uninitalised" > > state? > > > > bruce > > > A solution might be to use the Variant data type instead of Integer. > Alternatively, you could define a class that holds a data point plus a > flag whether the data is valid. > ... or a collection. data items accessed by a key. If no data item then it's not in the collection. > Werner > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From juergen.linder at ...17... Wed Apr 15 15:32:48 2009 From: juergen.linder at ...17... (juelin) Date: Wed, 15 Apr 2009 06:32:48 -0700 (PDT) Subject: [Gambas-user] open office text document In-Reply-To: <23047383.post@...1379...> References: <23042958.post@...1379...> <23047383.post@...1379...> Message-ID: <23059061.post@...1379...> dear JB SKaggs, thank you for your reply. Now i have convert the textdocument (odt) to html. then I read the htmlfile and insert it to TEXTEDIT object. But I see only the HTML-Text (with tags) What must I do, that I see only the text? kind regards J?rgen jbskaggs wrote: > > I convert odt to HTML and display in a control such as TextEdit. > Otherwise you will need to write a conversion code to convert ODT into > HTML or Text for Gambas. > > IN Gambas that is what Rich Text editing is - it is basically HTML. > Personally if you could write a ODT converter I would be very happy as I > dont have the time or inclination to do so becuase I am just as happy with > the HTML. > > JB SKaggs > > > > juelin wrote: >> >> hello, >> how can I show an open office text document (odt) into gambas >> textarea or some object like this? >> the document include pictures. >> >> the object embeded is not possible, while the user do not change the >> document >> and the document is not open with open office. >> >> kind regards >> J?rgen >> > > -- View this message in context: http://www.nabble.com/open-office-text-document-tp23042958p23059061.html Sent from the gambas-user mailing list archive at Nabble.com. From crozet.georges at ...402... Wed Apr 15 17:38:46 2009 From: crozet.georges at ...402... (CROZET Georges) Date: Wed, 15 Apr 2009 17:38:46 +0200 Subject: [Gambas-user] (pas de sujet) Message-ID: <49E5FF86.7050503@...402...> From nando_f at ...951... Wed Apr 15 18:46:19 2009 From: nando_f at ...951... (nando) Date: Wed, 15 Apr 2009 11:46:19 -0500 Subject: [Gambas-user] handling database nulls In-Reply-To: <200904151727.39849.bbruen@...2090...> References: <200904151727.39849.bbruen@...2090...> Message-ID: <20090415164450.M1036@...951...> What about testing if it's null first as in... IF IsNull(dbresult!rangeheight) THEN 'it's null here, you might want to do something like dp.rangeheight=0 ELSE dp.rangeheight=$dbresult!rangeheight ENDIF ---------- Original Message ----------- From: Bruce To: gambas-user at lists.sourceforge.net Sent: Wed, 15 Apr 2009 17:27:38 +1000 Subject: [Gambas-user] handling database nulls > This has sort of been asked before. However, the answers I have found haven't > helped. > > My database has a LOT of integer fields, arranged into sets of fieldwork > results. The majority of them contain nulls, quite validly as the data for a > particular set may not have been entered or even collected yet. > > My Gambas problem is creating the classes for the various plot types. Within > Gambas the data items are integers. When I try and read the existing datum > point into the class (as in dp.rangeheight=$dbresult!rangeheight ) it is > complaining that the value is a null not an integer, as in "wanted integer, > got null instead"). > > Now, coercing the value of the object data to zero is NOT valid, as in the > above example, the rangeheight is null not zero, as zero means 0m above the > basepoint. Similarly, coercing it to a negative value wont work either, as > that means meters below the base point. > > Is there any way to set the value of an integer variable to an "uninitalised" > state? > > bruce > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From marc at ...2086... Wed Apr 15 19:39:35 2009 From: marc at ...2086... (Marc Carson) Date: Wed, 15 Apr 2009 10:39:35 -0700 Subject: [Gambas-user] Writing a "Choose Your Own Adventure" prototype Message-ID: <49E61BD7.9080107@...2086...> I want to make a short adventure game that lets users read text and look at an image that explains where they are in the story, and then lets them make a decision like, 1) get in the car or 2) run and call the police. These choices then branch into other choices, and at many points the player may die or complete the adventure in different ways. I hope that makes sense... What I'm wondering is, what sort of data structures and approaches to this type of software should I use? The last time I did something like this, as a youngster, I used GOTO everywhere. :-) But I've heard there are better ways. Thanks for any tips for a beginner... Marc From jbskaggs at ...1871... Wed Apr 15 21:39:21 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Wed, 15 Apr 2009 12:39:21 -0700 (PDT) Subject: [Gambas-user] Writing a "Choose Your Own Adventure" prototype In-Reply-To: <49E61BD7.9080107@...2086...> References: <49E61BD7.9080107@...2086...> Message-ID: <23065712.post@...1379...> That would be really easy in Gambas! Becuase Gambas is object oriented goto's aren't needed. Let me give you a step by step how to do one screen and you can then change it or redo it how you like. step 1: create a form with a textbox, a picture box, and three buttons. Put your reading selection in the textbox, the image in the picture box and the three options on the buttons so button1.text="Open door." button2.text="Scream for help" etc.. Now in your form editor double click one of the buttons and it will take you to the code page and automatically create an event code: public sub button1_click() End Now between those two lines you would put your code to display a new page. You have two options really: 1. Goto a new form with new controls or 2. Change the data for the controls (ie the text, the picture, and the button labels) I have done something like this in the past and I stored my texts in small files. so my button code looked like this: public sub button1_click() textarea1.text=file.load(user.home &/ "scene1.txt") picturebox1.picture = picture.load(user.home &/ "thispic.png") button1.text="You have been killed!" button2.text="Go back?" Button3.text="Quit." End I will be glad to help you if you want more help. JB Skaggs Marc Carson-3 wrote: > > I want to make a short adventure game that lets users read text and look > at an image that explains where they are in the story, and then lets > them make a decision like, 1) get in the car or 2) run and call the > police. These choices then branch into other choices, and at many points > the player may die or complete the adventure in different ways. I hope > that makes sense... > > What I'm wondering is, what sort of data structures and approaches to > this type of software should I use? The last time I did something like > this, as a youngster, I used GOTO everywhere. :-) But I've heard there > are better ways. > > Thanks for any tips for a beginner... > > Marc > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > 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/Writing-a-%22Choose-Your-Own-Adventure%22-prototype-tp23064077p23065712.html Sent from the gambas-user mailing list archive at Nabble.com. From jbskaggs at ...1871... Wed Apr 15 21:55:33 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Wed, 15 Apr 2009 12:55:33 -0700 (PDT) Subject: [Gambas-user] open office text document In-Reply-To: <23059061.post@...1379...> References: <23042958.post@...1379...> <23047383.post@...1379...> <23059061.post@...1379...> Message-ID: <23066009.post@...1379...> Okay I went to Openoffice and I created a file and added some text altered the text size, formatting, etc and saved as html. Openoffice gives warning about losing some formating I ignore that and save. Then in Gambas2 I have a form with Textedit1 and I add: textedit1.text=file.load("filename.html") in my form_open sub and click run and it works fine for me. If you need more help feel free to send me the document and I will see if I can get it to work for you. JB Skaggs juelin wrote: > > dear JB SKaggs, > thank you for your reply. > Now i have convert the textdocument (odt) to html. > then I read the htmlfile and insert it to TEXTEDIT object. > But I see only the HTML-Text (with tags) > What must I do, that I see only the text? > kind regards > J?rgen > > > jbskaggs wrote: >> >> I convert odt to HTML and display in a control such as TextEdit. >> Otherwise you will need to write a conversion code to convert ODT into >> HTML or Text for Gambas. >> >> IN Gambas that is what Rich Text editing is - it is basically HTML. >> Personally if you could write a ODT converter I would be very happy as I >> dont have the time or inclination to do so becuase I am just as happy >> with the HTML. >> >> JB SKaggs >> >> >> >> juelin wrote: >>> >>> hello, >>> how can I show an open office text document (odt) into gambas >>> textarea or some object like this? >>> the document include pictures. >>> >>> the object embeded is not possible, while the user do not change the >>> document >>> and the document is not open with open office. >>> >>> kind regards >>> J?rgen >>> >> >> > > -- View this message in context: http://www.nabble.com/open-office-text-document-tp23042958p23066009.html Sent from the gambas-user mailing list archive at Nabble.com. From nando_f at ...951... Thu Apr 16 00:56:32 2009 From: nando_f at ...951... (nando) Date: Wed, 15 Apr 2009 17:56:32 -0500 Subject: [Gambas-user] Writing a "Choose Your Own Adventure" prototype In-Reply-To: <23065712.post@...1379...> References: <49E61BD7.9080107@...2086...> <23065712.post@...1379...> Message-ID: <20090415225131.M80906@...951...> The following is not a true statement: 'Becuase Gambas is object oriented goto's aren't needed.' I use Gambas in an OO way and sometimes GOTO is very clear and I use it. I also use GOTO when I control to go exactly someplace and (possibly) not test or run unnecessary code in-between. I also use GOTO in a soft-real-time (as real as can be). A whole bunch of GOTO's can be very confusing. OO does require planning though. ---------- Original Message ----------- From: jbskaggs To: gambas-user at lists.sourceforge.net Sent: Wed, 15 Apr 2009 12:39:21 -0700 (PDT) Subject: Re: [Gambas-user] Writing a "Choose Your Own Adventure" prototype > That would be really easy in Gambas! > > > > Let me give you a step by step how to do one screen and you can then change > it or redo it how you like. > > step 1: > > create a form with a textbox, a picture box, and three buttons. > > Put your reading selection in the textbox, the image in the picture box and > the three options on the buttons > > so button1.text="Open door." > button2.text="Scream for help" > etc.. > > Now in your form editor double click one of the buttons and it will take you > to the code page and automatically create an event code: > > public sub button1_click() > > End > > Now between those two lines you would put your code to display a new page. > You have two options really: > > 1. Goto a new form with new controls or > 2. Change the data for the controls (ie the text, the picture, and the > button labels) > > I have done something like this in the past and I stored my texts in small > files. so my button code looked like this: > > public sub button1_click() > textarea1.text=file.load(user.home &/ "scene1.txt") > picturebox1.picture = picture.load(user.home &/ "thispic.png") > button1.text="You have been killed!" > button2.text="Go back?" > Button3.text="Quit." > End > > I will be glad to help you if you want more help. > > JB Skaggs > > Marc Carson-3 wrote: > > > > I want to make a short adventure game that lets users read text and look > > at an image that explains where they are in the story, and then lets > > them make a decision like, 1) get in the car or 2) run and call the > > police. These choices then branch into other choices, and at many points > > the player may die or complete the adventure in different ways. I hope > > that makes sense... > > > > What I'm wondering is, what sort of data structures and approaches to > > this type of software should I use? The last time I did something like > > this, as a youngster, I used GOTO everywhere. :-) But I've heard there > > are better ways. > > > > Thanks for any tips for a beginner... > > > > Marc > > > > ------------------------------------------------------------------------------ > > This SF.net email is sponsored by: > > High Quality Requirements in a Collaborative Environment. > > Download a free trial of Rational Requirements Composer Now! > > http://p.sf.net/sfu/www-ibm-com > > _______________________________________________ > > 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/Writing-a-%22Choose-Your-Own- > Adventure%22-prototype-tp23064077p23065712.html Sent from the gambas-user > mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From simonart.dominique at ...11... Thu Apr 16 02:05:00 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Thu, 16 Apr 2009 02:05:00 +0200 Subject: [Gambas-user] binary numeral system In-Reply-To: References: Message-ID: <49E6762C.1000704@...11...> vlahonick vlahonick a ?crit : > > hello all :D > > i am trying to create a program that calculates a number from the binary numeral system and gives a result > > example of what the program will do : > > we have the number (at binary numeral system) 10011 > > so to have result we have to do (1*2^4)+(0*2^3)+(0*2^2)+(1*2^1)+(1*2^0)= > 16+0+0+2+1=19 > > to do that in a program first i have to calculate the powers > so i have to write (y=number of digits) for the first of the digits y-1,second y-2etc > > so if i have 5 digits then the power for the first one will be y-1=5-1=4 > > this is done by the Len(textbox1.text) > > but HOW i will write Len(textbox1.text)=y ????? > > then how i can make the program to recognize that for the 1st digit entered in the Textbox1.text have to > give (d*2^y-1) (d=the digit that can be 0 or 1 and y the number of the digits) for the second (d*2^y-2)etc... > > so the main question is how i can make JUST ONE TEXTBOX to understand that for every digits enter it will give something else for a result As an exercise for myself, I modify the program so the decimal value is displayed for each binary digit you typed. Now, you don't need to click a button to know the value. I could say it was not simple to understand how works this TextArea update with the cursor position STATIC PUBLIC DecVal AS Integer STATIC PUBLIC InputChain AS String PUBLIC SUB Form_Open() Button1_Click() END PUBLIC SUB Button1_Click() ' CLEAR button DecVal = 0 InputChain = "" TextArea1.Clear END PUBLIC SUB TextArea1_KeyPress() DIM K as String K = Key.Text IF K <> "0" AND K <> "1" THEN RETURN DecVal *= 2 DecVal += Val(K) TextArea1.Text = InputChain & "\nBinary " & InputChain & K & " = decimal " & Str(DecVal) TextArea1.Pos = Len(InputChain) InputChain &= K END Look how I have to separate InputChain and K to initialize the Text property. You must add the K character to the InputChain *after* the modification of the TextArea. Hope this help Dominique Simonart From sbungay at ...981... Thu Apr 16 04:16:55 2009 From: sbungay at ...981... (Stephen Bungay) Date: Wed, 15 Apr 2009 22:16:55 -0400 Subject: [Gambas-user] handling database nulls In-Reply-To: <20090415164450.M1036@...951...> References: <200904151727.39849.bbruen@...2090...> <20090415164450.M1036@...951...> Message-ID: <49E69517.4010607@...981...> OK, you have nulls and need values... you could use COALESCE... SELECT COALESCE(FieldName,0) AS FieldName FROM TableName; This will result in any NULL values being returned as zeros. Hope this helps you out. Steve. nando wrote: > What about testing if it's null first as in... > > IF IsNull(dbresult!rangeheight) THEN > 'it's null here, you might want to do something like > dp.rangeheight=0 > ELSE > dp.rangeheight=$dbresult!rangeheight > > ENDIF > > > ---------- Original Message ----------- > From: Bruce > To: gambas-user at lists.sourceforge.net > Sent: Wed, 15 Apr 2009 17:27:38 +1000 > Subject: [Gambas-user] handling database nulls > >> This has sort of been asked before. However, the answers I have found haven't >> helped. >> >> My database has a LOT of integer fields, arranged into sets of fieldwork >> results. The majority of them contain nulls, quite validly as the data for a >> particular set may not have been entered or even collected yet. >> >> My Gambas problem is creating the classes for the various plot types. Within >> Gambas the data items are integers. When I try and read the existing datum >> point into the class (as in dp.rangeheight=$dbresult!rangeheight ) it is >> complaining that the value is a null not an integer, as in "wanted integer, >> got null instead"). >> >> Now, coercing the value of the object data to zero is NOT valid, as in the >> above example, the rangeheight is null not zero, as zero means 0m above the >> basepoint. Similarly, coercing it to a negative value wont work either, as >> that means meters below the base point. >> >> Is there any way to set the value of an integer variable to an "uninitalised" >> state? >> >> bruce >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by: >> High Quality Requirements in a Collaborative Environment. >> Download a free trial of Rational Requirements Composer Now! >> http://p.sf.net/sfu/www-ibm-com >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > ------- End of Original Message ------- > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jbskaggs at ...1871... Thu Apr 16 06:21:14 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Wed, 15 Apr 2009 21:21:14 -0700 (PDT) Subject: [Gambas-user] Writing a "Choose Your Own Adventure" prototype In-Reply-To: <20090415225131.M80906@...951...> References: <49E61BD7.9080107@...2086...> <23065712.post@...1379...> <20090415225131.M80906@...951...> Message-ID: <23071197.post@...1379...> I am not saying goto isnt needed at all- just that to do what he is doing it isn't. Furthermore too many goto's create spaghetti code which becomes really hard to follow. :) But I do get what your saying and I have used goto's the same way- though not in a while. For me it was when I began to think less sequentially and more interconnectedly that my code became clearer and my need for goto's became less. And it was hard for me to overcome my habit of: 10 input x 20 if x = 0 then goto 40 30 goto 10 40 print "yeah" and so on... I seriously had a hard time grasping that OO was pseudo nonsequential! JB Skaggs nando-7 wrote: > > The following is not a true statement: > 'Becuase Gambas is object oriented goto's aren't needed.' > > I use Gambas in an OO way and sometimes GOTO is very clear and I use it. > I also use GOTO when I control to go exactly someplace and (possibly) not > test or run unnecessary code in-between. > I also use GOTO in a soft-real-time (as real as can be). > > A whole bunch of GOTO's can be very confusing. > OO does require planning though. > > ---------- Original Message ----------- > From: jbskaggs > To: gambas-user at lists.sourceforge.net > Sent: Wed, 15 Apr 2009 12:39:21 -0700 (PDT) > Subject: Re: [Gambas-user] Writing a "Choose Your Own Adventure" prototype > >> That would be really easy in Gambas! >> >> >> >> Let me give you a step by step how to do one screen and you can then >> change >> it or redo it how you like. >> >> step 1: >> >> create a form with a textbox, a picture box, and three buttons. >> >> Put your reading selection in the textbox, the image in the picture box >> and >> the three options on the buttons >> >> so button1.text="Open door." >> button2.text="Scream for help" >> etc.. >> >> Now in your form editor double click one of the buttons and it will take >> you >> to the code page and automatically create an event code: >> >> public sub button1_click() >> >> End >> >> Now between those two lines you would put your code to display a new >> page. >> You have two options really: >> >> 1. Goto a new form with new controls or >> 2. Change the data for the controls (ie the text, the picture, and the >> button labels) >> >> I have done something like this in the past and I stored my texts in >> small >> files. so my button code looked like this: >> >> public sub button1_click() >> textarea1.text=file.load(user.home &/ "scene1.txt") >> picturebox1.picture = picture.load(user.home &/ "thispic.png") >> button1.text="You have been killed!" >> button2.text="Go back?" >> Button3.text="Quit." >> End >> >> I will be glad to help you if you want more help. >> >> JB Skaggs >> >> Marc Carson-3 wrote: >> > >> > I want to make a short adventure game that lets users read text and >> look >> > at an image that explains where they are in the story, and then lets >> > them make a decision like, 1) get in the car or 2) run and call the >> > police. These choices then branch into other choices, and at many >> points >> > the player may die or complete the adventure in different ways. I hope >> > that makes sense... >> > >> > What I'm wondering is, what sort of data structures and approaches to >> > this type of software should I use? The last time I did something like >> > this, as a youngster, I used GOTO everywhere. :-) But I've heard there >> > are better ways. >> > >> > Thanks for any tips for a beginner... >> > >> > Marc >> > >> > >> ------------------------------------------------------------------------------ >> > This SF.net email is sponsored by: >> > High Quality Requirements in a Collaborative Environment. >> > Download a free trial of Rational Requirements Composer Now! >> > http://p.sf.net/sfu/www-ibm-com >> > _______________________________________________ >> > 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/Writing-a-%22Choose-Your-Own- >> Adventure%22-prototype-tp23064077p23065712.html Sent from the gambas-user >> mailing list archive at Nabble.com. >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by: >> High Quality Requirements in a Collaborative Environment. >> Download a free trial of Rational Requirements Composer Now! >> http://p.sf.net/sfu/www-ibm-com >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > ------- End of Original Message ------- > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > 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/Writing-a-%22Choose-Your-Own-Adventure%22-prototype-tp23064077p23071197.html Sent from the gambas-user mailing list archive at Nabble.com. From doriano.blengino at ...1909... Thu Apr 16 09:41:30 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Thu, 16 Apr 2009 09:41:30 +0200 Subject: [Gambas-user] Writing a "Choose Your Own Adventure" prototype In-Reply-To: <23071197.post@...1379...> References: <49E61BD7.9080107@...2086...> <23065712.post@...1379...> <20090415225131.M80906@...951...> <23071197.post@...1379...> Message-ID: <49E6E12A.7080509@...1909...> jbskaggs ha scritto: > I am not saying goto isnt needed at all- just that to do what he is doing it > isn't. Furthermore too many goto's create spaghetti code which becomes > really hard to follow. :) > > > But I do get what your saying and I have used goto's the same way- though > not in a while. For me it was when I began to think less sequentially and > more interconnectedly that my code became clearer and my need for goto's > became less. And it was hard for me to overcome my habit of: > > 10 input x > 20 if x = 0 then goto 40 > 30 goto 10 > 40 print "yeah" > and so on... > > I seriously had a hard time grasping that OO was pseudo nonsequential! > I think that GOTOs have nothing to do with OO programming, but instead they relate to "structured programming". In C and Pascal (and many many others), which are structured, you can totally avoid GOTOs, if you want. But, as Nando says, sometimes GOTOs are clearer that while-do-loop-if-elseif-elseif and so on. The real thing is to have *both* structures and GOTOs; if either is missing, then the language is poor. Regards, Doriano From leonardo at ...1237... Thu Apr 16 15:06:35 2009 From: leonardo at ...1237... (Leonardo Miliani) Date: Thu, 16 Apr 2009 15:06:35 +0200 Subject: [Gambas-user] Writing a "Choose Your Own Adventure" prototype In-Reply-To: <49E6E12A.7080509@...1909...> References: <49E61BD7.9080107@...2086...> <23065712.post@...1379...> <20090415225131.M80906@...951...> <23071197.post@...1379...> <49E6E12A.7080509@...1909...> Message-ID: <49E72D5B.1090709@...1237...> Doriano Blengino ha scritto: > jbskaggs ha scritto: >> I am not saying goto isnt needed at all- just that to do what he is doing it >> isn't. Furthermore too many goto's create spaghetti code which becomes >> really hard to follow. :) >> >> >> But I do get what your saying and I have used goto's the same way- though >> not in a while. For me it was when I began to think less sequentially and >> more interconnectedly that my code became clearer and my need for goto's >> became less. And it was hard for me to overcome my habit of: >> >> 10 input x >> 20 if x = 0 then goto 40 >> 30 goto 10 >> 40 print "yeah" >> and so on... >> >> I seriously had a hard time grasping that OO was pseudo nonsequential! >> > I think that GOTOs have nothing to do with OO programming, but instead > they relate to "structured programming". > In C and Pascal (and many many others), which are structured, you can > totally avoid GOTOs, if you want. But, as Nando says, sometimes GOTOs > are clearer that while-do-loop-if-elseif-elseif and so on. > The real thing is to have *both* structures and GOTOs; if either is > missing, then the language is poor. > > Regards, > Doriano > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > You are OT. Subject was how to write an adventure game, not how to program with or without GOTO's ;-) Coming back to the original post, a lot of years ago I wrote a couple ob text-based adventure games based on "rooms". I created a little matrix (the "rooms") with a basic description of what was the room, then I had another array that contained the rooms of the game where the items were located. Everytime that the player entered a room the game: - loaded the default description of the room; - checked if there was an item in that particular room: if yes, it then loaded the description of the object; - printed the available exits. If the player typed to get an object, the program simply checked if that object was present in the room; if the player asked to go in a particular direction, the program checked if that exit was present too. This prehambol to say that it is not difficult to implement such kind of games: you just have to create a general interface and then modify the available actions depending on what the room contains. -- Ciao. Leo. Web: www.leonardomiliani.com E-mail: leonardo at ...1237... Scegli software opensource - Choose opensource software Co-fondatore di Gambas-it.org Il sito di riferimento della comunit? italiana degli utenti di Gambas www.gambas-it.org From jussi.lahtinen at ...626... Thu Apr 16 15:17:30 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Thu, 16 Apr 2009 16:17:30 +0300 Subject: [Gambas-user] Nasty bug in "With" instruction! Message-ID: <384d3900904160617j104a2337x5a6ee8578ca53e5d@...627...> Hi! Confirmed on Gambas2 and Gambas3. Code: Dim tmp As New Class1 With tmp .y = 0 tmp = funcx() Debug .y Debug tmp.y End With Public Function funcx() As Class1 Dim test As New Class1 test.y = 1 Return test End Output of debug is; 0 1 I think .y and tmp.y should be same! Regards, Jussi From nando at ...2137... Thu Apr 16 18:32:29 2009 From: nando at ...2137... (nando) Date: Thu, 16 Apr 2009 18:32:29 +0200 Subject: [Gambas-user] databrowser toolbar - delete Message-ID: <1239899549.8664.2.camel@...1706...> hi, is there a way when i press the del button in the toolbar not to delete the register in the database but modify the register to set it as inactive? Thank you From jguardon at ...2035... Thu Apr 16 18:53:00 2009 From: jguardon at ...2035... (Jesus Guardon) Date: Thu, 16 Apr 2009 18:53:00 +0200 Subject: [Gambas-user] databrowser toolbar - delete In-Reply-To: <1239899549.8664.2.camel@...1706...> References: <1239899549.8664.2.camel@...1706...> Message-ID: <49E7626C.40809@...2035...> Hi Nando I don't know exactly if this behavior could be changed, but, why don't you use a tableview or gridview instead? I think it may be not so difficult to implement the same functionality in a custom toolbar. Regards Jes?s nando escribi?: > hi, > is there a way when i press the del button in the toolbar not to delete > the register in the database but modify the register to set it as > inactive? > Thank you > > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From andreas at ...2139... Thu Apr 16 22:07:51 2009 From: andreas at ...2139... (Andreas =?ISO-8859-1?Q?M=FCller?=) Date: Thu, 16 Apr 2009 22:07:51 +0200 Subject: [Gambas-user] atanh - wrong calculation Message-ID: <1239912471.7042.27.camel@...2140...> Hello all, first I want to thank Benoit for his wonderfull Gambas system - never was programming easier than with this IDE! Now my little problem. I calculated the atanh(0.5) and got: ?(Atnh(0.5)) 3,162277660168 but this is wrong. The definition of atanh() should be: atanh(x) = 0.5 * ln ((1+x)/(1-x)) which gives: ?(0.5*LOG((1+0.5)/(1-0.5))) 0,549306144334 and should be the correct value. Those problems may have its origin in a wrong ALU unit or a wrong implementation. Can anybody confirm this or do I have a local problem? system specs: Pentium 4 Linux tax 2.6.27-11-generic #1 SMP Wed Apr 1 20:57:48 UTC 2009 i686 GNU/Linux Ubuntu 8.10 (intrepid) Gambas2 version 2.7 best regards and many thanks for your answers! Andreas Mueller From jshackney at ...626... Thu Apr 16 22:43:16 2009 From: jshackney at ...626... (Jason Hackney) Date: Thu, 16 Apr 2009 16:43:16 -0400 Subject: [Gambas-user] Installing GridEditor Component Message-ID: <799be1690904161343w58111d4rd30df04b26bb682f@...627...> I'm having a bit of trouble getting the GridEditor component intsalled into 2.7. Followed the directions at Gareth's site ( http://gambasrad.org/software/gambas-grideditor/documentation/how-to/installing-grideditor ). The project compiles without errors. Make -> Executable goes through the messages "Loading information on component" ... without errors. Nothing appears beyond this. Project -> Properties -> Components does not list GridEditor. How do I track down where I'm getting a misfire here? From jussi.lahtinen at ...626... Fri Apr 17 00:02:51 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Fri, 17 Apr 2009 01:02:51 +0300 Subject: [Gambas-user] atanh - wrong calculation In-Reply-To: <1239912471.7042.27.camel@...2140...> References: <1239912471.7042.27.camel@...2140...> Message-ID: <384d3900904161502j75252f7ds27402a7152c7a14a@...627...> Confirmed. Regards, Jussi On Thu, Apr 16, 2009 at 23:07, Andreas M?ller wrote: > Hello all, > > first I want to thank Benoit for his wonderfull Gambas system - never > was programming easier than with this IDE! > > Now my little problem. I calculated the atanh(0.5) and got: > > ? ? ? ??(Atnh(0.5)) > ? ? ? ?3,162277660168 > > but this is wrong. The definition of atanh() should be: > > ? ? ? ?atanh(x) = 0.5 * ln ((1+x)/(1-x)) > > which gives: > > ? ? ? ??(0.5*LOG((1+0.5)/(1-0.5))) > ? ? ? ?0,549306144334 > > and should be the correct value. > > Those problems may have its origin in a wrong ALU unit or a wrong > implementation. > > Can anybody confirm this or do I have a local problem? > > system specs: > > Pentium 4 > Linux tax 2.6.27-11-generic #1 SMP Wed Apr 1 20:57:48 UTC 2009 i686 > GNU/Linux > Ubuntu 8.10 (intrepid) > Gambas2 version 2.7 > > best regards and many thanks for your answers! > > Andreas Mueller > > > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From rterry at ...1946... Fri Apr 17 07:49:26 2009 From: rterry at ...1946... (richard terry) Date: Fri, 17 Apr 2009 15:49:26 +1000 Subject: [Gambas-user] A refreshing a gui question Message-ID: <200904171549.26261.rterry@...1946...> I wondered if there was anyway to force a refresh of a gui in the following circumstance. If one has say a toolbutton with its auto-size property set to true and one changes the application font, then the button doesn't auto resize. If one closes the form and opens it again it does. Any help appreciated. Richard From charles at ...1784... Fri Apr 17 16:08:45 2009 From: charles at ...1784... (charlesg) Date: Fri, 17 Apr 2009 07:08:45 -0700 (PDT) Subject: [Gambas-user] Gridview select and deselect Message-ID: <23098365.post@...1379...> Hi all Having selected a gridview row with a click, I cannot deselect it with another click as should be normal. After reading an old thread here, I have fudged it with an array bSelected which keeps track of which rows in gvRequired are selected. '------------------------------------------------------------- PUBLIC SUB gvRequired_Click() IF bSelected[gvRequired.Row] THEN bSelected[gvRequired.row] = FALSE ELSE bSelected[gvRequired.row] = TRUE ENDIF txtItem.SetFocus END '------------------------------------------------------------- PUBLIC SUB gvRequired_LostFocus() DIM x AS Integer gvRequired.Rows.Unselect FOR x = 0 TO gvRequired.Rows.count - 2 IF bSelected[x] THEN gvRequired.Rows[x].Selected = TRUE ENDIF NEXT END '------------------------------------------------------------- This can't interpret shift+click and ctrl+click used to create the selection. How can I trap shift+click on a gridview? Or am I as usual making a whale of a gambas :) rgds -- View this message in context: http://www.nabble.com/Gridview-select-and-deselect-tp23098365p23098365.html Sent from the gambas-user mailing list archive at Nabble.com. From rospolosco at ...152... Fri Apr 17 17:03:50 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Fri, 17 Apr 2009 17:03:50 +0200 Subject: [Gambas-user] Gridview select and deselect In-Reply-To: <23098365.post@...1379...> References: <23098365.post@...1379...> Message-ID: <200904171703.50504.rospolosco@...152...> Il venerd? 17 aprile 2009 16:08:45 charlesg ha scritto: > Hi all > > Having selected a gridview row with a click, I cannot deselect it with > another click as should be normal. > > After reading an old thread here, I have fudged it with an array bSelected > which keeps track of which rows in gvRequired are selected. > > '------------------------------------------------------------- > PUBLIC SUB gvRequired_Click() > IF bSelected[gvRequired.Row] THEN > bSelected[gvRequired.row] = FALSE > ELSE > bSelected[gvRequired.row] = TRUE > ENDIF > txtItem.SetFocus > END > '------------------------------------------------------------- > PUBLIC SUB gvRequired_LostFocus() > DIM x AS Integer > > gvRequired.Rows.Unselect > FOR x = 0 TO gvRequired.Rows.count - 2 > IF bSelected[x] THEN > gvRequired.Rows[x].Selected = TRUE > ENDIF > NEXT > END > '------------------------------------------------------------- > > This can't interpret shift+click and ctrl+click used to create the > selection. How can I trap shift+click on a gridview? > > Or am I as usual making a whale of a gambas :) > > rgds You could use the MouseDown event. Example: PUBLIC SUB GridView1_MouseDown() IF Mouse.Shift THEN PRINT "You clicked while pressing the Shift key" ENDIF END Saluti, Stefano From abarzuaf at ...626... Fri Apr 17 19:21:03 2009 From: abarzuaf at ...626... (cristian abarzua) Date: Fri, 17 Apr 2009 13:21:03 -0400 Subject: [Gambas-user] Deb packages from the sources of Gambas Message-ID: <7481ab230904171021o6b94f2a2o265e54508b293f8c@...627...> Hello 5 months ago I installed the 7.0 version that comes in the repositories of Ubuntu Intrepid Ibex. Benoit has released version 12.0.1 and goes to 13. Consultation. Someone tried to create a DEB packages for the fonts in the version 12.0.1. Usually the one installed with. / Configure, make, make install, but the interesting thing would be to create deb packages for other people who have recently arrived to linux you can install without problemas.Se not be easy, but any idea is appreciated. Send some email to the maintainer of the official Ubuntu packages and received no reply. The idea is that you can test different versions that come out without having to install sources. Well, any help is welcome, for my part I will continue investigating. PD: I've managed to create some deb packages of some components: auto-apt run. / configure make checkinstall - install = no But it does not work for all components that bring the package tar sources Gambas. Greetings. From charles at ...1784... Fri Apr 17 19:39:04 2009 From: charles at ...1784... (charlesg) Date: Fri, 17 Apr 2009 10:39:04 -0700 (PDT) Subject: [Gambas-user] Gridview select and deselect In-Reply-To: <200904171703.50504.rospolosco@...152...> References: <23098365.post@...1379...> <200904171703.50504.rospolosco@...152...> Message-ID: <23102420.post@...1379...> Stefano, Yes, thanks for that. I am sure I can make it work. rgds -- View this message in context: http://www.nabble.com/Gridview-select-and-deselect-tp23098365p23102420.html Sent from the gambas-user mailing list archive at Nabble.com. From andreas at ...2139... Fri Apr 17 19:48:23 2009 From: andreas at ...2139... (Andreas =?ISO-8859-1?Q?M=FCller?=) Date: Fri, 17 Apr 2009 19:48:23 +0200 Subject: [Gambas-user] atanh - wrong calculation In-Reply-To: <384d3900904161502j75252f7ds27402a7152c7a14a@...627...> References: <1239912471.7042.27.camel@...2140...> <384d3900904161502j75252f7ds27402a7152c7a14a@...627...> Message-ID: <1239990503.5807.3.camel@...2140...> Thanks Jussi. best regards andreas Am Freitag, den 17.04.2009, 01:02 +0300 schrieb Jussi Lahtinen: > Confirmed. > > Regards, > Jussi > > > > ?(Atnh(0.5)) > > 3,162277660168 > > > > but this is wrong. The definition of atanh() should be: From leonardo at ...1237... Fri Apr 17 21:53:37 2009 From: leonardo at ...1237... (Leonardo Miliani) Date: Fri, 17 Apr 2009 21:53:37 +0200 Subject: [Gambas-user] Deb packages from the sources of Gambas In-Reply-To: <7481ab230904171021o6b94f2a2o265e54508b293f8c@...627...> References: <7481ab230904171021o6b94f2a2o265e54508b293f8c@...627...> Message-ID: <49E8DE41.2030300@...1237...> The procedure below is the one I follow to compile Gambas on my Ubuntu 8.10. It's not "debianish" and it creates one big package that contains all Gambas but... it works! 1) before to start you have to check that you have all the repositories activated (main, universe, restricted, multiverse) and that you have installed all the necessary to build packages (at least the build-essentials and dh_make packages and maybe some others that I don't remember); 2) download the Gambas sources, unpack them and enter in the destination folder; 3) open a terminal then digit: dh_make -e your at ...2141... -n -copyright gpl When it is asked, choose "s" to build a single monolithic package; 4) When the process terminates, enter in the /debian subfolder and edit the file "control". It has to look like this one: ----------------------------------------------------------------- Source: gambas2 Section: development Priority: extra Maintainer: Your Name Build-Depends: debhelper (>= 7), autotools-dev Standards-Version: 3.7.3 Homepage: gambas.sourceforge.net Package: gambas2 Architecture: i386 Depends: kdelibs4c2a (>= 4:3.5.8-1), libatk1.0-0 (>= 1.20.0), libbz2-1.0, libc6 (>= 2.4), libcairo2 (>= 1.6.0), libcurl3 (>= 7.16.2-1), libffi5, libgcc1 (>= 1:4.1.1-21), libgl1-mesa-glx | libgl1, libglib2.0-0 (>= 2.12.0), libglu1-mesa | libglu1, libgtk2.0-0 (>= 2.12.0), libice6 (>= 1:1.0.0), libjpeg62, libkrb53 (>= 1.6.dfsg.2), libmysqlclient15off (>= 5.0.27-1), libomniorb4-1 (>= 4.1.1-2), libpango1.0-0 (>= 1.20.5), libpcre3 (>= 7.4), libpng12-0 (>= 1.2.13-4), libpoppler3, libpq5 (>= 8.3~beta1), libqt3-mt (>= 3:3.3.8-b), librsvg2-2 (>= 2.18.1), libsdl-image1.2 (>= 1.2.5), libsdl-mixer1.2 (>= 1.2.6), libsdl1.2debian (>= 1.2.10-1), libsm6, libsqlite0 (>= 2.8.17), libsqlite3-0 (>= 3.4.2), libstdc++6 (>= 4.2.1-4), libx11-6, libxcursor1 (>> 1.1.2), libxext6, libxft2 (>> 2.1.1), libxml2 (>= 2.6.27), libxslt1.1 (>= 1.1.20), libxtst6, unixodbc (>= 2.2.11-1), zlib1g (>= 1:1.2.3.3.dfsg-1) Description: Gambas, a free visual programming environment Gambas is a free visual programming environment based on BASIC language with object oriented extensions. With Gambas it is possible to write graphical applications with Qt/GTK interfaces, manage databases (MySQL, SQLite, PostgreSQL, etc), console script programs and web applications. ------------------------------------------------------------------ 5) Save the file, then, from terminal, digit: CFLAGS="-Wall -g -O2" ./configure --host=i386-linux-gnu --build=i386-linux-gnu --prefix=/usr --mandir=${prefix}/share/man --infodir=${prefix}/share/info This will start the configuration process. 6) At the end, digit: debuild binary This will compile Gambas and will create the deb package. -- Ciao. Leo. Web: www.leonardomiliani.com E-mail: leonardo at ...1237... Scegli software opensource - Choose opensource software Co-fondatore di Gambas-it.org Il sito di riferimento della comunit? italiana degli utenti di Gambas www.gambas-it.org From abarzuaf at ...626... Fri Apr 17 22:39:09 2009 From: abarzuaf at ...626... (cristian abarzua) Date: Fri, 17 Apr 2009 16:39:09 -0400 Subject: [Gambas-user] Deb packages from the sources of Gambas In-Reply-To: <49E8DE41.2030300@...1237...> References: <7481ab230904171021o6b94f2a2o265e54508b293f8c@...627...> <49E8DE41.2030300@...1237...> Message-ID: <7481ab230904171339q62b4f682x235e1be4ee312beb@...627...> Hey, thank you very much, would never have succeeded without your help. greetings 2009/4/17 Leonardo Miliani > The procedure below is the one I follow to compile Gambas on my Ubuntu > 8.10. It's not "debianish" and it creates one big package that contains > all Gambas but... it works! > > 1) before to start you have to check that you have all the repositories > activated (main, universe, restricted, multiverse) and that you have > installed all the necessary to build packages (at least the > build-essentials and dh_make packages and maybe some others that I don't > remember); > > 2) download the Gambas sources, unpack them and enter in the destination > folder; > > 3) open a terminal then digit: > dh_make -e your at ...2141... -n -copyright gpl > When it is asked, choose "s" to build a single monolithic package; > > 4) When the process terminates, enter in the /debian subfolder and edit > the file "control". It has to look like this one: > ----------------------------------------------------------------- > Source: gambas2 > Section: development > Priority: extra > Maintainer: Your Name > Build-Depends: debhelper (>= 7), autotools-dev > Standards-Version: 3.7.3 > Homepage: gambas.sourceforge.net > > Package: gambas2 > Architecture: i386 > Depends: kdelibs4c2a (>= 4:3.5.8-1), libatk1.0-0 (>= 1.20.0), > libbz2-1.0, libc6 (>= 2.4), libcairo2 (>= 1.6.0), libcurl3 (>= > 7.16.2-1), libffi5, libgcc1 (>= 1:4.1.1-21), libgl1-mesa-glx | libgl1, > libglib2.0-0 (>= 2.12.0), libglu1-mesa | libglu1, libgtk2.0-0 (>= > 2.12.0), libice6 (>= 1:1.0.0), libjpeg62, libkrb53 (>= 1.6.dfsg.2), > libmysqlclient15off (>= 5.0.27-1), libomniorb4-1 (>= 4.1.1-2), > libpango1.0-0 (>= 1.20.5), libpcre3 (>= 7.4), libpng12-0 (>= 1.2.13-4), > libpoppler3, libpq5 (>= 8.3~beta1), libqt3-mt (>= 3:3.3.8-b), librsvg2-2 > (>= 2.18.1), libsdl-image1.2 (>= 1.2.5), libsdl-mixer1.2 (>= 1.2.6), > libsdl1.2debian (>= 1.2.10-1), libsm6, libsqlite0 (>= 2.8.17), > libsqlite3-0 (>= 3.4.2), libstdc++6 (>= 4.2.1-4), libx11-6, libxcursor1 > (>> 1.1.2), libxext6, libxft2 (>> 2.1.1), libxml2 (>= 2.6.27), > libxslt1.1 (>= 1.1.20), libxtst6, unixodbc (>= 2.2.11-1), zlib1g (>= > 1:1.2.3.3.dfsg-1) > > Description: Gambas, a free visual programming environment > Gambas is a free visual programming environment based on BASIC language > with object oriented extensions. With Gambas it is possible to write > graphical applications with Qt/GTK interfaces, manage databases (MySQL, > SQLite, PostgreSQL, etc), console script programs and web applications. > ------------------------------------------------------------------ > > 5) Save the file, then, from terminal, digit: > CFLAGS="-Wall -g -O2" ./configure --host=i386-linux-gnu > --build=i386-linux-gnu --prefix=/usr --mandir=${prefix}/share/man > --infodir=${prefix}/share/info > This will start the configuration process. > > 6) At the end, digit: > debuild binary > This will compile Gambas and will create the deb package. > > -- > Ciao. > Leo. > > Web: www.leonardomiliani.com > E-mail: leonardo at ...1237... > Scegli software opensource - Choose opensource software > > Co-fondatore di Gambas-it.org > Il sito di riferimento della comunit? italiana degli utenti di Gambas > www.gambas-it.org > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From nando_f at ...951... Fri Apr 17 22:46:42 2009 From: nando_f at ...951... (nando) Date: Fri, 17 Apr 2009 15:46:42 -0500 Subject: [Gambas-user] A refreshing a gui question In-Reply-To: <200904171549.26261.rterry@...1946...> References: <200904171549.26261.rterry@...1946...> Message-ID: <20090417204339.M45057@...951...> I heavily use ver 1. I found out through experimentation that I get more of what I think it should do by using WAIT or making the SUB very small. In either case, it appears that the runtime needs to have a change to 'do things'. ---------- Original Message ----------- From: richard terry To: mailing list for gambas users Sent: Fri, 17 Apr 2009 15:49:26 +1000 Subject: [Gambas-user] A refreshing a gui question > I wondered if there was anyway to force a refresh of a gui in the following > circumstance. > > If one has say a toolbutton with its auto-size property set to true and one > changes the application font, then the button doesn't auto resize. If one > closes the form and opens it again it does. > > Any help appreciated. > > Richard > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From jbskaggs at ...1871... Fri Apr 17 23:24:04 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Fri, 17 Apr 2009 14:24:04 -0700 (PDT) Subject: [Gambas-user] order of children in container Message-ID: <23106142.post@...1379...> I have a behavior I do not understand- I have several panels with controls in them. The controls are numbered sequentially and created in sequential order in the containers. My problem is that sometimes the containers count the controls backwards! for example: i = 0 FOR i = 0 TO Fsetupgame.Panel1.Children.Count - 1 ' eleven children hValueBox1 = Fsetupgame.Panel1.Children[i] ' gets the address of the already existing object hd = Fsetupgame.panel14.Children[i] a = hd.Text 'pfire.Children[i].name = hd.Text PRINT a, hValueBox1.value fc &= (", fc" & i) IF hValueBox1.Value > 0 FOR c = 0 TO hValueBox1.Value - 1 fire &= (", fc" & i & "^" & a) INC Fsetupgame.firecount NEXT ENDIF NEXT the ouput goes: textbox11 textbox10 textbox9 textbox8 textbox7 textbox6 textbox5 textbox4 textbox3 textbox2 textbox1 rather than textbox1 textbox2 textbox3 and so . . . Why does this happen? JB SKaggs -- View this message in context: http://www.nabble.com/order-of-children-in-container-tp23106142p23106142.html Sent from the gambas-user mailing list archive at Nabble.com. From jbskaggs at ...1871... Fri Apr 17 23:32:01 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Fri, 17 Apr 2009 14:32:01 -0700 (PDT) Subject: [Gambas-user] order of children in container In-Reply-To: <23106142.post@...1379...> References: <23106142.post@...1379...> Message-ID: <23106387.post@...1379...> I closed the form and reloaded it and the control order changed to how I wanted it. I still am not sure if I understand why. JB SKaggs jbskaggs wrote: > > I have a behavior I do not understand- > > I have several panels with controls in them. > > The controls are numbered sequentially and created in sequential order in > the containers. My problem is that sometimes the containers count the > controls backwards! > > for example: > i = 0 > FOR i = 0 TO Fsetupgame.Panel1.Children.Count - 1 ' eleven children > hValueBox1 = Fsetupgame.Panel1.Children[i] ' gets the > address of the already existing object > hd = Fsetupgame.panel14.Children[i] > a = hd.Text > 'pfire.Children[i].name = hd.Text > PRINT a, hValueBox1.value > fc &= (", fc" & i) > IF hValueBox1.Value > 0 > FOR c = 0 TO hValueBox1.Value - 1 > fire &= (", fc" & i & "^" & a) > INC Fsetupgame.firecount > NEXT > ENDIF > NEXT > > the ouput goes: > > textbox11 > textbox10 > textbox9 > textbox8 > textbox7 > textbox6 > textbox5 > textbox4 > textbox3 > textbox2 > textbox1 > > rather than > > textbox1 > textbox2 > textbox3 > and so . . . > > Why does this happen? > > JB SKaggs > -- View this message in context: http://www.nabble.com/order-of-children-in-container-tp23106142p23106387.html Sent from the gambas-user mailing list archive at Nabble.com. From iecltd at ...2113... Sat Apr 18 08:38:01 2009 From: iecltd at ...2113... (Rodney Rundstrom) Date: Sat, 18 Apr 2009 18:38:01 +1200 Subject: [Gambas-user] Form Bug? Message-ID: When I started developing Gambas forms I found that to obtain a blank form without a top bar I could set border to none however even with this setting a top bar with a label of the project name is provided on Fmain form . Is this a bug? Am I missing something ? Is there a way around this? Rodney Rundstrom From jbskaggs at ...1871... Sat Apr 18 10:38:55 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sat, 18 Apr 2009 01:38:55 -0700 (PDT) Subject: [Gambas-user] Object creating properties? ball.speed, ball.solid, etc Message-ID: <23110588.post@...1379...> I need to know how to either create an object to where I can attach a list of variables or how to give myself the ability to do the following: lets say I want to name my special object: ball. I want to be able to create special properties for that ball I can access with .property (or variable) for example: ball.speed ball.solid ball.item ball.gravity ball.life etc... I don't mean Gambas, I mean just being able to attach variables to an object like I mentioned. I write a lot of games and this is something I need to know how to do or at least get close to it. I have read all the docs I can find and I am probably overlooking it. JB Skaggs -- View this message in context: http://www.nabble.com/Object-creating-properties--ball.speed%2C-ball.solid%2C-etc-tp23110588p23110588.html Sent from the gambas-user mailing list archive at Nabble.com. From simonart.dominique at ...11... Sat Apr 18 13:32:50 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Sat, 18 Apr 2009 13:32:50 +0200 Subject: [Gambas-user] Object creating properties? ball.speed, ball.solid, etc In-Reply-To: <23110588.post@...1379...> References: <23110588.post@...1379...> Message-ID: <49E9BA62.1070404@...11...> jbskaggs a ?crit : > > I need to know how to either create an object to where I can attach a list of > variables or how to give myself the ability to do the following: > > lets say I want to name my special object: ball. > > I want to be able to create special properties for that ball I can access > with .property (or variable) > > for example: > > ball.speed > ball.solid > ball.item > ball.gravity > ball.life > etc... > > > I don't mean Gambas, I mean just being able to attach variables to an object > like I mentioned. > > I write a lot of games and this is something I need to know how to do or at > least get close to it. I have read all the docs I can find and I am > probably overlooking it. > > JB Skaggs Hi JB, May be I don't understand the real question? You just have to create a class, let say BallModel, add properties to it, like speed, solid, etc.. Then you have to create an instance of that class , let say Ball and initialize its properties. :) Hope this is what you ask for Dominique Simonart From simonart.dominique at ...11... Sat Apr 18 13:46:39 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Sat, 18 Apr 2009 13:46:39 +0200 Subject: [Gambas-user] Object creating properties? ball.speed, ball.solid, etc In-Reply-To: <49E9BA62.1070404@...11...> References: <23110588.post@...1379...> <49E9BA62.1070404@...11...> Message-ID: <49E9BD9F.3020000@...11...> Simonart Dominique a ?crit : > jbskaggs a ?crit : >> I need to know how to either create an object to where I can attach a list of >> variables or how to give myself the ability to do the following: >> >> lets say I want to name my special object: ball. >> >> I want to be able to create special properties for that ball I can access >> with .property (or variable) >> >> for example: >> >> ball.speed >> ball.solid >> ball.item >> ball.gravity >> ball.life >> etc... >> >> >> I don't mean Gambas, I mean just being able to attach variables to an object >> like I mentioned. >> >> I write a lot of games and this is something I need to know how to do or at >> least get close to it. I have read all the docs I can find and I am >> probably overlooking it. >> >> JB Skaggs > > Hi JB, > > May be I don't understand the real question? > You just have to create a class, let say BallModel, > add properties to it, like speed, solid, etc.. > Then you have to create an instance of that class , let say > Ball and initialize its properties. :) > > Hope this is what you ask for > Dominique Simonart > Hi again, May be the Ball object is already defined in Gambas? In this case, you have to create a class which inherits this object, and add the new properties on this new class regards, Dominique Simonart From jussi.lahtinen at ...626... Sat Apr 18 14:07:06 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 18 Apr 2009 15:07:06 +0300 Subject: [Gambas-user] Object creating properties? ball.speed, ball.solid, etc In-Reply-To: <49E9BD9F.3020000@...11...> References: <23110588.post@...1379...> <49E9BA62.1070404@...11...> <49E9BD9F.3020000@...11...> Message-ID: <384d3900904180507h745ba833y817b357de7e50724@...627...> 'Class CBallModel Public speed as Integer Public solid as Integer Public item as Integer Then just; Dim Ball as New CBallModel 'Set speed to 10 Ball.speed = 10 Is that you were looking for? Jussi On Sat, Apr 18, 2009 at 14:46, Simonart Dominique wrote: > Simonart Dominique a ?crit : >> jbskaggs a ?crit : >>> I need to know how to either create an object to where I can attach a list of >>> variables or how to give myself the ability to do the following: >>> >>> lets say I want to name my special object: ball. >>> >>> I want to be able to create special properties for that ball I can access >>> with .property (or variable) >>> >>> for example: >>> >>> ball.speed >>> ball.solid >>> ball.item >>> ball.gravity >>> ball.life >>> etc... >>> >>> >>> I don't mean Gambas, I mean just being able to attach variables to an object >>> like I mentioned. >>> >>> I write a lot of games and this is something I need to know how to do or at >>> least get close to it. ?I have read all the docs I can find and I am >>> probably overlooking it. >>> >>> JB Skaggs >> >> Hi JB, >> >> May be I don't understand the real question? >> You just have to create a class, let say BallModel, >> add properties to it, like speed, solid, etc.. >> Then you have to create an instance of that class , let say >> Ball and initialize its properties. :) >> >> Hope this is what you ask for >> Dominique Simonart >> > > Hi again, > > May be the Ball object is already defined in Gambas? > In this case, you have to create a class which inherits this > object, and add the new properties on this new class > > regards, > Dominique Simonart > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Sat Apr 18 15:22:50 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 18 Apr 2009 16:22:50 +0300 Subject: [Gambas-user] Nasty bug in "With" instruction! In-Reply-To: <384d3900904160617j104a2337x5a6ee8578ca53e5d@...627...> References: <384d3900904160617j104a2337x5a6ee8578ca53e5d@...627...> Message-ID: <384d3900904180622i45925734r7f8e4ca11b0a2016@...627...> Some more testing... With this code: With tmp .y = 0 tmp = funcx() With tmp ' Extra with instruction. Debug .y Debug tmp.y End With End With Or with this: With tmp .y = 0 funcx2(tmp) ' By reference (unfortunately this solution doesn't fit to my code). Debug .y Debug tmp.y End With Public Sub funcx2(test as Class1) test.y = 1 End Result is what is expected! I tried to look at the gambas source code to figure out what is wrong... beats me up. But maybe the problem is in how archiver or interpreter handles "tmp = ...". Extra "with" instruction is workaround, but it's little troublesome to find where it is needed. And when "tmp = funcx()" is in "if then else" structure, it is very troublesome! Maybe I need temporarily to get rid of "with" instructions! But I hope it is easy to fix! Regards, Jussi On Thu, Apr 16, 2009 at 16:17, Jussi Lahtinen wrote: > Hi! > Confirmed on Gambas2 and Gambas3. > > Code: > > Dim tmp As New Class1 > > With tmp > ?.y = 0 > ?tmp = funcx() > ?Debug .y > ?Debug tmp.y > End With > > > Public Function funcx() As Class1 > Dim test As New Class1 > > test.y = 1 > > Return test > End > > > Output of debug is; > 0 > 1 > > I think .y and tmp.y should be same! > > Regards, > Jussi > From jbskaggs at ...1871... Sat Apr 18 19:54:03 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sat, 18 Apr 2009 10:54:03 -0700 (PDT) Subject: [Gambas-user] Object creating properties? ball.speed, ball.solid, etc In-Reply-To: <384d3900904180507h745ba833y817b357de7e50724@...627...> References: <23110588.post@...1379...> <49E9BA62.1070404@...11...> <49E9BD9F.3020000@...11...> <384d3900904180507h745ba833y817b357de7e50724@...627...> Message-ID: <23115530.post@...1379...> Thanks to you both! Yes this is what I needed. JB Skaggs Jussi Lahtinen wrote: > > 'Class CBallModel > Public speed as Integer > Public solid as Integer > Public item as Integer > > Then just; > Dim Ball as New CBallModel > > 'Set speed to 10 > Ball.speed = 10 > > Is that you were looking for? > > > Jussi > > > > > > On Sat, Apr 18, 2009 at 14:46, Simonart Dominique > wrote: >> Simonart Dominique a ?crit : >>> jbskaggs a ?crit : >>>> I need to know how to either create an object to where I can attach a >>>> list of >>>> variables or how to give myself the ability to do the following: >>>> >>>> lets say I want to name my special object: ball. >>>> >>>> I want to be able to create special properties for that ball I can >>>> access >>>> with .property (or variable) >>>> >>>> for example: >>>> >>>> ball.speed >>>> ball.solid >>>> ball.item >>>> ball.gravity >>>> ball.life >>>> etc... >>>> >>>> >>>> I don't mean Gambas, I mean just being able to attach variables to an >>>> object >>>> like I mentioned. >>>> >>>> I write a lot of games and this is something I need to know how to do >>>> or at >>>> least get close to it. ?I have read all the docs I can find and I am >>>> probably overlooking it. >>>> >>>> JB Skaggs >>> >>> Hi JB, >>> >>> May be I don't understand the real question? >>> You just have to create a class, let say BallModel, >>> add properties to it, like speed, solid, etc.. >>> Then you have to create an instance of that class , let say >>> Ball and initialize its properties. :) >>> >>> Hope this is what you ask for >>> Dominique Simonart >>> >> >> Hi again, >> >> May be the Ball object is already defined in Gambas? >> In this case, you have to create a class which inherits this >> object, and add the new properties on this new class >> >> regards, >> Dominique Simonart >> >> >> ------------------------------------------------------------------------------ >> Stay on top of everything new and different, both inside and >> around Java (TM) technology - register by April 22, and save >> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. >> 300 plus technical and hands-on sessions. Register today. >> Use priority code J9JMT32. http://p.sf.net/sfu/p >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > 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/Object-creating-properties--ball.speed%2C-ball.solid%2C-etc-tp23110588p23115530.html Sent from the gambas-user mailing list archive at Nabble.com. From iecltd at ...2113... Sun Apr 19 03:06:05 2009 From: iecltd at ...2113... (Rodney Rundstrom) Date: Sun, 19 Apr 2009 13:06:05 +1200 Subject: [Gambas-user] Databrowser Message-ID: <5AE6A0982B1647E48318BF4B8BCDE97E@...2114...> When I insert a databrowser into my project I sometime do not see all the control icons and currently on some when all are there the "new" does seem to work Anyone help Thanks Rodney Rundstrom From jbskaggs at ...1871... Sun Apr 19 03:16:06 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sat, 18 Apr 2009 18:16:06 -0700 (PDT) Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <23117770.post@...1379...> References: <23117770.post@...1379...> Message-ID: <23118826.post@...1379...> Hi I hope this doesn't seem too basic- but did you create your form and draw the textbox1, label1, and button1? JB SKaggs phohammer wrote: > > Hello, > I am trying to learn a little bit about OOP with Gambas. I attempted to > create the "Hello World" program found here: > http://gambas.sourceforge.net/Getting%20Started%20with%20GAMBAS.odt , but > I can't even get it to run. When I > press play (or F5 or Debug>Run) it compiles, but the dialog box doesn't > pop up. > > I have ran the "Object" example that comes with Gambas II, and it works > perfectly (the dialog box pops up and everything). > > I'm using PCLinuxOS and installed Gambas II through Synaptic. > > Does anyone have an idea as to why my program won't run? > > (By the way my source looks like this: ' Gambas class file > > PUBLIC SUB Button1_Click() > > Label1.Text = "Hello " & Textbox1.Text & ". This is my first Gambas > project!" > > END > ). > -- View this message in context: http://www.nabble.com/Programming-beginner%3A-first-program-won%27t-run--tp23117770p23118826.html Sent from the gambas-user mailing list archive at Nabble.com. From trreddell at ...626... Sun Apr 19 04:15:08 2009 From: trreddell at ...626... (phohammer) Date: Sat, 18 Apr 2009 19:15:08 -0700 (PDT) Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <23118826.post@...1379...> References: <23117770.post@...1379...> <23118826.post@...1379...> Message-ID: <23118993.post@...1379...> Yep, I created the form just as the tutorial said (in my first post): http://www.nabble.com/file/p23118993/form.png jbskaggs wrote: > > Hi I hope this doesn't seem too basic- but did you create your form and > draw the textbox1, label1, and button1? > > JB SKaggs > > -- View this message in context: http://www.nabble.com/Programming-beginner%3A-first-program-won%27t-run--tp23117770p23118993.html Sent from the gambas-user mailing list archive at Nabble.com. From jbskaggs at ...1871... Sun Apr 19 05:36:24 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sat, 18 Apr 2009 20:36:24 -0700 (PDT) Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <23118993.post@...1379...> References: <23117770.post@...1379...> <23118826.post@...1379...> <23118993.post@...1379...> Message-ID: <23119189.post@...1379...> Okay two other things then: make sure your control names match the names in your code (ie label1 is actually named label1 on the form etc) two make sure you dont have the controls set to visible.false on the form. try this code: public sub form_open() label1.visible=true button1.visible=true textbox1.visible=true textbox1.readonly=false textbox1.text="Hello World!" end public sub button1_click() label1.text = Textbox1.text end The first section makes sure your controls are visible and that textbox is not set to readonly (although you shouldn't have to do this as by default controls are visible and readonly = false), and sets the text of textbox1 to hello world. You can type whatever you want in the textbox. The second section assigns any text in the textbox1 to the label1. Tell me if this runs for you? JB Skaggs phohammer wrote: > > Yep, I created the form just as the tutorial said (in my first post): > > http://www.nabble.com/file/p23118993/form.png > > > jbskaggs wrote: >> >> Hi I hope this doesn't seem too basic- but did you create your form and >> draw the textbox1, label1, and button1? >> >> JB SKaggs >> >> > > -- View this message in context: http://www.nabble.com/Programming-beginner%3A-first-program-won%27t-run--tp23117770p23119189.html Sent from the gambas-user mailing list archive at Nabble.com. From trreddell at ...626... Sun Apr 19 05:54:48 2009 From: trreddell at ...626... (phohammer) Date: Sat, 18 Apr 2009 20:54:48 -0700 (PDT) Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <23119189.post@...1379...> References: <23117770.post@...1379...> <23118826.post@...1379...> <23118993.post@...1379...> <23119189.post@...1379...> Message-ID: <23119191.post@...1379...> jbskaggs wrote: > > > Tell me if this runs for you? > > No luck. I even matched the cases (lower case) for the code and properties. You can see my code and form in the files I uploaded: http://www.nabble.com/file/p23119191/fmainform.png fmainform.png and http://www.nabble.com/file/p23119191/fmainclass.png fmainclass.png . I figured a program so simple should run... hmmm... -- View this message in context: http://www.nabble.com/Programming-beginner%3A-first-program-won%27t-run--tp23117770p23119191.html Sent from the gambas-user mailing list archive at Nabble.com. From jbskaggs at ...1871... Sun Apr 19 06:06:03 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sat, 18 Apr 2009 21:06:03 -0700 (PDT) Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <23119191.post@...1379...> References: <23117770.post@...1379...> <23118826.post@...1379...> <23118993.post@...1379...> <23119189.post@...1379...> <23119191.post@...1379...> Message-ID: <23119193.post@...1379...> Please send a screenshot of what it does when it runs? Oh what components do you have installed under project preferences? QT? JB Skaggs phohammer wrote: > > > jbskaggs wrote: >> >> >> Tell me if this runs for you? >> >> > > No luck. I even matched the cases (lower case) for the code and > properties. You can see my code and form in the files I uploaded: > http://www.nabble.com/file/p23119191/fmainform.png fmainform.png and > http://www.nabble.com/file/p23119191/fmainclass.png fmainclass.png . > > I figured a program so simple should run... hmmm... > -- View this message in context: http://www.nabble.com/Programming-beginner%3A-first-program-won%27t-run--tp23117770p23119193.html Sent from the gambas-user mailing list archive at Nabble.com. From trreddell at ...626... Sun Apr 19 06:30:14 2009 From: trreddell at ...626... (phohammer) Date: Sat, 18 Apr 2009 21:30:14 -0700 (PDT) Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <23119193.post@...1379...> References: <23117770.post@...1379...> <23118826.post@...1379...> <23118993.post@...1379...> <23119189.post@...1379...> <23119191.post@...1379...> <23119193.post@...1379...> Message-ID: <23119198.post@...1379...> jbskaggs wrote: > > Please send a screenshot of what it does when it runs? > > Oh what components do you have installed under project preferences? QT? > > JB Skaggs > > It simply says "compiling project..." as seen http://www.nabble.com/file/p23119198/compiling.png here . I'm not sure what you mean by "project preferences". There is a "project properties" and it says I have these components running: http://www.nabble.com/file/p23119198/properties.png properties.png , I tried to select the qt and gtk components but it said this: http://www.nabble.com/file/p23119198/properties1.png properties1.png . I wonder if I need to start a whole new project and enable the qt component before doing anything? -- View this message in context: http://www.nabble.com/Programming-beginner%3A-first-program-won%27t-run--tp23117770p23119198.html Sent from the gambas-user mailing list archive at Nabble.com. From jbskaggs at ...1871... Sun Apr 19 07:07:18 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sat, 18 Apr 2009 22:07:18 -0700 (PDT) Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <23119198.post@...1379...> References: <23117770.post@...1379...> <23118826.post@...1379...> <23118993.post@...1379...> <23119189.post@...1379...> <23119191.post@...1379...> <23119193.post@...1379...> <23119198.post@...1379...> Message-ID: <23119719.post@...1379...> Try just unclicking the gb gui and gb gtk and click QT you shouldnt have to rewrite the whole thing. JB SKaggs phohammer wrote: > > > jbskaggs wrote: >> >> Please send a screenshot of what it does when it runs? >> >> Oh what components do you have installed under project preferences? QT? >> >> JB Skaggs >> >> > > It simply says "compiling project..." as seen > http://www.nabble.com/file/p23119198/compiling.png here . > > I'm not sure what you mean by "project preferences". > There is a "project properties" and it says I have these components > running: http://www.nabble.com/file/p23119198/properties.png > properties.png , > > I tried to select the qt and gtk components but it said this: > http://www.nabble.com/file/p23119198/properties1.png properties1.png . > > I wonder if I need to start a whole new project and enable the qt > component before doing anything? > > -- View this message in context: http://www.nabble.com/Programming-beginner%3A-first-program-won%27t-run--tp23117770p23119719.html Sent from the gambas-user mailing list archive at Nabble.com. From trreddell at ...626... Sun Apr 19 07:16:41 2009 From: trreddell at ...626... (phohammer) Date: Sat, 18 Apr 2009 22:16:41 -0700 (PDT) Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <23119719.post@...1379...> References: <23117770.post@...1379...> <23118826.post@...1379...> <23118993.post@...1379...> <23119189.post@...1379...> <23119191.post@...1379...> <23119193.post@...1379...> <23119198.post@...1379...> <23119719.post@...1379...> Message-ID: <23119747.post@...1379...> jbskaggs wrote: > > Try just unclicking the gb gui and gb gtk and click QT you shouldnt have > to rewrite the whole thing. > > JB SKaggs > > > I tried it and it still won't run the dialog box - I only have these components enabled now: http://www.nabble.com/file/p23119747/onltgb_gbform_gbqt.png onltgb_gbform_gbqt.png -- View this message in context: http://www.nabble.com/Programming-beginner%3A-first-program-won%27t-run--tp23117770p23119747.html Sent from the gambas-user mailing list archive at Nabble.com. From jbskaggs at ...1871... Sun Apr 19 08:39:17 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sat, 18 Apr 2009 23:39:17 -0700 (PDT) Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <23119747.post@...1379...> References: <23117770.post@...1379...> <23118826.post@...1379...> <23118993.post@...1379...> <23119189.post@...1379...> <23119191.post@...1379...> <23119193.post@...1379...> <23119198.post@...1379...> <23119719.post@...1379...> <23119747.post@...1379...> Message-ID: <23120056.post@...1379...> Well my thinking was maybe you didnt have gtk loaded so to try qt but maybe you dont have qt either. Do you know if you hve gtk or qt loaded on your version of linux? And if so what version it is? Or some other dependency. Thats the only thng I can think of, but maybe the more experienced guys here can help as they know more and well wrote the language. Out of curiousity have you tried gambas on another linux on this same computer? I run Gambas2 on Ubuntu 8.1 and Wolvix 2.0 just fine- Ubuntu was one click install and Wolvix requires you to run qt config after installation. Sorry that I couldnt help more. JB Skaggs phohammer wrote: > > > jbskaggs wrote: >> >> Try just unclicking the gb gui and gb gtk and click QT you shouldnt have >> to rewrite the whole thing. >> >> JB SKaggs >> >> >> > > I tried it and it still won't run the dialog box - I only have these > components enabled now: > http://www.nabble.com/file/p23119747/onltgb_gbform_gbqt.png > onltgb_gbform_gbqt.png > -- View this message in context: http://www.nabble.com/Programming-beginner%3A-first-program-won%27t-run--tp23117770p23120056.html Sent from the gambas-user mailing list archive at Nabble.com. From jbskaggs at ...1871... Sun Apr 19 09:17:17 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sun, 19 Apr 2009 00:17:17 -0700 (PDT) Subject: [Gambas-user] In sdl window how do you hide mouse? Cant fnd a Doc entry for sdl mouse. Message-ID: <23120202.post@...1379...> Hi in my sdl window I need to hide the mouse cursor here's code: PUBLIC SUB Main() WITH Screen .Width = 640 .Height = 480 .Framerate = 100 .Show() .FullScreen = TRUE .Mouse = Mouse.Blank <<<<<< i have also tried mouse.cross and mouse.custom but nothing happens. END WITH At 640 x 480 the mouse cursor is huge! and does not need to be on a keyboard controlled game screen anyway. The doc's had no entry yet for .mouse for sdl and I searched the forums for mouse hide, cursor hide, sdl mouse, and mouse visible, cursor visible, and custom cursor but to no avail. JB SKaggs -- View this message in context: http://www.nabble.com/In-sdl-window-how-do-you-hide-mouse--Cant-fnd-a-Doc-entry-for-sdl-mouse.-tp23120202p23120202.html Sent from the gambas-user mailing list archive at Nabble.com. From Karl.Reinl at ...9... Sun Apr 19 12:26:50 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Sun, 19 Apr 2009 12:26:50 +0200 Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <23119747.post@...1379...> References: <23117770.post@...1379...> <23118826.post@...1379...> <23118993.post@...1379...> <23119189.post@...1379...> <23119191.post@...1379...> <23119193.post@...1379...> <23119198.post@...1379...> <23119719.post@...1379...> <23119747.post@...1379...> Message-ID: <1240136810.6470.11.camel@...40...> Am Samstag, den 18.04.2009, 22:16 -0700 schrieb phohammer: > > jbskaggs wrote: > > > > Try just unclicking the gb gui and gb gtk and click QT you shouldnt have > > to rewrite the whole thing. > > > > JB SKaggs > > > > > > > > I tried it and it still won't run the dialog box - I only have these > components enabled now: > http://www.nabble.com/file/p23119747/onltgb_gbform_gbqt.png > onltgb_gbform_gbqt.png Salut, please start the IDE by typing gambas2 in an Terminal and enter this _new sub into FMain.class PUBLIC SUB _new() ME.Center END at least, while debugging it (f8) you should, and you Form will be center on the screen. If you don't reach the _new sub, close the IDE and look if there are Errors written in the Terminal Something you also could do is to create a source archive package ( Ctrl+Alt+A or /Project/Make/Source archive) and send it to the list. -- Amicalment Charlie From ronstk at ...239... Sun Apr 19 12:44:19 2009 From: ronstk at ...239... (Ron_1st) Date: Sun, 19 Apr 2009 12:44:19 +0200 Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <23119191.post@...1379...> References: <23117770.post@...1379...> <23119189.post@...1379...> <23119191.post@...1379...> Message-ID: <200904191244.20952.ronstk@...239...> On Sunday 19 April 2009, phohammer wrote: > > jbskaggs wrote: > > > > > > Tell me if this runs for you? > > > > > > No luck. I even matched the cases (lower case) for the code and properties. > You can see my code and form in the files I uploaded: > http://www.nabble.com/file/p23119191/fmainform.png fmainform.png and > http://www.nabble.com/file/p23119191/fmainclass.png fmainclass.png . > > I figured a program so simple should run... hmmm... You right, it should. Interesting case you have now. I wil try to help but be aware it is not a really first beginners stupid mistake, I wil slap your PC from the table. :) ;=) As I follow your conversation and see pictures your install looks OK. PClinux2007 (used here to time by time) can/t be the problem IMHO. For the fact the IDE works and you use the base components used by IDE is also a good sign. You did try the Object example and that was working. Have you try more of them. > I have ran the "Object" example that comes with Gambas II, and it works > perfectly (the dialog box pops up and everything). > > I'm using PCLinuxOS and installed Gambas II through Synaptic. > > Does anyone have an idea as to why my program won't run? > > (By the way my source looks like this: ' Gambas class file > > PUBLIC SUB Button1_Click() > > ? Label1.Text = "Hello " & Textbox1.Text & ". This is my first Gambas > project!" > > END > ). > Is the Public SUB Button1_Click() routine the only code in the forms code class? Then you may have here the problem. If you use the wizard to create a project you wil see some extra code like a Form_Main() sub. Also it is need to set the form as the startup form, you can do it with a right mouse button click in the project tree after select the form. Just to try it is not the basic beginners mistake you could make a copy of the object exammple (in fact any other should work to) and add your label, textbox and button and code inside this example. This way you can see your project is in fact at least two parts a) the project setup (mistakes are prevented by using a a working example.) b) your progamitself For me highjacking a example to start with did help me many times with new ways of programming, i.e. starting gambas (v0.46) over 5 years back. ;) This could be help you to go on. Best regards, Ron_1st -- From leonardo at ...1237... Sun Apr 19 18:22:07 2009 From: leonardo at ...1237... (Leonardo Miliani) Date: Sun, 19 Apr 2009 18:22:07 +0200 Subject: [Gambas-user] Libtool & Ubuntu Jaunty Message-ID: <49EB4FAF.5030106@...1237...> With the new Ubuntu Jaunty upcoming to the horizon, I would like to know if the problem of libtool has been solved because Jaunty will have libtool 2.2.6 in its repos and a lot of users will have problems trying to compile Gambas on that system (I personally tried to compile Gambas under Jaunty RC installed on a VM but I was not able to complete the process). -- Ciao. Leo. Web: www.leonardomiliani.com E-mail: leonardo at ...1237... Scegli software opensource - Choose opensource software Co-fondatore di Gambas-it.org Il sito di riferimento della comunit? italiana degli utenti di Gambas www.gambas-it.org From trreddell at ...626... Sun Apr 19 18:41:34 2009 From: trreddell at ...626... (phohammer) Date: Sun, 19 Apr 2009 09:41:34 -0700 (PDT) Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <1240136810.6470.11.camel@...40...> References: <23117770.post@...1379...> <23118826.post@...1379...> <23118993.post@...1379...> <23119189.post@...1379...> <23119191.post@...1379...> <23119193.post@...1379...> <23119198.post@...1379...> <23119719.post@...1379...> <23119747.post@...1379...> <1240136810.6470.11.camel@...40...> Message-ID: <23124849.post@...1379...> Ok, I tried copying every thing over to my project from the "Object" example. I copied every single thing from the project tree. And I deleted all of my stuff from my project, essentially making an "Object" project of my own that I could edit. It still wouldn't run. I tried running the IDE from a terminal and there was no output into the terminal whether the project ran (with "Object") or it didn't (with mine). On the having qt on my system, I am not too sure but here is what I have installed that is qt related: http://www.nabble.com/file/p23124849/qt.png qt.png . I'm not sure how that could be a problem since I have seen a project run successfully on my system (the "Object" example.) I have a question here though, maybe this is my problem. What project type should I be using ( http://www.nabble.com/file/p23124849/whichtype.png whichtype.png )? I've been using the "Graphical Application" thus far. Charlie Reinl wrote: > > Am Samstag, den 18.04.2009, 22:16 -0700 schrieb phohammer: >> >> jbskaggs wrote: >> > >> > Try just unclicking the gb gui and gb gtk and click QT you shouldnt >> have >> > to rewrite the whole thing. >> > >> > JB SKaggs >> > >> > >> > >> >> I tried it and it still won't run the dialog box - I only have these >> components enabled now: >> http://www.nabble.com/file/p23119747/onltgb_gbform_gbqt.png >> onltgb_gbform_gbqt.png > > Salut, > > please start the IDE by typing gambas2 in an Terminal > > and enter this _new sub into FMain.class > > PUBLIC SUB _new() > ME.Center > END > > at least, while debugging it (f8) you should, and you Form will be > center on the screen. > > If you don't reach the _new sub, close the IDE and look if there are > Errors written in the Terminal > > Something you also could do is to create a source archive package ( > Ctrl+Alt+A or /Project/Make/Source archive) and send it to the list. > > > -- > Amicalment > Charlie > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > 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/Programming-beginner%3A-first-program-won%27t-run--tp23117770p23124849.html Sent from the gambas-user mailing list archive at Nabble.com. From doriano.blengino at ...1909... Sun Apr 19 19:37:44 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sun, 19 Apr 2009 19:37:44 +0200 Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <23124849.post@...1379...> References: <23117770.post@...1379...> <23118826.post@...1379...> <23118993.post@...1379...> <23119189.post@...1379...> <23119191.post@...1379...> <23119193.post@...1379...> <23119198.post@...1379...> <23119719.post@...1379...> <23119747.post@...1379...> <1240136810.6470.11.camel@...40...> <23124849.post@...1379...> Message-ID: <49EB6168.5060507@...1909...> phohammer ha scritto: > Ok, I tried copying every thing over to my project from the "Object" example. > I copied every single > thing from the project tree. And I deleted all of my stuff from my project, > essentially making an "Object" project > of my own that I could edit. It still wouldn't run. > > I tried running the IDE from a terminal and there was no output into the > terminal whether the project ran (with > "Object") or it didn't (with mine). > > On the having qt on my system, I am not too sure but here is what I have > installed that is qt related: http://www.nabble.com/file/p23124849/qt.png > qt.png . > I'm not sure how that could be a problem since I have seen a project run > successfully on my system (the "Object" example.) > > I have a question here though, maybe this is my problem. What project type > should I be using ( http://www.nabble.com/file/p23124849/whichtype.png > whichtype.png )? > I've been using the "Graphical Application" thus far. > I assume you have QT installed, because gambas would'nt work without. Graphical application should be ok. No compilation errors - ok. Next, try to understand, when you press GO (F5?), if the program really runs or not. While the program "seems" to run, you can confirm by using a terminal and the ps(1) command: on my system turns out: 9612 ? S 0:02 gbr2 /usr/bin/gambas2 9619 ? S 0:00 /usr/bin/gbx2 -g -f /root/programmi/gambas/prove/Parted -- You see "gbr2 ...gambas2", which is the IDE, and "gbx2 ...Parted" which is the program. If your program does'nt show, then it is not running - try to execute it step by step to see if terminates instead of opening a window and entering the idle loop. If it runs, look in the taskbar, where you see open windows/applications. If a button is there, then your program has an open window somewhere outside the desktop (window manager issue). You can try to pull it inside a desktop by using the contestual menu. If the program runs, but no window is shown, check with "lsof -p "; on my system, at the end, it shows: gbx2 9619 root 21r REG 3,70 14625 35686 /usr/lib/gambas2/gb.qt.gambas gbx2 9619 root 22r REG 3,70 1033214 35701 /usr/lib/gambas2/gb.form.gambas showing the the program actually uses QT (and many more information). There other tools to see if your program really opened a window, but things get more complicated... it is easier to see what is wrong in the source. Anyway, make a source tarball (Project->Create->Source package -- or something like that) and send the .tar.gz; this will let other users on this list to examine your project to find something you missed. Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From ron at ...1740... Sun Apr 19 18:32:07 2009 From: ron at ...1740... (Ron) Date: Sun, 19 Apr 2009 18:32:07 +0200 Subject: [Gambas-user] Libtool & Ubuntu Jaunty In-Reply-To: <68696c50904190929n9eb4847v909f6d99fe1d8138@...627...> References: <49EB4FAF.5030106@...1237...> <68696c50904190929n9eb4847v909f6d99fe1d8138@...627...> Message-ID: <68696c50904190932j3fcf5a4chca5f224d8c53a9f4@...627...> I also want to upgrade soon because of the more mature netbook support of that ubuntu release. And maybe someone can build a more recent 2.12 package for ubuntu too? Regards, Ron_2nd On Apr 19, 2009 6:23 PM, "Leonardo Miliani" wrote: With the new Ubuntu Jaunty upcoming to the horizon, I would like to know if the problem of libtool has been solved because Jaunty will have libtool 2.2.6 in its repos and a lot of users will have problems trying to compile Gambas on that system (I personally tried to compile Gambas under Jaunty RC installed on a VM but I was not able to complete the process). -- Ciao. Leo. Web: www.leonardomiliani.com E-mail: leonardo at ...1237... Scegli software opensource - Choose opensource software Co-fondatore di Gambas-it.org Il sito di riferimento della comunit? italiana degli utenti di Gambas www.gambas-it.org ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From leonardo at ...1237... Sun Apr 19 19:47:30 2009 From: leonardo at ...1237... (Leonardo Miliani) Date: Sun, 19 Apr 2009 19:47:30 +0200 Subject: [Gambas-user] Libtool & Ubuntu Jaunty In-Reply-To: <68696c50904190932j3fcf5a4chca5f224d8c53a9f4@...627...> References: <49EB4FAF.5030106@...1237...> <68696c50904190929n9eb4847v909f6d99fe1d8138@...627...> <68696c50904190932j3fcf5a4chca5f224d8c53a9f4@...627...> Message-ID: <49EB63B2.8060800@...1237...> Ron ha scritto: > I also want to upgrade soon because of the more mature netbook support of > that ubuntu release. > > And maybe someone can build a more recent 2.12 package for ubuntu too? > > Regards, > Ron_2nd > > On Apr 19, 2009 6:23 PM, "Leonardo Miliani" > wrote: > > With the new Ubuntu Jaunty upcoming to the horizon, I would like to know > if the problem of libtool has been solved because Jaunty will have > libtool 2.2.6 in its repos and a lot of users will have problems trying > to compile Gambas on that system (I personally tried to compile Gambas > under Jaunty RC installed on a VM but I was not able to complete the > process). > > -- > Ciao. > Leo. > > Web: www.leonardomiliani.com > E-mail: leonardo at ...1237... > Scegli software opensource - Choose opensource software > > Co-fondatore di Gambas-it.org > Il sito di riferimento della comunit? italiana degli utenti di Gambas > www.gambas-it.org > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > If you have Intrepid you can find a monolithic package ("all-in-one" packages with _all_ Gambas in a single packet) of Gambas 2.12 at this address: http://www.gambas-it.org/gmbs/modules/PDdownloads/viewcat.php?cid=7 -- Ciao. Leo. Web: www.leonardomiliani.com E-mail: leonardo at ...1237... Scegli software opensource - Choose opensource software Co-fondatore di Gambas-it.org Il sito di riferimento della comunit? italiana degli utenti di Gambas www.gambas-it.org From trreddell at ...626... Sun Apr 19 19:52:22 2009 From: trreddell at ...626... (phohammer) Date: Sun, 19 Apr 2009 10:52:22 -0700 (PDT) Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <49EB6168.5060507@...1909...> References: <23117770.post@...1379...> <23118826.post@...1379...> <23118993.post@...1379...> <23119189.post@...1379...> <23119191.post@...1379...> <23119193.post@...1379...> <23119198.post@...1379...> <23119719.post@...1379...> <23119747.post@...1379...> <1240136810.6470.11.camel@...40...> <23124849.post@...1379...> <49EB6168.5060507@...1909...> Message-ID: <23125471.post@...1379...> I opened the IDE with a terminal and it shows nothing when I run it. I'm not sure what you mean by the "ps(1) command". Here is a tarball of the project to scratch your head over: http://www.nabble.com/file/p23125471/trythis-0.0.1.tar.gz trythis-0.0.1.tar.gz I'm no command line wizard (started using GNU/Linux in January of this year) so bear with me, please :) Doriano Blengino wrote: > > > I assume you have QT installed, because gambas would'nt work without. > Graphical application should be ok. > No compilation errors - ok. > Next, try to understand, when you press GO (F5?), if the program really > runs or not. While the program "seems" to run, you can confirm by using > a terminal and the ps(1) command: on my system turns out: > > 9612 ? S 0:02 gbr2 /usr/bin/gambas2 > 9619 ? S 0:00 /usr/bin/gbx2 -g -f > /root/programmi/gambas/prove/Parted -- > > You see "gbr2 ...gambas2", which is the IDE, and "gbx2 ...Parted" which > is the program. > If your program does'nt show, then it is not running - try to execute it > step by step to see if terminates instead of opening a window and > entering the idle loop. > If it runs, look in the taskbar, where you see open > windows/applications. If a button is there, then your program has an > open window somewhere outside the desktop (window manager issue). You > can try to pull it inside a desktop by using the contestual menu. > > If the program runs, but no window is shown, check with "lsof -p > "; on my system, at the end, it shows: > > gbx2 9619 root 21r REG 3,70 14625 35686 > /usr/lib/gambas2/gb.qt.gambas > gbx2 9619 root 22r REG 3,70 1033214 35701 > /usr/lib/gambas2/gb.form.gambas > > showing the the program actually uses QT (and many more information). > There other tools to see if your program really opened a window, but > things get more complicated... it is easier to see what is wrong in the > source. > > Anyway, make a source tarball (Project->Create->Source package -- or > something like that) and send the .tar.gz; this will let other users on > this list to examine your project to find something you missed. > -- View this message in context: http://www.nabble.com/Programming-beginner%3A-first-program-won%27t-run--tp23117770p23125471.html Sent from the gambas-user mailing list archive at Nabble.com. From ronstk at ...239... Sun Apr 19 20:44:42 2009 From: ronstk at ...239... (Ron_1st) Date: Sun, 19 Apr 2009 20:44:42 +0200 Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <23124849.post@...1379...> References: <23117770.post@...1379...> <1240136810.6470.11.camel@...40...> <23124849.post@...1379...> Message-ID: <200904192044.43858.ronstk@...239...> On Sunday 19 April 2009, phohammer wrote: > Ok, I tried copying every thing over to my project from the "Object" example. > I copied every single > thing from the project tree. And I deleted all of my stuff from my project, > essentially making an "Object" project > of my own that I could edit. It still wouldn't run. > I did suggest just the opposite. Copy your form and code into the Object example and set your form as startup. or insert the label, textbox and button into the main form of the object example together with your code. This way you eliminate wrong project setup in the first place. Good learning process is first to try to expand a existing project. You see example code, helpfull to prevent syntax errors in your own code. When it stops working then you know it is your own coding failure. Best regards, Ron_1st -- A: Delete the text you reply on. Q: What to do to get my post on top? --- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --- A: Top-posting. Q: What is the most annoying thing in e-mail? From shordi at ...626... Sun Apr 19 21:06:29 2009 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Sun, 19 Apr 2009 21:06:29 +0200 Subject: [Gambas-user] Libtool & Ubuntu Jaunty In-Reply-To: <49EB63B2.8060800@...1237...> References: <49EB4FAF.5030106@...1237...> <68696c50904190929n9eb4847v909f6d99fe1d8138@...627...> <68696c50904190932j3fcf5a4chca5f224d8c53a9f4@...627...> <49EB63B2.8060800@...1237...> Message-ID: In my work everybody uses ubuntu 8.04 (cause estabililty of Long Time Service versions) I've made some time ago a little repository with Gambas 2.10 with .deb packages that download of Debian unstable don't-remember-version and the _all.deb of my own programs. All machines actualize and isntall the programs v?a ubuntu updates utility. All works fine by now I like actualize it to Gambas 2.12 (next Long Term Service of Ubuntu y still far away in time). ?Someone has the .debs packages of Gambas 2.12 for Ubuntu 8.04? Thanks in advance. 2009/4/19 Leonardo Miliani > Ron ha scritto: > > I also want to upgrade soon because of the more mature netbook support of > > that ubuntu release. > > > > And maybe someone can build a more recent 2.12 package for ubuntu too? > > > > Regards, > > Ron_2nd > > > > On Apr 19, 2009 6:23 PM, "Leonardo Miliani" < > leonardo at ...1237...> > > wrote: > > > > With the new Ubuntu Jaunty upcoming to the horizon, I would like to know > > if the problem of libtool has been solved because Jaunty will have > > libtool 2.2.6 in its repos and a lot of users will have problems trying > > to compile Gambas on that system (I personally tried to compile Gambas > > under Jaunty RC installed on a VM but I was not able to complete the > > process). > > > > -- > > Ciao. > > Leo. > > > > Web: www.leonardomiliani.com > > E-mail: leonardo at ...1237... > > Scegli software opensource - Choose opensource software > > > > Co-fondatore di Gambas-it.org > > Il sito di riferimento della comunit? italiana degli utenti di Gambas > > www.gambas-it.org > > > > > ------------------------------------------------------------------------------ > > Stay on top of everything new and different, both inside and > > around Java (TM) technology - register by April 22, and save > > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > > 300 plus technical and hands-on sessions. Register today. > > Use priority code J9JMT32. http://p.sf.net/sfu/p > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------------------------ > > Stay on top of everything new and different, both inside and > > around Java (TM) technology - register by April 22, and save > > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > > 300 plus technical and hands-on sessions. Register today. > > Use priority code J9JMT32. http://p.sf.net/sfu/p > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > If you have Intrepid you can find a monolithic package ("all-in-one" > packages with _all_ Gambas in a single packet) of Gambas 2.12 at this > address: > http://www.gambas-it.org/gmbs/modules/PDdownloads/viewcat.php?cid=7 > > -- > Ciao. > Leo. > > Web: www.leonardomiliani.com > E-mail: leonardo at ...1237... > Scegli software opensource - Choose opensource software > > Co-fondatore di Gambas-it.org > Il sito di riferimento della comunit? italiana degli utenti di Gambas > www.gambas-it.org > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jshackney at ...626... Sun Apr 19 21:42:51 2009 From: jshackney at ...626... (Jason Hackney) Date: Sun, 19 Apr 2009 15:42:51 -0400 Subject: [Gambas-user] Installing GridEditor Component In-Reply-To: <799be1690904161343w58111d4rd30df04b26bb682f@...627...> References: <799be1690904161343w58111d4rd30df04b26bb682f@...627...> Message-ID: <799be1690904191242l39378856p915f09acdc7c5589@...627...> I figured out what happened here... ~/.local/lib/gambas2/GridEditor.component ~/.local/share/gambas2/info/GridEditor.list these were linked to: ~/Documents/source/GridEditor/.component ~/Documents/source/GridEditor/GridEditor.gambas which was there because I copied my home directory from a previous install. In the new install I put it somewhere else (trying to organize a little better), but the links remained and were not being overwritten. Deleted the links in ~./local and all went fine. I was nearly going to go insane! From trreddell at ...626... Sun Apr 19 21:57:07 2009 From: trreddell at ...626... (phohammer) Date: Sun, 19 Apr 2009 12:57:07 -0700 (PDT) Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <200904192044.43858.ronstk@...239...> References: <23117770.post@...1379...> <23118826.post@...1379...> <23118993.post@...1379...> <23119189.post@...1379...> <23119191.post@...1379...> <23119193.post@...1379...> <23119198.post@...1379...> <23119719.post@...1379...> <23119747.post@...1379...> <1240136810.6470.11.camel@...40...> <23124849.post@...1379...> <200904192044.43858.ronstk@...239...> Message-ID: <23126753.post@...1379...> Ron_1st wrote: > > > I did suggest just the opposite. > Copy your form and code into the Object example and set your form as > startup. > or > insert the label, textbox and button into the main form of the object > example > together with your code. > > This way you eliminate wrong project setup in the first place. > > Good learning process is first to try to expand a existing project. > You see example code, helpfull to prevent syntax errors in your own code. > When it stops working then you know it is your own coding failure. > > > Best regards, > > Ron_1st > > I would do as you said with the Object example, but those of infinite wisdom made it read-only. I have attempted to download an example project that was not read-only (I believe I found it on a Gambas wiki page) but it would not run the program made in the project either, even though I had not edited it yet... -- View this message in context: http://www.nabble.com/Programming-beginner%3A-first-program-won%27t-run--tp23117770p23126753.html Sent from the gambas-user mailing list archive at Nabble.com. From Karl.Reinl at ...9... Sun Apr 19 23:19:37 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Sun, 19 Apr 2009 23:19:37 +0200 Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <23125471.post@...1379...> References: <23117770.post@...1379...> <23118826.post@...1379...> <23118993.post@...1379...> <23119189.post@...1379...> <23119191.post@...1379...> <23119193.post@...1379...> <23119198.post@...1379...> <23119719.post@...1379...> <23119747.post@...1379...> <1240136810.6470.11.camel@...40...> <23124849.post@...1379...> <49EB6168.5060507@...1909...> <23125471.post@...1379...> Message-ID: <1240175977.6470.15.camel@...40...> Am Sonntag, den 19.04.2009, 10:52 -0700 schrieb phohammer: > I opened the IDE with a terminal and it shows nothing when I run it. I'm not > sure what you mean by > the "ps(1) command". > > Here is a tarball of the project to scratch your head over: > http://www.nabble.com/file/p23125471/trythis-0.0.1.tar.gz > trythis-0.0.1.tar.gz > > I'm no command line wizard (started using GNU/Linux in January of this year) > so bear with me, please :) Salut, for the opend IDE in a Terminal, you find messages only after the IDE is closed, by a crash or you. I can't open your tarball, please create a new one. -- Amicalment Charlie From ronstk at ...239... Mon Apr 20 00:09:37 2009 From: ronstk at ...239... (Ron_1st) Date: Mon, 20 Apr 2009 00:09:37 +0200 Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <23126753.post@...1379...> References: <23117770.post@...1379...> <200904192044.43858.ronstk@...239...> <23126753.post@...1379...> Message-ID: <200904200009.38187.ronstk@...239...> On Sunday 19 April 2009, phohammer wrote: > I would do as you said with the Object example, but those of infinite wisdom > made it read-only. When you make a copy to your home directory or the place where you want to store your projects it is automagic not readonly any more. copy /usr/local/share/gambas3/examples/Basic/Object to /home/phohammer/gambas/projects/ (note: local is on my box, gambas3 may be gambas2) If you check you will see your name as owner and read/write for you is OK The 'infinite wisdom' is to prevent you to damage a valuable example you need the next time as possible template in your next project. It should not to be to difficult to make a copy to your home place. This copy should test first for good working before you start working with it. Best regards, Ron_1st -- A: Delete the text you reply on. Q: What to do to get my post on top? --- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --- A: Top-posting. Q: What is the most annoying thing in e-mail? From ronstk at ...239... Mon Apr 20 00:19:22 2009 From: ronstk at ...239... (Ron_1st) Date: Mon, 20 Apr 2009 00:19:22 +0200 Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <1240175977.6470.15.camel@...40...> References: <23117770.post@...1379...> <23125471.post@...1379...> <1240175977.6470.15.camel@...40...> Message-ID: <200904200019.23363.ronstk@...239...> On Sunday 19 April 2009, Charlie Reinl wrote: > Am Sonntag, den 19.04.2009, 10:52 -0700 schrieb phohammer: > > I opened the IDE with a terminal and it shows nothing when I run it. I'm not > > sure what you mean by > > the "ps(1) command". > > > > Here is a tarball of the project to scratch your head over: > > http://www.nabble.com/file/p23125471/trythis-0.0.1.tar.gz > > trythis-0.0.1.tar.gz > > > > I'm no command line wizard (started using GNU/Linux in January of this year) > > so bear with me, please :) > > Salut, > > for the opend IDE in a Terminal, you find messages only after the IDE is > closed, by a crash or you. > > I can't open your tarball, please create a new one. > I could untar and open it. Found in the FMain.class Static Public Sub Main() Dim myForm As Form myForm = New FStart myForm.Show End Where is the FStart form ???? The form you want is FMain form ? :) Best regards, Ron_1st -- A: Delete the text you reply on. Q: What to do to get my post on top? --- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --- A: Top-posting. Q: What is the most annoying thing in e-mail? From ronstk at ...239... Mon Apr 20 00:23:05 2009 From: ronstk at ...239... (Ron_1st) Date: Mon, 20 Apr 2009 00:23:05 +0200 Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <200904200019.23363.ronstk@...239...> References: <23117770.post@...1379...> <1240175977.6470.15.camel@...40...> <200904200019.23363.ronstk@...239...> Message-ID: <200904200023.06299.ronstk@...239...> On Monday 20 April 2009, Ron_1st wrote: > On Sunday 19 April 2009, Charlie Reinl wrote: > > Am Sonntag, den 19.04.2009, 10:52 -0700 schrieb phohammer: > > > I opened the IDE with a terminal and it shows nothing when I run it. I'm not > > > sure what you mean by > > > the "ps(1) command". > > > > > > Here is a tarball of the project to scratch your head over: > > > http://www.nabble.com/file/p23125471/trythis-0.0.1.tar.gz > > > trythis-0.0.1.tar.gz > > > > > > I'm no command line wizard (started using GNU/Linux in January of this year) > > > so bear with me, please :) > > > > Salut, > > > > for the opend IDE in a Terminal, you find messages only after the IDE is > > closed, by a crash or you. > > > > I can't open your tarball, please create a new one. > > > > > I could untar and open it. > > > Found in the FMain.class > > > Static Public Sub Main() > Dim myForm As Form > myForm = New FStart > myForm.Show > End > > Where is the FStart form ???? > The form you want is FMain form ? > > :) > > > Best regards, > > Ron_1st > BTW Program is working if you make the right correction. Best regards, Ron_1st -- A: Delete the text you reply on. Q: What to do to get my post on top? --- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --- A: Top-posting. Q: What is the most annoying thing in e-mail? From iecltd at ...2113... Mon Apr 20 00:56:29 2009 From: iecltd at ...2113... (Rodney Rundstrom) Date: Mon, 20 Apr 2009 10:56:29 +1200 Subject: [Gambas-user] Catch NULL character In-Reply-To: <22760874.post@...1379...> Message-ID: <404566D753CB4DFA95C8C1C1B47D8EE8@...2114...> As the NULL character is not a true character just a place holder you should use ISNULL( ) Ie if ISNULL(NULL) Then print "GOT it" Just change NULL for your variable Rodney Rundstrom -----Original Message----- From: CelticBhoy [mailto:weldon_gary at ...67...] Sent: Sunday, 29 March 2009 9:26 a.m. To: gambas-user at lists.sourceforge.net Subject: Re: [Gambas-user] Catch NULL character Thanx again for the help. I will have a look at your advice and try and implement it in my code. This is my first crack at programming since way back in the QuickBasic days, so I appreciate the help. -- View this message in context: http://www.nabble.com/Catch-NULL-character-tp22751957p22760874.html Sent from the gambas-user mailing list archive at Nabble.com. ---------------------------------------------------------------------------- -- _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From trreddell at ...626... Mon Apr 20 01:10:39 2009 From: trreddell at ...626... (phohammer) Date: Sun, 19 Apr 2009 16:10:39 -0700 (PDT) Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <200904200009.38187.ronstk@...239...> References: <23117770.post@...1379...> <23118826.post@...1379...> <23118993.post@...1379...> <23119189.post@...1379...> <23119191.post@...1379...> <23119193.post@...1379...> <23119198.post@...1379...> <23119719.post@...1379...> <23119747.post@...1379...> <1240136810.6470.11.camel@...40...> <23124849.post@...1379...> <200904192044.43858.ronstk@...239...> <23126753.post@...1379...> <200904200009.38187.ronstk@...239...> Message-ID: <23128377.post@...1379...> Ron_1st wrote: > > On Sunday 19 April 2009, phohammer wrote: >> I would do as you said with the Object example, but those of infinite >> wisdom >> made it read-only. > > When you make a copy to your home directory or the place where you want to > store your projects it is automagic not readonly any more. > > copy /usr/local/share/gambas3/examples/Basic/Object > to /home/phohammer/gambas/projects/ > > (note: local is on my box, gambas3 may be gambas2) > > If you check you will see your name as owner and read/write > for you is OK > > > The 'infinite wisdom' is to prevent you to damage a valuable example > you need the next time as possible template in your next project. > It should not to be to difficult to make a copy to your home place. > > This copy should test first for good working before you start > working with it. > > > > Best regards, > > Ron_1st > > I tried to do this in terminal but I get this: [root at ...40... tr]# copy /usr/share/gambas2/examples/Basic/Object to /home/tr/Documents/programming junk bash: copy: command not found [root at ...40... tr]# apt-get install copy Reading Package Lists... Done Building Dependency Tree... Done E: Couldn't find package copy So I used my file manager to locate Object in /usr/share/gambas2/examples/Basic/Object then right click, copy, paste to my desired location. When I open the example and try to run it, it reacts the same as my own project and does not run. Ron_1st wrote: > > BTW Program is working if you make the right correction. > > Best regards, > > Ron_1st > What does that mean, you got it running? -- View this message in context: http://www.nabble.com/Programming-beginner%3A-first-program-won%27t-run--tp23117770p23128377.html Sent from the gambas-user mailing list archive at Nabble.com. From nando_f at ...951... Mon Apr 20 02:43:39 2009 From: nando_f at ...951... (nando) Date: Sun, 19 Apr 2009 19:43:39 -0500 Subject: [Gambas-user] Catch NULL character In-Reply-To: <404566D753CB4DFA95C8C1C1B47D8EE8@...2114...> References: <22760874.post@...1379...> <404566D753CB4DFA95C8C1C1B47D8EE8@...2114...> Message-ID: <20090420003417.M4722@...951...> Actually, the NULL character is a true character. Specifically, it is CHR$(0) <---zero. It is an actual character in ASCII and other sets. Alternatively, NULL is used in databases, Java, C, others to describe certain situation. Java: Null pointer is a pointer which has a value of zero and therefore is an invalid reference and you'll get an exception. C: Same thing, you'll get a seg fault or similar. Databases: If the datatype is defined can be null, then the absence of any value is NULL. It is completely possible to have a VARCHAR and not allow null and have a string stored with CHAR(zero) in it. It is a NULL character and not the NULL situation. The lack of any string is a NULL situation and not a NULL character. Usually, the absence of assigning a variable a value will result in a NULL situation, not a NULL character. Make sure you've got it correct or confusing results will follow. -Fernando ---------- Original Message ----------- From: "Rodney Rundstrom" To: "'mailing list for gambas users'" Sent: Mon, 20 Apr 2009 10:56:29 +1200 Subject: Re: [Gambas-user] Catch NULL character > As the NULL character is not a true character just a place holder you should > use ISNULL( ) > > Ie if ISNULL(NULL) Then print "GOT it" > Just change NULL for your variable > > Rodney Rundstrom > > -----Original Message----- > From: CelticBhoy [mailto:weldon_gary at ...67...] > Sent: Sunday, 29 March 2009 9:26 a.m. > To: gambas-user at lists.sourceforge.net > Subject: Re: [Gambas-user] Catch NULL character > > Thanx again for the help. I will have a look at your advice and try and > implement it in my code. This is my first crack at programming since way > back in the QuickBasic days, so I appreciate the help. > -- > View this message in context: > http://www.nabble.com/Catch-NULL-character-tp22751957p22760874.html > Sent from the gambas-user mailing list archive at Nabble.com. > > ---------------------------------------------------------------------------- > -- > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From ronstk at ...239... Mon Apr 20 02:45:45 2009 From: ronstk at ...239... (Ron_1st) Date: Mon, 20 Apr 2009 02:45:45 +0200 Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <23128377.post@...1379...> References: <23117770.post@...1379...> <200904200009.38187.ronstk@...239...> <23128377.post@...1379...> Message-ID: <200904200245.46230.ronstk@...239...> On Monday 20 April 2009, phohammer wrote: > > Ron_1st wrote: > > > > On Sunday 19 April 2009, phohammer wrote: > >> I would do as you said with the Object example, but those of infinite > >> wisdom > >> made it read-only. > > > > When you make a copy to your home directory or the place where you want to > > store your projects it is automagic not readonly any more. > > > > copy /usr/local/share/gambas3/examples/Basic/Object > > to /home/phohammer/gambas/projects/ > > > > (note: local is on my box, gambas3 may be gambas2) > > > > If you check you will see your name as owner and read/write > > for you is OK > > > > > > The 'infinite wisdom' is to prevent you to damage a valuable example > > you need the next time as possible template in your next project. > > It should not to be to difficult to make a copy to your home place. > > > > This copy should test first for good working before you start > > working with it. > > > > > > > > Best regards, > > > > Ron_1st > > > > > > I tried to do this in terminal but I get this: > > [root at ...40... tr]# copy /usr/share/gambas2/examples/Basic/Object to > /home/tr/Documents/programming junk > bash: copy: command not found > [root at ...40... tr]# apt-get install copy nice try but using the word copy in a conversation does not always mean the same letters as command. :) You should really read some help for linux. See below > Reading Package Lists... Done > Building Dependency Tree... Done > E: Couldn't find package copy > > So I used my file manager to locate Object in > /usr/share/gambas2/examples/Basic/Object then right click, copy, > paste to my desired location. The easy way and the way I did in my previous post to check owner and rights. > When I open the example and try to run it, it > reacts the same as my own project and does not run. That is very strange. Did you try also another example? > > > Ron_1st wrote: > > > > BTW Program is working if you make the right correction. > > > > Best regards, > > > > Ron_1st > > > > What does that mean, you got it running? I did unpack your code archive, started my gambas IDE select the project and used compile all. Then run and it did not work. It told me it could not find FStart. So I take a look in the code and made a correction. After compile it did work as your want it to do. This brings me to a question. Did you change the look of your windows in PCLinux? Plastic has/had some problems by some people with gambas. (it is default in PCLinux for the Windows look and feel) I use KDE2 as theme in PCLinux2007 and Kubuntu-8.04. This because you did not mention the error message popup. > bash: copy: command not found > [root at ...40... tr]# apt-get install copy nice try but using the word 'copy' in a conversation does not always mean the same letters as command. :) There is alread many help installed and the first try you could do when a command does not work is typing tr at ...2144...:~$ man cp CP(1) User Commands NAME cp - copy files and directories SYNOPSIS cp [OPTION]... [-T] SOURCE DEST cp [OPTION]... SOURCE... DIRECTORY cp [OPTION]... -t DIRECTORY SOURCE... DESCRIPTION Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY. ..... and many more lines of help. > [root at ...40... tr]# copy /usr/share/gambas2/examples/Basic/Object to > /home/tr/Documents/programming junk > bash: copy: command not found > [root at ...40... tr]# apt-get install copy > Reading Package Lists... Done > Building Dependency Tree... Done > E: Couldn't find package copy What the hell, does linux not have a copy command :) True, the Windows 'copy' command does not exist in linux :) It is typed as 'cp' in linux. (move is mv, remove is rm) Second: cp to will still not work Just as in Windows the same rule exist in Linux based systems. Filenames and paths with spaces inside should be quoted. The single ' is the most safe to use and allows " in names. The double " is need when a singl quote ' is in the name. Ohhh and the 'to' is not need in linux (AFAiK even forbidden to use). You need to or should type: cp /usr/share/gambas2/examples/Basic/Object '/home/tr/Documents/programming junk' When you buy a new car/dvd-player/ipod/windows/camera/mobile-phone you read the userguide, why not when starting using linux? For the commandline help you could do for 'The Advanced Bash-Scripting Guide': apt-get install abs-guide In /usr/share/doc/abs-guide you find also the example directory, very helpfull. For more 'Documentation and examples for the The GNU Bourne Again SHell' apt-get install bash-doc In /usr/share/doc you will find it, and many more. I/you know, you/I was born with acknowledge of Windows so it is much easy :) I hope thist will help a bit and keep face up, time will learn. Best regards, Ron_1st -- A: Delete the text you reply on. Q: What to do to get my post on top? --- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --- A: Top-posting. Q: What is the most annoying thing in e-mail? From trreddell at ...626... Mon Apr 20 03:18:58 2009 From: trreddell at ...626... (phohammer) Date: Sun, 19 Apr 2009 18:18:58 -0700 (PDT) Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <200904200245.46230.ronstk@...239...> References: <23117770.post@...1379...> <23118826.post@...1379...> <23118993.post@...1379...> <23119189.post@...1379...> <23119191.post@...1379...> <23119193.post@...1379...> <23119198.post@...1379...> <23119719.post@...1379...> <23119747.post@...1379...> <1240136810.6470.11.camel@...40...> <23124849.post@...1379...> <200904192044.43858.ronstk@...239...> <23126753.post@...1379...> <200904200009.38187.ronstk@...239...> <23128377.post@...1379...> <200904200245.46230.ronstk@...239...> Message-ID: <23129101.post@...1379...> Okay, I realize I should RTFM, but I intended to fly at this with gambas' GUI and learn some programming, not Linux terminal commands. I'm going to bow out for now. Thank you for your help, Ron_1st, jbskaggs, Charlie Reinl and Doriano Blengino. I guess I'm not/don't have the time to be an "Advanced Bash-Scripter". Ron_1st wrote: > > On Monday 20 April 2009, phohammer wrote: >> >> Ron_1st wrote: >> > >> > On Sunday 19 April 2009, phohammer wrote: >> >> I would do as you said with the Object example, but those of infinite >> >> wisdom >> >> made it read-only. >> > >> > When you make a copy to your home directory or the place where you want >> to >> > store your projects it is automagic not readonly any more. >> > >> > copy /usr/local/share/gambas3/examples/Basic/Object >> > to /home/phohammer/gambas/projects/ >> > >> > (note: local is on my box, gambas3 may be gambas2) >> > >> > If you check you will see your name as owner and read/write >> > for you is OK >> > >> > >> > The 'infinite wisdom' is to prevent you to damage a valuable example >> > you need the next time as possible template in your next project. >> > It should not to be to difficult to make a copy to your home place. >> > >> > This copy should test first for good working before you start >> > working with it. >> > >> > >> > >> > Best regards, >> > >> > Ron_1st >> > >> > >> >> I tried to do this in terminal but I get this: >> >> [root at ...40... tr]# copy /usr/share/gambas2/examples/Basic/Object to >> /home/tr/Documents/programming junk >> bash: copy: command not found >> [root at ...40... tr]# apt-get install copy > nice try but using the word copy in a conversation does not > always mean the same letters as command. :) > > You should really read some help for linux. See below > >> Reading Package Lists... Done >> Building Dependency Tree... Done >> E: Couldn't find package copy >> >> So I used my file manager to locate Object in >> /usr/share/gambas2/examples/Basic/Object then right click, copy, >> paste to my desired location. > The easy way and the way I did in my previous post to check > owner and rights. > >> When I open the example and try to run it, it >> reacts the same as my own project and does not run. > > That is very strange. Did you try also another example? > >> >> >> Ron_1st wrote: >> > >> > BTW Program is working if you make the right correction. >> > >> > Best regards, >> > >> > Ron_1st >> > >> >> What does that mean, you got it running? > > I did unpack your code archive, started my gambas IDE > select the project and used compile all. > Then run and it did not work. > It told me it could not find FStart. > So I take a look in the code and made a correction. > After compile it did work as your want it to do. > > This brings me to a question. > Did you change the look of your windows in PCLinux? > Plastic has/had some problems by some people with gambas. > (it is default in PCLinux for the Windows look and feel) > I use KDE2 as theme in PCLinux2007 and Kubuntu-8.04. > This because you did not mention the error message popup. > > >> bash: copy: command not found >> [root at ...40... tr]# apt-get install copy > nice try but using the word 'copy' in a conversation does not > always mean the same letters as command. :) > > > There is alread many help installed and the first try you > could do when a command does not work is typing > tr at ...2144...:~$ man cp > > CP(1) User Commands > NAME > cp - copy files and directories > > SYNOPSIS > cp [OPTION]... [-T] SOURCE DEST > cp [OPTION]... SOURCE... DIRECTORY > cp [OPTION]... -t DIRECTORY SOURCE... > > DESCRIPTION > Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY. > ..... > and many more lines of help. > > >> [root at ...40... tr]# copy /usr/share/gambas2/examples/Basic/Object to >> /home/tr/Documents/programming junk >> bash: copy: command not found >> [root at ...40... tr]# apt-get install copy >> Reading Package Lists... Done >> Building Dependency Tree... Done >> E: Couldn't find package copy > > What the hell, does linux not have a copy command :) > > > True, the Windows 'copy' command does not exist in linux :) > It is typed as 'cp' in linux. (move is mv, remove is rm) > > Second: cp to will still not work > Just as in Windows the same rule exist in Linux based systems. > Filenames and paths with spaces inside should be quoted. > The single ' is the most safe to use and allows " in names. > The double " is need when a singl quote ' is in the name. > Ohhh and the 'to' is not need in linux (AFAiK even forbidden to use). > > You need to or should type: > cp /usr/share/gambas2/examples/Basic/Object > '/home/tr/Documents/programming junk' > > > When you buy a new car/dvd-player/ipod/windows/camera/mobile-phone you > read the > userguide, why not when starting using linux? > > For the commandline help you could do for 'The Advanced Bash-Scripting > Guide': > apt-get install abs-guide > In /usr/share/doc/abs-guide you find also the example directory, very > helpfull. > > For more 'Documentation and examples for the The GNU Bourne Again SHell' > apt-get install bash-doc > > In /usr/share/doc you will find it, and many more. > > I/you know, you/I was born with acknowledge of Windows so it is much easy > :) > > > > I hope thist will help a bit and keep face up, time will learn. > Best regards, > > Ron_1st > > -- > A: Delete the text you reply on. > Q: What to do to get my post on top? > --- > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > --- > A: Top-posting. > Q: What is the most annoying thing in e-mail? > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > 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/Programming-beginner%3A-first-program-won%27t-run--tp23117770p23129101.html Sent from the gambas-user mailing list archive at Nabble.com. From ronstk at ...239... Mon Apr 20 03:30:24 2009 From: ronstk at ...239... (Ron_1st) Date: Mon, 20 Apr 2009 03:30:24 +0200 Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <23129101.post@...1379...> References: <23117770.post@...1379...> <200904200245.46230.ronstk@...239...> <23129101.post@...1379...> Message-ID: <200904200330.24404.ronstk@...239...> On Monday 20 April 2009, phohammer wrote: > > Okay, I realize I should RTFM, but I intended to fly at this with gambas' GUI > and learn some programming, not Linux > terminal commands. I'm going to bow out for now. Thank you for your help, > Ron_1st, jbskaggs, Charlie Reinl and > Doriano Blengino. I guess I'm not/don't have the time to be an "Advanced > Bash-Scripter". > > The problem is you switched two things, Windows to Linux and VB to Gambas. Both have a way of thinking how it should be done and are not 100% the same by that. It will be a hard time but worth to do. Ok Bash-scripter is no need but the command line wil very helpfull in time. Success Best regards, Ron_1st -- A: Delete the text you reply on. Q: What to do to get my post on top? --- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --- A: Top-posting. Q: What is the most annoying thing in e-mail? From trreddell at ...626... Mon Apr 20 03:58:14 2009 From: trreddell at ...626... (phohammer) Date: Sun, 19 Apr 2009 18:58:14 -0700 (PDT) Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <200904200330.24404.ronstk@...239...> References: <23117770.post@...1379...> <23118826.post@...1379...> <23118993.post@...1379...> <23119189.post@...1379...> <23119191.post@...1379...> <23119193.post@...1379...> <23119198.post@...1379...> <23119719.post@...1379...> <23119747.post@...1379...> <1240136810.6470.11.camel@...40...> <23124849.post@...1379...> <200904192044.43858.ronstk@...239...> <23126753.post@...1379...> <200904200009.38187.ronstk@...239...> <23128377.post@...1379...> <200904200245.46230.ronstk@...239...> <23129101.post@...1379...> <200904200330.24404.ronstk@...239...> Message-ID: <23129340.post@...1379...> Ron_1st wrote: > > On Monday 20 April 2009, phohammer wrote: >> >> Okay, I realize I should RTFM, but I intended to fly at this with gambas' >> GUI >> and learn some programming, not Linux >> terminal commands. I'm going to bow out for now. Thank you for your help, >> Ron_1st, jbskaggs, Charlie Reinl and >> Doriano Blengino. I guess I'm not/don't have the time to be an "Advanced >> Bash-Scripter". >> >> > > The problem is you switched two things, Windows to Linux and VB to Gambas. > Both have a way of thinking how it should be done and are not 100% the > same > by that. It will be a hard time but worth to do. > Ok Bash-scripter is no need but the command line wil very helpfull in > time. > > > Success > > Best regards, > > Ron_1st > I'm not sure what you're talking about with Windows and VB. I don't use either one of them. I know Gambas uses a lot of the BASIC language from VB, but other than that I'm not sure I follow... -- View this message in context: http://www.nabble.com/Programming-beginner%3A-first-program-won%27t-run--tp23117770p23129340.html Sent from the gambas-user mailing list archive at Nabble.com. From rterry at ...1946... Mon Apr 20 07:24:11 2009 From: rterry at ...1946... (richard terry) Date: Mon, 20 Apr 2009 15:24:11 +1000 Subject: [Gambas-user] Setting top margin of printer. Message-ID: <200904201524.11983.rterry@...1946...> I'm still struggling with the printer stuff. Say I have an A4 Page, and I want to write something right near the top of the page If I do: Dim PagePosition as integer Dim LeftMargin as integer = 100 Dim FontHeight as integer 'calculate the font height fontHeight = Draw.TextHeight("Check the font height") 'start the page position PagePostition = 500 Draw.Text("Some writing", leftMargin, pagePosition) PagePosition += fontHeight Draw.Text("Some more writing", leftMargin, pagePosition) bla bla Draw.end then the text appears at about a 1.5cm margin from the top.printed as two lines of text But I need to get it right up to the top for this application as it is printing on a pre-formatted printed form. so I set this to PagePostition = 250 and do the same thing, the top row of text does not appear on the form (ie the printer must consider it outside of the margins. There seems no way to set the margins on the kde popup dialog box for an a4 sheet. Any help/idea's appreciated. Regards Richard From bbruen at ...2090... Mon Apr 20 07:59:26 2009 From: bbruen at ...2090... (Bruce) Date: Mon, 20 Apr 2009 15:59:26 +1000 Subject: [Gambas-user] More null problems Message-ID: <200904201559.27805.bbruen@...2090...> I have a set of two radio buttons in a panel control (Male & Female), when a new person object is loaded into the form I need to set the gender appropriately. However, some persons' gender is not known, say for "Brown, J" and I am trying unsuccessfully to set both radio buttons to reflect this. IF p.gender = "M" THEN rbMale.Value = TRUE rbFemale.Value = FALSE ELSE IF p.gender = "F" THEN rbMale.Value = FALSE rbFemale.Value = TRUE 'OK So far, but... ELSE rbMale.Value = FALSE rbFemale.Value = FALSE ENDIF In the unknowns case, the radiobuttons are always left in the state they were in on the previous object. So, if I go from Brown, Hillary (F) to Brown, J the value is left as for Hillary. But if I go from Brown, Kevin (M) to Brown, J its left as for Kevin. I've also tried setting both rb Values to NULL but this gives the same result. Any clues? tia Bruce From ron at ...1740... Mon Apr 20 08:11:23 2009 From: ron at ...1740... (Ron) Date: Mon, 20 Apr 2009 08:11:23 +0200 Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <200904200009.38187.ronstk@...239...> References: <23117770.post@...1379...> <200904192044.43858.ronstk@...239...> <23126753.post@...1379...> <200904200009.38187.ronstk@...239...> Message-ID: <49EC120B.2010207@...1740...> Ron_1st schreef: > On Sunday 19 April 2009, phohammer wrote: >> I would do as you said with the Object example, but those of infinite wisdom >> made it read-only. > > When you make a copy to your home directory or the place where you want to > store your projects it is automagic not readonly any more. > > copy /usr/local/share/gambas3/examples/Basic/Object > to /home/phohammer/gambas/projects/ > > (note: local is on my box, gambas3 may be gambas2) > > If you check you will see your name as owner and read/write > for you is OK > > > The 'infinite wisdom' is to prevent you to damage a valuable example > you need the next time as possible template in your next project. > It should not to be to difficult to make a copy to your home place. > > This copy should test first for good working before you start > working with it. > > > > Best regards, > > Ron_1st > You can also just open the example project with the IDE and do a 'Save project as' to a different location first, then continue to change it. Regards, Ron_2nd. From jbskaggs at ...1871... Mon Apr 20 08:28:29 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sun, 19 Apr 2009 23:28:29 -0700 (PDT) Subject: [Gambas-user] Sdl mouse problem XCFE problem. Message-ID: <23131066.post@...1379...> MY SDL mouse problem only occurs on Wolvix 2.0 which is running a XFCE environment. This is the same environment that would not let me change border colors etc. I can change mouse cursor just fine on UBUNTU so, Has anyone gotten mouse cursors to change with XFCE? Or am I barking up wrong tree? JB SKaggs -- View this message in context: http://www.nabble.com/Sdl-mouse-problem-XCFE-problem.-tp23131066p23131066.html Sent from the gambas-user mailing list archive at Nabble.com. From charles at ...1784... Mon Apr 20 09:30:06 2009 From: charles at ...1784... (charlesg) Date: Mon, 20 Apr 2009 00:30:06 -0700 (PDT) Subject: [Gambas-user] Libtool & Ubuntu Jaunty In-Reply-To: <49EB4FAF.5030106@...1237...> References: <49EB4FAF.5030106@...1237...> Message-ID: <23131653.post@...1379...> Hi, Well I don't know if it is because I only use 386 Ubuntu, but I do not have a problem (or maybe the problem is too subtle for me to notice). I have a pile of old 20Gb Hard disks to mess around on (currently ST4.00 USD6.00 each!) and have Gam2.11 quite happy on UB810 on Athlon64 without any libtool intervention on my part. UB904 also has built in support for Gam2.8 (although you have to enable some Gambas support packages from Synaptic) so I can't see Gam2.12 being a problem. By the way, Fedora 10 supports Gam2.11 and Linux Mint 6 supports Gam2.7 so things are slowly starting to improve. Neither of the two sources for .deb packages listed in the Ubuntu section of Getting started (i.e encryptec and gambas.gnulinex.org/ubuntu) work. Nor does the azores.linux.org. So Leonardo's 2.12-intrepid packages are very useful. rgds -- View this message in context: http://www.nabble.com/Libtool---Ubuntu-Jaunty-tp23124661p23131653.html Sent from the gambas-user mailing list archive at Nabble.com. From doriano.blengino at ...1909... Mon Apr 20 10:06:53 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Mon, 20 Apr 2009 10:06:53 +0200 Subject: [Gambas-user] Programming beginner: first program won't run? In-Reply-To: <23129340.post@...1379...> References: <23117770.post@...1379...> <23118826.post@...1379...> <23118993.post@...1379...> <23119189.post@...1379...> <23119191.post@...1379...> <23119193.post@...1379...> <23119198.post@...1379...> <23119719.post@...1379...> <23119747.post@...1379...> <1240136810.6470.11.camel@...40...> <23124849.post@...1379...> <200904192044.43858.ronstk@...239...> <23126753.post@...1379...> <200904200009.38187.ronstk@...239...> <23128377.post@...1379...> <200904200245.46230.ronstk@...239...> <23129101.post@...1379...> <200904200330.24404.ronstk@...239...> <23129340.post@...1379...> Message-ID: <49EC2D1D.6000700@...1909...> phohammer ha scritto: > >>> Okay, I realize I should RTFM, but I intended to fly at this with gambas' >>> GUI >>> and learn some programming, not Linux >>> terminal commands. I'm going to bow out for now. Thank you for your help, >>> Ron_1st, jbskaggs, Charlie Reinl and >>> Doriano Blengino. I guess I'm not/don't have the time to be an "Advanced >>> Bash-Scripter". >>> >>> > I'm not sure what you're talking about with Windows and VB. I don't use > either one of them. I know Gambas uses a > lot of the BASIC language from VB, but other than that I'm not sure I > follow... > I like this! You have clear what you want, and what you want not. :->> Anyway, I opened your tarball (strangely, I had to use a windows(tm) program, the linux tar did'nt work). The project was'nt running properly; at first it gave the error "Cannot load class FStart". Did you notice that? Then, in sub Main(): STATIC PUBLIC SUB Main() DIM myForm AS Form myForm = NEW FStart myForm.Show END I commented out the last two lines: STATIC PUBLIC SUB Main() DIM myForm AS Form 'myForm = NEW FStart 'myForm.Show END At this point, the program started, but immediately terminated. By executing step by step, I noticed that after executing Main(), which does nothing because of the commented out lines, the program terminated - ie, it never entered the idle loop (the one where the program waits for user interation). Probably a subroutine named Main indicates that the program is embodied inside, and when Main() terminates the program terminates too. Then, I commented out the whole subroutine: 'STATIC PUBLIC SUB Main() ' DIM myForm AS Form ' myForm = NEW FStart ' myForm.Show 'END ... and the program ran. Hope this helps you to understand; I leave to you to discover why the subroutine Main() prevented the program from working (RTFM... :-) either it is a documented thing, or an undocumented one, or a bug). Last thing, if you ask for help, pay attention to all the things that happen. I say so because my customers too many times say "it does'nt work", and it is true, but they do not bother to read messages and other things. You, as a programmer, should have noticed that error message about class FStart, and perhaps should have described differently the behaviour of the program: "it does nothing" it is not the optimal description. Have fun with gambas (and linux...)! Cheers, Doriano From doriano.blengino at ...1909... Mon Apr 20 10:21:24 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Mon, 20 Apr 2009 10:21:24 +0200 Subject: [Gambas-user] Setting top margin of printer. In-Reply-To: <200904201524.11983.rterry@...1946...> References: <200904201524.11983.rterry@...1946...> Message-ID: <49EC3084.8030609@...1909...> richard terry ha scritto: > I'm still struggling with the printer stuff. > > Say I have an A4 Page, and I want to write something right near the top of the > page > > If I do: > > Dim PagePosition as integer > Dim LeftMargin as integer = 100 > Dim FontHeight as integer > > 'calculate the font height > fontHeight = Draw.TextHeight("Check the font height") > > 'start the page position > PagePostition = 500 > Draw.Text("Some writing", leftMargin, pagePosition) > PagePosition += fontHeight > Draw.Text("Some more writing", leftMargin, pagePosition) > > bla bla > > Draw.end > > then the text appears at about a 1.5cm margin from the top.printed as two > lines of text > > But I need to get it right up to the top for this application as it is > printing on a pre-formatted printed form. > > so I set this to > > PagePostition = 250 > > and do the same thing, the top row of text does not appear on the form (ie the > printer must consider it outside of the margins. > > > There seems no way to set the margins on the kde popup dialog box for an a4 > sheet. > You must consider two things. First, PagePosition and Leftmargin depend on the printer resolution (which you can query from the printer properties); "500" means something to one printer, and something else to another. Second, a combination of printer/printer driver can work differently from another one. You could try to draw some line, with different starting points, to see what happens and deduce margins and behaviours. The best I did about this, was to have parameters for scaling and offsets. This way you setup your print in a straightforward manner, and then you can adapt your page to any printer by varying few parameters and a few tries. Regards, Doriano From weldon_gary at ...67... Mon Apr 20 11:08:27 2009 From: weldon_gary at ...67... (CelticBhoy) Date: Mon, 20 Apr 2009 02:08:27 -0700 (PDT) Subject: [Gambas-user] Error on Jaunty Message-ID: <23132993.post@...1379...> I am running gambas 2 on a testing version of Ubuntu 9.04, when I try to run a simple program I get this error :- Your program has stopped unexpectedlly by raising signal #11 What is this error? -- View this message in context: http://www.nabble.com/Error-on-Jaunty-tp23132993p23132993.html Sent from the gambas-user mailing list archive at Nabble.com. From jbskaggs at ...1871... Mon Apr 20 11:13:28 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Mon, 20 Apr 2009 02:13:28 -0700 (PDT) Subject: [Gambas-user] Sdl mouse problem XCFE problem. In-Reply-To: <23131066.post@...1379...> References: <23131066.post@...1379...> Message-ID: <23133058.post@...1379...> I have discovered that running gambas2.12 in fluxbox, gnome, kde, enlightenment, or xfce had no effect on the SDL Mouse problem. But I also found out the mouse cursor is controllable on Forms in these environments (I am on Wolvix 2.0- a Slackware 12.2 enviro) but the cursor is not controllable in SDL on Slackware. Yet it works in Ubuntu! This is very very frustrating! JB SKaggs jbskaggs wrote: > > MY SDL mouse problem only occurs on Wolvix 2.0 which is running a XFCE > environment. This is the same environment that would not let me change > border colors etc. > > I can change mouse cursor just fine on UBUNTU so, > > Has anyone gotten mouse cursors to change with XFCE? > > Or am I barking up wrong tree? > > JB SKaggs > -- View this message in context: http://www.nabble.com/Sdl-mouse-problem-XCFE-problem.-tp23131066p23133058.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas at ...1... Mon Apr 20 11:18:24 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Mon, 20 Apr 2009 11:18:24 +0200 Subject: [Gambas-user] Nasty bug in "With" instruction! In-Reply-To: <384d3900904180622i45925734r7f8e4ca11b0a2016@...627...> References: <384d3900904160617j104a2337x5a6ee8578ca53e5d@...627...> <384d3900904180622i45925734r7f8e4ca11b0a2016@...627...> Message-ID: <200904201118.24908.gambas@...1...> > Some more testing... > With this code: > > With tmp > .y = 0 > tmp = funcx() > With tmp ' Extra with instruction. > Debug .y > Debug tmp.y > End With > End With > > Or with this: > > With tmp > .y = 0 > funcx2(tmp) ' By reference (unfortunately this solution doesn't fit > to my code). > Debug .y > Debug tmp.y > End With > > Public Sub funcx2(test as Class1) > test.y = 1 > End > > Result is what is expected! > > I tried to look at the gambas source code to figure out what is > wrong... beats me up. > But maybe the problem is in how archiver or interpreter handles "tmp = > ...". Extra "with" instruction is workaround, but it's little troublesome > to find where it is needed. > And when "tmp = funcx()" is in "if then else" structure, it is very > troublesome! Maybe I need temporarily to get rid of "with" instructions! > But I hope it is easy to fix! > > Regards, > Jussi > > On Thu, Apr 16, 2009 at 16:17, Jussi Lahtinen wrote: > > Hi! > > Confirmed on Gambas2 and Gambas3. > > > > Code: > > > > Dim tmp As New Class1 > > > > With tmp > > .y = 0 > > tmp = funcx() > > Debug .y > > Debug tmp.y > > End With > > > > > > Public Function funcx() As Class1 > > Dim test As New Class1 > > > > test.y = 1 > > > > Return test > > End > > > > > > Output of debug is; > > 0 > > 1 > > > > I think .y and tmp.y should be same! > > > > Regards, > > Jussi > WITH is actually managed at runtime, not at compile time. I mean: WITH var .x = ... .y = ... END WITH is equivalent to: tmp = var tmp.x = ... tmp.y = ... and not to: var.x = ... var.y = ... So, by changing the value of tmp inside the WITH instruction, you are not changing the object WITH works on! Regards, -- Beno?t From gambas at ...1... Mon Apr 20 14:51:14 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Mon, 20 Apr 2009 14:51:14 +0200 Subject: [Gambas-user] order of children in container In-Reply-To: <23106387.post@...1379...> References: <23106142.post@...1379...> <23106387.post@...1379...> Message-ID: <200904201451.14273.gambas@...1...> > I closed the form and reloaded it and the control order changed to how I > wanted it. > > I still am not sure if I understand why. > > JB SKaggs > The order of control is the z-order, i.e. the first returned control is the lower one, while the last is the higher one. The IDE automatically changes the order of controls in a container when the container automatically arranges its children. Regards, -- Beno?t From sbungay at ...981... Mon Apr 20 14:27:02 2009 From: sbungay at ...981... (Stephen Bungay) Date: Mon, 20 Apr 2009 08:27:02 -0400 Subject: [Gambas-user] More null problems In-Reply-To: <200904201559.27805.bbruen@...2090...> References: <200904201559.27805.bbruen@...2090...> Message-ID: <49EC6A16.5080501@...981...> It is the nature of radio buttons to allow only one in a set to be toggled on, If you really want to go that route then I would suggest that you use checkboxes instead of radio buttons, A better way (IMHO) is to place a third button on the form labelled as "Unknown" and set that one when the gender is a null. Bruce wrote: > I have a set of two radio buttons in a panel control (Male & Female), when a > new person object is loaded into the form I need to set the gender > appropriately. However, some persons' gender is not known, say for "Brown, > J" and I am trying unsuccessfully to set both radio buttons to reflect this. > > IF p.gender = "M" THEN > rbMale.Value = TRUE > rbFemale.Value = FALSE > ELSE IF p.gender = "F" THEN > rbMale.Value = FALSE > rbFemale.Value = TRUE 'OK So far, but... > ELSE > rbMale.Value = FALSE > rbFemale.Value = FALSE > ENDIF > > In the unknowns case, the radiobuttons are always left in the state they were > in on the previous object. So, if I go from Brown, Hillary (F) to Brown, J > the value is left as for Hillary. But if I go from Brown, Kevin (M) to > Brown, J its left as for Kevin. > > I've also tried setting both rb Values to NULL but this gives the same result. > > > Any clues? > > tia > Bruce > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From leonardo at ...1237... Mon Apr 20 15:06:23 2009 From: leonardo at ...1237... (Leonardo Miliani) Date: Mon, 20 Apr 2009 15:06:23 +0200 Subject: [Gambas-user] Libtool & Ubuntu Jaunty In-Reply-To: References: <49EB4FAF.5030106@...1237...> <68696c50904190929n9eb4847v909f6d99fe1d8138@...627...> <68696c50904190932j3fcf5a4chca5f224d8c53a9f4@...627...> <49EB63B2.8060800@...1237...> Message-ID: <49EC734F.2080208@...1237...> Jorge Carri?n ha scritto: > Ubuntu y still far away in time). ?Someone has the .debs packages of Gambas > 2.12 for Ubuntu 8.04? > Thanks in advance. Same for you. Here: http://www.gambas-it.org/gmbs/modules/PDdownloads/viewcat.php?cid=7 are packages for 8.04 too. -- Ciao. Leo. Web: www.leonardomiliani.com E-mail: leonardo at ...1237... Scegli software opensource - Choose opensource software Co-fondatore di Gambas-it.org Il sito di riferimento della comunit? italiana degli utenti di Gambas www.gambas-it.org From jussi.lahtinen at ...626... Mon Apr 20 15:54:13 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 20 Apr 2009 16:54:13 +0300 Subject: [Gambas-user] Error on Jaunty In-Reply-To: <23132993.post@...1379...> References: <23132993.post@...1379...> Message-ID: <384d3900904200654n6c4b5b8odadd90277ef67ea@...627...> What Gambas2.xx version you are using? What are you trying to run? Please, send an example source code. Jussi On Mon, Apr 20, 2009 at 12:08, CelticBhoy wrote: > > I am running gambas 2 on a testing version of Ubuntu 9.04, when I try to run > a simple program I get this error :- > > Your program has stopped unexpectedlly by raising signal #11 > > What is this error? > -- > View this message in context: http://www.nabble.com/Error-on-Jaunty-tp23132993p23132993.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jeff at ...2103... Mon Apr 20 15:37:02 2009 From: jeff at ...2103... (Jeff) Date: Mon, 20 Apr 2009 23:37:02 +1000 Subject: [Gambas-user] More null problems In-Reply-To: <49EC6A16.5080501@...981...> References: <200904201559.27805.bbruen@...2090...> <49EC6A16.5080501@...981...> Message-ID: <1240234622.14447.7.camel@...2104...> I agree with Stephen's third button option. I don't think check boxes are right as you can't be both simultaneously (except maybe in some speciality bars and clubs). Radio buttons are the right way to go. You may be able to get the behaviour you're asking for if you delete and recreate the controls but even if you can do that, once a radio button selection has been made there's no going back. In that case your gui has a one way street that isn't user friendly - so better to have that 3rd state. I'm currently working in health. We have 4 states: male, female, unknown and undisclosed. On Mon, 2009-04-20 at 08:27 -0400, Stephen Bungay wrote: > It is the nature of radio buttons to allow only one in a set to be > toggled on, If you really want to go that route then I would suggest > that you use checkboxes instead of radio buttons, A better way (IMHO) is > to place a third button on the form labelled as "Unknown" and set that > one when the gender is a null. > > Bruce wrote: > > I have a set of two radio buttons in a panel control (Male & Female), when a > > new person object is loaded into the form I need to set the gender > > appropriately. However, some persons' gender is not known, say for "Brown, > > J" and I am trying unsuccessfully to set both radio buttons to reflect this. > > > > IF p.gender = "M" THEN > > rbMale.Value = TRUE > > rbFemale.Value = FALSE > > ELSE IF p.gender = "F" THEN > > rbMale.Value = FALSE > > rbFemale.Value = TRUE 'OK So far, but... > > ELSE > > rbMale.Value = FALSE > > rbFemale.Value = FALSE > > ENDIF > > > > In the unknowns case, the radiobuttons are always left in the state they were > > in on the previous object. So, if I go from Brown, Hillary (F) to Brown, J > > the value is left as for Hillary. But if I go from Brown, Kevin (M) to > > Brown, J its left as for Kevin. > > > > I've also tried setting both rb Values to NULL but this gives the same result. > > > > > > Any clues? > > > > tia > > Bruce > > > > ------------------------------------------------------------------------------ > > Stay on top of everything new and different, both inside and > > around Java (TM) technology - register by April 22, and save > > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > > 300 plus technical and hands-on sessions. Register today. > > Use priority code J9JMT32. http://p.sf.net/sfu/p > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Mon Apr 20 16:37:57 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 20 Apr 2009 17:37:57 +0300 Subject: [Gambas-user] Nasty bug in "With" instruction! In-Reply-To: <200904201118.24908.gambas@...1...> References: <384d3900904160617j104a2337x5a6ee8578ca53e5d@...627...> <384d3900904180622i45925734r7f8e4ca11b0a2016@...627...> <200904201118.24908.gambas@...1...> Message-ID: <384d3900904200737s7b37c2d5v53a8dd301661caa2@...627...> Thanks! OK, I have to check my code for this... in vb this works different way. Thought I don't know how exactly. In vb WITH instruction (properly placed) speeded up code, and code I used as example worked. Maybe it used tmp like in Gambas, but it did this also: Code: With var .y = 0 var = funcx() Maybe equivalent to: tmp = var tmp.y = 0 tmp = funcx() So, maybe from "WITH xyz", "xyz" where searched from within WITH --> END WITH, and replaced to tmp. That would be nice to see in Gambas! Jussi P.S. Don't get me wrong, I'm very pleased that I don't have to use M$ products anymore! Gambas is GREAT! 2009/4/20 Beno?t Minisini : >> Some more testing... >> With this code: >> >> With tmp >> ? .y = 0 >> ? tmp = funcx() >> ? ? With tmp ' Extra with instruction. >> ? ? Debug .y >> ? ? Debug tmp.y >> ? ? End With >> End With >> >> Or with this: >> >> ?With tmp >> ? .y = 0 >> ? funcx2(tmp) ' By reference (unfortunately this solution doesn't fit >> to my code). >> ? ?Debug .y >> ? ?Debug tmp.y >> ?End With >> >> ? Public Sub funcx2(test as Class1) >> ? test.y = 1 >> ? End >> >> Result is what is expected! >> >> I tried to look at the gambas source code to figure out what is >> wrong... beats me up. >> But maybe the problem is in how archiver or interpreter handles "tmp = >> ...". Extra "with" instruction is workaround, but it's little troublesome >> to find where it is needed. >> And when "tmp = funcx()" is in "if then else" structure, it is very >> troublesome! Maybe I need temporarily to get rid of "with" instructions! >> But I hope it is easy to fix! >> >> Regards, >> Jussi >> >> On Thu, Apr 16, 2009 at 16:17, Jussi Lahtinen > wrote: >> > Hi! >> > Confirmed on Gambas2 and Gambas3. >> > >> > Code: >> > >> > Dim tmp As New Class1 >> > >> > With tmp >> > ?.y = 0 >> > ?tmp = funcx() >> > ?Debug .y >> > ?Debug tmp.y >> > End With >> > >> > >> > Public Function funcx() As Class1 >> > Dim test As New Class1 >> > >> > test.y = 1 >> > >> > Return test >> > End >> > >> > >> > Output of debug is; >> > 0 >> > 1 >> > >> > I think .y and tmp.y should be same! >> > >> > Regards, >> > Jussi >> > > WITH is actually managed at runtime, not at compile time. > > I mean: > > WITH var > ?.x = ... > ?.y = ... > END WITH > > is equivalent to: > > tmp = var > tmp.x = ... > tmp.y = ... > > and not to: > > var.x = ... > var.y = ... > > So, by changing the value of tmp inside the WITH instruction, you are not > changing the object WITH works on! > > Regards, > > > -- > Beno?t > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From weldon_gary at ...67... Mon Apr 20 16:47:37 2009 From: weldon_gary at ...67... (CelticBhoy) Date: Mon, 20 Apr 2009 07:47:37 -0700 (PDT) Subject: [Gambas-user] Error on Jaunty In-Reply-To: <384d3900904200654n6c4b5b8odadd90277ef67ea@...627...> References: <23132993.post@...1379...> <384d3900904200654n6c4b5b8odadd90277ef67ea@...627...> Message-ID: <23138207.post@...1379...> Using 2.8, source code attached http://www.nabble.com/file/p23138207/FMain.class FMain.class -- View this message in context: http://www.nabble.com/Error-on-Jaunty-tp23132993p23138207.html Sent from the gambas-user mailing list archive at Nabble.com. From jussi.lahtinen at ...626... Mon Apr 20 17:49:21 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 20 Apr 2009 18:49:21 +0300 Subject: [Gambas-user] Error on Jaunty In-Reply-To: <23138207.post@...1379...> References: <23132993.post@...1379...> <384d3900904200654n6c4b5b8odadd90277ef67ea@...627...> <23138207.post@...1379...> Message-ID: <384d3900904200849s7a454a8cj98fd659f85d0d88c@...627...> I can't confirm with only FMain.class, too much missing code for test run. But signal 11 means that you are trying to access to memory location that is not allowed. So, if your program crash immediatly when starting, I suspect file handling in Init_Setup. If you like me to test it on Gambas 2.10 send whole project package (at least all needed to run). Anyhow, try to comment out this, and then try to run again; WHILE NOT Eof(hFileName) LINE INPUT #hFileName, hReadLine Seperate(hReadLine, recno) ItemName.add(IName[recno], recno) MItemName.Add(IName[recno], recno) INC recno WEND Still signal 11? Jussi On Mon, Apr 20, 2009 at 17:47, CelticBhoy wrote: > > Using 2.8, source code attached > http://www.nabble.com/file/p23138207/FMain.class FMain.class > -- > View this message in context: http://www.nabble.com/Error-on-Jaunty-tp23132993p23138207.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From ronstk at ...239... Mon Apr 20 18:00:33 2009 From: ronstk at ...239... (Ron_1st) Date: Mon, 20 Apr 2009 18:00:33 +0200 Subject: [Gambas-user] More null problems In-Reply-To: <49EC6A16.5080501@...981...> References: <200904201559.27805.bbruen@...2090...> <49EC6A16.5080501@...981...> Message-ID: <200904201800.34210.ronstk@...239...> On Monday 20 April 2009, Stephen Bungay wrote: > ? ?It is the nature of radio buttons to allow only one in a set to be > toggled on, If you really want to go that route then I would suggest > that you use checkboxes instead of radio buttons, A better way (IMHO) is > to place a third button on the form labelled as "Unknown" and set that > one when the gender is a null. > IMHO indeed the right solution. But when the person is a shemale/transgender ??? :) The checkboxes fits well in that case. Still the radios are better (IMHO) and a 4'th should be add too? 'Unknown', 'Male', 'Female', 'Cross' Just the modern times are comming :) Best regards, Ron_1st -- PS. Forgotten, the people that are just an animal. From weldon_gary at ...67... Mon Apr 20 18:01:18 2009 From: weldon_gary at ...67... (CelticBhoy) Date: Mon, 20 Apr 2009 09:01:18 -0700 (PDT) Subject: [Gambas-user] Error on Jaunty In-Reply-To: <23138207.post@...1379...> References: <23132993.post@...1379...> <384d3900904200654n6c4b5b8odadd90277ef67ea@...627...> <23138207.post@...1379...> Message-ID: <23139578.post@...1379...> Thanx for the offer, I have attached the rest of my files, obviously you will need to change file location. http://www.nabble.com/file/p23139578/FMain.form FMain.form http://www.nabble.com/file/p23139578/stock.rec stock.rec http://www.nabble.com/file/p23139578/suppliers.rec suppliers.rec http://www.nabble.com/file/p23139578/stock stock If I have missed anything please let me know. -- View this message in context: http://www.nabble.com/Error-on-Jaunty-tp23132993p23139578.html Sent from the gambas-user mailing list archive at Nabble.com. From shordi at ...626... Mon Apr 20 18:22:58 2009 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Mon, 20 Apr 2009 18:22:58 +0200 Subject: [Gambas-user] Libtool & Ubuntu Jaunty In-Reply-To: <49EC734F.2080208@...1237...> References: <49EB4FAF.5030106@...1237...> <68696c50904190929n9eb4847v909f6d99fe1d8138@...627...> <68696c50904190932j3fcf5a4chca5f224d8c53a9f4@...627...> <49EB63B2.8060800@...1237...> <49EC734F.2080208@...1237...> Message-ID: Ok. Thanks, Leonardo. 2009/4/20 Leonardo Miliani > Jorge Carri?n ha scritto: > > Ubuntu y still far away in time). ?Someone has the .debs packages of > Gambas > > 2.12 for Ubuntu 8.04? > > Thanks in advance. > > Same for you. Here: > > http://www.gambas-it.org/gmbs/modules/PDdownloads/viewcat.php?cid=7 > > are packages for 8.04 too. > > -- > Ciao. > Leo. > > Web: www.leonardomiliani.com > E-mail: leonardo at ...1237... > Scegli software opensource - Choose opensource software > > Co-fondatore di Gambas-it.org > Il sito di riferimento della comunit? italiana degli utenti di Gambas > www.gambas-it.org > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From shordi at ...626... Mon Apr 20 18:31:36 2009 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Mon, 20 Apr 2009 18:31:36 +0200 Subject: [Gambas-user] More null problems In-Reply-To: <200904201800.34210.ronstk@...239...> References: <200904201559.27805.bbruen@...2090...> <49EC6A16.5080501@...981...> <200904201800.34210.ronstk@...239...> Message-ID: Perhaps "Male", "Female", "Unknown", "On Transit" and "Variable"? Ups... excuse me, I can't resist it... 2009/4/20 Ron_1st > On Monday 20 April 2009, Stephen Bungay wrote: > > It is the nature of radio buttons to allow only one in a set to be > > toggled on, If you really want to go that route then I would suggest > > that you use checkboxes instead of radio buttons, A better way (IMHO) is > > to place a third button on the form labelled as "Unknown" and set that > > one when the gender is a null. > > > > IMHO indeed the right solution. > > But when the person is a shemale/transgender ??? :) > The checkboxes fits well in that case. > Still the radios are better (IMHO) and a 4'th should be add too? > 'Unknown', 'Male', 'Female', 'Cross' > > Just the modern times are comming :) > > Best regards, > > Ron_1st > -- > > PS. Forgotten, the people that are just an animal. > > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Mon Apr 20 18:35:45 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 20 Apr 2009 19:35:45 +0300 Subject: [Gambas-user] Error on Jaunty In-Reply-To: <23139578.post@...1379...> References: <23132993.post@...1379...> <384d3900904200654n6c4b5b8odadd90277ef67ea@...627...> <23138207.post@...1379...> <23139578.post@...1379...> Message-ID: <384d3900904200935p7335ca0g4dff09ca67e3d96f@...627...> Your code seems to work... I cannot get signal 11 with it. Only error I got is; "QComboBox::removeItem: (unnamed) Index 1 out of range" when adding item. I think the reason is "ItemName.Remove(iArrayIndex)", iArrayIndex is 1 and index max is 0! And I think that command is in wrong place... Seems that old Gambas version can't handle this. I recommend to update to new version of Gambas 2! Jussi On Mon, Apr 20, 2009 at 19:01, CelticBhoy wrote: > > Thanx for the offer, I have attached the rest of my files, obviously you will > need to change file location. > > http://www.nabble.com/file/p23139578/FMain.form FMain.form > http://www.nabble.com/file/p23139578/stock.rec stock.rec > http://www.nabble.com/file/p23139578/suppliers.rec suppliers.rec > http://www.nabble.com/file/p23139578/stock stock > > If I have missed anything please let me know. > -- > View this message in context: http://www.nabble.com/Error-on-Jaunty-tp23132993p23139578.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From weldon_gary at ...67... Mon Apr 20 18:56:24 2009 From: weldon_gary at ...67... (CelticBhoy) Date: Mon, 20 Apr 2009 09:56:24 -0700 (PDT) Subject: [Gambas-user] Error on Jaunty In-Reply-To: <23139578.post@...1379...> References: <23132993.post@...1379...> <384d3900904200654n6c4b5b8odadd90277ef67ea@...627...> <23138207.post@...1379...> <23139578.post@...1379...> Message-ID: <23140592.post@...1379...> Thanx for the advice & your time looking at this, as I am using the version from the repo's how do I update my version ?? -- View this message in context: http://www.nabble.com/Error-on-Jaunty-tp23132993p23140592.html Sent from the gambas-user mailing list archive at Nabble.com. From jussi.lahtinen at ...626... Mon Apr 20 19:15:18 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 20 Apr 2009 20:15:18 +0300 Subject: [Gambas-user] Error on Jaunty In-Reply-To: <23140592.post@...1379...> References: <23132993.post@...1379...> <384d3900904200654n6c4b5b8odadd90277ef67ea@...627...> <23138207.post@...1379...> <23139578.post@...1379...> <23140592.post@...1379...> Message-ID: <384d3900904201015p369722eema6fb8d04d77bd91b@...627...> Maybe you find what you need from this post; http://www.nabble.com/Libtool---Ubuntu-Jaunty-td23124661.html If not, you must compile it from source. I never had problem compiling Gambas 2 on my system (Ubuntu 8.10 64bit), but I don't know about Jaunty... Try and please report to that post! Jussi On Mon, Apr 20, 2009 at 19:56, CelticBhoy wrote: > > Thanx for the advice & your time looking at this, as I am using the version > from the repo's how do I update my version ?? > -- > View this message in context: http://www.nabble.com/Error-on-Jaunty-tp23132993p23140592.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Mon Apr 20 19:16:21 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 20 Apr 2009 20:16:21 +0300 Subject: [Gambas-user] Error on Jaunty In-Reply-To: <384d3900904201015p369722eema6fb8d04d77bd91b@...627...> References: <23132993.post@...1379...> <384d3900904200654n6c4b5b8odadd90277ef67ea@...627...> <23138207.post@...1379...> <23139578.post@...1379...> <23140592.post@...1379...> <384d3900904201015p369722eema6fb8d04d77bd91b@...627...> Message-ID: <384d3900904201016o5f27726v4b43292cdb10b59c@...627...> ....forgot.... Sources from here: http://gambas.sourceforge.net/ Jussi On Mon, Apr 20, 2009 at 20:15, Jussi Lahtinen wrote: > Maybe you find what you need from this post; > http://www.nabble.com/Libtool---Ubuntu-Jaunty-td23124661.html > > If not, you must compile it from source. > I never had problem compiling Gambas 2 on my system (Ubuntu 8.10 64bit), > but I don't know about Jaunty... > Try and please report to that post! > > > Jussi > > > > > On Mon, Apr 20, 2009 at 19:56, CelticBhoy wrote: >> >> Thanx for the advice & your time looking at this, as I am using the version >> from the repo's how do I update my version ?? >> -- >> View this message in context: http://www.nabble.com/Error-on-Jaunty-tp23132993p23140592.html >> Sent from the gambas-user mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------------ >> Stay on top of everything new and different, both inside and >> around Java (TM) technology - register by April 22, and save >> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. >> 300 plus technical and hands-on sessions. Register today. >> Use priority code J9JMT32. http://p.sf.net/sfu/p >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > From charles at ...1784... Mon Apr 20 20:12:48 2009 From: charles at ...1784... (charlesg) Date: Mon, 20 Apr 2009 11:12:48 -0700 (PDT) Subject: [Gambas-user] Error on Jaunty In-Reply-To: <23132993.post@...1379...> References: <23132993.post@...1379...> Message-ID: <23142015.post@...1379...> Hi, I have experienced this some time ago and it was not on ub904. I have set your code on ub904 with built-in gam2.8 and confirm the error 11. BUT, the fix is the same as it was in my case: get rid of the menu bar and it compiles. Just don't ask me what it means :) rgds -- View this message in context: http://www.nabble.com/Error-on-Jaunty-tp23132993p23142015.html Sent from the gambas-user mailing list archive at Nabble.com. From nando_f at ...951... Mon Apr 20 22:26:06 2009 From: nando_f at ...951... (nando) Date: Mon, 20 Apr 2009 15:26:06 -0500 Subject: [Gambas-user] More null problems In-Reply-To: <200904201559.27805.bbruen@...2090...> References: <200904201559.27805.bbruen@...2090...> Message-ID: <20090420202428.M46304@...951...> I would set them all to false first, then do a case statement, then case else is unknown as a 'catch-all' ---------- Original Message ----------- From: Bruce To: gambas-user at lists.sourceforge.net Sent: Mon, 20 Apr 2009 15:59:26 +1000 Subject: [Gambas-user] More null problems > I have a set of two radio buttons in a panel control (Male & Female), when a > new person object is loaded into the form I need to set the gender > appropriately. However, some persons' gender is not known, say for "Brown, > J" and I am trying unsuccessfully to set both radio buttons to reflect this. > > IF p.gender = "M" THEN > rbMale.Value = TRUE > rbFemale.Value = FALSE > ELSE IF p.gender = "F" THEN > rbMale.Value = FALSE > rbFemale.Value = TRUE 'OK So far, but... > ELSE > rbMale.Value = FALSE > rbFemale.Value = FALSE > ENDIF > > In the unknowns case, the radiobuttons are always left in the state they were > in on the previous object. So, if I go from Brown, Hillary (F) to Brown, J > the value is left as for Hillary. But if I go from Brown, Kevin (M) to > Brown, J its left as for Kevin. > > I've also tried setting both rb Values to NULL but this gives the same result. > > Any clues? > > tia > Bruce > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From iecltd at ...2113... Mon Apr 20 23:07:12 2009 From: iecltd at ...2113... (Rodney Rundstrom) Date: Tue, 21 Apr 2009 09:07:12 +1200 Subject: [Gambas-user] Catch NULL character In-Reply-To: <20090420003417.M4722@...951...> Message-ID: <04E20483336C4024AA00C33B8B2EB19C@...2114...> Thanks for that I remember using isnull in visual basic and when =null didn't work I checked isnull and found it worked. Thanks again and sorry for any confusion Rodney -----Original Message----- From: nando [mailto:nando_f at ...951...] Sent: Monday, 20 April 2009 12:44 p.m. To: mailing list for gambas users Subject: Re: [Gambas-user] Catch NULL character Actually, the NULL character is a true character. Specifically, it is CHR$(0) <---zero. It is an actual character in ASCII and other sets. Alternatively, NULL is used in databases, Java, C, others to describe certain situation. Java: Null pointer is a pointer which has a value of zero and therefore is an invalid reference and you'll get an exception. C: Same thing, you'll get a seg fault or similar. Databases: If the datatype is defined can be null, then the absence of any value is NULL. It is completely possible to have a VARCHAR and not allow null and have a string stored with CHAR(zero) in it. It is a NULL character and not the NULL situation. The lack of any string is a NULL situation and not a NULL character. Usually, the absence of assigning a variable a value will result in a NULL situation, not a NULL character. Make sure you've got it correct or confusing results will follow. -Fernando ---------- Original Message ----------- From: "Rodney Rundstrom" To: "'mailing list for gambas users'" Sent: Mon, 20 Apr 2009 10:56:29 +1200 Subject: Re: [Gambas-user] Catch NULL character > As the NULL character is not a true character just a place holder you should > use ISNULL( ) > > Ie if ISNULL(NULL) Then print "GOT it" > Just change NULL for your variable > > Rodney Rundstrom > > -----Original Message----- > From: CelticBhoy [mailto:weldon_gary at ...67...] > Sent: Sunday, 29 March 2009 9:26 a.m. > To: gambas-user at lists.sourceforge.net > Subject: Re: [Gambas-user] Catch NULL character > > Thanx again for the help. I will have a look at your advice and try and > implement it in my code. This is my first crack at programming since way > back in the QuickBasic days, so I appreciate the help. > -- > View this message in context: > http://www.nabble.com/Catch-NULL-character-tp22751957p22760874.html > Sent from the gambas-user mailing list archive at Nabble.com. > > ---------------------------------------------------------------------------- > -- > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > ---------------------------------------------------------------------------- -- > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- ---------------------------------------------------------------------------- -- Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From andreas at ...2139... Mon Apr 20 23:22:20 2009 From: andreas at ...2139... (Andreas =?ISO-8859-1?Q?M=FCller?=) Date: Mon, 20 Apr 2009 23:22:20 +0200 Subject: [Gambas-user] Dependency is not satisfiable: gambas2-gb.sdl.sound Message-ID: <1240262540.12072.2.camel@...2140...> Hello, all Gambas2 supplies the gb.sdl.sound component. When I use this component on my Ubuntu 8.10 system, I can use sound within gambas applications. When I try to create an installation package, it will work. But when I try to install the package - just created - the following error pops up: Dependency is not satisfiable: gambas2-gb.sdl.sound Within Synaptic there is listed an installed library: gambas2-gb-sdl with description "This component use the sound image and ttf fonts parts of the SDL library. It allows you to simultaneously play many sounds and a music stored in a file." So it seems to be that the Gambas package creating process refers to its sound library as "gambas2-gb.sdl.sound" but Ubuntu 8.10 lists these capabilities as "gambas2-gb-sdl". Is there any solution available for this missmatch? Are there newer versions of Ubuntu and/or Gambas2 which doesn't show this problem? To whom should this problem be addressed to - to the Gambas developers or to the Ubuntu packagers? (I have just posted the same question to launchpad, hope that was correct?) I'm using the Gambas2 installation (2.7-1) which comes with Ubuntu 8.10 (intrepid) and have installed all updates available . My /etc/apt/sources.lists are not modified. uname -a -> Linux tax 2.6.27-11-generic #1 SMP Wed Apr 1 20:57:48 UTC 2009 i686 GNU/Linux best regards Andreas From jbskaggs at ...1871... Tue Apr 21 11:59:29 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Tue, 21 Apr 2009 02:59:29 -0700 (PDT) Subject: [Gambas-user] Dependency is not satisfiable: gambas2-gb.sdl.sound In-Reply-To: <1240262540.12072.2.camel@...2140...> References: <1240262540.12072.2.camel@...2140...> Message-ID: <23152789.post@...1379...> It is a mistake in the ubuntu / debian package I had the same problem and manually installed and configured Gambas2 thru the ./configure etc method. Look up on the main Gambas2 website how to compile and install Gambas and it will list the dependencies and steps needed to do so. One of the maintainers of the Ubuntu Gambas packages said he would fix it but I haven't heard of a new package since. Maybe they are waiting till 3.0? Search the message forums and you should find more on this. Though it is quite hard sometimes to find all the dependencies. BTW it might actually be faster to take another distro package and convert it to Debian? If you have problems finding the dependencies. OR even run another Distro of Linux- I know the Slackware version doesn't have this issue. JB Skaggs Andreas "M?ller" wrote: > > Hello, all > > Gambas2 supplies the gb.sdl.sound component. When I use this component > on my Ubuntu 8.10 system, I can use sound within gambas applications. > When I try to create an installation package, it will work. But when I > try to install the package - just created - the following error pops up: > Dependency is not satisfiable: gambas2-gb.sdl.sound > > Within Synaptic there is listed an installed library: gambas2-gb-sdl > with description "This component use the sound image and ttf fonts parts > of the SDL library. It allows you to simultaneously play many sounds and > a music stored in a file." > > So it seems to be that the Gambas package creating process refers to its > sound library as "gambas2-gb.sdl.sound" but Ubuntu 8.10 lists these > capabilities as "gambas2-gb-sdl". > > Is there any solution available for this missmatch? Are there newer > versions of Ubuntu and/or Gambas2 which doesn't show this problem? To > whom should this problem be addressed to - to the Gambas developers or > to the Ubuntu packagers? (I have just posted the same question to > launchpad, hope that was correct?) > > I'm using the Gambas2 installation (2.7-1) which comes with Ubuntu 8.10 > (intrepid) and have installed all updates available . > My /etc/apt/sources.lists are not modified. > uname -a -> Linux tax 2.6.27-11-generic #1 SMP Wed Apr 1 20:57:48 UTC > 2009 i686 GNU/Linux > > best regards > Andreas > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > 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/Dependency-is-not-satisfiable%3A-gambas2-gb.sdl.sound-tp23145167p23152789.html Sent from the gambas-user mailing list archive at Nabble.com. From smiefert at ...784... Tue Apr 21 15:51:39 2009 From: smiefert at ...784... (Stefan Miefert) Date: Tue, 21 Apr 2009 15:51:39 +0200 Subject: [Gambas-user] dynamic classes? Message-ID: <8D42310D957CFB46AA11921A711D4D16023F579CEE@...1899...> Hello, how can i creat a class having a dynamic name? for example. I have some classnames in my database and want now do this DIM cclass as class Dim var = "myclassname" Class = new var But that dosent run:( He takes the var as the class "var" How can I use the content of the var? From jeff at ...2103... Tue Apr 21 16:29:06 2009 From: jeff at ...2103... (Jeff) Date: Wed, 22 Apr 2009 00:29:06 +1000 Subject: [Gambas-user] dynamic classes? In-Reply-To: <8D42310D957CFB46AA11921A711D4D16023F579CEE@...1899...> References: <8D42310D957CFB46AA11921A711D4D16023F579CEE@...1899...> Message-ID: <1240324146.5960.0.camel@...2104...> Try: var = Class.Load("myclassname") On Tue, 2009-04-21 at 15:51 +0200, Stefan Miefert wrote: > Hello, > > how can i creat a class having a dynamic name? > > for example. > > I have some classnames in my database and want now do this > > DIM cclass as class > Dim var = "myclassname" > Class = new var > > But that dosent run:( He takes the var as the class "var" > > How can I use the content of the var? > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Tue Apr 21 16:29:32 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 21 Apr 2009 17:29:32 +0300 Subject: [Gambas-user] dynamic classes? In-Reply-To: <8D42310D957CFB46AA11921A711D4D16023F579CEE@...1899...> References: <8D42310D957CFB46AA11921A711D4D16023F579CEE@...1899...> Message-ID: <384d3900904210729l2579f3f6kb979aaa3e296b212@...627...> If I understand correctly, you want to declare class type dynamically, not name... ( http://gambasdoc.org/help/lang/new?v3 ) I'm not sure you can do it that way... but maybe you should use integer variable that denotes what type is needed to declare. Then; Dim SomeObject as New Object Select case iClasstype case 1 SomeObject = New Class1 case 2 SomeObject = New Class2 .... Jussi On Tue, Apr 21, 2009 at 16:51, Stefan Miefert wrote: > Hello, > > how can i creat a class ?having ?a dynamic name? > > for example. > > I have some classnames in my database and want now do this > > DIM cclass as class > Dim var = "myclassname" > Class = new var > > But that dosent run:( He takes the var ?as the class "var" > > How can I use the content ?of the var? > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From weldon_gary at ...67... Tue Apr 21 16:50:59 2009 From: weldon_gary at ...67... (CelticBhoy) Date: Tue, 21 Apr 2009 07:50:59 -0700 (PDT) Subject: [Gambas-user] Error on Jaunty In-Reply-To: <23142015.post@...1379...> References: <23132993.post@...1379...> <23142015.post@...1379...> Message-ID: <23157818.post@...1379...> OK the menu is the problem. Is there a way around this or will I have to design my projects without menu's ???? -- View this message in context: http://www.nabble.com/Error-on-Jaunty-tp23132993p23157818.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas at ...1... Tue Apr 21 18:03:26 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Tue, 21 Apr 2009 18:03:26 +0200 Subject: [Gambas-user] dynamic classes? In-Reply-To: <8D42310D957CFB46AA11921A711D4D16023F579CEE@...1899...> References: <8D42310D957CFB46AA11921A711D4D16023F579CEE@...1899...> Message-ID: <200904211803.26210.gambas@...1...> > Hello, > > how can i creat a class having a dynamic name? > > for example. > > I have some classnames in my database and want now do this > > DIM cclass as class > Dim var = "myclassname" > Class = new var > > But that dosent run:( He takes the var as the class "var" > > How can I use the content of the var? > Object.New() is a method that does what you need. See the documentation for the details. Regards, -- Beno?t From gambas at ...1... Tue Apr 21 18:04:27 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Tue, 21 Apr 2009 18:04:27 +0200 Subject: [Gambas-user] Error on Jaunty In-Reply-To: <23157818.post@...1379...> References: <23132993.post@...1379...> <23142015.post@...1379...> <23157818.post@...1379...> Message-ID: <200904211804.27232.gambas@...1...> > OK the menu is the problem. Is there a way around this or will I have to > design my projects without menu's ???? Can you send me your project and tell the version of Gambas you use? -- Beno?t From gambas at ...1... Tue Apr 21 18:07:45 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Tue, 21 Apr 2009 18:07:45 +0200 Subject: [Gambas-user] Catch NULL character In-Reply-To: <22751957.post@...1379...> References: <22751957.post@...1379...> Message-ID: <200904211807.45232.gambas@...1...> > What is wrong with this line :- > > IF sElement[iLoop] = NULL THEN sElement[iLoop] = "0" > > I want to catch a null character and change it to "0". Just as a summary: NULL is NULL, a special constant (like TRUE or FALSE), that is the default value of Variant, String, Date and Object datatypes. In Gambas, NULL and "" (the void string) are the same thing. Maybe you can find that confusing, but that makes a lot of code simpler to write. But the "null" character is a bad name for Chr$(0), i.e. a byte in memory inside a string whose value is zero. So, Chr$(0) <> NULL ! -- Beno?t From kazutaka802 at ...1907... Tue Apr 21 16:04:07 2009 From: kazutaka802 at ...1907... (HARADA Kazutaka) Date: Tue, 21 Apr 2009 23:04:07 +0900 Subject: [Gambas-user] Cannot scroll gridview by mouse wheel with hidden row (gb.gtk) Message-ID: <49EDD257.7060701@...1907...> With gb.gtk, I cannot scroll gridview by mouse wheel if some hidden row (gridview.rows[].height = 0) exist. I attached small project to check it. When you click Button1, then even rows are set as hidden. Scroll bar works, but cannot scroll with mouse wheel even though mouse pointer is in the gridview. It works fine with gb.qt. I'm using gambas-2.12 with gtk+-2.16.1 and qt-3.3.8 Best regards, -- -------------------------------------- Kazutaka HARADA e-mail:kazutaka802 at ...1907... -------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: gridviewtest.tar.gz Type: application/x-gzip Size: 8948 bytes Desc: not available URL: From weldon_gary at ...67... Tue Apr 21 18:39:58 2009 From: weldon_gary at ...67... (CelticBhoy) Date: Tue, 21 Apr 2009 09:39:58 -0700 (PDT) Subject: [Gambas-user] Error on Jaunty In-Reply-To: <200904211804.27232.gambas@...1...> References: <23132993.post@...1379...> <23142015.post@...1379...> <23157818.post@...1379...> <200904211804.27232.gambas@...1...> Message-ID: <23160072.post@...1379...> I am currently using 2.8 from the Ubuntu repo's, the project files are all uploaded above. I tried to install a .deb of 2.12 but got a dependancy error for a lib file - sorry cant remember the name. -- View this message in context: http://www.nabble.com/Error-on-Jaunty-tp23132993p23160072.html Sent from the gambas-user mailing list archive at Nabble.com. From weldon_gary at ...67... Tue Apr 21 18:41:41 2009 From: weldon_gary at ...67... (CelticBhoy) Date: Tue, 21 Apr 2009 09:41:41 -0700 (PDT) Subject: [Gambas-user] Error on Jaunty In-Reply-To: <23160072.post@...1379...> References: <23132993.post@...1379...> <23142015.post@...1379...> <23157818.post@...1379...> <200904211804.27232.gambas@...1...> <23160072.post@...1379...> Message-ID: <23160137.post@...1379...> CelticBhoy wrote: > > I am currently using 2.8 from the Ubuntu repo's, the project files are all > uploaded above. > I tried to install a .deb of 2.12 but got a dependancy error for a lib > file - sorry cant remember the name. > > Just checked again, and this is the error :- Error: Dependency is not satisfiable: libpoppler3 -- View this message in context: http://www.nabble.com/Error-on-Jaunty-tp23132993p23160137.html Sent from the gambas-user mailing list archive at Nabble.com. From arbelmichal at ...2145... Tue Apr 21 18:52:56 2009 From: arbelmichal at ...2145... (arbelmichal) Date: Tue, 21 Apr 2009 19:52:56 +0300 Subject: [Gambas-user] a problem installing gambas... Message-ID: <1240332776.4848.1.camel@...2146...> Hi Please read this thread and see if you can help me... I got project that I am working on and I hed to stop beacuase my Gambas died... Thanks Arbel http://www.linuxbasic.net/index.php?topic=466.0 From m0e.lnx at ...626... Tue Apr 21 19:17:07 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Tue, 21 Apr 2009 12:17:07 -0500 Subject: [Gambas-user] a problem installing gambas... In-Reply-To: <1240332776.4848.1.camel@...2146...> References: <1240332776.4848.1.camel@...2146...> Message-ID: <1f1e8c1b0904211017u72b0e707if46672676b756fdc@...627...> I have seen this before. My problem was solved by restoring the sane permissions to my /tmp dir On Apr 21, 2009 11:55 AM, "arbelmichal" wrote: Hi Please read this thread and see if you can help me... I got project that I am working on and I hed to stop beacuase my Gambas died... Thanks Arbel http://www.linuxbasic.net/index.php?topic=466.0 ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From arbelmichal at ...2145... Tue Apr 21 19:28:31 2009 From: arbelmichal at ...2145... (arbelmichal) Date: Tue, 21 Apr 2009 20:28:31 +0300 Subject: [Gambas-user] a problem installing gambas... In-Reply-To: <1f1e8c1b0904211017u72b0e707if46672676b756fdc@...627...> References: <1240332776.4848.1.camel@...2146...> <1f1e8c1b0904211017u72b0e707if46672676b756fdc@...627...> Message-ID: <1240334911.4848.2.camel@...2146...> can you please explain a bit more? What do I have to do? Arbel On Tue, 2009-04-21 at 12:17 -0500, M0E Lnx wrote: > I have seen this before. My problem was solved by restoring the sane > permissions to my /tmp dir > > On Apr 21, 2009 11:55 AM, "arbelmichal" wrote: > > Hi > Please read this thread and see if you can help me... I got project that > I am working on and I hed to stop beacuase my Gambas died... > Thanks > Arbel > > http://www.linuxbasic.net/index.php?topic=466.0 > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From m0e.lnx at ...626... Tue Apr 21 19:54:43 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Tue, 21 Apr 2009 12:54:43 -0500 Subject: [Gambas-user] a problem installing gambas... In-Reply-To: <1240334911.4848.2.camel@...2146...> References: <1240332776.4848.1.camel@...2146...> <1f1e8c1b0904211017u72b0e707if46672676b756fdc@...627...> <1240334911.4848.2.camel@...2146...> Message-ID: <1f1e8c1b0904211054t40412d14r64c025dcd877fff8@...627...> Post your output of ls -al / On Apr 21, 2009 12:30 PM, "arbelmichal" wrote: can you please explain a bit more? What do I have to do? Arbel On Tue, 2009-04-21 at 12:17 -0500, M0E Lnx wrote: > I have seen this before. My problem was solved b... From arbelmichal at ...2145... Tue Apr 21 20:06:07 2009 From: arbelmichal at ...2145... (arbelmichal) Date: Tue, 21 Apr 2009 21:06:07 +0300 Subject: [Gambas-user] a problem installing gambas... In-Reply-To: <1f1e8c1b0904211054t40412d14r64c025dcd877fff8@...627...> References: <1240332776.4848.1.camel@...2146...> <1f1e8c1b0904211017u72b0e707if46672676b756fdc@...627...> <1240334911.4848.2.camel@...2146...> <1f1e8c1b0904211054t40412d14r64c025dcd877fff8@...627...> Message-ID: <1240337167.4848.4.camel@...2146...> ok Thats a lot... Here gose... Do you have an IRC chanel so we can talk without the mail? arbelmichal at ...2146...:~$ ls -al total 8884 drwxr-xr-x 165 arbelmichal arbelmichal 12288 2009-04-21 19:11 . drwxr-xr-x 3 root root 4096 2007-12-13 06:25 .. -rw-r----- 1 arbelmichal arbelmichal 8 2008-06-16 10:03 .a7xpg.prf drwx------ 2 arbelmichal arbelmichal 4096 2008-06-16 16:41 .abe drwx------ 2 arbelmichal arbelmichal 4096 2009-03-26 16:54 .AbiSuite drwx------ 3 arbelmichal arbelmichal 4096 2008-05-12 18:49 .adanaxis drwx------ 3 arbelmichal arbelmichal 4096 2008-02-11 23:36 .adobe drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-12-09 18:58 .alex4 drwxr-xr-x 25 arbelmichal arbelmichal 4096 2008-09-16 09:32 .amaya drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-12-09 18:53 .amph drwxr-xr-x 4 arbelmichal arbelmichal 4096 2009-01-18 16:19 .aMule drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-05-31 17:10 .anjuta drwx------ 2 arbelmichal arbelmichal 4096 2009-04-11 00:16 .aptitude -rw-r--r-- 1 arbelmichal arbelmichal 21887 2008-06-11 22:21 .atanks-config.txt drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-01-22 23:09 autosave drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-08-01 17:22 .avidemux drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-04-09 20:26 babyo -rw-r--r-- 1 arbelmichal arbelmichal 408 2008-06-08 19:42 .balazar drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-10-30 21:16 .balazar_brothers -rw-r--r-- 1 arbelmichal arbelmichal 2085 2008-08-12 22:42 .balder2d.conf -rw-r--r-- 1 arbelmichal arbelmichal 107520 2008-08-13 22:50 bank.doc -rw------- 1 arbelmichal arbelmichal 13248 2009-04-19 16:20 .bash_history -rw-r--r-- 1 arbelmichal arbelmichal 220 2007-12-13 06:25 .bash_logout -rw-r--r-- 1 arbelmichal arbelmichal 414 2008-09-15 17:08 .bash_profile -rw-r--r-- 1 arbelmichal arbelmichal 2298 2007-12-13 06:25 .bashrc drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-05-26 21:41 bin drwxr-xr-x 6 arbelmichal arbelmichal 4096 2009-03-25 20:09 .blender drwx------ 2 arbelmichal arbelmichal 4096 2009-01-29 10:18 .bogofilter -rw-r--r-- 1 arbelmichal arbelmichal 79215 2008-02-11 23:38 bookmarks.html drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-06-10 20:42 .briquolo drwx------ 2 arbelmichal arbelmichal 4096 2008-10-09 18:26 .btanks drwxr-xr-x 4 arbelmichal arbelmichal 4096 2005-04-05 17:25 ButterFlight-2.2 drwxr-xr-x 9 arbelmichal arbelmichal 4096 2009-02-03 11:50 .cache drwxr-xr-x 5 arbelmichal arbelmichal 4096 2009-03-21 16:57 .cairo-dock -rw-r--r-- 1 arbelmichal arbelmichal 169 2008-12-06 17:03 .ceferino -rw-r--r-- 1 arbelmichal arbelmichal 168 2008-12-05 18:08 .ceferinomarcas -rw-r--r-- 1 arbelmichal arbelmichal 240 2008-12-05 18:11 .chromium -rw-r--r-- 1 arbelmichal arbelmichal 3800 2008-12-05 18:11 .chromium-score -rw-r--r-- 1 arbelmichal arbelmichal 7255 2008-10-09 10:17 .civclientrc -rw------- 1 arbelmichal arbelmichal 0 2008-10-09 10:17 .civserver_history drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-08-30 10:37 .clive drwxr-xr-x 5 arbelmichal arbelmichal 4096 2008-05-12 19:08 .comix drwxr-xr-x 25 arbelmichal arbelmichal 4096 2009-04-14 13:42 .config -rw-r--r-- 1 arbelmichal arbelmichal 989 2008-10-04 11:43 content.html~ drwx------ 2 arbelmichal arbelmichal 4096 2007-12-15 20:51 .cups drwx------ 3 arbelmichal arbelmichal 4096 2008-11-16 09:57 .dbus drwx------ 2 arbelmichal arbelmichal 4096 2008-04-12 17:17 .dbus-keyrings -rw-r--r-- 1 arbelmichal arbelmichal 66 2009-04-17 22:52 .DCOPserver_arbelmichal-desktop__0 lrwxrwxrwx 1 arbelmichal arbelmichal 52 2009-04-17 22:52 .DCOPserver_arbelmichal-desktop_:0 -> /home/arbelmichal/.DCOPserver_arbelmichal-desktop__0 -rw-r--r-- 1 arbelmichal games 56 2008-12-05 18:13 .dd2rc drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-12-21 16:42 .debtags drwxr-xr-x 6 arbelmichal arbelmichal 4096 2009-04-21 18:25 Desktop drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-08-28 13:11 .dgen -rw-r--r-- 1 arbelmichal arbelmichal 8455 2008-08-02 10:52 divx2pass.log -rw------- 1 arbelmichal arbelmichal 25 2009-04-17 22:52 .dmrc drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-11-16 19:50 eagle -rw-r--r-- 1 root root 2686 2008-11-16 19:50 .eaglerc drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-04-01 19:50 .eclipse drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-03-22 02:12 .elisa drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-01-26 20:12 .emma -rw-r--r-- 1 arbelmichal arbelmichal 471736 2008-07-03 23:03 empsave.dat drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-02-09 18:28 .endeavour2 -rw------- 1 arbelmichal arbelmichal 16 2007-12-13 07:45 .esd_auth drwxr-xr-x 8 arbelmichal arbelmichal 4096 2009-04-19 23:20 .evolution lrwxrwxrwx 1 arbelmichal arbelmichal 26 2007-12-13 06:25 Examples -> /usr/share/example-content -rw-r--r-- 1 arbelmichal arbelmichal 584 2007-12-30 23:06 .fbhighlevelshistory -rw-r--r-- 1 arbelmichal arbelmichal 363 2007-12-30 23:06 .fbhighscores drwxr-xr-x 2 arbelmichal arbelmichal 4096 2007-12-30 22:30 .fblevels -rw-r--r-- 1 arbelmichal arbelmichal 1196 2008-10-17 17:32 .fbrc -rw-r--r-- 1 arbelmichal arbelmichal 209 2008-10-30 00:00 .festival_history drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-11-03 20:24 .fltk drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-04-17 16:51 .fontconfig drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:48 .fr-3HHAPm drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:40 .fr-4DIgFP drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:38 .fr-8f8ra8 drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:39 .fr-ABtOCx drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:38 .fr-cIEyOz drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:38 .fr-dejWwy drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:38 .fr-dYVv37 drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-10-09 10:00 .freeciv drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:39 .fr-EhpZmG drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-11-03 23:53 .fretsonfire drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:39 .fr-H0vSaz drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:39 .fr-kot4VK drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:39 .fr-LLpd36 drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:39 .fr-lwRTKF drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:38 .fr-PWpeJU drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:39 .fr-tdplxs drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:38 .fr-ySYG0U -rw-r--r-- 1 arbelmichal arbelmichal 1168 2008-05-28 09:18 .fte-history drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-11-28 16:22 .funnyboat drwx------ 4 arbelmichal arbelmichal 4096 2009-04-09 20:33 .galeon drwx------ 2 arbelmichal arbelmichal 4096 2007-12-13 23:22 .gambas drwx------ 2 arbelmichal arbelmichal 4096 2008-02-11 23:00 .gcjwebplugin drwx------ 6 arbelmichal arbelmichal 4096 2009-04-21 07:36 .gconf drwx------ 2 arbelmichal arbelmichal 4096 2009-04-21 19:54 .gconfd drwx------ 7 arbelmichal arbelmichal 4096 2008-05-24 10:55 .gdesklets drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-10-08 14:21 .gearhead drwx------ 4 arbelmichal arbelmichal 4096 2008-11-23 23:12 .gegl-0.0 -rw-r--r-- 1 arbelmichal arbelmichal 17507 2008-08-13 22:45 germany.odt drwx------ 3 arbelmichal arbelmichal 4096 2008-01-16 17:33 .gftp drwx------ 2 arbelmichal arbelmichal 4096 2008-06-09 10:42 .ggz drwxr-xr-x 22 arbelmichal arbelmichal 4096 2008-10-27 08:51 .gimp-2.4 drwxr-xr-x 22 arbelmichal arbelmichal 4096 2009-04-19 00:09 .gimp-2.6 -rw-r----- 1 arbelmichal arbelmichal 0 2009-04-18 09:35 .gksu.lock drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-08-06 20:58 .glest drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-12-05 18:14 .gnome drwx------ 28 arbelmichal arbelmichal 4096 2009-04-17 19:01 .gnome2 drwx------ 2 arbelmichal arbelmichal 4096 2007-12-13 07:45 .gnome2_private drwx------ 2 arbelmichal arbelmichal 4096 2008-12-05 18:14 .gnome_private drwx------ 2 arbelmichal arbelmichal 4096 2009-01-31 12:56 .gnupg drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-04-28 10:45 .gpilotd -rw-r--r-- 1 arbelmichal arbelmichal 5 2008-04-28 10:45 .gpilotd.pid drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-03-19 23:03 .gstreamer-0.10 -rw-r--r-- 1 arbelmichal arbelmichal 271 2009-04-19 21:44 .gtk-bookmarks -rw-r--r-- 1 arbelmichal arbelmichal 93 2007-12-13 07:45 .gtkrc-1.2-gnome2 -rw-r--r-- 1 arbelmichal arbelmichal 484 2008-05-26 16:56 .gtktermrc dr-x------ 2 arbelmichal arbelmichal 0 2009-04-17 22:52 .gvfs -rw-r--r-- 1 arbelmichal arbelmichal 1732 2008-04-12 15:25 .gvrngrc drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-10-30 21:21 .hrd -rw-r--r-- 1 arbelmichal arbelmichal 23119 2008-02-13 21:23 .hxplayerrc -rw------- 1 arbelmichal arbelmichal 45402 2009-04-17 22:52 .ICEauthority drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-12-07 17:08 .icons drwxr-xr-x 5 arbelmichal arbelmichal 4096 2008-05-26 21:41 .ies4linux drwxr-xr-x 7 arbelmichal arbelmichal 4096 2007-11-26 08:28 ies4linux-2.99.0.1 -rw-r--r-- 1 arbelmichal arbelmichal 332341 2008-02-06 11:49 ies4linux-latest.tar.gz -rw-r--r-- 1 arbelmichal arbelmichal 1992 2008-04-14 19:53 index.htm~ -rw-r--r-- 1 arbelmichal arbelmichal 3036127 2008-02-13 21:35 install_flash_player_9_linux.tar.gz drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-08-05 11:35 .java drwxr-xr-x 3 arbelmichal arbelmichal 4096 2009-04-17 18:37 .k3d drwx------ 4 arbelmichal arbelmichal 4096 2008-08-03 08:38 .kde drwx------ 2 arbelmichal arbelmichal 4096 2008-11-08 15:38 .kino-history -rw-r--r-- 1 arbelmichal arbelmichal 2969 2008-12-21 09:44 .kinorc drwxr-xr-x 3 arbelmichal arbelmichal 4096 2009-04-09 08:47 .klamav drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-05-20 00:10 .ktoon -rw------- 1 root root 44 2008-03-23 22:40 .lesshst drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-10-26 18:05 .lftp -rw-r--r-- 1 arbelmichal arbelmichal 85381 2008-11-03 19:23 .libquicktime_codecs drwxrwxrwx 13 arbelmichal arbelmichal 4096 2009-01-04 20:32 libtool-1.5.26 -rw-r--r-- 1 arbelmichal arbelmichal 2961939 2009-01-04 16:31 libtool-1.5.26.tar.gz -rw-r--r-- 1 arbelmichal arbelmichal 150 2008-06-11 21:55 .lightyears.cfg -rw-r--r-- 1 arbelmichal arbelmichal 1745 2008-05-13 06:00 linux_signing_key.pub -rw-r--r-- 1 arbelmichal arbelmichal 1745 2008-05-13 06:00 linux_signing_key.pub.1 -rw-r--r-- 1 arbelmichal arbelmichal 1210 2008-12-06 17:58 .liquidwarrc drwxr-xr-x 3 arbelmichal arbelmichal 4096 2007-12-13 11:23 .local -rw-r--r-- 1 arbelmichal arbelmichal 471 2008-02-18 16:00 log.txt drwx------ 3 arbelmichal arbelmichal 4096 2008-02-11 23:36 .macromedia drwxr-xr-x 3 arbelmichal arbelmichal 4096 2007-12-13 22:30 .mcop -rw------- 1 arbelmichal arbelmichal 31 2007-12-14 18:13 .mcoprc drwx------ 8 arbelmichal arbelmichal 4096 2008-08-28 12:38 .mednafen drwx------ 3 arbelmichal arbelmichal 4096 2007-12-13 07:45 .metacity -rw-r--r-- 1 arbelmichal arbelmichal 1940 2009-03-22 18:14 Miekfrep.bak -rw-r--r-- 1 arbelmichal arbelmichal 1994 2009-03-22 18:14 Miekfrep.pq drwxr-xr-x 6 arbelmichal arbelmichal 4096 2009-02-20 19:38 .miro drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-10-30 21:13 .monsterz drwx------ 6 arbelmichal arbelmichal 4096 2008-04-27 22:42 .mozilla drwx------ 3 arbelmichal arbelmichal 4096 2008-04-27 22:42 .mozilla-thunderbird drwx------ 2 arbelmichal arbelmichal 4096 2008-03-04 22:28 .mplayer drwxr-xr-x 3 arbelmichal arbelmichal 4096 2009-03-22 18:14 My GCompris drwxr-xr-x 3 arbelmichal arbelmichal 20480 2009-04-17 19:01 .nautilus -rw-r--r-- 1 arbelmichal arbelmichal 49152 2008-02-28 00:56 nautilus-debug-log.txt drwxr-xr-x 5 arbelmichal arbelmichal 4096 2008-01-26 21:21 .navicat drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-02-24 23:04 .neverball drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-06-08 13:21 .nexuiz -rw-r--r-- 1 arbelmichal arbelmichal 29 2008-11-22 12:46 .njamconf -rw------- 1 arbelmichal arbelmichal 3826 2008-07-08 20:28 .octave_hist drwx------ 3 arbelmichal arbelmichal 4096 2008-11-03 19:38 .openme -rw-r--r-- 1 arbelmichal arbelmichal 376 2008-11-03 20:24 .openme.prefs -rw-r--r-- 1 arbelmichal arbelmichal 71 2008-11-03 20:17 .openme.presets drwx------ 3 arbelmichal arbelmichal 4096 2009-04-21 18:25 .openoffice.org2 drwx------ 11 arbelmichal arbelmichal 4096 2008-08-02 10:59 .opera drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-05-05 22:38 orangutan drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-11-19 11:07 .orca drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-10-09 18:26 .parallelrealities drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-05-01 18:54 Photos drwxr-xr-x 7 arbelmichal arbelmichal 12288 2009-03-15 16:36 Pictures drwxr-x--- 10 arbelmichal arbelmichal 4096 2007-12-18 23:53 .pingus drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-08-01 10:16 .pitivi drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-12-04 18:52 .praat-dir -rw-r--r-- 1 arbelmichal arbelmichal 566 2007-12-13 06:25 .profile drwxr-xr-x 2 arbelmichal arbelmichal 4096 2007-12-13 11:23 Public drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-04-25 11:08 .pulse -rw------- 1 arbelmichal arbelmichal 256 2008-01-25 21:48 .pulse-cookie drwx------ 5 arbelmichal arbelmichal 4096 2009-04-21 20:10 .purple drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-11-03 22:16 .pydance drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-04-11 00:26 .qt drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-07-06 19:49 .qtoctave -rw------- 1 arbelmichal arbelmichal 66576 2009-04-21 18:25 .recently-used -rw------- 1 arbelmichal arbelmichal 126051 2009-04-21 19:11 .recently-used.xbel -rw-r--r-- 1 arbelmichal arbelmichal 41678 2008-08-15 22:40 robotarmparts.odg -rwxr-xr-x 1 arbelmichal arbelmichal 109445 2008-04-26 17:23 robotech.gambas drwx------ 2 arbelmichal arbelmichal 4096 2008-06-09 13:20 .rott drwxr-xr-x 8 arbelmichal arbelmichal 4096 2008-04-03 12:19 RPM drwxrwx--- 3 arbelmichal arbelmichal 4096 2008-01-14 11:10 .sane drwx------ 4 arbelmichal arbelmichal 4096 2008-09-16 09:46 .screem drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-12-07 18:56 .screenlets drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-06-10 23:18 .scummvm -rw-r--r-- 1 arbelmichal arbelmichal 76 2008-06-26 20:38 .scummvmrc drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-06-03 20:32 .sdljump drwx------ 8 arbelmichal arbelmichal 4096 2008-02-08 19:12 .secondlife drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-03-23 11:51 .serpentine -rw-r--r-- 1 arbelmichal arbelmichal 2525 2008-02-18 16:00 settings.bin drwx------ 3 arbelmichal arbelmichal 4096 2008-12-07 19:27 .Skype drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-05-31 00:13 smb4k drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-04-27 23:10 smb4k_sync -rw-r--r-- 1 arbelmichal arbelmichal 3693 2008-06-05 21:52 Sport.c~ drwx------ 2 arbelmichal arbelmichal 4096 2008-04-25 08:09 .ssh drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-08-02 10:52 .stopmotion -rw-r--r-- 1 arbelmichal arbelmichal 0 2007-12-13 07:48 .sudo_as_admin_successful drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-04-17 18:37 .synfig drwxr-xr-x 2 arbelmichal arbelmichal 4096 2007-12-13 11:23 Templates -rw-r--r-- 1 arbelmichal arbelmichal 683 2008-04-03 11:44 testpaste~ drwxr-xr-x 2 arbelmichal arbelmichal 4096 2007-12-13 11:31 .themes drwx------ 5 arbelmichal arbelmichal 4096 2008-02-13 21:14 .thumbnails drwxr-xr-x 5 arbelmichal arbelmichal 4096 2008-06-03 12:53 .tomboy -rw-r--r-- 1 arbelmichal arbelmichal 4940 2008-06-03 12:53 .tomboy.log drwxr-xr-x 5 arbelmichal arbelmichal 4096 2008-05-24 11:07 .transmission drwx------ 2 arbelmichal arbelmichal 4096 2008-10-22 19:35 .tsclient -rw-r--r-- 1 arbelmichal arbelmichal 5023 2008-04-07 21:13 untitled.b## drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-05-03 10:52 .update-manager-core drwx------ 2 arbelmichal arbelmichal 4096 2008-04-23 16:11 .update-notifier -rw-r--r-- 1 root root 2262 2008-12-10 17:06 .usb-creator.log drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-01-26 11:25 .vba drwxr-xr-x 8 arbelmichal arbelmichal 4096 2009-03-22 19:19 .vegastrike-0.4.x drwxr-xr-t 8 arbelmichal arbelmichal 4096 2008-01-17 10:27 .vegastrike.4.x drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-08-01 10:09 Video Projects -rw------- 1 arbelmichal arbelmichal 12288 2008-04-28 23:31 .vi.swp drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-12-21 09:39 .vlc drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-10-01 11:11 .vnc drwx------ 2 arbelmichal arbelmichal 4096 2007-12-18 22:16 .w3m drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-04-14 13:43 .wapi drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-06-09 16:55 .warsow drwxr-x--- 7 arbelmichal arbelmichal 4096 2007-12-18 23:51 .wesnoth -rw-r--r-- 1 arbelmichal arbelmichal 0 2008-12-07 17:49 wget-log drwxr-xr-x 4 arbelmichal arbelmichal 4096 2009-04-21 19:40 .wine drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-04-11 00:35 .wordtrans drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-11-03 23:11 workspace drwxr-x--- 2 arbelmichal arbelmichal 4096 2008-10-09 18:33 .wormux drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-03-22 19:17 .wwisup -rw------- 1 arbelmichal arbelmichal 130 2009-04-17 22:52 .Xauthority drwxr-xr-x 2 arbelmichal arbelmichal 4096 2007-12-13 23:31 .xine -rw-r--r-- 1 arbelmichal arbelmichal 181 2008-12-06 20:28 .xscreensaver-getimage.cache -rw-r--r-- 1 arbelmichal arbelmichal 78941 2009-04-21 20:49 .xsession-errors drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-08-31 13:12 .zsnes -rw-r--r-- 1 arbelmichal arbelmichal 107008 2007-12-23 22:32 ????.doc -rw-r--r-- 1 arbelmichal arbelmichal 106496 2008-04-28 21:31 ?????.doc -rw-r--r-- 1 arbelmichal arbelmichal 12045 2009-02-02 13:31 ??? ???.odt -rw-r--r-- 1 arbelmichal arbelmichal 18027 2009-04-15 19:35 ?????? ???????.odt -rw-r--r-- 1 arbelmichal arbelmichal 117248 2009-02-19 07:41 ??? ?????.doc On Tue, 2009-04-21 at 12:54 -0500, M0E Lnx wrote: > Post your output of ls -al / > > On Apr 21, 2009 12:30 PM, "arbelmichal" wrote: > > can you please explain a bit more? What do I have to do? > Arbel > > On Tue, 2009-04-21 at 12:17 -0500, M0E Lnx wrote: > I have seen this before. > My problem was solved b... > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From m0e.lnx at ...626... Tue Apr 21 20:15:58 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Tue, 21 Apr 2009 13:15:58 -0500 Subject: [Gambas-user] a problem installing gambas... In-Reply-To: <1240337167.4848.4.camel@...2146...> References: <1240332776.4848.1.camel@...2146...> <1f1e8c1b0904211017u72b0e707if46672676b756fdc@...627...> <1240334911.4848.2.camel@...2146...> <1f1e8c1b0904211054t40412d14r64c025dcd877fff8@...627...> <1240337167.4848.4.camel@...2146...> Message-ID: <1f1e8c1b0904211115g5369802hba7676c95b405008@...627...> Try #gambas in irc.freenode.org On Apr 21, 2009 1:10 PM, "arbelmichal" wrote: ok Thats a lot... Here gose... Do you have an IRC chanel so we can talk without the mail? arbelmichal at ...2146...:~$ ls -al total 8884 drwxr-xr-x 165 arbelmichal arbelmichal 12288 2009-04-21 19:11 . drwxr-xr-x 3 root root 4096 2007-12-13 06:25 .. -rw-r----- 1 arbelmichal arbelmichal 8 2008-06-16 10:03 .a7xpg.prf drwx------ 2 arbelmichal arbelmichal 4096 2008-06-16 16:41 .abe drwx------ 2 arbelmichal arbelmichal 4096 2009-03-26 16:54 .AbiSuite drwx------ 3 arbelmichal arbelmichal 4096 2008-05-12 18:49 .adanaxis drwx------ 3 arbelmichal arbelmichal 4096 2008-02-11 23:36 .adobe drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-12-09 18:58 .alex4 drwxr-xr-x 25 arbelmichal arbelmichal 4096 2008-09-16 09:32 .amaya drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-12-09 18:53 .amph drwxr-xr-x 4 arbelmichal arbelmichal 4096 2009-01-18 16:19 .aMule drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-05-31 17:10 .anjuta drwx------ 2 arbelmichal arbelmichal 4096 2009-04-11 00:16 .aptitude -rw-r--r-- 1 arbelmichal arbelmichal 21887 2008-06-11 22:21 .atanks-config.txt drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-01-22 23:09 autosave drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-08-01 17:22 .avidemux drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-04-09 20:26 babyo -rw-r--r-- 1 arbelmichal arbelmichal 408 2008-06-08 19:42 .balazar drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-10-30 21:16 .balazar_brothers -rw-r--r-- 1 arbelmichal arbelmichal 2085 2008-08-12 22:42 .balder2d.conf -rw-r--r-- 1 arbelmichal arbelmichal 107520 2008-08-13 22:50 bank.doc -rw------- 1 arbelmichal arbelmichal 13248 2009-04-19 16:20 .bash_history -rw-r--r-- 1 arbelmichal arbelmichal 220 2007-12-13 06:25 .bash_logout -rw-r--r-- 1 arbelmichal arbelmichal 414 2008-09-15 17:08 .bash_profile -rw-r--r-- 1 arbelmichal arbelmichal 2298 2007-12-13 06:25 .bashrc drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-05-26 21:41 bin drwxr-xr-x 6 arbelmichal arbelmichal 4096 2009-03-25 20:09 .blender drwx------ 2 arbelmichal arbelmichal 4096 2009-01-29 10:18 .bogofilter -rw-r--r-- 1 arbelmichal arbelmichal 79215 2008-02-11 23:38 bookmarks.html drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-06-10 20:42 .briquolo drwx------ 2 arbelmichal arbelmichal 4096 2008-10-09 18:26 .btanks drwxr-xr-x 4 arbelmichal arbelmichal 4096 2005-04-05 17:25 ButterFlight-2.2 drwxr-xr-x 9 arbelmichal arbelmichal 4096 2009-02-03 11:50 .cache drwxr-xr-x 5 arbelmichal arbelmichal 4096 2009-03-21 16:57 .cairo-dock -rw-r--r-- 1 arbelmichal arbelmichal 169 2008-12-06 17:03 .ceferino -rw-r--r-- 1 arbelmichal arbelmichal 168 2008-12-05 18:08 .ceferinomarcas -rw-r--r-- 1 arbelmichal arbelmichal 240 2008-12-05 18:11 .chromium -rw-r--r-- 1 arbelmichal arbelmichal 3800 2008-12-05 18:11 .chromium-score -rw-r--r-- 1 arbelmichal arbelmichal 7255 2008-10-09 10:17 .civclientrc -rw------- 1 arbelmichal arbelmichal 0 2008-10-09 10:17 .civserver_history drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-08-30 10:37 .clive drwxr-xr-x 5 arbelmichal arbelmichal 4096 2008-05-12 19:08 .comix drwxr-xr-x 25 arbelmichal arbelmichal 4096 2009-04-14 13:42 .config -rw-r--r-- 1 arbelmichal arbelmichal 989 2008-10-04 11:43 content.html~ drwx------ 2 arbelmichal arbelmichal 4096 2007-12-15 20:51 .cups drwx------ 3 arbelmichal arbelmichal 4096 2008-11-16 09:57 .dbus drwx------ 2 arbelmichal arbelmichal 4096 2008-04-12 17:17 .dbus-keyrings -rw-r--r-- 1 arbelmichal arbelmichal 66 2009-04-17 22:52 .DCOPserver_arbelmichal-desktop__0 lrwxrwxrwx 1 arbelmichal arbelmichal 52 2009-04-17 22:52 .DCOPserver_arbelmichal-desktop_:0 -> /home/arbelmichal/.DCOPserver_arbelmichal-desktop__0 -rw-r--r-- 1 arbelmichal games 56 2008-12-05 18:13 .dd2rc drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-12-21 16:42 .debtags drwxr-xr-x 6 arbelmichal arbelmichal 4096 2009-04-21 18:25 Desktop drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-08-28 13:11 .dgen -rw-r--r-- 1 arbelmichal arbelmichal 8455 2008-08-02 10:52 divx2pass.log -rw------- 1 arbelmichal arbelmichal 25 2009-04-17 22:52 .dmrc drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-11-16 19:50 eagle -rw-r--r-- 1 root root 2686 2008-11-16 19:50 .eaglerc drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-04-01 19:50 .eclipse drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-03-22 02:12 .elisa drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-01-26 20:12 .emma -rw-r--r-- 1 arbelmichal arbelmichal 471736 2008-07-03 23:03 empsave.dat drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-02-09 18:28 .endeavour2 -rw------- 1 arbelmichal arbelmichal 16 2007-12-13 07:45 .esd_auth drwxr-xr-x 8 arbelmichal arbelmichal 4096 2009-04-19 23:20 .evolution lrwxrwxrwx 1 arbelmichal arbelmichal 26 2007-12-13 06:25 Examples -> /usr/share/example-content -rw-r--r-- 1 arbelmichal arbelmichal 584 2007-12-30 23:06 .fbhighlevelshistory -rw-r--r-- 1 arbelmichal arbelmichal 363 2007-12-30 23:06 .fbhighscores drwxr-xr-x 2 arbelmichal arbelmichal 4096 2007-12-30 22:30 .fblevels -rw-r--r-- 1 arbelmichal arbelmichal 1196 2008-10-17 17:32 .fbrc -rw-r--r-- 1 arbelmichal arbelmichal 209 2008-10-30 00:00 .festival_history drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-11-03 20:24 .fltk drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-04-17 16:51 .fontconfig drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:48 .fr-3HHAPm drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:40 .fr-4DIgFP drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:38 .fr-8f8ra8 drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:39 .fr-ABtOCx drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:38 .fr-cIEyOz drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:38 .fr-dejWwy drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:38 .fr-dYVv37 drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-10-09 10:00 .freeciv drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:39 .fr-EhpZmG drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-11-03 23:53 .fretsonfire drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:39 .fr-H0vSaz drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:39 .fr-kot4VK drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:39 .fr-LLpd36 drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:39 .fr-lwRTKF drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:38 .fr-PWpeJU drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:39 .fr-tdplxs drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 21:38 .fr-ySYG0U -rw-r--r-- 1 arbelmichal arbelmichal 1168 2008-05-28 09:18 .fte-history drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-11-28 16:22 .funnyboat drwx------ 4 arbelmichal arbelmichal 4096 2009-04-09 20:33 .galeon drwx------ 2 arbelmichal arbelmichal 4096 2007-12-13 23:22 .gambas drwx------ 2 arbelmichal arbelmichal 4096 2008-02-11 23:00 .gcjwebplugin drwx------ 6 arbelmichal arbelmichal 4096 2009-04-21 07:36 .gconf drwx------ 2 arbelmichal arbelmichal 4096 2009-04-21 19:54 .gconfd drwx------ 7 arbelmichal arbelmichal 4096 2008-05-24 10:55 .gdesklets drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-10-08 14:21 .gearhead drwx------ 4 arbelmichal arbelmichal 4096 2008-11-23 23:12 .gegl-0.0 -rw-r--r-- 1 arbelmichal arbelmichal 17507 2008-08-13 22:45 germany.odt drwx------ 3 arbelmichal arbelmichal 4096 2008-01-16 17:33 .gftp drwx------ 2 arbelmichal arbelmichal 4096 2008-06-09 10:42 .ggz drwxr-xr-x 22 arbelmichal arbelmichal 4096 2008-10-27 08:51 .gimp-2.4 drwxr-xr-x 22 arbelmichal arbelmichal 4096 2009-04-19 00:09 .gimp-2.6 -rw-r----- 1 arbelmichal arbelmichal 0 2009-04-18 09:35 .gksu.lock drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-08-06 20:58 .glest drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-12-05 18:14 .gnome drwx------ 28 arbelmichal arbelmichal 4096 2009-04-17 19:01 .gnome2 drwx------ 2 arbelmichal arbelmichal 4096 2007-12-13 07:45 .gnome2_private drwx------ 2 arbelmichal arbelmichal 4096 2008-12-05 18:14 .gnome_private drwx------ 2 arbelmichal arbelmichal 4096 2009-01-31 12:56 .gnupg drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-04-28 10:45 .gpilotd -rw-r--r-- 1 arbelmichal arbelmichal 5 2008-04-28 10:45 .gpilotd.pid drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-03-19 23:03 .gstreamer-0.10 -rw-r--r-- 1 arbelmichal arbelmichal 271 2009-04-19 21:44 .gtk-bookmarks -rw-r--r-- 1 arbelmichal arbelmichal 93 2007-12-13 07:45 .gtkrc-1.2-gnome2 -rw-r--r-- 1 arbelmichal arbelmichal 484 2008-05-26 16:56 .gtktermrc dr-x------ 2 arbelmichal arbelmichal 0 2009-04-17 22:52 .gvfs -rw-r--r-- 1 arbelmichal arbelmichal 1732 2008-04-12 15:25 .gvrngrc drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-10-30 21:21 .hrd -rw-r--r-- 1 arbelmichal arbelmichal 23119 2008-02-13 21:23 .hxplayerrc -rw------- 1 arbelmichal arbelmichal 45402 2009-04-17 22:52 .ICEauthority drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-12-07 17:08 .icons drwxr-xr-x 5 arbelmichal arbelmichal 4096 2008-05-26 21:41 .ies4linux drwxr-xr-x 7 arbelmichal arbelmichal 4096 2007-11-26 08:28 ies4linux-2.99.0.1 -rw-r--r-- 1 arbelmichal arbelmichal 332341 2008-02-06 11:49 ies4linux-latest.tar.gz -rw-r--r-- 1 arbelmichal arbelmichal 1992 2008-04-14 19:53 index.htm~ -rw-r--r-- 1 arbelmichal arbelmichal 3036127 2008-02-13 21:35 install_flash_player_9_linux.tar.gz drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-08-05 11:35 .java drwxr-xr-x 3 arbelmichal arbelmichal 4096 2009-04-17 18:37 .k3d drwx------ 4 arbelmichal arbelmichal 4096 2008-08-03 08:38 .kde drwx------ 2 arbelmichal arbelmichal 4096 2008-11-08 15:38 .kino-history -rw-r--r-- 1 arbelmichal arbelmichal 2969 2008-12-21 09:44 .kinorc drwxr-xr-x 3 arbelmichal arbelmichal 4096 2009-04-09 08:47 .klamav drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-05-20 00:10 .ktoon -rw------- 1 root root 44 2008-03-23 22:40 .lesshst drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-10-26 18:05 .lftp -rw-r--r-- 1 arbelmichal arbelmichal 85381 2008-11-03 19:23 .libquicktime_codecs drwxrwxrwx 13 arbelmichal arbelmichal 4096 2009-01-04 20:32 libtool-1.5.26 -rw-r--r-- 1 arbelmichal arbelmichal 2961939 2009-01-04 16:31 libtool-1.5.26.tar.gz -rw-r--r-- 1 arbelmichal arbelmichal 150 2008-06-11 21:55 .lightyears.cfg -rw-r--r-- 1 arbelmichal arbelmichal 1745 2008-05-13 06:00 linux_signing_key.pub -rw-r--r-- 1 arbelmichal arbelmichal 1745 2008-05-13 06:00 linux_signing_key.pub.1 -rw-r--r-- 1 arbelmichal arbelmichal 1210 2008-12-06 17:58 .liquidwarrc drwxr-xr-x 3 arbelmichal arbelmichal 4096 2007-12-13 11:23 .local -rw-r--r-- 1 arbelmichal arbelmichal 471 2008-02-18 16:00 log.txt drwx------ 3 arbelmichal arbelmichal 4096 2008-02-11 23:36 .macromedia drwxr-xr-x 3 arbelmichal arbelmichal 4096 2007-12-13 22:30 .mcop -rw------- 1 arbelmichal arbelmichal 31 2007-12-14 18:13 .mcoprc drwx------ 8 arbelmichal arbelmichal 4096 2008-08-28 12:38 .mednafen drwx------ 3 arbelmichal arbelmichal 4096 2007-12-13 07:45 .metacity -rw-r--r-- 1 arbelmichal arbelmichal 1940 2009-03-22 18:14 Miekfrep.bak -rw-r--r-- 1 arbelmichal arbelmichal 1994 2009-03-22 18:14 Miekfrep.pq drwxr-xr-x 6 arbelmichal arbelmichal 4096 2009-02-20 19:38 .miro drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-10-30 21:13 .monsterz drwx------ 6 arbelmichal arbelmichal 4096 2008-04-27 22:42 .mozilla drwx------ 3 arbelmichal arbelmichal 4096 2008-04-27 22:42 .mozilla-thunderbird drwx------ 2 arbelmichal arbelmichal 4096 2008-03-04 22:28 .mplayer drwxr-xr-x 3 arbelmichal arbelmichal 4096 2009-03-22 18:14 My GCompris drwxr-xr-x 3 arbelmichal arbelmichal 20480 2009-04-17 19:01 .nautilus -rw-r--r-- 1 arbelmichal arbelmichal 49152 2008-02-28 00:56 nautilus-debug-log.txt drwxr-xr-x 5 arbelmichal arbelmichal 4096 2008-01-26 21:21 .navicat drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-02-24 23:04 .neverball drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-06-08 13:21 .nexuiz -rw-r--r-- 1 arbelmichal arbelmichal 29 2008-11-22 12:46 .njamconf -rw------- 1 arbelmichal arbelmichal 3826 2008-07-08 20:28 .octave_hist drwx------ 3 arbelmichal arbelmichal 4096 2008-11-03 19:38 .openme -rw-r--r-- 1 arbelmichal arbelmichal 376 2008-11-03 20:24 .openme.prefs -rw-r--r-- 1 arbelmichal arbelmichal 71 2008-11-03 20:17 .openme.presets drwx------ 3 arbelmichal arbelmichal 4096 2009-04-21 18:25 .openoffice.org2 drwx------ 11 arbelmichal arbelmichal 4096 2008-08-02 10:59 .opera drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-05-05 22:38 orangutan drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-11-19 11:07 .orca drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-10-09 18:26 .parallelrealities drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-05-01 18:54 Photos drwxr-xr-x 7 arbelmichal arbelmichal 12288 2009-03-15 16:36 Pictures drwxr-x--- 10 arbelmichal arbelmichal 4096 2007-12-18 23:53 .pingus drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-08-01 10:16 .pitivi drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-12-04 18:52 .praat-dir -rw-r--r-- 1 arbelmichal arbelmichal 566 2007-12-13 06:25 .profile drwxr-xr-x 2 arbelmichal arbelmichal 4096 2007-12-13 11:23 Public drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-04-25 11:08 .pulse -rw------- 1 arbelmichal arbelmichal 256 2008-01-25 21:48 .pulse-cookie drwx------ 5 arbelmichal arbelmichal 4096 2009-04-21 20:10 .purple drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-11-03 22:16 .pydance drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-04-11 00:26 .qt drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-07-06 19:49 .qtoctave -rw------- 1 arbelmichal arbelmichal 66576 2009-04-21 18:25 .recently-used -rw------- 1 arbelmichal arbelmichal 126051 2009-04-21 19:11 .recently-used.xbel -rw-r--r-- 1 arbelmichal arbelmichal 41678 2008-08-15 22:40 robotarmparts.odg -rwxr-xr-x 1 arbelmichal arbelmichal 109445 2008-04-26 17:23 robotech.gambas drwx------ 2 arbelmichal arbelmichal 4096 2008-06-09 13:20 .rott drwxr-xr-x 8 arbelmichal arbelmichal 4096 2008-04-03 12:19 RPM drwxrwx--- 3 arbelmichal arbelmichal 4096 2008-01-14 11:10 .sane drwx------ 4 arbelmichal arbelmichal 4096 2008-09-16 09:46 .screem drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-12-07 18:56 .screenlets drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-06-10 23:18 .scummvm -rw-r--r-- 1 arbelmichal arbelmichal 76 2008-06-26 20:38 .scummvmrc drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-06-03 20:32 .sdljump drwx------ 8 arbelmichal arbelmichal 4096 2008-02-08 19:12 .secondlife drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-03-23 11:51 .serpentine -rw-r--r-- 1 arbelmichal arbelmichal 2525 2008-02-18 16:00 settings.bin drwx------ 3 arbelmichal arbelmichal 4096 2008-12-07 19:27 .Skype drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-05-31 00:13 smb4k drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-04-27 23:10 smb4k_sync -rw-r--r-- 1 arbelmichal arbelmichal 3693 2008-06-05 21:52 Sport.c~ drwx------ 2 arbelmichal arbelmichal 4096 2008-04-25 08:09 .ssh drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-08-02 10:52 .stopmotion -rw-r--r-- 1 arbelmichal arbelmichal 0 2007-12-13 07:48 .sudo_as_admin_successful drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-04-17 18:37 .synfig drwxr-xr-x 2 arbelmichal arbelmichal 4096 2007-12-13 11:23 Templates -rw-r--r-- 1 arbelmichal arbelmichal 683 2008-04-03 11:44 testpaste~ drwxr-xr-x 2 arbelmichal arbelmichal 4096 2007-12-13 11:31 .themes drwx------ 5 arbelmichal arbelmichal 4096 2008-02-13 21:14 .thumbnails drwxr-xr-x 5 arbelmichal arbelmichal 4096 2008-06-03 12:53 .tomboy -rw-r--r-- 1 arbelmichal arbelmichal 4940 2008-06-03 12:53 .tomboy.log drwxr-xr-x 5 arbelmichal arbelmichal 4096 2008-05-24 11:07 .transmission drwx------ 2 arbelmichal arbelmichal 4096 2008-10-22 19:35 .tsclient -rw-r--r-- 1 arbelmichal arbelmichal 5023 2008-04-07 21:13 untitled.b## drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-05-03 10:52 .update-manager-core drwx------ 2 arbelmichal arbelmichal 4096 2008-04-23 16:11 .update-notifier -rw-r--r-- 1 root root 2262 2008-12-10 17:06 .usb-creator.log drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-01-26 11:25 .vba drwxr-xr-x 8 arbelmichal arbelmichal 4096 2009-03-22 19:19 .vegastrike-0.4.x drwxr-xr-t 8 arbelmichal arbelmichal 4096 2008-01-17 10:27 .vegastrike.4.x drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-08-01 10:09 Video Projects -rw------- 1 arbelmichal arbelmichal 12288 2008-04-28 23:31 .vi.swp drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-12-21 09:39 .vlc drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-10-01 11:11 .vnc drwx------ 2 arbelmichal arbelmichal 4096 2007-12-18 22:16 .w3m drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-04-14 13:43 .wapi drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-06-09 16:55 .warsow drwxr-x--- 7 arbelmichal arbelmichal 4096 2007-12-18 23:51 .wesnoth -rw-r--r-- 1 arbelmichal arbelmichal 0 2008-12-07 17:49 wget-log drwxr-xr-x 4 arbelmichal arbelmichal 4096 2009-04-21 19:40 .wine drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-04-11 00:35 .wordtrans drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-11-03 23:11 workspace drwxr-x--- 2 arbelmichal arbelmichal 4096 2008-10-09 18:33 .wormux drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-03-22 19:17 .wwisup -rw------- 1 arbelmichal arbelmichal 130 2009-04-17 22:52 .Xauthority drwxr-xr-x 2 arbelmichal arbelmichal 4096 2007-12-13 23:31 .xine -rw-r--r-- 1 arbelmichal arbelmichal 181 2008-12-06 20:28 .xscreensaver-getimage.cache -rw-r--r-- 1 arbelmichal arbelmichal 78941 2009-04-21 20:49 .xsession-errors drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-08-31 13:12 .zsnes -rw-r--r-- 1 arbelmichal arbelmichal 107008 2007-12-23 22:32 ????.doc -rw-r--r-- 1 arbelmichal arbelmichal 106496 2008-04-28 21:31 ?????.doc -rw-r--r-- 1 arbelmichal arbelmichal 12045 2009-02-02 13:31 ??? ???.odt -rw-r--r-- 1 arbelmichal arbelmichal 18027 2009-04-15 19:35 ?????? ???????.odt -rw-r--r-- 1 arbelmichal arbelmichal 117248 2009-02-19 07:41 ??? ?????.doc On Tue, 2009-04-21 at 12:54 -0500, M0E Lnx wrote: > Post your output of ls -al / > > On Apr 21, 2... > ------------------------------------------------------------------------------ > Stay on top of ev... From arbelmichal at ...2145... Tue Apr 21 20:31:13 2009 From: arbelmichal at ...2145... (arbelmichal) Date: Tue, 21 Apr 2009 21:31:13 +0300 Subject: [Gambas-user] a problem installing gambas... In-Reply-To: <1f1e8c1b0904211115g5369802hba7676c95b405008@...627...> References: <1240332776.4848.1.camel@...2146...> <1f1e8c1b0904211017u72b0e707if46672676b756fdc@...627...> <1240334911.4848.2.camel@...2146...> <1f1e8c1b0904211054t40412d14r64c025dcd877fff8@...627...> <1240337167.4848.4.camel@...2146...> <1f1e8c1b0904211115g5369802hba7676c95b405008@...627...> Message-ID: <1240338673.4848.5.camel@...2146...> I'm there... On Tue, 2009-04-21 at 13:15 -0500, M0E Lnx wrote: > Try #gambas in irc.freenode.org > > On Apr 21, 2009 1:10 PM, "arbelmichal" wrote: > > ok Thats a lot... > Here gose... > > Do you have an IRC chanel so we can talk without the mail? > > arbelmichal at ...2146...:~$ ls -al > total 8884 > drwxr-xr-x 165 arbelmichal arbelmichal 12288 2009-04-21 19:11 . > drwxr-xr-x 3 root root 4096 2007-12-13 06:25 .. > -rw-r----- 1 arbelmichal arbelmichal 8 2008-06-16 > 10:03 .a7xpg.prf > drwx------ 2 arbelmichal arbelmichal 4096 2008-06-16 16:41 .abe > drwx------ 2 arbelmichal arbelmichal 4096 2009-03-26 > 16:54 .AbiSuite > drwx------ 3 arbelmichal arbelmichal 4096 2008-05-12 > 18:49 .adanaxis > drwx------ 3 arbelmichal arbelmichal 4096 2008-02-11 23:36 .adobe > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-12-09 18:58 .alex4 > drwxr-xr-x 25 arbelmichal arbelmichal 4096 2008-09-16 09:32 .amaya > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-12-09 18:53 .amph > drwxr-xr-x 4 arbelmichal arbelmichal 4096 2009-01-18 16:19 .aMule > drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-05-31 17:10 .anjuta > drwx------ 2 arbelmichal arbelmichal 4096 2009-04-11 > 00:16 .aptitude > -rw-r--r-- 1 arbelmichal arbelmichal 21887 2008-06-11 > 22:21 .atanks-config.txt > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-01-22 23:09 autosave > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-08-01 > 17:22 .avidemux > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-04-09 20:26 babyo > -rw-r--r-- 1 arbelmichal arbelmichal 408 2008-06-08 19:42 .balazar > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-10-30 > 21:16 .balazar_brothers > -rw-r--r-- 1 arbelmichal arbelmichal 2085 2008-08-12 > 22:42 .balder2d.conf > -rw-r--r-- 1 arbelmichal arbelmichal 107520 2008-08-13 22:50 bank.doc > -rw------- 1 arbelmichal arbelmichal 13248 2009-04-19 > 16:20 .bash_history > -rw-r--r-- 1 arbelmichal arbelmichal 220 2007-12-13 > 06:25 .bash_logout > -rw-r--r-- 1 arbelmichal arbelmichal 414 2008-09-15 > 17:08 .bash_profile > -rw-r--r-- 1 arbelmichal arbelmichal 2298 2007-12-13 06:25 .bashrc > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-05-26 21:41 bin > drwxr-xr-x 6 arbelmichal arbelmichal 4096 2009-03-25 20:09 .blender > drwx------ 2 arbelmichal arbelmichal 4096 2009-01-29 > 10:18 .bogofilter > -rw-r--r-- 1 arbelmichal arbelmichal 79215 2008-02-11 23:38 > bookmarks.html > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-06-10 > 20:42 .briquolo > drwx------ 2 arbelmichal arbelmichal 4096 2008-10-09 18:26 .btanks > drwxr-xr-x 4 arbelmichal arbelmichal 4096 2005-04-05 17:25 > ButterFlight-2.2 > drwxr-xr-x 9 arbelmichal arbelmichal 4096 2009-02-03 11:50 .cache > drwxr-xr-x 5 arbelmichal arbelmichal 4096 2009-03-21 > 16:57 .cairo-dock > -rw-r--r-- 1 arbelmichal arbelmichal 169 2008-12-06 > 17:03 .ceferino > -rw-r--r-- 1 arbelmichal arbelmichal 168 2008-12-05 > 18:08 .ceferinomarcas > -rw-r--r-- 1 arbelmichal arbelmichal 240 2008-12-05 > 18:11 .chromium > -rw-r--r-- 1 arbelmichal arbelmichal 3800 2008-12-05 > 18:11 .chromium-score > -rw-r--r-- 1 arbelmichal arbelmichal 7255 2008-10-09 > 10:17 .civclientrc > -rw------- 1 arbelmichal arbelmichal 0 2008-10-09 > 10:17 .civserver_history > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-08-30 10:37 .clive > drwxr-xr-x 5 arbelmichal arbelmichal 4096 2008-05-12 19:08 .comix > drwxr-xr-x 25 arbelmichal arbelmichal 4096 2009-04-14 13:42 .config > -rw-r--r-- 1 arbelmichal arbelmichal 989 2008-10-04 11:43 > content.html~ > drwx------ 2 arbelmichal arbelmichal 4096 2007-12-15 20:51 .cups > drwx------ 3 arbelmichal arbelmichal 4096 2008-11-16 09:57 .dbus > drwx------ 2 arbelmichal arbelmichal 4096 2008-04-12 > 17:17 .dbus-keyrings > -rw-r--r-- 1 arbelmichal arbelmichal 66 2009-04-17 > 22:52 .DCOPserver_arbelmichal-desktop__0 > lrwxrwxrwx 1 arbelmichal arbelmichal 52 2009-04-17 > 22:52 .DCOPserver_arbelmichal-desktop_:0 > -> /home/arbelmichal/.DCOPserver_arbelmichal-desktop__0 > -rw-r--r-- 1 arbelmichal games 56 2008-12-05 18:13 .dd2rc > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-12-21 16:42 .debtags > drwxr-xr-x 6 arbelmichal arbelmichal 4096 2009-04-21 18:25 Desktop > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-08-28 13:11 .dgen > -rw-r--r-- 1 arbelmichal arbelmichal 8455 2008-08-02 10:52 > divx2pass.log > -rw------- 1 arbelmichal arbelmichal 25 2009-04-17 22:52 .dmrc > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-11-16 19:50 eagle > -rw-r--r-- 1 root root 2686 2008-11-16 19:50 .eaglerc > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-04-01 19:50 .eclipse > drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-03-22 02:12 .elisa > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-01-26 20:12 .emma > -rw-r--r-- 1 arbelmichal arbelmichal 471736 2008-07-03 23:03 > empsave.dat > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-02-09 > 18:28 .endeavour2 > -rw------- 1 arbelmichal arbelmichal 16 2007-12-13 > 07:45 .esd_auth > drwxr-xr-x 8 arbelmichal arbelmichal 4096 2009-04-19 > 23:20 .evolution > lrwxrwxrwx 1 arbelmichal arbelmichal 26 2007-12-13 06:25 Examples > -> /usr/share/example-content > -rw-r--r-- 1 arbelmichal arbelmichal 584 2007-12-30 > 23:06 .fbhighlevelshistory > -rw-r--r-- 1 arbelmichal arbelmichal 363 2007-12-30 > 23:06 .fbhighscores > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2007-12-30 > 22:30 .fblevels > -rw-r--r-- 1 arbelmichal arbelmichal 1196 2008-10-17 17:32 .fbrc > -rw-r--r-- 1 arbelmichal arbelmichal 209 2008-10-30 > 00:00 .festival_history > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-11-03 20:24 .fltk > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-04-17 > 16:51 .fontconfig > drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 > 21:48 .fr-3HHAPm > drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 > 21:40 .fr-4DIgFP > drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 > 21:38 .fr-8f8ra8 > drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 > 21:39 .fr-ABtOCx > drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 > 21:38 .fr-cIEyOz > drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 > 21:38 .fr-dejWwy > drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 > 21:38 .fr-dYVv37 > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-10-09 10:00 .freeciv > drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 > 21:39 .fr-EhpZmG > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-11-03 > 23:53 .fretsonfire > drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 > 21:39 .fr-H0vSaz > drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 > 21:39 .fr-kot4VK > drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 > 21:39 .fr-LLpd36 > drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 > 21:39 .fr-lwRTKF > drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 > 21:38 .fr-PWpeJU > drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 > 21:39 .fr-tdplxs > drwx------ 3 arbelmichal arbelmichal 4096 2008-11-09 > 21:38 .fr-ySYG0U > -rw-r--r-- 1 arbelmichal arbelmichal 1168 2008-05-28 > 09:18 .fte-history > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-11-28 > 16:22 .funnyboat > drwx------ 4 arbelmichal arbelmichal 4096 2009-04-09 20:33 .galeon > drwx------ 2 arbelmichal arbelmichal 4096 2007-12-13 23:22 .gambas > drwx------ 2 arbelmichal arbelmichal 4096 2008-02-11 > 23:00 .gcjwebplugin > drwx------ 6 arbelmichal arbelmichal 4096 2009-04-21 07:36 .gconf > drwx------ 2 arbelmichal arbelmichal 4096 2009-04-21 19:54 .gconfd > drwx------ 7 arbelmichal arbelmichal 4096 2008-05-24 > 10:55 .gdesklets > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-10-08 > 14:21 .gearhead > drwx------ 4 arbelmichal arbelmichal 4096 2008-11-23 > 23:12 .gegl-0.0 > -rw-r--r-- 1 arbelmichal arbelmichal 17507 2008-08-13 22:45 > germany.odt > drwx------ 3 arbelmichal arbelmichal 4096 2008-01-16 17:33 .gftp > drwx------ 2 arbelmichal arbelmichal 4096 2008-06-09 10:42 .ggz > drwxr-xr-x 22 arbelmichal arbelmichal 4096 2008-10-27 > 08:51 .gimp-2.4 > drwxr-xr-x 22 arbelmichal arbelmichal 4096 2009-04-19 > 00:09 .gimp-2.6 > -rw-r----- 1 arbelmichal arbelmichal 0 2009-04-18 > 09:35 .gksu.lock > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-08-06 20:58 .glest > drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-12-05 18:14 .gnome > drwx------ 28 arbelmichal arbelmichal 4096 2009-04-17 19:01 .gnome2 > drwx------ 2 arbelmichal arbelmichal 4096 2007-12-13 > 07:45 .gnome2_private > drwx------ 2 arbelmichal arbelmichal 4096 2008-12-05 > 18:14 .gnome_private > drwx------ 2 arbelmichal arbelmichal 4096 2009-01-31 12:56 .gnupg > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-04-28 10:45 .gpilotd > -rw-r--r-- 1 arbelmichal arbelmichal 5 2008-04-28 > 10:45 .gpilotd.pid > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-03-19 > 23:03 .gstreamer-0.10 > -rw-r--r-- 1 arbelmichal arbelmichal 271 2009-04-19 > 21:44 .gtk-bookmarks > -rw-r--r-- 1 arbelmichal arbelmichal 93 2007-12-13 > 07:45 .gtkrc-1.2-gnome2 > -rw-r--r-- 1 arbelmichal arbelmichal 484 2008-05-26 > 16:56 .gtktermrc > dr-x------ 2 arbelmichal arbelmichal 0 2009-04-17 22:52 .gvfs > -rw-r--r-- 1 arbelmichal arbelmichal 1732 2008-04-12 15:25 .gvrngrc > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-10-30 21:21 .hrd > -rw-r--r-- 1 arbelmichal arbelmichal 23119 2008-02-13 > 21:23 .hxplayerrc > -rw------- 1 arbelmichal arbelmichal 45402 2009-04-17 > 22:52 .ICEauthority > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-12-07 17:08 .icons > drwxr-xr-x 5 arbelmichal arbelmichal 4096 2008-05-26 > 21:41 .ies4linux > drwxr-xr-x 7 arbelmichal arbelmichal 4096 2007-11-26 08:28 > ies4linux-2.99.0.1 > -rw-r--r-- 1 arbelmichal arbelmichal 332341 2008-02-06 11:49 > ies4linux-latest.tar.gz > -rw-r--r-- 1 arbelmichal arbelmichal 1992 2008-04-14 19:53 > index.htm~ > -rw-r--r-- 1 arbelmichal arbelmichal 3036127 2008-02-13 21:35 > install_flash_player_9_linux.tar.gz > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-08-05 11:35 .java > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2009-04-17 18:37 .k3d > drwx------ 4 arbelmichal arbelmichal 4096 2008-08-03 08:38 .kde > drwx------ 2 arbelmichal arbelmichal 4096 2008-11-08 > 15:38 .kino-history > -rw-r--r-- 1 arbelmichal arbelmichal 2969 2008-12-21 09:44 .kinorc > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2009-04-09 08:47 .klamav > drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-05-20 00:10 .ktoon > -rw------- 1 root root 44 2008-03-23 22:40 .lesshst > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-10-26 18:05 .lftp > -rw-r--r-- 1 arbelmichal arbelmichal 85381 2008-11-03 > 19:23 .libquicktime_codecs > drwxrwxrwx 13 arbelmichal arbelmichal 4096 2009-01-04 20:32 > libtool-1.5.26 > -rw-r--r-- 1 arbelmichal arbelmichal 2961939 2009-01-04 16:31 > libtool-1.5.26.tar.gz > -rw-r--r-- 1 arbelmichal arbelmichal 150 2008-06-11 > 21:55 .lightyears.cfg > -rw-r--r-- 1 arbelmichal arbelmichal 1745 2008-05-13 06:00 > linux_signing_key.pub > -rw-r--r-- 1 arbelmichal arbelmichal 1745 2008-05-13 06:00 > linux_signing_key.pub.1 > -rw-r--r-- 1 arbelmichal arbelmichal 1210 2008-12-06 > 17:58 .liquidwarrc > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2007-12-13 11:23 .local > -rw-r--r-- 1 arbelmichal arbelmichal 471 2008-02-18 16:00 log.txt > drwx------ 3 arbelmichal arbelmichal 4096 2008-02-11 > 23:36 .macromedia > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2007-12-13 22:30 .mcop > -rw------- 1 arbelmichal arbelmichal 31 2007-12-14 18:13 .mcoprc > drwx------ 8 arbelmichal arbelmichal 4096 2008-08-28 > 12:38 .mednafen > drwx------ 3 arbelmichal arbelmichal 4096 2007-12-13 > 07:45 .metacity > -rw-r--r-- 1 arbelmichal arbelmichal 1940 2009-03-22 18:14 > Miekfrep.bak > -rw-r--r-- 1 arbelmichal arbelmichal 1994 2009-03-22 18:14 > Miekfrep.pq > drwxr-xr-x 6 arbelmichal arbelmichal 4096 2009-02-20 19:38 .miro > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-10-30 > 21:13 .monsterz > drwx------ 6 arbelmichal arbelmichal 4096 2008-04-27 22:42 .mozilla > drwx------ 3 arbelmichal arbelmichal 4096 2008-04-27 > 22:42 .mozilla-thunderbird > drwx------ 2 arbelmichal arbelmichal 4096 2008-03-04 22:28 .mplayer > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2009-03-22 18:14 My > GCompris > drwxr-xr-x 3 arbelmichal arbelmichal 20480 2009-04-17 > 19:01 .nautilus > -rw-r--r-- 1 arbelmichal arbelmichal 49152 2008-02-28 00:56 > nautilus-debug-log.txt > drwxr-xr-x 5 arbelmichal arbelmichal 4096 2008-01-26 21:21 .navicat > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-02-24 > 23:04 .neverball > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-06-08 13:21 .nexuiz > -rw-r--r-- 1 arbelmichal arbelmichal 29 2008-11-22 > 12:46 .njamconf > -rw------- 1 arbelmichal arbelmichal 3826 2008-07-08 > 20:28 .octave_hist > drwx------ 3 arbelmichal arbelmichal 4096 2008-11-03 19:38 .openme > -rw-r--r-- 1 arbelmichal arbelmichal 376 2008-11-03 > 20:24 .openme.prefs > -rw-r--r-- 1 arbelmichal arbelmichal 71 2008-11-03 > 20:17 .openme.presets > drwx------ 3 arbelmichal arbelmichal 4096 2009-04-21 > 18:25 .openoffice.org2 > drwx------ 11 arbelmichal arbelmichal 4096 2008-08-02 10:59 .opera > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-05-05 22:38 > orangutan > drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-11-19 11:07 .orca > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-10-09 > 18:26 .parallelrealities > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-05-01 18:54 Photos > drwxr-xr-x 7 arbelmichal arbelmichal 12288 2009-03-15 16:36 Pictures > drwxr-x--- 10 arbelmichal arbelmichal 4096 2007-12-18 23:53 .pingus > drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-08-01 10:16 .pitivi > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-12-04 > 18:52 .praat-dir > -rw-r--r-- 1 arbelmichal arbelmichal 566 2007-12-13 06:25 .profile > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2007-12-13 11:23 Public > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-04-25 11:08 .pulse > -rw------- 1 arbelmichal arbelmichal 256 2008-01-25 > 21:48 .pulse-cookie > drwx------ 5 arbelmichal arbelmichal 4096 2009-04-21 20:10 .purple > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-11-03 22:16 .pydance > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-04-11 00:26 .qt > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-07-06 > 19:49 .qtoctave > -rw------- 1 arbelmichal arbelmichal 66576 2009-04-21 > 18:25 .recently-used > -rw------- 1 arbelmichal arbelmichal 126051 2009-04-21 > 19:11 .recently-used.xbel > -rw-r--r-- 1 arbelmichal arbelmichal 41678 2008-08-15 22:40 > robotarmparts.odg > -rwxr-xr-x 1 arbelmichal arbelmichal 109445 2008-04-26 17:23 > robotech.gambas > drwx------ 2 arbelmichal arbelmichal 4096 2008-06-09 13:20 .rott > drwxr-xr-x 8 arbelmichal arbelmichal 4096 2008-04-03 12:19 RPM > drwxrwx--- 3 arbelmichal arbelmichal 4096 2008-01-14 11:10 .sane > drwx------ 4 arbelmichal arbelmichal 4096 2008-09-16 09:46 .screem > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-12-07 > 18:56 .screenlets > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-06-10 23:18 .scummvm > -rw-r--r-- 1 arbelmichal arbelmichal 76 2008-06-26 > 20:38 .scummvmrc > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-06-03 20:32 .sdljump > drwx------ 8 arbelmichal arbelmichal 4096 2008-02-08 > 19:12 .secondlife > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-03-23 > 11:51 .serpentine > -rw-r--r-- 1 arbelmichal arbelmichal 2525 2008-02-18 16:00 > settings.bin > drwx------ 3 arbelmichal arbelmichal 4096 2008-12-07 19:27 .Skype > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-05-31 00:13 smb4k > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-04-27 23:10 > smb4k_sync > -rw-r--r-- 1 arbelmichal arbelmichal 3693 2008-06-05 21:52 Sport.c~ > drwx------ 2 arbelmichal arbelmichal 4096 2008-04-25 08:09 .ssh > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-08-02 > 10:52 .stopmotion > -rw-r--r-- 1 arbelmichal arbelmichal 0 2007-12-13 > 07:48 .sudo_as_admin_successful > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-04-17 18:37 .synfig > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2007-12-13 11:23 > Templates > -rw-r--r-- 1 arbelmichal arbelmichal 683 2008-04-03 11:44 > testpaste~ > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2007-12-13 11:31 .themes > drwx------ 5 arbelmichal arbelmichal 4096 2008-02-13 > 21:14 .thumbnails > drwxr-xr-x 5 arbelmichal arbelmichal 4096 2008-06-03 12:53 .tomboy > -rw-r--r-- 1 arbelmichal arbelmichal 4940 2008-06-03 > 12:53 .tomboy.log > drwxr-xr-x 5 arbelmichal arbelmichal 4096 2008-05-24 > 11:07 .transmission > drwx------ 2 arbelmichal arbelmichal 4096 2008-10-22 > 19:35 .tsclient > -rw-r--r-- 1 arbelmichal arbelmichal 5023 2008-04-07 21:13 > untitled.b## > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-05-03 > 10:52 .update-manager-core > drwx------ 2 arbelmichal arbelmichal 4096 2008-04-23 > 16:11 .update-notifier > -rw-r--r-- 1 root root 2262 2008-12-10 > 17:06 .usb-creator.log > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-01-26 11:25 .vba > drwxr-xr-x 8 arbelmichal arbelmichal 4096 2009-03-22 > 19:19 .vegastrike-0.4.x > drwxr-xr-t 8 arbelmichal arbelmichal 4096 2008-01-17 > 10:27 .vegastrike.4.x > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-08-01 10:09 Video > Projects > -rw------- 1 arbelmichal arbelmichal 12288 2008-04-28 23:31 .vi.swp > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-12-21 09:39 .vlc > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-10-01 11:11 .vnc > drwx------ 2 arbelmichal arbelmichal 4096 2007-12-18 22:16 .w3m > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-04-14 13:43 .wapi > drwxr-xr-x 3 arbelmichal arbelmichal 4096 2008-06-09 16:55 .warsow > drwxr-x--- 7 arbelmichal arbelmichal 4096 2007-12-18 23:51 .wesnoth > -rw-r--r-- 1 arbelmichal arbelmichal 0 2008-12-07 17:49 wget-log > drwxr-xr-x 4 arbelmichal arbelmichal 4096 2009-04-21 19:40 .wine > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-04-11 > 00:35 .wordtrans > drwxr-xr-x 4 arbelmichal arbelmichal 4096 2008-11-03 23:11 > workspace > drwxr-x--- 2 arbelmichal arbelmichal 4096 2008-10-09 18:33 .wormux > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2009-03-22 19:17 .wwisup > -rw------- 1 arbelmichal arbelmichal 130 2009-04-17 > 22:52 .Xauthority > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2007-12-13 23:31 .xine > -rw-r--r-- 1 arbelmichal arbelmichal 181 2008-12-06 > 20:28 .xscreensaver-getimage.cache > -rw-r--r-- 1 arbelmichal arbelmichal 78941 2009-04-21 > 20:49 .xsession-errors > drwxr-xr-x 2 arbelmichal arbelmichal 4096 2008-08-31 13:12 .zsnes > -rw-r--r-- 1 arbelmichal arbelmichal 107008 2007-12-23 22:32 ????.doc > -rw-r--r-- 1 arbelmichal arbelmichal 106496 2008-04-28 21:31 -rw-r--r-- 1 arbelmichal arbelmichal 12045 2009-02-02 13:31 ??? -rw-r--r-- 1 arbelmichal arbelmichal 18027 2009-04-15 19:35 ?????? -rw-r--r-- 1 arbelmichal arbelmichal 117248 2009-02-19 07:41 ??? > On Tue, 2009-04-21 at 12:54 -0500, M0E Lnx wrote: > Post your output of ls > -al / > > On Apr 21, 2... > > > > ------------------------------------------------------------------------------ > > Stay on top of ev... > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From jguardon at ...2035... Tue Apr 21 21:41:32 2009 From: jguardon at ...2035... (Jesus Guardon) Date: Tue, 21 Apr 2009 21:41:32 +0200 Subject: [Gambas-user] Error on Jaunty In-Reply-To: <23160137.post@...1379...> References: <23132993.post@...1379...> <23142015.post@...1379...> <23157818.post@...1379...> <200904211804.27232.gambas@...1...> <23160072.post@...1379...> <23160137.post@...1379...> Message-ID: <49EE216C.6090306@...2035...> I agree with CelticBoy I've installed a working deb of my own application on Jaunty, that is running fine on Ubuntu 8.10 Gnome (and 8.04 with some tweaking), and also on latest version of openSuse KDE. Now, it crashes with signal 11. Initially it was developed on Gambas 2.9 compiled manually on my 8.10 Intrepid, but I've installed Gambas 2.8 from the Jaunty repositories, loaded my project and still crashes. It uses gambas2-gb-qt, and if I change to use gb-gui, now loads, but I get some other errors, of course, when it didn't find the proper classes. So my two cents are that this issue has something to do with the new Gnome desktop version and new libraries in this upcoming Ubuntu 9.04. Why the hell this distribution is upgrading so often? In the other hand, trying to install 2.12 .deb package of Gambas2 gives dependency errors, as Celtic said. It looks for libpoppler3, and libpoppler4 comes with Jaunty, instead. Benoit, if you need my project files I can give you a link to checkout my svn tree. Thanks Jes?s CelticBhoy escribi?: > > > CelticBhoy wrote: >> I am currently using 2.8 from the Ubuntu repo's, the project files are all >> uploaded above. >> I tried to install a .deb of 2.12 but got a dependancy error for a lib >> file - sorry cant remember the name. >> >> > > > > Just checked again, and this is the error :- > > Error: Dependency is not satisfiable: libpoppler3 > > > From andreas at ...2139... Wed Apr 22 01:24:56 2009 From: andreas at ...2139... (Andreas =?ISO-8859-1?Q?M=FCller?=) Date: Wed, 22 Apr 2009 01:24:56 +0200 Subject: [Gambas-user] Gambas-user Digest, Vol 35, Issue 48 In-Reply-To: References: Message-ID: <1240356296.15218.32.camel@...2140...> Hello JB Skaggs, thank you for the help, but I think it is more pragmatic to uncomment the sound effects and remove the gb.sdl.sound component from the distribution files. Anybody interested in sound effects can uncomment a few lines in the display module and activate the component within his ide. Btw. if someone wants to have an emulation of the "first PC" aka HP9100A one can find that on my homepage under software. http://www.poipoi.de/software Comments are welcome! But don't punish me for the code - I know it's a terrible mixture somewhere between object and spagetti code ;-> but I have started with Gambas and the project this month. best regards Andreas Mueller Am Dienstag, den 21.04.2009, 14:30 +0000 schrieb > It is a mistake in the ubuntu / debian package I had the same problem and > manually installed and configured Gambas2 thru the ./configure etc method. From gambas at ...1... Wed Apr 22 10:57:58 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Wed, 22 Apr 2009 10:57:58 +0200 Subject: [Gambas-user] atanh - wrong calculation In-Reply-To: <1239912471.7042.27.camel@...2140...> References: <1239912471.7042.27.camel@...2140...> Message-ID: <200904221057.58733.gambas@...1...> > Hello all, > > first I want to thank Benoit for his wonderfull Gambas system - never > was programming easier than with this IDE! > > Now my little problem. I calculated the atanh(0.5) and got: > > ?(Atnh(0.5)) > 3,162277660168 > > but this is wrong. The definition of atanh() should be: > > atanh(x) = 0.5 * ln ((1+x)/(1-x)) > > which gives: > > ?(0.5*LOG((1+0.5)/(1-0.5))) > 0,549306144334 > > and should be the correct value. > > Those problems may have its origin in a wrong ALU unit or a wrong > implementation. > > Can anybody confirm this or do I have a local problem? > > system specs: > > Pentium 4 > Linux tax 2.6.27-11-generic #1 SMP Wed Apr 1 20:57:48 UTC 2009 i686 > GNU/Linux > Ubuntu 8.10 (intrepid) > Gambas2 version 2.7 > > best regards and many thanks for your answers! > > Andreas Mueller > Bug fixed in revision 1930 & 1931! Thanks for the report. -- Beno?t From jbskaggs at ...1871... Wed Apr 22 11:17:45 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Wed, 22 Apr 2009 02:17:45 -0700 (PDT) Subject: [Gambas-user] What are the linux distros I should have to test my Gambas code on? Message-ID: <23172622.post@...1379...> Currently I have Wolvix and Ubuntu (which I guess represent slackware and debian) is there another major flavor that is really different from those two that I should have to test my code on? I have noticed there are major differences in how slackware and ubuntu each handle graphics especially SDL which I still can't find an answer for. SO I would like to ensure I test my code on the three major kinds of linux. Any suggestions? JB Skaggs -- View this message in context: http://www.nabble.com/What-are-the-linux-distros-I-should-have-to-test-my-Gambas-code-on--tp23172622p23172622.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas at ...1... Wed Apr 22 11:19:22 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Wed, 22 Apr 2009 11:19:22 +0200 Subject: [Gambas-user] HTML in Text Label In-Reply-To: <799be1690903100857p53b21be6rafec024ce6500d98@...627...> References: <799be1690903100857p53b21be6rafec024ce6500d98@...627...> Message-ID: <200904221119.22956.gambas@...1...> > I'm trying to insert some basic HTML into a text label and from the docs, > "
" should work, but it displays the text
align=center>. Meanwhile , , etc. seems to work well. Also, > TextLabel1.alignment = 3 has the result I want. Am I missing something? > > Jason I think you must write '
'. Without the quotes it may not work. Regards, -- Beno?t From gambas at ...1... Wed Apr 22 11:32:05 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Wed, 22 Apr 2009 11:32:05 +0200 Subject: [Gambas-user] Pointer[] error in Ubuntu 8.04 In-Reply-To: <49B54763.9040904@...2035...> References: <49B27190.2060203@...2035...> <200903091612.26379.gambas@...1...> <49B54763.9040904@...2035...> Message-ID: <200904221132.05106.gambas@...1...> > Sorry if I was unclear. > > I have released an Ubuntu package of my own application in my > development machine running Ubuntu 8.10 and Gambas 2.9. No problems at > all, so far on this configuration. > > Later, I've installed such .deb package into a *clean* Ubuntu 8.04, > which complains about pointer[] class. All dependencies are satisfied > correctly, but when I call this method, my program crashes with the > explained message. Note this PC has not Gambas2 IDE installed nor any > component, previously to install my own package. > Also this behavior is the same with all users who has 8.04 (3 different > users at least has reported to me this error). > Hope this clarify my question (sorry for my messy English, lol) > > Thanks > > > Jes?s > > Beno?t Minisini escribi?: > >> Hi all > >> > >> Since I'm testing my application in several distributions, I've noticed > >> a bug? with pointer class in Ubuntu 8.04 only. > >> > >> This is related to embedder, so it's better to show my code based on the > >> example provided by Gambas. Note that the example doesn't work, too. > >> > >> PUBLIC SUB Form_Open() > >> > >> DIM sTitle AS String > >> DIM aHandle AS NEW Pointer[] > >> DIM iHandle AS Integer > >> > >> sTitle = "DX Map" 'this is a xplanet window > >> ME.Title = sTitle > >> WHILE aHandle.Count < 1 > >> > >> aHandle = Desktop.find(Trim(sTitle)) > >> > >> WAIT 0.1 > >> WEND > >> iHandle = aHandle[0] > >> TRY Embedder1.Embed(iHandle) > >> FMain.Controls["btnMap"].Enabled = FALSE > >> > >> loadSettings() > >> > >> END > >> > >> The error shown is: > >> > >> [2] Cannot load class 'Pointer[]': > >> Unable to load class file. > >> FMap.?.0 > >> > >> I've attached a capture of it. > >> Using Gambas 2.9, and deployed Ubuntu .deb package. > >> > >> Any hints? > >> > >> Best regards > >> > >> Jes?s > > > > You are not very clear: on which system do you get the error. Which > > version of Gambas is installed on this system? > Pointer[] was introduced in Gambas 2.1 with the 64 bits port. So I think the target system has a too old Gambas version. Regards, -- Beno?t From juergen.linder at ...17... Wed Apr 22 13:11:56 2009 From: juergen.linder at ...17... (juelin) Date: Wed, 22 Apr 2009 04:11:56 -0700 (PDT) Subject: [Gambas-user] get color from drawingarea point Message-ID: <23174196.post@...1379...> hi, I need to get the color of point into drawingaera. I use "c = DrawingArea1.Grab().Image[x, y]" This works well, but for a Area of 512 x 512 points it needs more than 10 minutes How can I accelerate this function? kind regards J?rgen -- View this message in context: http://www.nabble.com/get-color-from-drawingarea-point-tp23174196p23174196.html Sent from the gambas-user mailing list archive at Nabble.com. From sfatimah99 at ...43... Wed Apr 22 13:11:59 2009 From: sfatimah99 at ...43... (Siti Fatimah) Date: Wed, 22 Apr 2009 18:11:59 +0700 (ICT) Subject: [Gambas-user] How prevent application from opening twice Message-ID: <225981.68296.qm@...2147...> Hi all, I need to prevent my program from opening twice. Is there a? best method to determine whether a program has already run ? Thanks. sfatimah Berselancar lebih cepat. Internet Explorer 8 yang dioptimalkan untuk Yahoo! otomatis membuka 2 halaman favorit Anda setiap kali Anda membuka browser. Dapatkan IE8 di sini! http://downloads.yahoo.com/id/internetexplorer From juergen.linder at ...17... Wed Apr 22 13:17:07 2009 From: juergen.linder at ...17... (juelin) Date: Wed, 22 Apr 2009 04:17:07 -0700 (PDT) Subject: [Gambas-user] change cursor design Message-ID: <23174254.post@...1379...> hello, how can I chnage the cursor-design when the cursor go into a drawingarea? please example kind regards J?rgen -- View this message in context: http://www.nabble.com/change-cursor-design-tp23174254p23174254.html Sent from the gambas-user mailing list archive at Nabble.com. From rospolosco at ...152... Wed Apr 22 13:19:54 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Wed, 22 Apr 2009 13:19:54 +0200 Subject: [Gambas-user] How prevent application from opening twice In-Reply-To: <225981.68296.qm@...2147...> References: <225981.68296.qm@...2147...> Message-ID: <200904221319.55145.rospolosco@...152...> Il mercoled? 22 aprile 2009 13:11:59 Siti Fatimah ha scritto: > Hi all, > I need to prevent my program from opening twice. Is there a? best method to > determine whether a program has already run ? > > Thanks. > sfatimah > I use this: DIM sShellOutput as String SHELL "pgrep -f -U " & User.Name & " " & Application.Args[0] TO sShellOutput IF Split(Trim$(sShellOutput), "\n").Count > 1 THEN 'already running 'take action here ENDIF This check for the user. If you want to check system wide, do: SHELL "pgrep -f " & Application.Args[0] TO sShellOutput Bye, Stefano > > > Berselancar lebih cepat. Internet Explorer 8 yang dioptimalkan untuk > Yahoo! otomatis membuka 2 halaman favorit Anda setiap kali Anda membuka > browser. Dapatkan IE8 di sini! > http://downloads.yahoo.com/id/internetexplorer > --------------------------------------------------------------------------- >--- Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From sfatimah99 at ...43... Wed Apr 22 13:47:05 2009 From: sfatimah99 at ...43... (Siti Fatimah) Date: Wed, 22 Apr 2009 19:47:05 +0800 (SGT) Subject: [Gambas-user] How prevent application from opening twice Message-ID: <521514.45567.qm@...2148...> Thank's Stefano ..for ur quick response. It really worked.... ? Best Regards, sfatimah --- Pada Rab, 22/4/09, Stefano Palmeri menulis: Dari: Stefano Palmeri Topik: Re: [Gambas-user] How prevent application from opening twice Kepada: "mailing list for gambas users" Tanggal: Rabu, 22 April, 2009, 4:19 AM Il mercoled? 22 aprile 2009 13:11:59 Siti Fatimah ha scritto: > Hi all, > I need to prevent my program from opening twice. Is there a? best method to > determine whether a program has already run ? > > Thanks. > sfatimah > I use this: DIM sShellOutput as String SHELL "pgrep -f -U " & User.Name & " " & Application.Args[0] TO sShellOutput ? ???IF Split(Trim$(sShellOutput), "\n").Count > 1 THEN ? ??? ? ???'already running ? ???'take action here ??? ???ENDIF? This check for the user. If you want to check system wide, do: SHELL "pgrep -f " & Application.Args[0] TO sShellOutput Bye, Stefano > > >? ? ???Berselancar lebih cepat. Internet Explorer 8 yang dioptimalkan untuk > Yahoo! otomatis membuka 2 halaman favorit Anda setiap kali Anda membuka > browser. Dapatkan IE8 di sini! > http://downloads.yahoo.com/id/internetexplorer > --------------------------------------------------------------------------- >--- Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Berselancar lebih cepat. Internet Explorer 8 yang dioptimalkan untuk Yahoo! otomatis membuka 2 halaman favorit Anda setiap kali Anda membuka browser. Dapatkan IE8 di sini! http://downloads.yahoo.com/id/internetexplorer From jussi.lahtinen at ...626... Wed Apr 22 15:48:30 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 22 Apr 2009 16:48:30 +0300 Subject: [Gambas-user] get color from drawingarea point In-Reply-To: <23174196.post@...1379...> References: <23174196.post@...1379...> Message-ID: <384d3900904220648l2fb1d7d3n2c59a6e759f19e2c@...627...> tmpImage = DrawingArea1.Grab().Image c = tmpImage[x, y] Jussi On Wed, Apr 22, 2009 at 14:11, juelin wrote: > > hi, > I need to get the color of point into drawingaera. > I use "c = DrawingArea1.Grab().Image[x, y]" > This works well, but for a Area of 512 x 512 points it needs more than 10 > minutes > How can I accelerate this function? > > kind regards > J?rgen > -- > View this message in context: http://www.nabble.com/get-color-from-drawingarea-point-tp23174196p23174196.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From rospolosco at ...152... Wed Apr 22 15:43:38 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Wed, 22 Apr 2009 15:43:38 +0200 Subject: [Gambas-user] change cursor design In-Reply-To: <23174254.post@...1379...> References: <23174254.post@...1379...> Message-ID: <200904221543.38576.rospolosco@...152...> Il mercoled? 22 aprile 2009 13:17:07 juelin ha scritto: > hello, > how can I chnage the cursor-design when the cursor go into a drawingarea? > please example > > kind regards > J?rgen PUBLIC SUB DrawingArea1_Enter() ME.Mouse = Mouse.Pointing END PUBLIC SUB DrawingArea1_Leave() ME.Mouse = Mouse.Default END From jguardon at ...2035... Wed Apr 22 16:14:55 2009 From: jguardon at ...2035... (Jesus Guardon) Date: Wed, 22 Apr 2009 16:14:55 +0200 Subject: [Gambas-user] Pointer[] error in Ubuntu 8.04 In-Reply-To: <200904221132.05106.gambas@...1...> References: <49B27190.2060203@...2035...> <200903091612.26379.gambas@...1...> <49B54763.9040904@...2035...> <200904221132.05106.gambas@...1...> Message-ID: <49EF265F.9090005@...2035...> Yes, that is. Gambas 8.04 Repositories have Gambas2 2.0.0. Trying to install new versions of gambas components gives dependency errors of some libs, so my solution was to distribute my executable and shared libraries of gambas into a package which installs from shell script, putting every file in their correct place. At least, it works! ;-) Thanks Jes?s Beno?t Minisini escribi?: > Pointer[] was introduced in Gambas 2.1 with the 64 bits port. So I think the > target system has a too old Gambas version. > > Regards, > From jussi.lahtinen at ...626... Wed Apr 22 17:57:24 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 22 Apr 2009 18:57:24 +0300 Subject: [Gambas-user] How prevent application from opening twice In-Reply-To: <521514.45567.qm@...2148...> References: <521514.45567.qm@...2148...> Message-ID: <384d3900904220857h2e2e424eh9f8055f0a27f834d@...627...> Hi! I have looking for code to do that also... but your code doesn't work with me. It always finds two instances of my program; 1. the program it self 2. sh -c pgrep -f -l ProgramName (option -l is just for debugging, it doesn't matter) This happens with Gambas 2.10 at Ubuntu 8.10 64bit. This did NOT fix the problem: SHELL "pgrep -f -l " & Application.Args[0] WAIT TO sShellOutput But this works: Exec ["pgrep", "-f", "-l", Application.Args[0]] To sShellOutput And just for case: Exec ["pgrep", "-f", "-l", Application.Args[0]] Wait To sShellOutput So, just to warn, and thanks for idea! Jussi On Wed, Apr 22, 2009 at 14:47, Siti Fatimah wrote: > Thank's Stefano ..for ur quick response. It really worked.... > > Best Regards, > sfatimah > > --- Pada Rab, 22/4/09, Stefano Palmeri menulis: > > > Dari: Stefano Palmeri > Topik: Re: [Gambas-user] How prevent application from opening twice > Kepada: "mailing list for gambas users" > Tanggal: Rabu, 22 April, 2009, 4:19 AM > > > Il mercoled? 22 aprile 2009 13:11:59 Siti Fatimah ha scritto: >> Hi all, >> I need to prevent my program from opening twice. Is there a? best method to >> determine whether a program has already run ? >> >> Thanks. >> sfatimah >> > > I use this: > > DIM sShellOutput as String > SHELL "pgrep -f -U " & User.Name & " " & Application.Args[0] TO sShellOutput > > ???IF Split(Trim$(sShellOutput), "\n").Count > 1 THEN > > ? ???'already running > ? ???'take action here > > ???ENDIF > > This check for the user. If you want to check system > wide, do: > > SHELL "pgrep -f " & Application.Args[0] TO sShellOutput > > Bye, > > Stefano > > >> >> >>? ? ???Berselancar lebih cepat. Internet Explorer 8 yang dioptimalkan untuk >> Yahoo! otomatis membuka 2 halaman favorit Anda setiap kali Anda membuka >> browser. Dapatkan IE8 di sini! >> http://downloads.yahoo.com/id/internetexplorer >> --------------------------------------------------------------------------- >>--- Stay on top of everything new and different, both inside and >> around Java (TM) technology - register by April 22, and save >> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. >> 300 plus technical and hands-on sessions. Register today. >> Use priority code J9JMT32. http://p.sf.net/sfu/p >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ? ? ?Berselancar lebih cepat. Internet Explorer 8 yang dioptimalkan untuk Yahoo! otomatis membuka 2 halaman favorit Anda setiap kali Anda membuka browser. Dapatkan IE8 di sini! > http://downloads.yahoo.com/id/internetexplorer > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From theatre at ...2012... Wed Apr 22 18:07:08 2009 From: theatre at ...2012... (Frank Cox) Date: Wed, 22 Apr 2009 10:07:08 -0600 Subject: [Gambas-user] What are the linux distros I should have to test my Gambas code on? In-Reply-To: <23172622.post@...1379...> References: <23172622.post@...1379...> Message-ID: <20090422100708.40bd5c05.theatre@...2012...> On Wed, 22 Apr 2009 02:17:45 -0700 (PDT) jbskaggs wrote: > Currently I have Wolvix and Ubuntu (which I guess represent slackware and > debian) is there another major flavor that is really different from those > two that I should have to test my code on? I have noticed there are major > differences in how slackware and ubuntu each handle graphics especially SDL > which I still can't find an answer for. SO I would like to ensure I test my > code on the three major kinds of linux. Fedora (plus RHEL and Centos) are major distributions. -- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com From rospolosco at ...152... Wed Apr 22 19:25:21 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Wed, 22 Apr 2009 19:25:21 +0200 Subject: [Gambas-user] How prevent application from opening twice In-Reply-To: <384d3900904220857h2e2e424eh9f8055f0a27f834d@...627...> References: <521514.45567.qm@...2148...> <384d3900904220857h2e2e424eh9f8055f0a27f834d@...627...> Message-ID: <200904221925.21544.rospolosco@...152...> Il mercoled? 22 aprile 2009 17:57:24 Jussi Lahtinen ha scritto: > Hi! > > I have looking for code to do that also... but your code doesn't work with > me. It always finds two instances of my program; > 1. the program it self > 2. sh -c pgrep -f -l ProgramName (option -l is just for debugging, it > doesn't matter) > > This happens with Gambas 2.10 at Ubuntu 8.10 64bit. > > This did NOT fix the problem: > SHELL "pgrep -f -l " & Application.Args[0] WAIT TO sShellOutput > > But this works: > Exec ["pgrep", "-f", "-l", Application.Args[0]] To sShellOutput > > And just for case: > Exec ["pgrep", "-f", "-l", Application.Args[0]] Wait To sShellOutput > > So, just to warn, and thanks for idea! > > > Jussi > Oh, well. Thanks for warning. Maybe your machine is faster than mine and pgrep is able to catch sh -c pgrep. Yes, using EXEC is better. Stefano > On Wed, Apr 22, 2009 at 14:47, Siti Fatimah wrote: > > Thank's Stefano ..for ur quick response. It really worked.... > > > > Best Regards, > > sfatimah > > > > --- Pada Rab, 22/4/09, Stefano Palmeri menulis: > > > > > > Dari: Stefano Palmeri > > Topik: Re: [Gambas-user] How prevent application from opening twice > > Kepada: "mailing list for gambas users" > > Tanggal: Rabu, 22 April, 2009, 4:19 > > AM > > > > Il mercoled? 22 aprile 2009 13:11:59 Siti Fatimah ha scritto: > >> Hi all, > >> I need to prevent my program from opening twice. Is there a? best method > >> to determine whether a program has already run ? > >> > >> Thanks. > >> sfatimah > > > > I use this: > > > > DIM sShellOutput as String > > SHELL "pgrep -f -U " & User.Name & " " & Application.Args[0] TO > > sShellOutput > > > > ???IF Split(Trim$(sShellOutput), "\n").Count > 1 THEN > > > > ? ???'already running > > ? ???'take action here > > > > ???ENDIF > > > > This check for the user. If you want to check system > > wide, do: > > > > SHELL "pgrep -f " & Application.Args[0] TO sShellOutput > > > > Bye, > > > > Stefano > > > >>? ? ???Berselancar lebih cepat. Internet Explorer 8 yang dioptimalkan > >> untuk Yahoo! otomatis membuka 2 halaman favorit Anda setiap kali Anda > >> membuka browser. Dapatkan IE8 di sini! > >> http://downloads.yahoo.com/id/internetexplorer > >> ------------------------------------------------------------------------ > >>--- --- Stay on top of everything new and different, both inside and > >> around Java (TM) technology - register by April 22, and save > >> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > >> 300 plus technical and hands-on sessions. Register today. > >> Use priority code J9JMT32. http://p.sf.net/sfu/p > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------- > >----- Stay on top of everything new and different, both inside and > > around Java (TM) technology - register by April 22, and save > > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > > 300 plus technical and hands-on sessions. Register today. > > Use priority code J9JMT32. http://p.sf.net/sfu/p > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > ? ? ?Berselancar lebih cepat. Internet Explorer 8 yang dioptimalkan untuk > > Yahoo! otomatis membuka 2 halaman favorit Anda setiap kali Anda membuka > > browser. Dapatkan IE8 di sini! > > http://downloads.yahoo.com/id/internetexplorer > > ------------------------------------------------------------------------- > >----- Stay on top of everything new and different, both inside and > > around Java (TM) technology - register by April 22, and save > > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > > 300 plus technical and hands-on sessions. Register today. > > Use priority code J9JMT32. http://p.sf.net/sfu/p > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > --------------------------------------------------------------------------- >--- Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From wspinto at ...1405... Wed Apr 22 19:26:21 2009 From: wspinto at ...1405... (Wellington de Souza Pinto) Date: Wed, 22 Apr 2009 14:26:21 -0300 Subject: [Gambas-user] How use Drag n Drop in FileChooser???? Message-ID: <1240421181.49ef533dda637@...1406...> Hi everyone!!!! Please! Any idea about the use Drag n Drop in FileChooser???? I need drag file from another window or external program. Any solutions, please.... Reguards, Souza, Wellington PS: My english is not very well. ___________________________________________________________________________________ Para fazer uma liga??o DDD pra perto ou pra longe, faz um 21. A Embratel tem tarifas muito baratas esperando por voc?. Aproveite! From gambas at ...1... Wed Apr 22 20:48:34 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Wed, 22 Apr 2009 20:48:34 +0200 Subject: [Gambas-user] get color from drawingarea point In-Reply-To: <23174196.post@...1379...> References: <23174196.post@...1379...> Message-ID: <200904222048.34872.gambas@...1...> > hi, > I need to get the color of point into drawingaera. > I use "c = DrawingArea1.Grab().Image[x, y]" > This works well, but for a Area of 512 x 512 points it needs more than 10 > minutes > How can I accelerate this function? > > kind regards > J?rgen On X-Window, you don't have access to the pixel data of the buffer used by a DrawingArea, so it will always be slow. To be fast, you must have an Image buffer and keep it in sync with the DrawingArea internal buffer. Not easy... Regards, -- Beno?t From gambas at ...1... Wed Apr 22 20:51:27 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Wed, 22 Apr 2009 20:51:27 +0200 Subject: [Gambas-user] Gambas Server Pages & mysql In-Reply-To: <82bffccf0904142033t2b0337d6ya589a8a96055f320@...627...> References: <82bffccf0904142033t2b0337d6ya589a8a96055f320@...627...> Message-ID: <200904222051.27908.gambas@...1...> > Hey guys, > > With the example below Gambas Server Pages were introduced. > > My question is: > 1) how would I achieve a connection to a mysql database or any database for > that matter? > 2) where in the code below would I put the necessary statements? > 3) if no direct reference to any database objects can be made is the > alternative, by lets say, using an external gambas module or some other > trick? > > --8<----------------------------------------------------------------------- >--------------------------------------------------------------- > > #!/usr/bin/env gbw2 > <% > DIM sEnv AS String > %> > > > > > >

CGI script environmental variables

> > > > > > > > > <% FOR EACH sEnv IN Application.Env %> > > > > > <% NEXT %> > >
NameValue
<%= sEnv %><%= Application.Env[sEnv] %>
> > > --8<----------------------------------------------------------------------- >--------------------------------------------------------------- > > Thanks in advance > > Regards > Dimitris You must add: <% USE "gb.db" %> at the beginning of the page, and then you can access any database. Regards, -- Beno?t From arbelmichal at ...2145... Wed Apr 22 21:56:41 2009 From: arbelmichal at ...2145... (arbelmichal) Date: Wed, 22 Apr 2009 22:56:41 +0300 Subject: [Gambas-user] [Fwd: My gambas stoped working...] Message-ID: <1240430201.25469.0.camel@...2146...> -------------- next part -------------- An embedded message was scrubbed... From: arbelmichal Subject: My gambas stoped working... Date: Sun, 19 Apr 2009 23:20:35 +0300 Size: 547 URL: From jussi.lahtinen at ...626... Wed Apr 22 22:14:10 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 22 Apr 2009 23:14:10 +0300 Subject: [Gambas-user] get color from drawingarea point In-Reply-To: <200904222048.34872.gambas@...1...> References: <23174196.post@...1379...> <200904222048.34872.gambas@...1...> Message-ID: <384d3900904221314t502dcfa6ye7976021eb3d5aa1@...627...> To be more clear... this to outside of loop: tmpImage = DrawingArea1.Grab().Image this to inside of loop: c = tmpImage[x, y] But like Benoit said, it's not necessary in sync with DrawingArea internal buffer... depends on situation. I have used that kind of code with pictures, to gain more speed; tmpImage = SomePicture.Image Jussi 2009/4/22 Beno?t Minisini : >> hi, >> I need to get the color of point into drawingaera. >> I use "c = DrawingArea1.Grab().Image[x, y]" >> This works well, but for a Area of 512 x 512 points it needs more than 10 >> minutes >> How can I accelerate this function? >> >> kind regards >> J?rgen > > On X-Window, you don't have access to the pixel data of the buffer used by a > DrawingArea, so it will always be slow. > > To be fast, you must have an Image buffer and keep it in sync with the > DrawingArea internal buffer. Not easy... > > Regards, > > -- > Beno?t > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From Karl.Reinl at ...9... Wed Apr 22 22:36:45 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Wed, 22 Apr 2009 22:36:45 +0200 Subject: [Gambas-user] Gambas-user Digest, Vol 35, Issue 48 In-Reply-To: <1240356296.15218.32.camel@...2140...> References: <1240356296.15218.32.camel@...2140...> Message-ID: <1240432605.6375.11.camel@...40...> Am Mittwoch, den 22.04.2009, 01:24 +0200 schrieb Andreas M?ller: 8<--------------------------------------------------------------------------- > Btw. if someone wants to have an emulation of the "first PC" aka HP9100A > one can find that on my homepage under software. http://www.poipoi.de/software > Comments are welcome! But don't punish me for the code - I know it's a > terrible mixture somewhere between object and spagetti code ;-> but I have > started with Gambas and the project this month. > 8<--------------------------------------------------------------------------- Salut, just know, Spagetti Code is just bad for those who can't read this code, never for the functionality of that code. I find your project just wonderful. (I do not know if it is a real emulation of an HP9100A and even not, if all works OK ) I'm impressed by the way the mechanics of the 'computer' is realized. Good job. -- Amicalment Charlie From rterry at ...1946... Thu Apr 23 00:28:30 2009 From: rterry at ...1946... (richard terry) Date: Thu, 23 Apr 2009 08:28:30 +1000 Subject: [Gambas-user] build failing 1931 Message-ID: <200904230828.31115.rterry@...1946...> The last few builds from 1929 on seem to be failing on my machine here: Is this just my problem? Compiling the gb.db.mysql project... gb.db.mysql gbc: project file not found: /home/richard/gambas3-svn/src/trunk/gb.db.mysql/src/gb.db.mysql/.project gba: ERROR: Cannot set file owner: /home/richard/gambas3-svn/src/trunk/gb.db.mysql/src/gb.db.mysql/gb.db.mysql.gambas: No such file or directory /bin/install: cannot stat `gb.db.mysql.gambas': No such file or directory make[4]: *** [install-data-hook] Error 1 make[4]: Leaving directory `/home/richard/gambas3-svn/src/trunk/gb.db.mysql/src' make[3]: *** [install-data-am] Error 2 make[3]: Leaving directory `/home/richard/gambas3-svn/src/trunk/gb.db.mysql/src' make[2]: *** [install-am] Error 2 make[2]: Leaving directory `/home/richard/gambas3-svn/src/trunk/gb.db.mysql/src' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory `/home/richard/gambas3-svn/src/trunk/gb.db.mysql' make: *** [install-recursive] Error 1 ==> ERROR: Build Failed. Aborting... From m0e.lnx at ...626... Thu Apr 23 01:27:25 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Wed, 22 Apr 2009 18:27:25 -0500 Subject: [Gambas-user] build failing 1931 In-Reply-To: <200904230828.31115.rterry@...1946...> References: <200904230828.31115.rterry@...1946...> Message-ID: <1f1e8c1b0904221627w7a3cf622h3c59dbab1a3d77f7@...627...> Do you have mysql installed? On Apr 22, 2009 5:32 PM, "richard terry" wrote: The last few builds from 1929 on seem to be failing on my machine here: Is this just my problem? Compiling the gb.db.mysql project... gb.db.mysql gbc: project file not found: /home/richard/gambas3-svn/src/trunk/gb.db.mysql/src/gb.db.mysql/.project gba: ERROR: Cannot set file owner: /home/richard/gambas3-svn/src/trunk/gb.db.mysql/src/gb.db.mysql/gb.db.mysql.gambas: No such file or directory /bin/install: cannot stat `gb.db.mysql.gambas': No such file or directory make[4]: *** [install-data-hook] Error 1 make[4]: Leaving directory `/home/richard/gambas3-svn/src/trunk/gb.db.mysql/src' make[3]: *** [install-data-am] Error 2 make[3]: Leaving directory `/home/richard/gambas3-svn/src/trunk/gb.db.mysql/src' make[2]: *** [install-am] Error 2 make[2]: Leaving directory `/home/richard/gambas3-svn/src/trunk/gb.db.mysql/src' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory `/home/richard/gambas3-svn/src/trunk/gb.db.mysql' make: *** [install-recursive] Error 1 ==> ERROR: Build Failed. Aborting... ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From wdahn at ...1000... Thu Apr 23 05:06:45 2009 From: wdahn at ...1000... (Werner) Date: Thu, 23 Apr 2009 11:06:45 +0800 Subject: [Gambas-user] [Fwd: My gambas stoped working...] In-Reply-To: <1240430201.25469.0.camel@...2146...> References: <1240430201.25469.0.camel@...2146...> Message-ID: <49EFDB45.5020008@...1000...> arbelmichal wrote: > > ------------------------------------------------------------------------ > > Subject: > My gambas stoped working... > From: > arbelmichal > Date: > Sun, 19 Apr 2009 23:20:35 +0300 > To: > gambas-user at lists.sourceforge.net > > To: > gambas-user at lists.sourceforge.net > > Content-Type: > text/plain > Message-ID: > <1240172433.22317.5.camel at ...2146...> > MIME-Version: > 1.0 > X-Mailer: > Evolution 2.24.3 > Content-Transfer-Encoding: > 7bit > > > Hi > Please read this thread and see if you can help me... I got project that > I am working on and I hed to stop beacuase my Gambas died... > Thanks > Arbel > > http://www.linuxbasic.net/index.php?topic=466.0 > What distribution/version are you using? Which version of Gambas? From arbelmichal at ...2145... Thu Apr 23 07:26:02 2009 From: arbelmichal at ...2145... (arbelmichal) Date: Thu, 23 Apr 2009 08:26:02 +0300 Subject: [Gambas-user] [Fwd: My gambas stoped working...] In-Reply-To: <49EFDB45.5020008@...1000...> References: <1240430201.25469.0.camel@...2146...> <49EFDB45.5020008@...1000...> Message-ID: <1240464362.25469.1.camel@...2146...> ubuntu 8.10 gambas2 Arbel On Thu, 2009-04-23 at 11:06 +0800, Werner wrote: > arbelmichal wrote: > > > > ------------------------------------------------------------------------ > > > > Subject: > > My gambas stoped working... > > From: > > arbelmichal > > Date: > > Sun, 19 Apr 2009 23:20:35 +0300 > > To: > > gambas-user at lists.sourceforge.net > > > > To: > > gambas-user at lists.sourceforge.net > > > > Content-Type: > > text/plain > > Message-ID: > > <1240172433.22317.5.camel at ...2146...> > > MIME-Version: > > 1.0 > > X-Mailer: > > Evolution 2.24.3 > > Content-Transfer-Encoding: > > 7bit > > > > > > Hi > > Please read this thread and see if you can help me... I got project that > > I am working on and I hed to stop beacuase my Gambas died... > > Thanks > > Arbel > > > > http://www.linuxbasic.net/index.php?topic=466.0 > > > What distribution/version are you using? > Which version of Gambas? > > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From wdahn at ...1000... Thu Apr 23 09:08:53 2009 From: wdahn at ...1000... (Werner) Date: Thu, 23 Apr 2009 15:08:53 +0800 Subject: [Gambas-user] [Fwd: My gambas stoped working...] In-Reply-To: <1240464362.25469.1.camel@...2146...> References: <1240430201.25469.0.camel@...2146...> <49EFDB45.5020008@...1000...> <1240464362.25469.1.camel@...2146...> Message-ID: <49F01405.5010903@...1000...> arbelmichal wrote: > ubuntu 8.10 gambas2 > Arbel > On Thu, 2009-04-23 at 11:06 +0800, Werner wrote: > >> arbelmichal wrote: >> >>> ------------------------------------------------------------------------ >>> >>> Subject: >>> My gambas stoped working... >>> From: >>> arbelmichal >>> Date: >>> Sun, 19 Apr 2009 23:20:35 +0300 >>> To: >>> gambas-user at lists.sourceforge.net >>> >>> To: >>> gambas-user at lists.sourceforge.net >>> >>> Content-Type: >>> text/plain >>> Message-ID: >>> <1240172433.22317.5.camel at ...2146...> >>> MIME-Version: >>> 1.0 >>> X-Mailer: >>> Evolution 2.24.3 >>> Content-Transfer-Encoding: >>> 7bit >>> >>> >>> Hi >>> Please read this thread and see if you can help me... I got project that >>> I am working on and I hed to stop beacuase my Gambas died... >>> Thanks >>> Arbel >>> >>> http://www.linuxbasic.net/index.php?topic=466.0 >>> >>> >> What distribution/version are you using? >> Which version of Gambas? >> >> gambas 2.what? >From what I understand, it had been working before, is that correct? From arbelmichal at ...2145... Thu Apr 23 09:35:17 2009 From: arbelmichal at ...2145... (arbelmichal) Date: Thu, 23 Apr 2009 10:35:17 +0300 Subject: [Gambas-user] [Fwd: My gambas stoped working...] In-Reply-To: <49F01405.5010903@...1000...> References: <1240430201.25469.0.camel@...2146...> <49EFDB45.5020008@...1000...> <1240464362.25469.1.camel@...2146...> <49F01405.5010903@...1000...> Message-ID: <1240472117.25469.2.camel@...2146...> Ithink gambas 2.12 Arbel On Thu, 2009-04-23 at 15:08 +0800, Werner wrote: > arbelmichal wrote: > > ubuntu 8.10 gambas2 > > Arbel > > On Thu, 2009-04-23 at 11:06 +0800, Werner wrote: > > > >> arbelmichal wrote: > >> > >>> ------------------------------------------------------------------------ > >>> > >>> Subject: > >>> My gambas stoped working... > >>> From: > >>> arbelmichal > >>> Date: > >>> Sun, 19 Apr 2009 23:20:35 +0300 > >>> To: > >>> gambas-user at lists.sourceforge.net > >>> > >>> To: > >>> gambas-user at lists.sourceforge.net > >>> > >>> Content-Type: > >>> text/plain > >>> Message-ID: > >>> <1240172433.22317.5.camel at ...2146...> > >>> MIME-Version: > >>> 1.0 > >>> X-Mailer: > >>> Evolution 2.24.3 > >>> Content-Transfer-Encoding: > >>> 7bit > >>> > >>> > >>> Hi > >>> Please read this thread and see if you can help me... I got project that > >>> I am working on and I hed to stop beacuase my Gambas died... > >>> Thanks > >>> Arbel > >>> > >>> http://www.linuxbasic.net/index.php?topic=466.0 > >>> > >>> > >> What distribution/version are you using? > >> Which version of Gambas? > >> > >> > gambas 2.what? > >From what I understand, it had been working before, is that correct? > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From ronstk at ...239... Thu Apr 23 10:37:32 2009 From: ronstk at ...239... (Ron_1st) Date: Thu, 23 Apr 2009 10:37:32 +0200 Subject: [Gambas-user] [Fwd: My gambas stoped working...] In-Reply-To: <1240472117.25469.2.camel@...2146...> References: <1240430201.25469.0.camel@...2146...> <49F01405.5010903@...1000...> <1240472117.25469.2.camel@...2146...> Message-ID: <200904231037.32940.ronstk@...239...> On Thursday 23 April 2009, arbelmichal wrote: > Ithink gambas 2.12 > Arbel > > On Thu, 2009-04-23 at 15:08 +0800, Werner wrote: > > arbelmichal wrote: > > > ubuntu 8.10 gambas2 > > > Arbel > > > On Thu, 2009-04-23 at 11:06 +0800, Werner wrote: > > > > > >> arbelmichal wrote: > > >> > > >>> ------------------------------------------------------------------------ > > >>> > > >>> Subject: > > >>> My gambas stoped working... > > >>> From: > > >>> arbelmichal > > >>> Date: > > >>> Sun, 19 Apr 2009 23:20:35 +0300 > > >>> To: > > >>> gambas-user at lists.sourceforge.net > > >>> > > >>> To: > > >>> gambas-user at lists.sourceforge.net > > >>> > > >>> Content-Type: > > >>> text/plain > > >>> Message-ID: > > >>> <1240172433.22317.5.camel at ...2146...> > > >>> MIME-Version: > > >>> 1.0 > > >>> X-Mailer: > > >>> Evolution 2.24.3 > > >>> Content-Transfer-Encoding: > > >>> 7bit > > >>> > > >>> > > >>> Hi > > >>> Please read this thread and see if you can help me... I got project that > > >>> I am working on and I hed to stop beacuase my Gambas died... > > >>> Thanks > > >>> Arbel > > >>> > > >>> http://www.linuxbasic.net/index.php?topic=466.0 > > >>> > > >>> > > >> What distribution/version are you using? > > >> Which version of Gambas? > > >> > > >> > > gambas 2.what? > > >From what I understand, it had been working before, is that correct? > > > > > > ------------------------------------------------------------------------------ > > Stay on top of everything new and different, both inside and > > around Java (TM) technology - register by April 22, and save > > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > > 300 plus technical and hands-on sessions. Register today. > > Use priority code J9JMT32. http://p.sf.net/sfu/p > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > Arggg. My crystal bowl is broken. Best regards, Ron_1st -- A: Delete the text you reply on. Q: What to do to get my post on top? --- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --- A: Top-posting. Q: What is the most annoying thing in e-mail? From gambas at ...1... Thu Apr 23 12:19:08 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Thu, 23 Apr 2009 12:19:08 +0200 Subject: [Gambas-user] build failing 1931 In-Reply-To: <200904230828.31115.rterry@...1946...> References: <200904230828.31115.rterry@...1946...> Message-ID: <200904231219.09012.gambas@...1...> > The last few builds from 1929 on seem to be failing on my machine here: > > Is this just my problem? > > Did you do a ./reconf && ./configure -C ? -- Beno?t From jeff at ...2103... Thu Apr 23 08:16:49 2009 From: jeff at ...2103... (Jeff) Date: Thu, 23 Apr 2009 16:16:49 +1000 Subject: [Gambas-user] Logical operators Message-ID: <1240467409.6078.3.camel@...2104...> If I write: IF expr1 OR expr2 THEN If expr1 evaluates to TRUE does the OR return TRUE or does it still go on to evaluate expr2? From dosida at ...626... Thu Apr 23 14:57:36 2009 From: dosida at ...626... (Dimitris Anogiatis) Date: Thu, 23 Apr 2009 06:57:36 -0600 Subject: [Gambas-user] Gambas Server Pages & mysql In-Reply-To: <200904222051.27908.gambas@...1...> References: <82bffccf0904142033t2b0337d6ya589a8a96055f320@...627...> <200904222051.27908.gambas@...1...> Message-ID: <82bffccf0904230557q32898bfch368467fb71277a2e@...627...> Thanks Benoit that works like a charm :) Regards Dimitris 2009/4/22 Beno?t Minisini > > Hey guys, > > > > With the example below Gambas Server Pages were introduced. > > > > My question is: > > 1) how would I achieve a connection to a mysql database or any database > for > > that matter? > > 2) where in the code below would I put the necessary statements? > > 3) if no direct reference to any database objects can be made is the > > alternative, by lets say, using an external gambas module or some other > > trick? > > > > > --8<----------------------------------------------------------------------- > >--------------------------------------------------------------- > > > > #!/usr/bin/env gbw2 > > <% > > DIM sEnv AS String > > %> > > > > > > > > > > > >

CGI script environmental variables

> > > > > > > > > > > > > > > > > > <% FOR EACH sEnv IN Application.Env %> > > > > > > > > > > <% NEXT %> > > > >
NameValue
<%= sEnv %><%= Application.Env[sEnv] %>
> > > > > > > --8<----------------------------------------------------------------------- > >--------------------------------------------------------------- > > > > Thanks in advance > > > > Regards > > Dimitris > > You must add: > > <% > USE "gb.db" > %> > > at the beginning of the page, and then you can access any database. > > Regards, > > -- > Beno?t > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From smiefert at ...784... Thu Apr 23 15:36:17 2009 From: smiefert at ...784... (Stefan Miefert) Date: Thu, 23 Apr 2009 15:36:17 +0200 Subject: [Gambas-user] Format Text Message-ID: <8D42310D957CFB46AA11921A711D4D16023F579D6F@...1899...> HEllo, how can i format a text like this 1 Auto 20.12.2008 20,15 2 Fahrrad 30.12.2005 3,22 3 Bus 12.05.2000 22,44 4 Auto2 15.04.2088 23,55 5 Auto3 15.04.2088 6 Bus2 15.04.2088 7 LKW 15.04.2088 8 Bus 15.04.2088 9 Auto4 15.04.2088 10 Bus 5 15.04.2088 From jussi.lahtinen at ...626... Thu Apr 23 16:28:46 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Thu, 23 Apr 2009 17:28:46 +0300 Subject: [Gambas-user] [Fwd: My gambas stoped working...] In-Reply-To: <200904231037.32940.ronstk@...239...> References: <1240430201.25469.0.camel@...2146...> <49F01405.5010903@...1000...> <1240472117.25469.2.camel@...2146...> <200904231037.32940.ronstk@...239...> Message-ID: <384d3900904230728w4cb4c65eq468b16071c96bd99@...627...> To clarify, you compiled Gambas 2.12 from source and installed it without any errors. Only error you got is; ERROR: #2: Cannot load class 'Project': Unable to load class file when you are trying to start Gambas. Have I understand correctly? Did you do this; rm -f /usr/local/bin/gbx2 /usr/local/bin/gbc2 /usr/local/bin/gba2 /usr/local/bin/gbi2 rm -rf /usr/local/lib/gambas2 rm -rf /usr/local/share/gambas2 before new try? Jussi On Thu, Apr 23, 2009 at 11:37, Ron_1st wrote: > On Thursday 23 April 2009, arbelmichal wrote: >> Ithink gambas 2.12 >> Arbel >> >> On Thu, 2009-04-23 at 15:08 +0800, Werner wrote: >> > arbelmichal wrote: >> > > ubuntu 8.10 gambas2 >> > > Arbel >> > > On Thu, 2009-04-23 at 11:06 +0800, Werner wrote: >> > > >> > >> arbelmichal wrote: >> > >> >> > >>> ------------------------------------------------------------------------ >> > >>> >> > >>> Subject: >> > >>> My gambas stoped working... >> > >>> From: >> > >>> arbelmichal >> > >>> Date: >> > >>> Sun, 19 Apr 2009 23:20:35 +0300 >> > >>> To: >> > >>> gambas-user at lists.sourceforge.net >> > >>> >> > >>> To: >> > >>> gambas-user at lists.sourceforge.net >> > >>> >> > >>> Content-Type: >> > >>> text/plain >> > >>> Message-ID: >> > >>> <1240172433.22317.5.camel at ...2146...> >> > >>> MIME-Version: >> > >>> 1.0 >> > >>> X-Mailer: >> > >>> Evolution 2.24.3 >> > >>> Content-Transfer-Encoding: >> > >>> 7bit >> > >>> >> > >>> >> > >>> Hi >> > >>> Please read this thread and see if you can help me... I got project that >> > >>> I am working on and I hed to stop beacuase my Gambas died... >> > >>> Thanks >> > >>> Arbel >> > >>> >> > >>> http://www.linuxbasic.net/index.php?topic=466.0 >> > >>> >> > >>> >> > >> What distribution/version are you using? >> > >> Which version of Gambas? >> > >> >> > >> >> > gambas 2.what? >> > >From what I understand, it had been working before, is that correct? >> > >> > >> > ------------------------------------------------------------------------------ >> > Stay on top of everything new and different, both inside and >> > around Java (TM) technology - register by April 22, and save >> > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. >> > 300 plus technical and hands-on sessions. Register today. >> > Use priority code J9JMT32. http://p.sf.net/sfu/p >> > _______________________________________________ >> > Gambas-user mailing list >> > Gambas-user at lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> ------------------------------------------------------------------------------ >> Stay on top of everything new and different, both inside and >> around Java (TM) technology - register by April 22, and save >> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. >> 300 plus technical and hands-on sessions. Register today. >> Use priority code J9JMT32. http://p.sf.net/sfu/p >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > > Arggg. > My crystal bowl is broken. > > > Best regards, > > Ron_1st > > -- > ?A: Delete the text you reply on. > ?Q: What to do to get my post on top? > --- > ?A: Because it messes up the order in which people normally read text. > ?Q: Why is top-posting such a bad thing? > --- > ?A: Top-posting. > ?Q: What is the most annoying thing in e-mail? > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From m0e.lnx at ...626... Thu Apr 23 16:31:40 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Thu, 23 Apr 2009 09:31:40 -0500 Subject: [Gambas-user] Format Text In-Reply-To: <8D42310D957CFB46AA11921A711D4D16023F579D6F@...1899...> References: <8D42310D957CFB46AA11921A711D4D16023F579D6F@...1899...> Message-ID: <1f1e8c1b0904230731x1b44efc0r144f095ec4344bc6@...627...> How about using something like space(5) between each string? On Apr 23, 2009 9:16 AM, "Stefan Miefert" wrote: HEllo, how can i format a text like this 1 Auto 20.12.2008 20,15 2 Fahrrad 30.12.2005 3,22 3 Bus 12.05.2000 22,44 4 Auto2 15.04.2088 23,55 5 Auto3 15.04.2088 6 Bus2 15.04.2088 7 LKW 15.04.2088 8 Bus 15.04.2088 9 Auto4 15.04.2088 10 Bus 5 15.04.2088 ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From smiefert at ...784... Thu Apr 23 16:44:25 2009 From: smiefert at ...784... (Stefan Miefert) Date: Thu, 23 Apr 2009 16:44:25 +0200 Subject: [Gambas-user] Format Text In-Reply-To: <1f1e8c1b0904230731x1b44efc0r144f095ec4344bc6@...627...> References: <8D42310D957CFB46AA11921A711D4D16023F579D6F@...1899...> <1f1e8c1b0904230731x1b44efc0r144f095ec4344bc6@...627...> Message-ID: <8D42310D957CFB46AA11921A711D4D16023F579D8A@...1899...> Hello, but the strings have different lengts:) That couldt work:) -----Urspr?ngliche Nachricht----- Von: M0E Lnx [mailto:m0e.lnx at ...626...] Gesendet: Donnerstag, 23. April 2009 16:32 An: mailing list for gambas users Betreff: Re: [Gambas-user] Format Text How about using something like space(5) between each string? On Apr 23, 2009 9:16 AM, "Stefan Miefert" wrote: HEllo, how can i format a text like this 1 Auto 20.12.2008 20,15 2 Fahrrad 30.12.2005 3,22 3 Bus 12.05.2000 22,44 4 Auto2 15.04.2088 23,55 5 Auto3 15.04.2088 6 Bus2 15.04.2088 7 LKW 15.04.2088 8 Bus 15.04.2088 9 Auto4 15.04.2088 10 Bus 5 15.04.2088 ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From mohareve at ...626... Thu Apr 23 16:44:51 2009 From: mohareve at ...626... (=?ISO-8859-2?Q?M=E9sz=E1ros_Csaba?=) Date: Thu, 23 Apr 2009 16:44:51 +0200 Subject: [Gambas-user] Format Text In-Reply-To: <8D42310D957CFB46AA11921A711D4D16023F579D6F@...1899...> References: <8D42310D957CFB46AA11921A711D4D16023F579D6F@...1899...> Message-ID: <49F07EE3.2050003@...626...> Stefan Miefert ?rta: > HEllo, > > how can i format a text like this > > 1 Auto 20.12.2008 20,15 > 2 Fahrrad 30.12.2005 3,22 > 3 Bus 12.05.2000 22,44 > 4 Auto2 15.04.2088 23,55 > 5 Auto3 15.04.2088 > 6 Bus2 15.04.2088 > 7 LKW 15.04.2088 > 8 Bus 15.04.2088 > 9 Auto4 15.04.2088 > 10 Bus 5 15.04.2088 > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > You have to do it manually! The basics: 1. The length of a row of text is for example> m - you can use property Len(yourstring) 2. The length of numbering> 3 (if you intend to have less than a thousand rows) 3. The length of the first gap: If you want your vehicles to start at position x then the length of gap is: x- Len(numbering). You can insert gaps with firstgap=String$(x-Len(numbering)," ") 4. Now you have to plan the position of dates, let it be w. You will have the second gap between the vehicles and dates> Can be calculated with w-x-Len(vehicle) etc. .. If you have done your calculus you'll have to create strings for each row like this: string[i]=numbers[i] & firstgap[i] & vehicles[i] & secondgap[i] & dates[i] ... From smiefert at ...784... Thu Apr 23 17:30:18 2009 From: smiefert at ...784... (Stefan Miefert) Date: Thu, 23 Apr 2009 17:30:18 +0200 Subject: [Gambas-user] Format Text In-Reply-To: <49F07EE3.2050003@...626...> References: <8D42310D957CFB46AA11921A711D4D16023F579D6F@...1899...> <49F07EE3.2050003@...626...> Message-ID: <8D42310D957CFB46AA11921A711D4D16023F579D96@...1899...> Istn very smart but i do something like this now "Test" & space(30 - len("Test)) & "Alles how I can" But how can I align something like number like this 22.55 1.22 133.22 Must be like this 22.55 1.22 133.22 -----Urspr?ngliche Nachricht----- Von: M?sz?ros Csaba [mailto:mohareve at ...626...] Gesendet: Donnerstag, 23. April 2009 16:45 An: mailing list for gambas users Betreff: Re: [Gambas-user] Format Text Stefan Miefert ?rta: > HEllo, > > how can i format a text like this > > 1 Auto 20.12.2008 20,15 > 2 Fahrrad 30.12.2005 3,22 > 3 Bus 12.05.2000 22,44 > 4 Auto2 15.04.2088 23,55 > 5 Auto3 15.04.2088 > 6 Bus2 15.04.2088 > 7 LKW 15.04.2088 > 8 Bus 15.04.2088 > 9 Auto4 15.04.2088 > 10 Bus 5 15.04.2088 > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > You have to do it manually! The basics: 1. The length of a row of text is for example> m - you can use property Len(yourstring) 2. The length of numbering> 3 (if you intend to have less than a thousand rows) 3. The length of the first gap: If you want your vehicles to start at position x then the length of gap is: x- Len(numbering). You can insert gaps with firstgap=String$(x-Len(numbering)," ") 4. Now you have to plan the position of dates, let it be w. You will have the second gap between the vehicles and dates> Can be calculated with w-x-Len(vehicle) etc. .. If you have done your calculus you'll have to create strings for each row like this: string[i]=numbers[i] & firstgap[i] & vehicles[i] & secondgap[i] & dates[i] ... ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From arbelmichal at ...2145... Thu Apr 23 17:57:54 2009 From: arbelmichal at ...2145... (arbelmichal) Date: Thu, 23 Apr 2009 18:57:54 +0300 Subject: [Gambas-user] [Fwd: My gambas stoped working...] In-Reply-To: <384d3900904230728w4cb4c65eq468b16071c96bd99@...627...> References: <1240430201.25469.0.camel@...2146...> <49F01405.5010903@...1000...> <1240472117.25469.2.camel@...2146...> <200904231037.32940.ronstk@...239...> <384d3900904230728w4cb4c65eq468b16071c96bd99@...627...> Message-ID: <1240502274.25469.7.camel@...2146...> When I tried to build it from a source file, and then run it' i had lots of missing packages. I removed the files you told me to remove and then tried to install from the synaptic maneger. Still the same error. Maybe there is a flag or somthing that wont let these files to be copied to my computer... I don't whant to reinstall ubuntu and loose everything... Arbel On Thu, 2009-04-23 at 17:28 +0300, Jussi Lahtinen wrote: > To clarify, you compiled Gambas 2.12 from source and installed it > without any errors. > Only error you got is; > ERROR: #2: Cannot load class 'Project': Unable to load class file > when you are trying to start Gambas. > > Have I understand correctly? > > Did you do this; > > rm -f /usr/local/bin/gbx2 /usr/local/bin/gbc2 /usr/local/bin/gba2 > /usr/local/bin/gbi2 > rm -rf /usr/local/lib/gambas2 > rm -rf /usr/local/share/gambas2 > > before new try? > > > Jussi > > > > On Thu, Apr 23, 2009 at 11:37, Ron_1st wrote: > > On Thursday 23 April 2009, arbelmichal wrote: > >> Ithink gambas 2.12 > >> Arbel > >> > >> On Thu, 2009-04-23 at 15:08 +0800, Werner wrote: > >> > arbelmichal wrote: > >> > > ubuntu 8.10 gambas2 > >> > > Arbel > >> > > On Thu, 2009-04-23 at 11:06 +0800, Werner wrote: > >> > > > >> > >> arbelmichal wrote: > >> > >> > >> > >>> ------------------------------------------------------------------------ > >> > >>> > >> > >>> Subject: > >> > >>> My gambas stoped working... > >> > >>> From: > >> > >>> arbelmichal > >> > >>> Date: > >> > >>> Sun, 19 Apr 2009 23:20:35 +0300 > >> > >>> To: > >> > >>> gambas-user at lists.sourceforge.net > >> > >>> > >> > >>> To: > >> > >>> gambas-user at lists.sourceforge.net > >> > >>> > >> > >>> Content-Type: > >> > >>> text/plain > >> > >>> Message-ID: > >> > >>> <1240172433.22317.5.camel at ...2146...> > >> > >>> MIME-Version: > >> > >>> 1.0 > >> > >>> X-Mailer: > >> > >>> Evolution 2.24.3 > >> > >>> Content-Transfer-Encoding: > >> > >>> 7bit > >> > >>> > >> > >>> > >> > >>> Hi > >> > >>> Please read this thread and see if you can help me... I got project that > >> > >>> I am working on and I hed to stop beacuase my Gambas died... > >> > >>> Thanks > >> > >>> Arbel > >> > >>> > >> > >>> http://www.linuxbasic.net/index.php?topic=466.0 > >> > >>> > >> > >>> > >> > >> What distribution/version are you using? > >> > >> Which version of Gambas? > >> > >> > >> > >> > >> > gambas 2.what? > >> > >From what I understand, it had been working before, is that correct? > >> > > >> > > >> > ------------------------------------------------------------------------------ > >> > Stay on top of everything new and different, both inside and > >> > around Java (TM) technology - register by April 22, and save > >> > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > >> > 300 plus technical and hands-on sessions. Register today. > >> > Use priority code J9JMT32. http://p.sf.net/sfu/p > >> > _______________________________________________ > >> > Gambas-user mailing list > >> > Gambas-user at lists.sourceforge.net > >> > https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > >> ------------------------------------------------------------------------------ > >> Stay on top of everything new and different, both inside and > >> around Java (TM) technology - register by April 22, and save > >> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > >> 300 plus technical and hands-on sessions. Register today. > >> Use priority code J9JMT32. http://p.sf.net/sfu/p > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > > > > > > Arggg. > > My crystal bowl is broken. > > > > > > Best regards, > > > > Ron_1st > > > > -- > > A: Delete the text you reply on. > > Q: What to do to get my post on top? > > --- > > A: Because it messes up the order in which people normally read text. > > Q: Why is top-posting such a bad thing? > > --- > > A: Top-posting. > > Q: What is the most annoying thing in e-mail? > > > > > > ------------------------------------------------------------------------------ > > Stay on top of everything new and different, both inside and > > around Java (TM) technology - register by April 22, and save > > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > > 300 plus technical and hands-on sessions. Register today. > > Use priority code J9JMT32. http://p.sf.net/sfu/p > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From eilert-sprachen at ...221... Thu Apr 23 18:03:51 2009 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Thu, 23 Apr 2009 18:03:51 +0200 Subject: [Gambas-user] Format Text In-Reply-To: <8D42310D957CFB46AA11921A711D4D16023F579D96@...1899...> References: <8D42310D957CFB46AA11921A711D4D16023F579D6F@...1899...> <49F07EE3.2050003@...626...> <8D42310D957CFB46AA11921A711D4D16023F579D96@...1899...> Message-ID: <49F09167.9000600@...221...> Hi Stefan, Stefan Miefert schrieb: > Istn very smart but i do something like this now > > > > > "Test" & space(30 - len("Test)) & "Alles how I can" Not very smart? Hm. This would be just my solution. > > But how can I align something like number like this > > 22.55 > 1.22 > 133.22 > > Must be like this > > 22.55 > 1.22 > 133.22 Just do it the other way round. If txt$ contains the text: space(30 - len(txt$)) & txt$ or better (if umlauts are contained) space(30 - string.len(txt$)) & txt$ That should do it... at least if you use Courier. For proportional fonts, you will want to use a drawing space like Printer or DrawingArea and work with measures of text lengths etc. That's quite another world, though it's basically the same way of grouping the columns. Rolf From smiefert at ...784... Thu Apr 23 18:36:13 2009 From: smiefert at ...784... (Stefan Miefert) Date: Thu, 23 Apr 2009 18:36:13 +0200 Subject: [Gambas-user] Format Text In-Reply-To: <49F09167.9000600@...221...> References: <8D42310D957CFB46AA11921A711D4D16023F579D6F@...1899...> <49F07EE3.2050003@...626...> <8D42310D957CFB46AA11921A711D4D16023F579D96@...1899...> <49F09167.9000600@...221...> Message-ID: <8D42310D957CFB46AA11921A711D4D16023F579D97@...1899...> HEllo, is the same:) I cant see any differences. Isnt their any formatting function in gambas like other languages habe? my problem is that I want to mail it via a textmail 123.22 1.22 34.11 Must be this x= space 123.22 xx1.22 x34.11 Just do it the other way round. If txt$ contains the text: space(30 - len(txt$)) & txt$ or better (if umlauts are contained) space(30 - string.len(txt$)) & txt$ From gambas at ...1... Thu Apr 23 19:07:31 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Thu, 23 Apr 2009 19:07:31 +0200 Subject: [Gambas-user] Logical operators In-Reply-To: <1240467409.6078.3.camel@...2104...> References: <1240467409.6078.3.camel@...2104...> Message-ID: <200904231907.31272.gambas@...1...> > If I write: > > IF expr1 OR expr2 THEN > > If expr1 evaluates to TRUE does the OR return TRUE or does it still go > on to evaluate expr2? > Operators always evaluate all their operands. But you can use the syntax IF expr1 OR IF expr2 THEN to evaluate only if is false. Regards, -- Beno?t From smiefert at ...784... Thu Apr 23 19:25:56 2009 From: smiefert at ...784... (Stefan Miefert) Date: Thu, 23 Apr 2009 19:25:56 +0200 Subject: [Gambas-user] Format Text In-Reply-To: <49F09167.9000600@...221...> References: <8D42310D957CFB46AA11921A711D4D16023F579D6F@...1899...> <49F07EE3.2050003@...626...> <8D42310D957CFB46AA11921A711D4D16023F579D96@...1899...> <49F09167.9000600@...221...> Message-ID: <8D42310D957CFB46AA11921A711D4D16023F579D98@...1899...> Hello, i try your version included "string.len ... but it dosent run when I have ??? inside. I always get "bad arguments" -----Urspr?ngliche Nachricht----- Von: Rolf-Werner Eilert [mailto:eilert-sprachen at ...221...] Gesendet: Donnerstag, 23. April 2009 18:04 An: mailing list for gambas users Betreff: Re: [Gambas-user] Format Text Hi Stefan, Stefan Miefert schrieb: > Istn very smart but i do something like this now > > > > > "Test" & space(30 - len("Test)) & "Alles how I can" Not very smart? Hm. This would be just my solution. > > But how can I align something like number like this > > 22.55 > 1.22 > 133.22 > > Must be like this > > 22.55 > 1.22 > 133.22 Just do it the other way round. If txt$ contains the text: space(30 - len(txt$)) & txt$ or better (if umlauts are contained) space(30 - string.len(txt$)) & txt$ That should do it... at least if you use Courier. For proportional fonts, you will want to use a drawing space like Printer or DrawingArea and work with measures of text lengths etc. That's quite another world, though it's basically the same way of grouping the columns. Rolf ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From jussi.lahtinen at ...626... Thu Apr 23 19:29:16 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Thu, 23 Apr 2009 20:29:16 +0300 Subject: [Gambas-user] [Fwd: My gambas stoped working...] In-Reply-To: <1240502274.25469.7.camel@...2146...> References: <1240430201.25469.0.camel@...2146...> <49F01405.5010903@...1000...> <1240472117.25469.2.camel@...2146...> <200904231037.32940.ronstk@...239...> <384d3900904230728w4cb4c65eq468b16071c96bd99@...627...> <1240502274.25469.7.camel@...2146...> Message-ID: <384d3900904231029k429e9ae8ic07ce59939d7c88d@...627...> With synaptic I find only Gambas 2.7. Are using some different repository..? 1. Do COMPLETE removal with synaptic, make sure that all related to gambas is gone. 2. Then just for sure: rm -f /usr/local/bin/gbx2 /usr/local/bin/gbc2 /usr/local/bin/gba2/usr/local/bin/gbi2 rm -rf /usr/local/lib/gambas2 rm -rf /usr/local/share/gambas2 3. Then Places --> Search for files --> Look in folder: file system --> gambas If you find something related to gambas (which is not your own project of course!!!), remove it. You might have alternate install path..? Remove them also. 4. Then install gambas2 from Applications --> Add/Remove. Do you have access to all needed folders and files (root pass)? There should not be anything left from gambas, no flags etc. AFAIK. Next thing is to install all needed libraries again... Jussi On Thu, Apr 23, 2009 at 18:57, arbelmichal wrote: > When I tried to build it from a source file, and then run it' i had lots > of missing packages. I removed the files you told me to remove and then > tried to install from the synaptic maneger. Still the same error. Maybe > there is a flag or somthing that wont let these files to be copied to my > computer... I don't whant to reinstall ubuntu and loose everything... > Arbel > On Thu, 2009-04-23 at 17:28 +0300, Jussi Lahtinen wrote: >> To clarify, you compiled Gambas 2.12 from source and installed it >> without any errors. >> Only error you got is; >> ERROR: #2: Cannot load class 'Project': Unable to load class file >> when you are trying to start Gambas. >> >> Have I understand correctly? >> >> Did you do this; >> >> rm -f /usr/local/bin/gbx2 /usr/local/bin/gbc2 /usr/local/bin/gba2 >> /usr/local/bin/gbi2 >> rm -rf /usr/local/lib/gambas2 >> rm -rf /usr/local/share/gambas2 >> >> before new try? >> >> >> Jussi >> >> >> >> On Thu, Apr 23, 2009 at 11:37, Ron_1st wrote: >> > On Thursday 23 April 2009, arbelmichal wrote: >> >> Ithink gambas 2.12 >> >> Arbel >> >> >> >> On Thu, 2009-04-23 at 15:08 +0800, Werner wrote: >> >> > arbelmichal wrote: >> >> > > ubuntu 8.10 gambas2 >> >> > > Arbel >> >> > > On Thu, 2009-04-23 at 11:06 +0800, Werner wrote: >> >> > > >> >> > >> arbelmichal wrote: >> >> > >> >> >> > >>> ------------------------------------------------------------------------ >> >> > >>> >> >> > >>> Subject: >> >> > >>> My gambas stoped working... >> >> > >>> From: >> >> > >>> arbelmichal >> >> > >>> Date: >> >> > >>> Sun, 19 Apr 2009 23:20:35 +0300 >> >> > >>> To: >> >> > >>> gambas-user at lists.sourceforge.net >> >> > >>> >> >> > >>> To: >> >> > >>> gambas-user at lists.sourceforge.net >> >> > >>> >> >> > >>> Content-Type: >> >> > >>> text/plain >> >> > >>> Message-ID: >> >> > >>> <1240172433.22317.5.camel at ...2146...> >> >> > >>> MIME-Version: >> >> > >>> 1.0 >> >> > >>> X-Mailer: >> >> > >>> Evolution 2.24.3 >> >> > >>> Content-Transfer-Encoding: >> >> > >>> 7bit >> >> > >>> >> >> > >>> >> >> > >>> Hi >> >> > >>> Please read this thread and see if you can help me... I got project that >> >> > >>> I am working on and I hed to stop beacuase my Gambas died... >> >> > >>> Thanks >> >> > >>> Arbel >> >> > >>> >> >> > >>> http://www.linuxbasic.net/index.php?topic=466.0 >> >> > >>> >> >> > >>> >> >> > >> What distribution/version are you using? >> >> > >> Which version of Gambas? >> >> > >> >> >> > >> >> >> > gambas 2.what? >> >> > >From what I understand, it had been working before, is that correct? >> >> > >> >> > >> >> > ------------------------------------------------------------------------------ >> >> > Stay on top of everything new and different, both inside and >> >> > around Java (TM) technology - register by April 22, and save >> >> > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. >> >> > 300 plus technical and hands-on sessions. Register today. >> >> > Use priority code J9JMT32. http://p.sf.net/sfu/p >> >> > _______________________________________________ >> >> > Gambas-user mailing list >> >> > Gambas-user at lists.sourceforge.net >> >> > https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> >> >> ------------------------------------------------------------------------------ >> >> Stay on top of everything new and different, both inside and >> >> around Java (TM) technology - register by April 22, and save >> >> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. >> >> 300 plus technical and hands-on sessions. Register today. >> >> Use priority code J9JMT32. http://p.sf.net/sfu/p >> >> _______________________________________________ >> >> Gambas-user mailing list >> >> Gambas-user at lists.sourceforge.net >> >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> >> > >> > >> > Arggg. >> > My crystal bowl is broken. >> > >> > >> > Best regards, >> > >> > Ron_1st >> > >> > -- >> > ?A: Delete the text you reply on. >> > ?Q: What to do to get my post on top? >> > --- >> > ?A: Because it messes up the order in which people normally read text. >> > ?Q: Why is top-posting such a bad thing? >> > --- >> > ?A: Top-posting. >> > ?Q: What is the most annoying thing in e-mail? >> > >> > >> > ------------------------------------------------------------------------------ >> > Stay on top of everything new and different, both inside and >> > around Java (TM) technology - register by April 22, and save >> > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. >> > 300 plus technical and hands-on sessions. Register today. >> > Use priority code J9JMT32. http://p.sf.net/sfu/p >> > _______________________________________________ >> > Gambas-user mailing list >> > Gambas-user at lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/gambas-user >> > >> >> ------------------------------------------------------------------------------ >> Stay on top of everything new and different, both inside and >> around Java (TM) technology - register by April 22, and save >> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. >> 300 plus technical and hands-on sessions. Register today. >> Use priority code J9JMT32. http://p.sf.net/sfu/p >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From andreas at ...2139... Thu Apr 23 20:45:32 2009 From: andreas at ...2139... (Andreas =?ISO-8859-1?Q?M=FCller?=) Date: Thu, 23 Apr 2009 20:45:32 +0200 Subject: [Gambas-user] Gambas-user Digest, Vol 35, Issue 54 In-Reply-To: References: Message-ID: <1240512332.6484.89.camel@...2140...> Hello Charlie, this comment makes me very happy and pushes me to continue with the project :-) For a programmer it's allways a somewhat difficult situation to 'put the trousers down' and show what is behind the sceenes, but I was so happy with the result, that I had to make it public. * WITHOUT GAMBAS IT WOULD NOT BE POSSIBLE * Yesterday I wrote the code for printing programs and X,Y,Z registers, I will continue today and possibly publish that possibly on weekend in the next release. (Are there any problems installing on different distributions?) The next steps are: * The HP 9101A Extented Memory (FMT commands..) * HP 9125A Plotter (screen plotter with printing) * Program library (see: source../Programs) This helps me to understand the Gambas components i.e. drawing pictures, using SHELL commands etc. and it makes fun! Your question about the truth of the emulation can be answered this way. I have an HP9100A on my desk since 1979 and I tried to make the emulator as close as possible to the real machine. There are still some differences, but I will remove them step by step. On the other hand I take the freedom to add features when they are nice to have and make the programming more comfortable like the "Program Listing" Menu. There are other differences like the possibility to program the "record" and "enter" buttons which gives one the option to program a "load program" command -> subroutines! Generally it's difficult to emulate a machine which is build up from discrete electronic parts as to HP is. There is no "digital chip" inside. Only flip-flops, transistors, diodes, resistors, magnetic core memory and a 16-fold-multilayer plantine as 'rom'. So the emulation emulates the 'behaviour' not the discrete parts. There is a diagostic program of the real HP which calculates every function possible on keyboard. (see: ../Programs within project folder) I needed one week to get the emulator working in a way that it computes the same results, The only differencs other than the "display font" is that real display shows 1 2.000000000 3 and not 1 2 3 as the emulator does. I will fix that when I have understood why the real machine does show this display. The handling of Zeros is a difficult part within the emulator because the HP does it in a complete other way as common pocket calculators do it. I have the HP9100A program library and use that to test the emulator results - so far I did not find an error :-) The file extension .hpf is registered at http://www.fileinfo.com/extension/hpf but the maintainer thought it is related to Windows ;-) I have a question to Benoit: The emulator is recursiv when working in run mode: State Module: (..) CASE "47" ' Continue (..) calls State.ChangeRun within State.ChangeRun. I suppose this will fill up the return stack and may be a problem with long running programs. For that reason I took the largest possible stack size of 64k within the project options. Is that correct? There is an other problem with "button feedback" when a program runs. So I took a 'forced delay' of every 711th program step to give time to the interpreter to catch the button click of a "STOP" button. Without that delay I could start the program but not stop it any more: Example: unstoppable program HP 9100A Program Listing - created: 04/23/2009 20:11:55.151 ___________________________________________________________________ File: Untiteld Line Code Instruction ____________________________ 0.0 01 1 0.1 33 + 0.2 44 GO TO()() 0.3 00 0 0.4 00 0 0.5 46 END This is a counting loop, which can not be stoped by the "STOP" button, if there is no 711-delay build in. Finally when I switch the emulator into "OFF" mode and then back into "POWER ON" the left switch called "DEGREES/RADIANS" shows a dottet square like an artefact. I don't know why? There is an error in the "POWER OFF" mode, because you can change the stack during that mode - which should not be the case - but that's easy to fix and will be in the next release. best regards Andreas Mueller Am Donnerstag, den 23.04.2009, 03:07 +0000 schrieb gambas-user-request at lists.sourceforge.net: > Am Mittwoch, den 22.04.2009, 01:24 +0200 schrieb Andreas M?ller: > 8<--------------------------------------------------------------------------- > > Btw. if someone wants to have an emulation of the "first PC" aka > HP9100A > > one can find that on my homepage under software. > http://www.poipoi.de/software > > Comments are welcome! But don't punish me for the code - I know it's > a > > terrible mixture somewhere between object and spagetti code ;-> but > I have > > started with Gambas and the project this month. > > > 8<--------------------------------------------------------------------------- > > Salut, > > just know, Spagetti Code is just bad for those who can't read this > code, > never for the functionality of that code. > I find your project just wonderful. (I do not know if it is a real > emulation of an HP9100A and even not, if all works OK ) > I'm impressed by the way the mechanics of the 'computer' is realized. > Good job. > -- > Amicalment > Charlie From arbelmichal at ...2145... Thu Apr 23 21:47:07 2009 From: arbelmichal at ...2145... (arbelmichal) Date: Thu, 23 Apr 2009 22:47:07 +0300 Subject: [Gambas-user] [Fwd: My gambas stoped working...] In-Reply-To: <384d3900904231029k429e9ae8ic07ce59939d7c88d@...627...> References: <1240430201.25469.0.camel@...2146...> <49F01405.5010903@...1000...> <1240472117.25469.2.camel@...2146...> <200904231037.32940.ronstk@...239...> <384d3900904230728w4cb4c65eq468b16071c96bd99@...627...> <1240502274.25469.7.camel@...2146...> <384d3900904231029k429e9ae8ic07ce59939d7c88d@...627...> Message-ID: <1240516027.25469.10.camel@...2146...> It worked!!! thanks Arbel On Thu, 2009-04-23 at 20:29 +0300, Jussi Lahtinen wrote: > With synaptic I find only Gambas 2.7. Are using some different repository..? > > 1. Do COMPLETE removal with synaptic, make sure that all related to > gambas is gone. > > 2. Then just for sure: > rm -f /usr/local/bin/gbx2 /usr/local/bin/gbc2 > /usr/local/bin/gba2/usr/local/bin/gbi2 > rm -rf /usr/local/lib/gambas2 > rm -rf /usr/local/share/gambas2 > > 3. Then Places --> Search for files --> Look in folder: file system --> gambas > If you find something related to gambas (which is not your own project > of course!!!), remove it. > You might have alternate install path..? Remove them also. > > 4. Then install gambas2 from Applications --> Add/Remove. > > Do you have access to all needed folders and files (root pass)? > > There should not be anything left from gambas, no flags etc. AFAIK. > Next thing is to install all needed libraries again... > > > Jussi > > > On Thu, Apr 23, 2009 at 18:57, arbelmichal wrote: > > When I tried to build it from a source file, and then run it' i had lots > > of missing packages. I removed the files you told me to remove and then > > tried to install from the synaptic maneger. Still the same error. Maybe > > there is a flag or somthing that wont let these files to be copied to my > > computer... I don't whant to reinstall ubuntu and loose everything... > > Arbel > > On Thu, 2009-04-23 at 17:28 +0300, Jussi Lahtinen wrote: > >> To clarify, you compiled Gambas 2.12 from source and installed it > >> without any errors. > >> Only error you got is; > >> ERROR: #2: Cannot load class 'Project': Unable to load class file > >> when you are trying to start Gambas. > >> > >> Have I understand correctly? > >> > >> Did you do this; > >> > >> rm -f /usr/local/bin/gbx2 /usr/local/bin/gbc2 /usr/local/bin/gba2 > >> /usr/local/bin/gbi2 > >> rm -rf /usr/local/lib/gambas2 > >> rm -rf /usr/local/share/gambas2 > >> > >> before new try? > >> > >> > >> Jussi > >> > >> > >> > >> On Thu, Apr 23, 2009 at 11:37, Ron_1st wrote: > >> > On Thursday 23 April 2009, arbelmichal wrote: > >> >> Ithink gambas 2.12 > >> >> Arbel > >> >> > >> >> On Thu, 2009-04-23 at 15:08 +0800, Werner wrote: > >> >> > arbelmichal wrote: > >> >> > > ubuntu 8.10 gambas2 > >> >> > > Arbel > >> >> > > On Thu, 2009-04-23 at 11:06 +0800, Werner wrote: > >> >> > > > >> >> > >> arbelmichal wrote: > >> >> > >> > >> >> > >>> ------------------------------------------------------------------------ > >> >> > >>> > >> >> > >>> Subject: > >> >> > >>> My gambas stoped working... > >> >> > >>> From: > >> >> > >>> arbelmichal > >> >> > >>> Date: > >> >> > >>> Sun, 19 Apr 2009 23:20:35 +0300 > >> >> > >>> To: > >> >> > >>> gambas-user at lists.sourceforge.net > >> >> > >>> > >> >> > >>> To: > >> >> > >>> gambas-user at lists.sourceforge.net > >> >> > >>> > >> >> > >>> Content-Type: > >> >> > >>> text/plain > >> >> > >>> Message-ID: > >> >> > >>> <1240172433.22317.5.camel at ...2146...> > >> >> > >>> MIME-Version: > >> >> > >>> 1.0 > >> >> > >>> X-Mailer: > >> >> > >>> Evolution 2.24.3 > >> >> > >>> Content-Transfer-Encoding: > >> >> > >>> 7bit > >> >> > >>> > >> >> > >>> > >> >> > >>> Hi > >> >> > >>> Please read this thread and see if you can help me... I got project that > >> >> > >>> I am working on and I hed to stop beacuase my Gambas died... > >> >> > >>> Thanks > >> >> > >>> Arbel > >> >> > >>> > >> >> > >>> http://www.linuxbasic.net/index.php?topic=466.0 > >> >> > >>> > >> >> > >>> > >> >> > >> What distribution/version are you using? > >> >> > >> Which version of Gambas? > >> >> > >> > >> >> > >> > >> >> > gambas 2.what? > >> >> > >From what I understand, it had been working before, is that correct? > >> >> > > >> >> > > >> >> > ------------------------------------------------------------------------------ > >> >> > Stay on top of everything new and different, both inside and > >> >> > around Java (TM) technology - register by April 22, and save > >> >> > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > >> >> > 300 plus technical and hands-on sessions. Register today. > >> >> > Use priority code J9JMT32. http://p.sf.net/sfu/p > >> >> > _______________________________________________ > >> >> > Gambas-user mailing list > >> >> > Gambas-user at lists.sourceforge.net > >> >> > https://lists.sourceforge.net/lists/listinfo/gambas-user > >> >> > >> >> ------------------------------------------------------------------------------ > >> >> Stay on top of everything new and different, both inside and > >> >> around Java (TM) technology - register by April 22, and save > >> >> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > >> >> 300 plus technical and hands-on sessions. Register today. > >> >> Use priority code J9JMT32. http://p.sf.net/sfu/p > >> >> _______________________________________________ > >> >> Gambas-user mailing list > >> >> Gambas-user at lists.sourceforge.net > >> >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> >> > >> > > >> > > >> > Arggg. > >> > My crystal bowl is broken. > >> > > >> > > >> > Best regards, > >> > > >> > Ron_1st > >> > > >> > -- > >> > A: Delete the text you reply on. > >> > Q: What to do to get my post on top? > >> > --- > >> > A: Because it messes up the order in which people normally read text. > >> > Q: Why is top-posting such a bad thing? > >> > --- > >> > A: Top-posting. > >> > Q: What is the most annoying thing in e-mail? > >> > > >> > > >> > ------------------------------------------------------------------------------ > >> > Stay on top of everything new and different, both inside and > >> > around Java (TM) technology - register by April 22, and save > >> > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > >> > 300 plus technical and hands-on sessions. Register today. > >> > Use priority code J9JMT32. http://p.sf.net/sfu/p > >> > _______________________________________________ > >> > Gambas-user mailing list > >> > Gambas-user at lists.sourceforge.net > >> > https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > > >> > >> ------------------------------------------------------------------------------ > >> Stay on top of everything new and different, both inside and > >> around Java (TM) technology - register by April 22, and save > >> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > >> 300 plus technical and hands-on sessions. Register today. > >> Use priority code J9JMT32. http://p.sf.net/sfu/p > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > > Stay on top of everything new and different, both inside and > > around Java (TM) technology - register by April 22, and save > > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > > 300 plus technical and hands-on sessions. Register today. > > Use priority code J9JMT32. http://p.sf.net/sfu/p > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From rterry at ...1946... Fri Apr 24 06:37:39 2009 From: rterry at ...1946... (richard terry) Date: Fri, 24 Apr 2009 14:37:39 +1000 Subject: [Gambas-user] Obtaining a list of system printers Message-ID: <200904241437.39948.rterry@...1946...> Hi, I need to be able to browse a list of system printers and wondered how one obtained these. Regards richard From eilert-sprachen at ...221... Fri Apr 24 08:19:20 2009 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Fri, 24 Apr 2009 08:19:20 +0200 Subject: [Gambas-user] Format Text In-Reply-To: <8D42310D957CFB46AA11921A711D4D16023F579D98@...1899...> References: <8D42310D957CFB46AA11921A711D4D16023F579D6F@...1899...> <49F07EE3.2050003@...626...> <8D42310D957CFB46AA11921A711D4D16023F579D96@...1899...> <49F09167.9000600@...221...> <8D42310D957CFB46AA11921A711D4D16023F579D98@...1899...> Message-ID: <49F159E8.1000002@...221...> Hi, Can you quote the thing you've written? Maybe you missed something or so... Normally it should work with both len() or string.len() Ok, then you said you will only give strings to another program, so the font shouldn't be important. In Basic, the only way of doing what you want will be using Print with a comma: print "22.55", 'the comma adds a tab character chr$(9) Then I remember (was it PowerBasic?) a "USING" thing where one could do such things with a mask of "###" or so. Long time ago, very, very long time ;-) Never used that stuff then. But as you need right-aligned tabs... you will need to spend a little time developing an algorithm that assembles your lines. You mentioned other languages that offer easier ways. Can you give me an example? The easiest way I can think of would be some function where you define the line length and the tabs and then you add the strings to be inserted. If this function just replaces a line of spaces with the inserted strings, it wouldn't be too complicated. Rolf Stefan Miefert schrieb: > Hello, > > i try your version included "string.len ... > but it dosent run when I have ??? inside. > > I always get "bad arguments" > > > -----Urspr?ngliche Nachricht----- > Von: Rolf-Werner Eilert [mailto:eilert-sprachen at ...221...] > Gesendet: Donnerstag, 23. April 2009 18:04 > An: mailing list for gambas users > Betreff: Re: [Gambas-user] Format Text > > Hi Stefan, > > Stefan Miefert schrieb: >> Istn very smart but i do something like this now >> >> >> >> >> "Test" & space(30 - len("Test)) & "Alles how I can" > > Not very smart? Hm. This would be just my solution. > >> But how can I align something like number like this >> >> 22.55 >> 1.22 >> 133.22 >> >> Must be like this >> >> 22.55 >> 1.22 >> 133.22 > > Just do it the other way round. If txt$ contains the text: > > space(30 - len(txt$)) & txt$ > > or better (if umlauts are contained) > > space(30 - string.len(txt$)) & txt$ > > > That should do it... at least if you use Courier. For proportional > fonts, you will want to use a drawing space like Printer or DrawingArea > and work with measures of text lengths etc. That's quite another world, > though it's basically the same way of grouping the columns. > > Rolf > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From rospolosco at ...152... Fri Apr 24 10:04:09 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Fri, 24 Apr 2009 10:04:09 +0200 Subject: [Gambas-user] Obtaining a list of system printers In-Reply-To: <200904241437.39948.rterry@...1946...> References: <200904241437.39948.rterry@...1946...> Message-ID: <200904241004.09382.rospolosco@...152...> Il venerd? 24 aprile 2009 06:37:39 richard terry ha scritto: > Hi, > > I need to be able to browse a list of system printers and wondered how one > obtained these. > > Regards > > richard > You could try 'lpstat'. I suggest you to read 'man lpstat' and try -a, -p, -v options to see which one fit your needs better. Warning: lpstat needs cupsd daemon running. Saluti, Stefano > --------------------------------------------------------------------------- >--- Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensign option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From steven at ...2097... Fri Apr 24 10:36:43 2009 From: steven at ...2097... (Steven James Drinnan) Date: Fri, 24 Apr 2009 16:36:43 +0800 Subject: [Gambas-user] Gambas server pages Message-ID: <1240562203.8940.14.camel@...2149...> Well i do not know if you got the last message but I have been playing with this. Got it working in Apache with cgi. But i have this problem the example always works. yeah! But when I try it myself with this program #!/usr/bin/env gbw2 <% DIM myName AS String %>

My Test

<% myName = "steven" %>

My name is <%= myName %>.

I test via the command line and get the right response. Content-type: text/html Content-length: 123

My Test

My name is steven.

But when I put on my webserver I get Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, steven at ...40... and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. ________________________________________________________________________ Apache/2.2.11 (Fedora) Server at localhost Port 80 in the appache error log i get ERROR: #24: No startup method [Fri Apr 24 16:31:20 2009] [error] [client 127.0.0.1] Premature end of script headers: test4.gbw2 I have got SElinux disabled, I need to to get anything working but I will sort that out later. Any thoughts Steven From steven at ...2097... Fri Apr 24 10:27:45 2009 From: steven at ...2097... (Steven James Drinnan) Date: Fri, 24 Apr 2009 16:27:45 +0800 Subject: [Gambas-user] Gambas server pages Message-ID: <1240561665.8940.5.camel@...2149...> Well i do not know if you got the last message but I have been playing with this. Got it working in Apache with cgi. From gambas at ...1... Fri Apr 24 10:55:34 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Fri, 24 Apr 2009 10:55:34 +0200 Subject: [Gambas-user] Format Text In-Reply-To: <49F159E8.1000002@...221...> References: <8D42310D957CFB46AA11921A711D4D16023F579D6F@...1899...> <8D42310D957CFB46AA11921A711D4D16023F579D98@...1899...> <49F159E8.1000002@...221...> Message-ID: <200904241055.34307.gambas@...1...> > Hi, > > Can you quote the thing you've written? Maybe you missed something or > so... Normally it should work with both len() or string.len() > > Ok, then you said you will only give strings to another program, so the > font shouldn't be important. In Basic, the only way of doing what you > want will be using Print with a comma: > > print "22.55", 'the comma adds a tab character chr$(9) > > Then I remember (was it PowerBasic?) a "USING" thing where one could do > such things with a mask of "###" or so. Long time ago, very, very long > time ;-) Never used that stuff then. > > But as you need right-aligned tabs... you will need to spend a little > time developing an algorithm that assembles your lines. > > You mentioned other languages that offer easier ways. Can you give me an > example? The easiest way I can think of would be some function where you > define the line length and the tabs and then you add the strings to be > inserted. If this function just replaces a line of spaces with the > inserted strings, it wouldn't be too complicated. > > Rolf > In Gambas 3, you can do that: sBuffer = Space$(80) Mid$(sBuffer, 1) = FirstColumn Mid$(sBuffer, 15) = SecondColumn Mid$(sBuffer, 28) = ThirdColumn ... Print sBuffer Regards, -- Beno?t From steven at ...2097... Fri Apr 24 11:05:03 2009 From: steven at ...2097... (Steven James Drinnan) Date: Fri, 24 Apr 2009 17:05:03 +0800 Subject: [Gambas-user] Gambas server pages In-Reply-To: <1240562203.8940.14.camel@...2149...> References: <1240562203.8940.14.camel@...2149...> Message-ID: <1240563903.8940.19.camel@...2149...> I think I solved it. But some please tell me if I can do this better. After some more playing I decided to open up the copied files in gedit as a root user. When I changed the file and resaved it the program worked as expected. Looks like a problem with Apache and cgi scripting and file ownership. Why the example worked OK I do not know. Steven On Fri, 2009-04-24 at 16:36 +0800, Steven James Drinnan wrote: > Well i do not know if you got the last message but I have been playing > with this. Got it working in Apache with cgi. > > But i have this problem the example always works. yeah! > > But when I try it myself with this program > > #!/usr/bin/env gbw2 > <% > DIM myName AS String > %> > > > > > >

My Test

> > <% > myName = "steven" > %> > >

My name is <%= myName %>.

> > > > I test via the command line and get the right response. > > Content-type: text/html > Content-length: 123 > > > > > > > >

My Test

> > > >

My name is steven.

> > > > > > But when I put on my webserver I get > > Internal Server Error > The server encountered an internal error or misconfiguration and was > unable to complete your request. > > Please contact the server administrator, steven at ...40... and inform > them of the time the error occurred, and anything you might have done > that may have caused the error. > > More information about this error may be available in the server error > log. > > > ________________________________________________________________________ > Apache/2.2.11 (Fedora) Server at localhost Port 80 > > in the appache error log i get > > ERROR: #24: No startup method > [Fri Apr 24 16:31:20 2009] [error] [client 127.0.0.1] Premature end of > script headers: test4.gbw2 > > I have got SElinux disabled, I need to to get anything working but I > will sort that out later. > > Any thoughts > > Steven > > > > > > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensign option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From eilert-sprachen at ...221... Fri Apr 24 13:02:36 2009 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Fri, 24 Apr 2009 13:02:36 +0200 Subject: [Gambas-user] Format Text In-Reply-To: <200904241055.34307.gambas@...1...> References: <8D42310D957CFB46AA11921A711D4D16023F579D6F@...1899...> <8D42310D957CFB46AA11921A711D4D16023F579D98@...1899...> <49F159E8.1000002@...221...> <200904241055.34307.gambas@...1...> Message-ID: <49F19C4C.9030609@...221...> Beno?t Minisini schrieb: >> Hi, >> >> Can you quote the thing you've written? Maybe you missed something or >> so... Normally it should work with both len() or string.len() >> >> Ok, then you said you will only give strings to another program, so the >> font shouldn't be important. In Basic, the only way of doing what you >> want will be using Print with a comma: >> >> print "22.55", 'the comma adds a tab character chr$(9) >> >> Then I remember (was it PowerBasic?) a "USING" thing where one could do >> such things with a mask of "###" or so. Long time ago, very, very long >> time ;-) Never used that stuff then. >> >> But as you need right-aligned tabs... you will need to spend a little >> time developing an algorithm that assembles your lines. >> >> You mentioned other languages that offer easier ways. Can you give me an >> example? The easiest way I can think of would be some function where you >> define the line length and the tabs and then you add the strings to be >> inserted. If this function just replaces a line of spaces with the >> inserted strings, it wouldn't be too complicated. >> >> Rolf >> > > In Gambas 3, you can do that: > > sBuffer = Space$(80) > Mid$(sBuffer, 1) = FirstColumn > Mid$(sBuffer, 15) = SecondColumn > Mid$(sBuffer, 28) = ThirdColumn > ... > Print sBuffer > > Regards, > Oh yes, that's very practical. Good to know this exists in Gambas3, but I still use Gambas2, so it's for the future :-) Regards Rolf From rterry at ...1946... Fri Apr 24 16:26:15 2009 From: rterry at ...1946... (richard terry) Date: Sat, 25 Apr 2009 00:26:15 +1000 Subject: [Gambas-user] A postregres question re points Message-ID: <200904250026.15681.rterry@...1946...> Probably off-gambas topic but, I want to be able to store x-y co-ordinates e.g: create table defaults.temp (pk serial primary key, xy point ); insert into defaults.temp(xy) values (point(1,1)); I can retreive a result as - select * from defaults.temp; which gives (1,1) Now I'm stuck knowing how to put this into a variablee in gambas. Any help appreciated. Richard From juergen.linder at ...17... Sat Apr 25 10:55:58 2009 From: juergen.linder at ...17... (juelin) Date: Sat, 25 Apr 2009 01:55:58 -0700 (PDT) Subject: [Gambas-user] define data-variable as record Message-ID: <23229945.post@...1379...> hello, it is possible to define a record into gambas? thats mean a variable with different datatypes for example: type recorda as record a as intger b as string c[99] as float endtype dim variablename as recorda kind regards J?rgen -- View this message in context: http://www.nabble.com/define-data-variable-as-record-tp23229945p23229945.html Sent from the gambas-user mailing list archive at Nabble.com. From m0e.lnx at ...626... Sat Apr 25 13:17:49 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Sat, 25 Apr 2009 06:17:49 -0500 Subject: [Gambas-user] define data-variable as record In-Reply-To: <23229945.post@...1379...> References: <23229945.post@...1379...> Message-ID: <1f1e8c1b0904250417k3dcc944dtcc6a40f995f0ec74@...627...> Never heard of such a thing. But maybe a variant type of variable will do what you need On Apr 25, 2009 3:57 AM, "juelin" wrote: hello, it is possible to define a record into gambas? thats mean a variable with different datatypes for example: type recorda as record a as intger b as string c[99] as float endtype dim variablename as recorda kind regards J?rgen -- View this message in context: http://www.nabble.com/define-data-variable-as-record-tp23229945p23229945.html Sent from the gambas-user mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From richard at ...2079... Sat Apr 25 13:30:19 2009 From: richard at ...2079... (Richard Muir-Gladman) Date: Sat, 25 Apr 2009 12:30:19 +0100 Subject: [Gambas-user] define data-variable as record In-Reply-To: <1f1e8c1b0904250417k3dcc944dtcc6a40f995f0ec74@...627...> References: <23229945.post@...1379...> <1f1e8c1b0904250417k3dcc944dtcc6a40f995f0ec74@...627...> Message-ID: <1240659019.6926.0.camel@...2150...> Couldn't you just use a class with public attributes? On Sat, 2009-04-25 at 06:17 -0500, M0E Lnx wrote: > Never heard of such a thing. But maybe a variant type of variable will do > what you need > > On Apr 25, 2009 3:57 AM, "juelin" wrote: > > > hello, > it is possible to define a record into gambas? > thats mean a variable with different datatypes > for example: > type recorda as record > a as intger > b as string > c[99] as float > endtype > dim variablename as recorda > > kind regards > J?rgen > > -- > View this message in context: > http://www.nabble.com/define-data-variable-as-record-tp23229945p23229945.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensign option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensign option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From rterry at ...1946... Sat Apr 25 13:28:36 2009 From: rterry at ...1946... (richard terry) Date: Sat, 25 Apr 2009 21:28:36 +1000 Subject: [Gambas-user] re type recorda as record Message-ID: <200904252128.36289.rterry@...1946...> Hi Juergen, I maybe way off the mark, but are you sure you couldnt just use a class? in which you do this. ?public a as integer public b as string public c as float [] This would be in its own file under the classes in the IDE say cRecordA To access this from another form you would do this. In the declarations at the top of the form ( or in a subroutine you want to use it) put this: dim myRecord as cRecordA Then in the subroutine you wanted to use it public Sub Mysub() Dim myrecord as new cRecordA myrecord.a = 2 myrecord.b = "hi there" etc end Hope that helps, if not, hey, my fingers got exercise typing. Regards Richard From wdahn at ...1000... Sat Apr 25 13:31:35 2009 From: wdahn at ...1000... (Werner) Date: Sat, 25 Apr 2009 19:31:35 +0800 Subject: [Gambas-user] define data-variable as record In-Reply-To: <23229945.post@...1379...> References: <23229945.post@...1379...> Message-ID: <49F2F497.4000409@...1000...> juelin wrote: > hello, > it is possible to define a record into gambas? > thats mean a variable with different datatypes > for example: > type recorda as record > a as intger > b as string > c[99] as float > endtype > dim variablename as recorda > > kind regards > J?rgen > > Yes of course. Example: class Person Public FirstName as String LastName as String BirthDate as Date Father as Person Mother as Person ----- DIM Peter as NEW Person DIM Village as Object[] Village.Add(Peter) From jeff at ...2103... Sat Apr 25 13:51:00 2009 From: jeff at ...2103... (Jeff) Date: Sat, 25 Apr 2009 21:51:00 +1000 Subject: [Gambas-user] define data-variable as record In-Reply-To: <23229945.post@...1379...> References: <23229945.post@...1379...> Message-ID: <1240660260.6222.2.camel@...2104...> Same as the other answers - define a class. It's a good habit to get into to write accessor methods (set and get) or use properties rather than public variables. On Sat, 2009-04-25 at 01:55 -0700, juelin wrote: > hello, > it is possible to define a record into gambas? > thats mean a variable with different datatypes > for example: > type recorda as record > a as intger > b as string > c[99] as float > endtype > dim variablename as recorda > > kind regards > J?rgen > From gael.lehech at ...626... Sat Apr 25 16:37:53 2009 From: gael.lehech at ...626... (=?ISO-8859-1?Q?Ga=EBl_Le_Hec=27H?=) Date: Sat, 25 Apr 2009 16:37:53 +0200 Subject: [Gambas-user] Signal 11 with Format$(123,00) Message-ID: hi all,on gambas2-2.11.1 on fedora 10 if I type on the console : ? format$(123,00) I get a beautiful Signal 11 ;-) Am I alone ? Ga?l Le Hec'H From jguardon at ...2035... Sat Apr 25 17:59:29 2009 From: jguardon at ...2035... (Jesus Guardon) Date: Sat, 25 Apr 2009 17:59:29 +0200 Subject: [Gambas-user] Gambas server pages In-Reply-To: <1240563903.8940.19.camel@...2149...> References: <1240562203.8940.14.camel@...2149...> <1240563903.8940.19.camel@...2149...> Message-ID: <49F33361.3050403@...2035...> I'm trying to get server pages to work, but I can't. My scripts doesn't work because gbw2 is not found in my system. Executing the script in console gives: jesus at ...2151...:~$ ./test.gbs /usr/bin/env: gbw2: No existe el fichero ? directorio jesus at ...2151...:~$ Using Ubuntu 8.10 - Gambas2 2.12 (Compiled without errors) Any help is welcome. Jes?s Steven James Drinnan escribi?: > I think I solved it. But some please tell me if I can do this better. > > After some more playing I decided to open up the copied files in gedit > as a root user. When I changed the file and resaved it the program > worked as expected. > > > Looks like a problem with Apache and cgi scripting and file ownership. > > Why the example worked OK I do not know. > > > Steven From gambas at ...1... Sat Apr 25 19:49:59 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Sat, 25 Apr 2009 19:49:59 +0200 Subject: [Gambas-user] Signal 11 with Format$(123,00) In-Reply-To: References: Message-ID: <200904251949.59207.gambas@...1...> > hi all,on gambas2-2.11.1 on fedora 10 if I type on the console : > ? format$(123,00) I get a beautiful Signal 11 ;-) > Am I alone ? > Ga?l Le Hec'H The bug is fixed in revision #1934. Don't forget to put double quotes around your format string! Regards, -- Beno?t From gael.lehech at ...626... Sat Apr 25 22:16:21 2009 From: gael.lehech at ...626... (=?ISO-8859-1?Q?Ga=EBl_Le_Hec=27H?=) Date: Sat, 25 Apr 2009 22:16:21 +0200 Subject: [Gambas-user] Signal 11 with Format$(123,00) In-Reply-To: <200904251949.59207.gambas@...1...> References: <200904251949.59207.gambas@...1...> Message-ID: yes, the bug was found thanks ti a typo ;-). good evening benoit Le 25 avril 2009 19:49, Beno?t Minisini a ?crit : > > hi all,on gambas2-2.11.1 on fedora 10 if I type on the console : > > ? format$(123,00) I get a beautiful Signal 11 ;-) > > Am I alone ? > > Ga?l Le Hec'H > > The bug is fixed in revision #1934. > > Don't forget to put double quotes around your format string! > > Regards, > > -- > Beno?t > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensign option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From rterry at ...1946... Sun Apr 26 04:22:51 2009 From: rterry at ...1946... (richard terry) Date: Sun, 26 Apr 2009 12:22:51 +1000 Subject: [Gambas-user] Creating a menu at runtime. Message-ID: <200904261222.51253.rterry@...1946...> Is it possible to create/add to a menu at runtime. If so, I wonder if anyone could give me an example. Regards Richard From rterry at ...1946... Sun Apr 26 05:02:30 2009 From: rterry at ...1946... (richard terry) Date: Sun, 26 Apr 2009 13:02:30 +1000 Subject: [Gambas-user] Creating a menu at runtime.(Solved sort of) In-Reply-To: <200904261222.51253.rterry@...1946...> References: <200904261222.51253.rterry@...1946...> Message-ID: <200904261302.30753.rterry@...1946...> On Sun, 26 Apr 2009 12:22:51 pm richard terry wrote: > Is it possible to create/add to a menu at runtime. > > If so, I wonder if anyone could give me an example. > > Regards > > Richard > > --------------------------------------------------------------------------- >--- Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensign option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user Answering myself, but perhaps someone can check this code and see if it is valid, or could improve it. The object was to put a popup menu on the print button in my prescription writer, so that if I didn't want to send the script to the default printer I could right mouse click and get up a list, so this is what I did: Public Sub Editor_SpecialButtons_Menu() Dim menu_item As Menu Dim hObs As Observer Dim Printer_name As String '------------------------------------------ 'Create a new menu on the fly '------------------------------------------ Dim mnuPrinter As New Menu(Me) '----------------------------------------------------------------- 'Only do this at the moment in the script writer 'and only on the print button '----------------------------------------------------------------- Select Case WorkspaceEditor.ActiveWindow.Tag Case "Scripts" Select Case Last.tag 'the buttons Case "print" 'Get list of printers attatched to this machine MyApp.Printers_Get_Available() For Each Printer_name InMyApp.available_printers '-------------------------------------------------- 'make a menu item for each printer '-------------------------------------------------- menu_item = New Menu(mnuPrinter) With menu_item .Caption = Printer_name .Tag = Printer_name .Name = Printer_name hobs = New Observer(menu_item) As "mnuPrinter" End With Next mnuPrinter.Popup() End Select End Select End Public Sub mnuPrinter_Click() Print "in the new menu", Last.tag End This seems to give the desired result, but is the code ok? Regards Richard From steven at ...2097... Sun Apr 26 05:19:40 2009 From: steven at ...2097... (Steven James Drinnan) Date: Sun, 26 Apr 2009 11:19:40 +0800 Subject: [Gambas-user] Gambas server pages In-Reply-To: <49F33361.3050403@...2035...> References: <1240562203.8940.14.camel@...2149...> <1240563903.8940.19.camel@...2149...> <49F33361.3050403@...2035...> Message-ID: <1240715980.19115.9.camel@...2149...> Create a symbolic link like this Code: Open your terminal: su ln -s /usr/bin/gbs2 /usr/bin/gbw2 #### this will create the necessary file. To test run your script through a terminal. Then you just need to configure your web server to recognize gbw2 extensions. (Or just use cgi) On Sat, 2009-04-25 at 17:59 +0200, Jesus Guardon wrote: > I'm trying to get server pages to work, but I can't. > > My scripts doesn't work because gbw2 is not found in my system. > Executing the script in console gives: > > jesus at ...2151...:~$ ./test.gbs > /usr/bin/env: gbw2: No existe el fichero ? directorio > jesus at ...2151...:~$ > > Using Ubuntu 8.10 - Gambas2 2.12 (Compiled without errors) > > Any help is welcome. > > Jes?s > > Steven James Drinnan escribi?: > > I think I solved it. But some please tell me if I can do this better. > > > > After some more playing I decided to open up the copied files in gedit > > as a root user. When I changed the file and resaved it the program > > worked as expected. > > > > > > Looks like a problem with Apache and cgi scripting and file ownership. > > > > Why the example worked OK I do not know. > > > > > > Steven > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensign option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From arbelmichal at ...2145... Sun Apr 26 07:21:11 2009 From: arbelmichal at ...2145... (arbelmichal) Date: Sun, 26 Apr 2009 08:21:11 +0300 Subject: [Gambas-user] how do I stop getting mail from the mailing list? Message-ID: <1240723271.414.1.camel@...2146...> Hi I don't wont to get more mails, It blocks my mail... so how can I stop getting them? Arbel From wdahn at ...1000... Sun Apr 26 08:47:51 2009 From: wdahn at ...1000... (Werner) Date: Sun, 26 Apr 2009 14:47:51 +0800 Subject: [Gambas-user] how do I stop getting mail from the mailing list? In-Reply-To: <1240723271.414.1.camel@...2146...> References: <1240723271.414.1.camel@...2146...> Message-ID: <49F40397.50507@...1000...> arbelmichal wrote: > Hi I don't wont to get more mails, It blocks my mail... so how can I > stop getting them? > Arbel The same way you subscribed. Visit here: https://lists.sourceforge.net/lists/listinfo/gambas-user The unsubscribe part is at the bottom. From rospolosco at ...152... Sun Apr 26 08:51:09 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Sun, 26 Apr 2009 08:51:09 +0200 Subject: [Gambas-user] how do I stop getting mail from the mailing list? In-Reply-To: <1240723271.414.1.camel@...2146...> References: <1240723271.414.1.camel@...2146...> Message-ID: <200904260851.10130.rospolosco@...152...> Il domenica 26 aprile 2009 07:21:11 arbelmichal ha scritto: > Hi I don't wont to get more mails, It blocks my mail... so how can I > stop getting them? > Arbel > See: https://lists.sourceforge.net/lists/options/gambas-user > --------------------------------------------------------------------------- >--- Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensign option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From jguardon at ...2035... Sun Apr 26 09:15:10 2009 From: jguardon at ...2035... (Jesus Guardon) Date: Sun, 26 Apr 2009 09:15:10 +0200 Subject: [Gambas-user] Gambas server pages In-Reply-To: <1240715980.19115.9.camel@...2149...> References: <1240562203.8940.14.camel@...2149...> <1240563903.8940.19.camel@...2149...> <49F33361.3050403@...2035...> <1240715980.19115.9.camel@...2149...> Message-ID: <49F409FE.1040109@...2035...> Many thanks, Steven. It now works. Although my gbs2 path is /usr/local/bin/gbs2 Regards Jesus Steven James Drinnan escribi?: > Create a symbolic link like this > > ln -s /usr/bin/gbs2 /usr/bin/gbw2 > From gambas.fr at ...626... Sun Apr 26 16:44:21 2009 From: gambas.fr at ...626... (Fabien Bodard) Date: Sun, 26 Apr 2009 16:44:21 +0200 Subject: [Gambas-user] Creating a menu at runtime.(Solved sort of) In-Reply-To: <200904261302.30753.rterry@...1946...> References: <200904261222.51253.rterry@...1946...> <200904261302.30753.rterry@...1946...> Message-ID: <6324a42a0904260744s7044d638wa586b8e6df077d0e@...627...> the code is good but why did you use an observer ??? You just need to set the handle in the new request. An observer is mde to catch an event before or after the objet observed. to change the event parent and handle : Object.Attach(... http://gambasdoc.org/help/comp/gb/object/attach?en For Each Printer_name InMyApp.available_printers '-------------------------------------------------- 'make a menu item for each printer '-------------------------------------------------- menu_item = New Menu(mnuPrinter) As "mnuPrinter" With menu_item .Caption = Printer_name .Tag = Printer_name .Name = Printer_name End With Next Regards, Fabien Bodard 2009/4/26 richard terry : > On Sun, 26 Apr 2009 12:22:51 pm richard terry wrote: >> Is it possible to create/add to a menu at runtime. >> >> If so, I wonder if anyone could give me an example. >> >> Regards >> >> Richard >> >> --------------------------------------------------------------------------- >>--- Crystal Reports - New Free Runtime and 30 Day Trial >> Check out the new simplified licensign option that enables unlimited >> royalty-free distribution of the report engine for externally facing >> server and web deployment. >> http://p.sf.net/sfu/businessobjects >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > Answering myself, but perhaps someone can check this code and see if it is > valid, or could improve it. > > The object was to put a popup menu on the print button in my prescription > writer, so that if I didn't want to send the script to the default printer I > could right mouse click and get up a list, so this is what I did: > > Public Sub Editor_SpecialButtons_Menu() > ? Dim menu_item As Menu > ? Dim hObs As Observer > ? Dim Printer_name As String > ?'------------------------------------------ > ?'Create a new menu on the fly > ?'------------------------------------------ > ? Dim mnuPrinter As New Menu(Me) > > ?'----------------------------------------------------------------- > ?'Only do this at the moment in the script writer > ?'and only on the print button > ?'----------------------------------------------------------------- > ?Select Case WorkspaceEditor.ActiveWindow.Tag > ?Case "Scripts" > ? ? ?Select Case Last.tag ? 'the buttons > ? ? ? ? Case "print" > > ? ? ? ? ? ? ? ?'Get list of printers attatched to this machine > ? ? ? ? ? ? ? MyApp.Printers_Get_Available() > ? ? ? ? ? ? ? For Each Printer_name InMyApp.available_printers > ? ? ? ? ? ? ? ? '-------------------------------------------------- > ? ? ? ? ? ? ? ? 'make a menu item for each printer > ? ? ? ? ? ? ? ? '-------------------------------------------------- > ? ? ? ? ? ? ? ? ?menu_item = New Menu(mnuPrinter) > ? ? ? ? ? ? ? ? ?With menu_item > ? ? ? ? ? ? ? ? ? ? .Caption = Printer_name > ? ? ? ? ? ? ? ? ? ? .Tag = Printer_name > ? ? ? ? ? ? ? ? ? ? .Name = Printer_name > ? ? ? ? ? ? ? ? ? ? hobs = New Observer(menu_item) As "mnuPrinter" > ? ? ? ? ? ? ? ? ?End With > ? ? ? ? ? ? Next > ? ? ? ? ? ? mnuPrinter.Popup() > > ? ? ?End Select > ?End Select > ?End > > > Public Sub mnuPrinter_Click() > > ?Print "in the new menu", Last.tag > > End > > This seems to give the desired result, but is the code ok? > > Regards > > Richard > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensign option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From rterry at ...1946... Sun Apr 26 23:35:05 2009 From: rterry at ...1946... (richard terry) Date: Mon, 27 Apr 2009 07:35:05 +1000 Subject: [Gambas-user] Creating a menu at runtime.(Solved sort of) In-Reply-To: <6324a42a0904260744s7044d638wa586b8e6df077d0e@...627...> References: <200904261222.51253.rterry@...1946...> <200904261302.30753.rterry@...1946...> <6324a42a0904260744s7044d638wa586b8e6df077d0e@...627...> Message-ID: <200904270735.05741.rterry@...1946...> On Mon, 27 Apr 2009 12:44:21 am you wrote: > the code is good but why did you use an observer ??? You just need to > set the handle in the new request. Thanks, I'll do that. I looked everywhere trying to figure this out, perhaps there should be this type of example in the help file. Regards Richard > > An observer is mde to catch an event before or after the objet observed. > > to change the event parent and handle : Object.Attach(... > http://gambasdoc.org/help/comp/gb/object/attach?en > > For Each Printer_name InMyApp.available_printers > '-------------------------------------------------- > 'make a menu item for each printer > '-------------------------------------------------- > menu_item = New Menu(mnuPrinter) As "mnuPrinter" > With menu_item > .Caption = Printer_name > .Tag = Printer_name > .Name = Printer_name > End With > Next > > > Regards, > > Fabien Bodard > > 2009/4/26 richard terry : > > On Sun, 26 Apr 2009 12:22:51 pm richard terry wrote: > >> Is it possible to create/add to a menu at runtime. > >> > >> If so, I wonder if anyone could give me an example. > >> > >> Regards > >> > >> Richard > >> > >> ------------------------------------------------------------------------ > >>--- --- Crystal Reports - New Free Runtime and 30 Day Trial > >> Check out the new simplified licensign option that enables unlimited > >> royalty-free distribution of the report engine for externally facing > >> server and web deployment. > >> http://p.sf.net/sfu/businessobjects > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > Answering myself, but perhaps someone can check this code and see if it > > is valid, or could improve it. > > > > The object was to put a popup menu on the print button in my prescription > > writer, so that if I didn't want to send the script to the default > > printer I could right mouse click and get up a list, so this is what I > > did: > > > > Public Sub Editor_SpecialButtons_Menu() > > ? Dim menu_item As Menu > > ? Dim hObs As Observer > > ? Dim Printer_name As String > > ?'------------------------------------------ > > ?'Create a new menu on the fly > > ?'------------------------------------------ > > ? Dim mnuPrinter As New Menu(Me) > > > > ?'----------------------------------------------------------------- > > ?'Only do this at the moment in the script writer > > ?'and only on the print button > > ?'----------------------------------------------------------------- > > ?Select Case WorkspaceEditor.ActiveWindow.Tag > > ?Case "Scripts" > > ? ? ?Select Case Last.tag ? 'the buttons > > ? ? ? ? Case "print" > > > > ? ? ? ? ? ? ? ?'Get list of printers attatched to this machine > > ? ? ? ? ? ? ? MyApp.Printers_Get_Available() > > ? ? ? ? ? ? ? For Each Printer_name InMyApp.available_printers > > ? ? ? ? ? ? ? ? '-------------------------------------------------- > > ? ? ? ? ? ? ? ? 'make a menu item for each printer > > ? ? ? ? ? ? ? ? '-------------------------------------------------- > > ? ? ? ? ? ? ? ? ?menu_item = New Menu(mnuPrinter) > > ? ? ? ? ? ? ? ? ?With menu_item > > ? ? ? ? ? ? ? ? ? ? .Caption = Printer_name > > ? ? ? ? ? ? ? ? ? ? .Tag = Printer_name > > ? ? ? ? ? ? ? ? ? ? .Name = Printer_name > > ? ? ? ? ? ? ? ? ? ? hobs = New Observer(menu_item) As "mnuPrinter" > > ? ? ? ? ? ? ? ? ?End With > > ? ? ? ? ? ? Next > > ? ? ? ? ? ? mnuPrinter.Popup() > > > > ? ? ?End Select > > ?End Select > > ?End > > > > > > Public Sub mnuPrinter_Click() > > > > ?Print "in the new menu", Last.tag > > > > End > > > > This seems to give the desired result, but is the code ok? > > > > Regards > > > > Richard > > > > ------------------------------------------------------------------------- > >----- Crystal Reports - New Free Runtime and 30 Day Trial > > Check out the new simplified licensign option that enables unlimited > > royalty-free distribution of the report engine for externally facing > > server and web deployment. > > http://p.sf.net/sfu/businessobjects > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user From simonart.dominique at ...11... Mon Apr 27 01:52:13 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Mon, 27 Apr 2009 01:52:13 +0200 Subject: [Gambas-user] Pb with transparency? Message-ID: <49F4F3AD.4080103@...11...> Hi, Gambas 2.12 with QT I had a prog that worked well in Gambas 2.11 but now it doesn't work correctly for all the images with transparent areas. Here is a very short illustration of the problem DIM PicSac AS Picture DIM PicCase AS Object[] Dim i AS Integer PicCase.Resize(2) FOR i = 0 TO 1 PicCase[i] = NEW Picture(14, 14, TRUE) NEXT PicCase[0] = Picture.Load(image with some transparent part) PicCase[1] = Picture.Load(image without transparent area) PicSac = NEW Picture(14, 14, TRUE) i = 0 Draw.Begin(PicSac) Draw.Picture(PicCase[i], 0, 0, 14, 14, 0, 0, 14, 14) Draw.End PictureBox1.Picture = PicSac i = 0 => nothing displayed i = 1 => correct display (I know that Gambas 2.12 changed the Draw routine) Is it a bug? regards, Dominique Simonart From jbskaggs at ...1871... Mon Apr 27 03:33:00 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Sun, 26 Apr 2009 18:33:00 -0700 (PDT) Subject: [Gambas-user] I need a shell script Message-ID: <23248632.post@...1379...> I am having a sudo (permission) problem in my gamemaker program. It creates the code and writes it to the MMain.Module and creates the .Project file. Now I need to be able to shell from my program to a directory and run the gbc2 and gba2 commands. I have tried several different shell commands and I have tried a script: cd mypathtoproject gbc2 gba2 but I get a permission not granted error. I have tired calling the script from shell with sudo Shell "sudo " & "scriptname.sh" but it asks for password then hangs. This is really simple but I am somehow bungling it as usual. So could someone one correct my script and to tell me how to call it? JB Skaggs -- View this message in context: http://www.nabble.com/I-need-a-shell-script-tp23248632p23248632.html Sent from the gambas-user mailing list archive at Nabble.com. From joshiggins at ...1601... Mon Apr 27 09:35:29 2009 From: joshiggins at ...1601... (Joshua Higgins) Date: Mon, 27 Apr 2009 08:35:29 +0100 Subject: [Gambas-user] I need a shell script In-Reply-To: <23248632.post@...1379...> References: <23248632.post@...1379...> Message-ID: <4247f5440904270035l7e07fd7eha9d8f382a3cc4523@...627...> Could you not replace the sudo command with gksu (or kdesu)? That command is the same as sudo but asks in X for the password, not on the console. 2009/4/27 jbskaggs > > I am having a sudo (permission) problem in my gamemaker program. It > creates > the code and writes it to the MMain.Module and creates the .Project file. > > Now I need to be able to shell from my program to a directory and run the > gbc2 and gba2 commands. > > I have tried several different shell commands and I have tried a script: > > cd mypathtoproject > gbc2 > gba2 > > but I get a permission not granted error. I have tired calling the script > from shell with sudo > > Shell "sudo " & "scriptname.sh" > > but it asks for password then hangs. > > This is really simple but I am somehow bungling it as usual. > > So could someone one correct my script and to tell me how to call it? > > JB Skaggs > -- > View this message in context: > http://www.nabble.com/I-need-a-shell-script-tp23248632p23248632.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensign option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- joshua higgins >>>>>>------ From rospolosco at ...152... Mon Apr 27 10:56:40 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Mon, 27 Apr 2009 10:56:40 +0200 Subject: [Gambas-user] I need a shell script In-Reply-To: <23248632.post@...1379...> References: <23248632.post@...1379...> Message-ID: <200904271056.40388.rospolosco@...152...> Il luned? 27 aprile 2009 03:33:00 jbskaggs ha scritto: > I am having a sudo (permission) problem in my gamemaker program. It > creates the code and writes it to the MMain.Module and creates the .Project > file. > > Now I need to be able to shell from my program to a directory and run the > gbc2 and gba2 commands. > > I have tried several different shell commands and I have tried a script: > > cd mypathtoproject > gbc2 > gba2 > > but I get a permission not granted error. I have tired calling the script > from shell with sudo > > Shell "sudo " & "scriptname.sh" > > but it asks for password then hangs. > > This is really simple but I am somehow bungling it as usual. > > So could someone one correct my script and to tell me how to call it? > > JB Skaggs Attached a little example. Stefano -------------- next part -------------- A non-text attachment was scrubbed... Name: sudo-0.0.1.tar.gz Type: application/x-tgz Size: 7871 bytes Desc: not available URL: From gambas at ...1... Mon Apr 27 11:38:33 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Mon, 27 Apr 2009 11:38:33 +0200 Subject: [Gambas-user] Pb with transparency? In-Reply-To: <49F4F3AD.4080103@...11...> References: <49F4F3AD.4080103@...11...> Message-ID: <200904271138.33711.gambas@...1...> > Hi, > > Gambas 2.12 with QT > > I had a prog that worked well in Gambas 2.11 but now it > doesn't work correctly for all the images with transparent > areas. > Here is a very short illustration of the problem > > DIM PicSac AS Picture > DIM PicCase AS Object[] > Dim i AS Integer > > PicCase.Resize(2) > FOR i = 0 TO 1 > PicCase[i] = NEW Picture(14, 14, TRUE) > NEXT > PicCase[0] = Picture.Load(image with some transparent part) > PicCase[1] = Picture.Load(image without transparent area) > > PicSac = NEW Picture(14, 14, TRUE) > i = 0 > Draw.Begin(PicSac) > Draw.Picture(PicCase[i], 0, 0, 14, 14, 0, 0, 14, 14) > Draw.End > > PictureBox1.Picture = PicSac > > i = 0 => nothing displayed > i = 1 => correct display > (I know that Gambas 2.12 changed the Draw routine) > Is it a bug? > > regards, > Dominique Simonart > I will look at that. Beware that the Picture class is not really transparent. It has no alpha channel but a bitmap mask. Creating a "transparent" Picture internally creates an X11 pixmap and a X11 bitmap mask. Drawing on it the must update both the pixmap and the mask. I think that the mask update is buggy for the Draw.Picture() method. Anyway, you should use the Image class and its Draw method to draw an image on top another one with real alpha transparency. To add to the complexity, converting an Image to a Picture keeps the alpha information with gb.qt, but not with gb.gtk. This is a Qt feature, that uses the XRender extension for that. But GTK+ don't, and just removes all pixels whose alpha component is lower than 128. But you should not take that into account as it is really toolkit specific. Regards, -- Beno?t From jbskaggs at ...1871... Mon Apr 27 12:31:12 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Mon, 27 Apr 2009 03:31:12 -0700 (PDT) Subject: [Gambas-user] I need a shell script In-Reply-To: <200904271056.40388.rospolosco@...152...> References: <23248632.post@...1379...> <200904271056.40388.rospolosco@...152...> Message-ID: <23253548.post@...1379...> When I try to open this with archive manager I get: tar: This does not look like a tar archive tar: Skipping to next header tar: Error exit delayed from previous errors I also tried with xarchive, and ark and could not get it to open could you re-archive it and send it again? JB Stefano Palmeri wrote: > > Il luned? 27 aprile 2009 03:33:00 jbskaggs ha scritto: >> I am having a sudo (permission) problem in my gamemaker program. It >> creates the code and writes it to the MMain.Module and creates the >> .Project >> file. >> >> Now I need to be able to shell from my program to a directory and run the >> gbc2 and gba2 commands. >> >> I have tried several different shell commands and I have tried a script: >> >> cd mypathtoproject >> gbc2 >> gba2 >> >> but I get a permission not granted error. I have tired calling the >> script >> from shell with sudo >> >> Shell "sudo " & "scriptname.sh" >> >> but it asks for password then hangs. >> >> This is really simple but I am somehow bungling it as usual. >> >> So could someone one correct my script and to tell me how to call it? >> >> JB Skaggs > > Attached a little example. > > Stefano > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensign option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > 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/I-need-a-shell-script-tp23248632p23253548.html Sent from the gambas-user mailing list archive at Nabble.com. From rospolosco at ...152... Mon Apr 27 12:44:26 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Mon, 27 Apr 2009 12:44:26 +0200 Subject: [Gambas-user] I need a shell script In-Reply-To: <23253548.post@...1379...> References: <23248632.post@...1379...> <200904271056.40388.rospolosco@...152...> <23253548.post@...1379...> Message-ID: <200904271244.26521.rospolosco@...152...> Il luned? 27 aprile 2009 12:31:12 jbskaggs ha scritto: > When I try to open this with archive manager I get: > > tar: This does not look like a tar archive > tar: Skipping to next header > tar: Error exit delayed from previous errors > > I also tried with xarchive, and ark and could not get it to open could you > re-archive it and send it again? > > JB > Strange. I've created it from the Gambs IDE and the archive seems to be fine here on my box. Anyway here again. Check the md5sum. e6c7e1021a1ee48f070f997dd5346f53 sudo-0.0.1.tar.gz Try 'tar xzvf sudo-0.0.1.tar.gz' Stefano > Stefano Palmeri wrote: > > Il luned? 27 aprile 2009 03:33:00 jbskaggs ha scritto: > >> I am having a sudo (permission) problem in my gamemaker program. It > >> creates the code and writes it to the MMain.Module and creates the > >> .Project > >> file. > >> > >> Now I need to be able to shell from my program to a directory and run > >> the gbc2 and gba2 commands. > >> > >> I have tried several different shell commands and I have tried a script: > >> > >> cd mypathtoproject > >> gbc2 > >> gba2 > >> > >> but I get a permission not granted error. I have tired calling the > >> script > >> from shell with sudo > >> > >> Shell "sudo " & "scriptname.sh" > >> > >> but it asks for password then hangs. > >> > >> This is really simple but I am somehow bungling it as usual. > >> > >> So could someone one correct my script and to tell me how to call it? > >> > >> JB Skaggs > > > > Attached a little example. > > > > Stefano > > > > > > ------------------------------------------------------------------------- > >----- Crystal Reports - New Free Runtime and 30 Day Trial > > Check out the new simplified licensign option that enables unlimited > > royalty-free distribution of the report engine for externally facing > > server and web deployment. > > http://p.sf.net/sfu/businessobjects > > _______________________________________________ > > 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: sudo-0.0.1.tar.gz Type: application/x-tgz Size: 7871 bytes Desc: not available URL: From leonardo at ...1237... Mon Apr 27 12:58:04 2009 From: leonardo at ...1237... (Leonardo Miliani) Date: Mon, 27 Apr 2009 12:58:04 +0200 Subject: [Gambas-user] Problems compiling under Ubuntu 9.04 Message-ID: <49F58FBC.6050802@...1237...> Does anybody have successfully compiled Gambas 2.12 under Ubuntu 9.04? I'm trying to do but until now I has not been able to compile Gambas. Configure works fine, no disabled componet (at part the unknown gb.qte) but when I try to compile Gambas with make, the process hangs up during the compilation of gb.qt.kde with the errors reported in the attached file. (P.S.: I've had to downgrade libtool to version 1.5 'cause I had some other errors from this library...). -- Ciao. Leo. Web: www.leonardomiliani.com E-mail: leonardo at ...1237... Scegli software opensource - Choose opensource software Co-fondatore di Gambas-it.org Il sito di riferimento della comunit? italiana degli utenti di Gambas www.gambas-it.org From simonart.dominique at ...11... Mon Apr 27 13:05:44 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Mon, 27 Apr 2009 13:05:44 +0200 Subject: [Gambas-user] Pb with transparency? In-Reply-To: <200904271138.33711.gambas@...1...> References: <49F4F3AD.4080103@...11...> <200904271138.33711.gambas@...1...> Message-ID: <49F59188.6080602@...11...> Beno?t Minisini a ?crit : >> Hi, >> >> Gambas 2.12 with QT >> >> I had a prog that worked well in Gambas 2.11 but now it >> doesn't work correctly for all the images with transparent >> areas. >> Here is a very short illustration of the problem >> >> DIM PicSac AS Picture >> DIM PicCase AS Object[] >> Dim i AS Integer >> >> PicCase.Resize(2) >> FOR i = 0 TO 1 >> PicCase[i] = NEW Picture(14, 14, TRUE) >> NEXT >> PicCase[0] = Picture.Load(image with some transparent part) >> PicCase[1] = Picture.Load(image without transparent area) >> >> PicSac = NEW Picture(14, 14, TRUE) >> i = 0 >> Draw.Begin(PicSac) >> Draw.Picture(PicCase[i], 0, 0, 14, 14, 0, 0, 14, 14) >> Draw.End >> >> PictureBox1.Picture = PicSac >> >> i = 0 => nothing displayed >> i = 1 => correct display >> (I know that Gambas 2.12 changed the Draw routine) >> Is it a bug? >> >> regards, >> Dominique Simonart >> > > I will look at that. > > Beware that the Picture class is not really transparent. It has no alpha > channel but a bitmap mask. > > Creating a "transparent" Picture internally creates an X11 pixmap and a X11 > bitmap mask. Drawing on it the must update both the pixmap and the mask. I > think that the mask update is buggy for the Draw.Picture() method. > > Anyway, you should use the Image class and its Draw method to draw an image on > top another one with real alpha transparency. > > To add to the complexity, converting an Image to a Picture keeps the alpha > information with gb.qt, but not with gb.gtk. This is a Qt feature, that uses > the XRender extension for that. But GTK+ don't, and just removes all pixels > whose alpha component is lower than 128. But you should not take that into > account as it is really toolkit specific. > > Regards, > Thanks Benoit, I replaced PicCase[] and PicSac by Image and used Draw method instead of Draw.Begin(...). The last instruction is now: PictureBox1.Picture = PicSac.Picture Here are the results: 1) i=0 now display correctly the image with transparent part 2) If I use 2 buttons to draw with i=0 (button1) and i=1 (button2) * button1 then button2 display correctly the two images successively * button2 then button1 display only the image without transparent part (button1 didn't change the display) * if I replace Image1 with another image without transparent part I could see the images associated with their buttons In conclusion, as soon as there is a transparent part in my image, it could never override another image Hope this helps Dominique Simonart From charles at ...1784... Mon Apr 27 13:40:11 2009 From: charles at ...1784... (charlesg) Date: Mon, 27 Apr 2009 04:40:11 -0700 (PDT) Subject: [Gambas-user] gridview In-Reply-To: <23252958.post@...1379...> References: <23252958.post@...1379...> Message-ID: <23254524.post@...1379...> Hi Have you changed the mode property to single (allows one line to be selected) or multiple? rgds -- View this message in context: http://www.nabble.com/gridview-tp23252958p23254524.html Sent from the gambas-user mailing list archive at Nabble.com. From charles at ...1784... Mon Apr 27 13:44:56 2009 From: charles at ...1784... (charlesg) Date: Mon, 27 Apr 2009 04:44:56 -0700 (PDT) Subject: [Gambas-user] I need a shell script In-Reply-To: <23253548.post@...1379...> References: <23248632.post@...1379...> <200904271056.40388.rospolosco@...152...> <23253548.post@...1379...> Message-ID: <23254597.post@...1379...> Hi I sometimes have this problem. It works if you gunzip it first to a tar file. rgds -- View this message in context: http://www.nabble.com/I-need-a-shell-script-tp23248632p23254597.html Sent from the gambas-user mailing list archive at Nabble.com. From marc at ...2075... Mon Apr 27 14:08:42 2009 From: marc at ...2075... (Marc Miralles) Date: Mon, 27 Apr 2009 14:08:42 +0200 Subject: [Gambas-user] Problems compiling under Ubuntu 9.04 In-Reply-To: <49F58FBC.6050802@...1237...> References: <49F58FBC.6050802@...1237...> Message-ID: <49F5A04A.3030902@...2075...> Hi Leonardo: I have compiled gambas 2.12 in some computers with Ubuntu 9.04 without problems. It works fine I have installed all libraries required for installation. In gambas home page I found this for Ubuntu 8.10: sudo apt-get install build-essential autoconf libbz2-dev libgnorba-dev libfbclient2 libmysqlclient15-dev unixodbc-dev libpq-dev libsqlite0-dev libsqlite3-dev libgtk2.0-dev libldap2-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libsage-dev libxml2-dev libxslt1-dev libbonobo2-dev libcos4-dev libomniorb4-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libasound2-dev libesd0-dev libesd-alsa0 libdirectfb-dev libaa1-dev libxtst-dev libffi-dev kdelibs4-dev firebird2.1-dev libqt4-dev With these packages installed, I don't have problems in compilation in some computers with 9.04 Aram En/na Leonardo Miliani ha escrit: > Does anybody have successfully compiled Gambas 2.12 under Ubuntu 9.04? > I'm trying to do but until now I has not been able to compile Gambas. > Configure works fine, no disabled componet (at part the unknown gb.qte) > but when I try to compile Gambas with make, the process hangs up during > the compilation of gb.qt.kde with the errors reported in the attached file. > (P.S.: I've had to downgrade libtool to version 1.5 'cause I had some > other errors from this library...). > > From jussi.lahtinen at ...626... Mon Apr 27 15:13:34 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 27 Apr 2009 16:13:34 +0300 Subject: [Gambas-user] Problems compiling under Ubuntu 9.04 In-Reply-To: <49F5A04A.3030902@...2075...> References: <49F58FBC.6050802@...1237...> <49F5A04A.3030902@...2075...> Message-ID: <384d3900904270613m7f3c6e08ka4395c9ff4a0ec72@...627...> Hi! I haven't move to 9.04 yet, so I'm interested if I should wait little more... Have anyone compiled Gambas3 on 9.04? Leonardo, seems that you forgot the attachment! Jussi On Mon, Apr 27, 2009 at 15:08, Marc Miralles wrote: > Hi Leonardo: > > I have compiled gambas 2.12 ?in some computers with Ubuntu 9.04 without > problems. It works fine > > I have installed all libraries required for installation. In gambas home > page ?I found this for Ubuntu 8.10: > > sudo apt-get install build-essential autoconf libbz2-dev libgnorba-dev > libfbclient2 libmysqlclient15-dev unixodbc-dev libpq-dev libsqlite0-dev > libsqlite3-dev libgtk2.0-dev libldap2-dev libcurl4-gnutls-dev > libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev > libsdl-image1.2-dev libsage-dev libxml2-dev libxslt1-dev libbonobo2-dev > libcos4-dev libomniorb4-dev librsvg2-dev libpoppler-dev > libpoppler-glib-dev libasound2-dev libesd0-dev libesd-alsa0 > libdirectfb-dev libaa1-dev libxtst-dev libffi-dev kdelibs4-dev > firebird2.1-dev libqt4-dev > > With these packages installed, I don't have problems in compilation in > some computers with 9.04 > > Aram > > > En/na Leonardo Miliani ha escrit: >> Does anybody have successfully compiled Gambas 2.12 under Ubuntu 9.04? >> I'm trying to do but until now I has not been able to compile Gambas. >> Configure works fine, no disabled componet (at part the unknown gb.qte) >> but when I try to compile Gambas with make, the process hangs up during >> the compilation of gb.qt.kde with the errors reported in the attached file. >> (P.S.: I've had to downgrade libtool to version 1.5 'cause I had some >> other errors from this library...). >> >> > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensign option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Mon Apr 27 16:34:14 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Mon, 27 Apr 2009 16:34:14 +0200 Subject: [Gambas-user] Pb with transparency? In-Reply-To: <49F59188.6080602@...11...> References: <49F4F3AD.4080103@...11...> <200904271138.33711.gambas@...1...> <49F59188.6080602@...11...> Message-ID: <200904271634.14282.gambas@...1...> > Beno?t Minisini a ?crit : > >> Hi, > >> > >> Gambas 2.12 with QT > >> > >> I had a prog that worked well in Gambas 2.11 but now it > >> doesn't work correctly for all the images with transparent > >> areas. > >> Here is a very short illustration of the problem > >> > >> DIM PicSac AS Picture > >> DIM PicCase AS Object[] > >> Dim i AS Integer > >> > >> PicCase.Resize(2) > >> FOR i = 0 TO 1 > >> PicCase[i] = NEW Picture(14, 14, TRUE) > >> NEXT > >> PicCase[0] = Picture.Load(image with some transparent part) > >> PicCase[1] = Picture.Load(image without transparent area) > >> > >> PicSac = NEW Picture(14, 14, TRUE) > >> i = 0 > >> Draw.Begin(PicSac) > >> Draw.Picture(PicCase[i], 0, 0, 14, 14, 0, 0, 14, 14) > >> Draw.End > >> > >> PictureBox1.Picture = PicSac > >> > >> i = 0 => nothing displayed > >> i = 1 => correct display > >> (I know that Gambas 2.12 changed the Draw routine) > >> Is it a bug? > >> > >> regards, > >> Dominique Simonart > > > > I will look at that. > > > > Beware that the Picture class is not really transparent. It has no alpha > > channel but a bitmap mask. > > > > Creating a "transparent" Picture internally creates an X11 pixmap and a > > X11 bitmap mask. Drawing on it the must update both the pixmap and the > > mask. I think that the mask update is buggy for the Draw.Picture() > > method. > > > > Anyway, you should use the Image class and its Draw method to draw an > > image on top another one with real alpha transparency. > > > > To add to the complexity, converting an Image to a Picture keeps the > > alpha information with gb.qt, but not with gb.gtk. This is a Qt feature, > > that uses the XRender extension for that. But GTK+ don't, and just > > removes all pixels whose alpha component is lower than 128. But you > > should not take that into account as it is really toolkit specific. > > > > Regards, > > Thanks Benoit, > I replaced PicCase[] and PicSac by Image and used Draw > method instead of Draw.Begin(...). > The last instruction is now: > PictureBox1.Picture = PicSac.Picture > > Here are the results: > 1) i=0 now display correctly the image with transparent part > 2) If I use 2 buttons to draw with i=0 (button1) and i=1 > (button2) > * button1 then button2 display correctly the two images > successively > * button2 then button1 display only the image without > transparent part (button1 didn't change the display) > * if I replace Image1 with another image without transparent > part I could see the images associated with their buttons > > In conclusion, as soon as there is a transparent part in my > image, it could never override another image > > Hope this helps > Dominique Simonart > I fixed many bugs in Draw.Picture() and Draw.Image() in revision #1938, both for gb.qt and gb.gtk. Can you try it to check if you have the same problems? Regards, -- Beno?t From simonart.dominique at ...11... Mon Apr 27 22:14:14 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Mon, 27 Apr 2009 22:14:14 +0200 Subject: [Gambas-user] Pb with transparency? In-Reply-To: <200904271634.14282.gambas@...1...> References: <49F4F3AD.4080103@...11...> <200904271138.33711.gambas@...1...> <49F59188.6080602@...11...> <200904271634.14282.gambas@...1...> Message-ID: <49F61216.3010204@...11...> Beno?t Minisini a ?crit : >> Beno?t Minisini a ?crit : >>>> Hi, >>>> >>>> Gambas 2.12 with QT >>>> >>>> I had a prog that worked well in Gambas 2.11 but now it >>>> doesn't work correctly for all the images with transparent >>>> areas. >>>> Here is a very short illustration of the problem >>>> >>>> DIM PicSac AS Picture >>>> DIM PicCase AS Object[] >>>> Dim i AS Integer >>>> >>>> PicCase.Resize(2) >>>> FOR i = 0 TO 1 >>>> PicCase[i] = NEW Picture(14, 14, TRUE) >>>> NEXT >>>> PicCase[0] = Picture.Load(image with some transparent part) >>>> PicCase[1] = Picture.Load(image without transparent area) >>>> >>>> PicSac = NEW Picture(14, 14, TRUE) >>>> i = 0 >>>> Draw.Begin(PicSac) >>>> Draw.Picture(PicCase[i], 0, 0, 14, 14, 0, 0, 14, 14) >>>> Draw.End >>>> >>>> PictureBox1.Picture = PicSac >>>> >>>> i = 0 => nothing displayed >>>> i = 1 => correct display >>>> (I know that Gambas 2.12 changed the Draw routine) >>>> Is it a bug? >>>> >>>> regards, >>>> Dominique Simonart >>> I will look at that. >>> >>> Beware that the Picture class is not really transparent. It has no alpha >>> channel but a bitmap mask. >>> >>> Creating a "transparent" Picture internally creates an X11 pixmap and a >>> X11 bitmap mask. Drawing on it the must update both the pixmap and the >>> mask. I think that the mask update is buggy for the Draw.Picture() >>> method. >>> >>> Anyway, you should use the Image class and its Draw method to draw an >>> image on top another one with real alpha transparency. >>> >>> To add to the complexity, converting an Image to a Picture keeps the >>> alpha information with gb.qt, but not with gb.gtk. This is a Qt feature, >>> that uses the XRender extension for that. But GTK+ don't, and just >>> removes all pixels whose alpha component is lower than 128. But you >>> should not take that into account as it is really toolkit specific. >>> >>> Regards, >> Thanks Benoit, >> I replaced PicCase[] and PicSac by Image and used Draw >> method instead of Draw.Begin(...). >> The last instruction is now: >> PictureBox1.Picture = PicSac.Picture >> >> Here are the results: >> 1) i=0 now display correctly the image with transparent part >> 2) If I use 2 buttons to draw with i=0 (button1) and i=1 >> (button2) >> * button1 then button2 display correctly the two images >> successively >> * button2 then button1 display only the image without >> transparent part (button1 didn't change the display) >> * if I replace Image1 with another image without transparent >> part I could see the images associated with their buttons >> >> In conclusion, as soon as there is a transparent part in my >> image, it could never override another image >> >> Hope this helps >> Dominique Simonart >> > > I fixed many bugs in Draw.Picture() and Draw.Image() in revision #1938, both > for gb.qt and gb.gtk. Can you try it to check if you have the same problems? > > Regards, > Hi Benoit, I'm sorry Benoit, but I don't install Gambas from svn, I use the rpms built by Guillermo Ballester Valor for OpenSuse (gambas 2.12-3.7). I don't know the revision level I'm using. regards, Dominique Simonart From leonardo at ...1237... Mon Apr 27 22:39:47 2009 From: leonardo at ...1237... (Leonardo Miliani) Date: Mon, 27 Apr 2009 22:39:47 +0200 Subject: [Gambas-user] Problems compiling under Ubuntu 9.04 In-Reply-To: <384d3900904270613m7f3c6e08ka4395c9ff4a0ec72@...627...> References: <49F58FBC.6050802@...1237...> <49F5A04A.3030902@...2075...> <384d3900904270613m7f3c6e08ka4395c9ff4a0ec72@...627...> Message-ID: <49F61813.8090407@...1237...> Jussi Lahtinen ha scritto: > Hi! > I haven't move to 9.04 yet, so I'm interested if I should wait little more... > Have anyone compiled Gambas3 on 9.04? > > Leonardo, seems that you forgot the attachment! Argh... Here it is... -- Ciao. Leo. Web: www.leonardomiliani.com E-mail: leonardo at ...1237... Scegli software opensource - Choose opensource software Co-fondatore di Gambas-it.org Il sito di riferimento della comunit? italiana degli utenti di Gambas www.gambas-it.org -------------- next part -------------- make all-recursive make[1]: ingresso nella directory ??/home/leo/Documenti/Software/Programmazione/Gambas/gambas2-2.12/gb.qt.kde?? Making all in src make[2]: ingresso nella directory ??/home/leo/Documenti/Software/Programmazione/Gambas/gambas2-2.12/gb.qt.kde/src?? Making all in html make[3]: ingresso nella directory ??/home/leo/Documenti/Software/Programmazione/Gambas/gambas2-2.12/gb.qt.kde/src/html?? /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I/usr/include/qt3/ -D_REENTRANT -pipe -Wall -fno-exceptions -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os -fno-omit-frame-pointer -MT main_moc.lo -MD -MP -MF .deps/main_moc.Tpo -c -o main_moc.lo main_moc.cpp mkdir .libs g++ -DHAVE_CONFIG_H -I. -I../.. -I/usr/include/qt3/ -D_REENTRANT -pipe -Wall -fno-exceptions -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os -fno-omit-frame-pointer -MT main_moc.lo -MD -MP -MF .deps/main_moc.Tpo -c main_moc.cpp -fPIC -DPIC -o .libs/main_moc.o mv -f .deps/main_moc.Tpo .deps/main_moc.Plo /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I/usr/include/qt3/ -D_REENTRANT -pipe -Wall -fno-exceptions -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os -fno-omit-frame-pointer -MT main.lo -MD -MP -MF .deps/main.Tpo -c -o main.lo main.cpp g++ -DHAVE_CONFIG_H -I. -I../.. -I/usr/include/qt3/ -D_REENTRANT -pipe -Wall -fno-exceptions -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os -fno-omit-frame-pointer -MT main.lo -MD -MP -MF .deps/main.Tpo -c main.cpp -fPIC -DPIC -o .libs/main.o In file included from /usr/include/khtml_export.h:24, from /usr/include/dom/dom_node.h:32, from /usr/include/dom/dom_doc.h:32, from /usr/include/khtml_part.h:29, from CWebBrowser.h:28, from main.cpp:25: /usr/include/kdemacros.h:162:29: error: QtCore/qglobal.h: Nessun file o directory In file included from /usr/include/dom/dom_doc.h:32, from /usr/include/khtml_part.h:29, from CWebBrowser.h:28, from main.cpp:25: /usr/include/dom/dom_node.h:33:26: error: QtCore/QString: Nessun file o directory In file included from /usr/include/dom/dom_string.h:26, from /usr/include/dom/css_stylesheet.h:32, from /usr/include/dom/dom_doc.h:33, from /usr/include/khtml_part.h:29, from CWebBrowser.h:28, from main.cpp:25: /usr/include/kdebug.h:27:25: error: QtCore/QDebug: Nessun file o directory In file included from /usr/include/khtml_part.h:32, from CWebBrowser.h:28, from main.cpp:25: /usr/include/kparts/part.h:23:27: error: QtCore/QPointer: Nessun file o directory /usr/include/kparts/part.h:24:25: error: QtCore/QEvent: Nessun file o directory /usr/include/kparts/part.h:25:37: error: QtCore/QSharedDataPointer: Nessun file o directory /usr/include/kparts/part.h:26:45: error: QtXml/QDomElement: Nessun file o directory In file included from /usr/include/kparts/part.h:28, from /usr/include/khtml_part.h:32, from CWebBrowser.h:28, from main.cpp:25: /usr/include/kurl.h:27:27: error: QtCore/QVariant: Nessun file o directory /usr/include/kurl.h:28:23: error: QtCore/QUrl: Nessun file o directory /usr/include/kurl.h:29:23: error: QtCore/QMap: Nessun file o directory In file included from /usr/include/kparts/part.h:29, from /usr/include/khtml_part.h:32, from CWebBrowser.h:28, from main.cpp:25: /usr/include/kxmlguiclient.h:25:30: error: QtCore/QStringList: Nessun file o directory In file included from /usr/include/kparts/browserextension.h:27, from /usr/include/khtml_part.h:33, from CWebBrowser.h:28, from main.cpp:25: /usr/include/kparts/event.h:23:27: error: QtGui/QKeyEvent: Nessun file o directory In file included from /usr/include/kconfiggroup.h:27, from /usr/include/kdialog.h:32, from /usr/include/kfind.h:24, from /usr/include/khtml_part.h:35, from CWebBrowser.h:28, from main.cpp:25: /usr/include/kconfigbase.h:29:27: error: QtCore/QtGlobal: Nessun file o directory In file included from /usr/include/kdialog.h:32, from /usr/include/kfind.h:24, from /usr/include/khtml_part.h:35, from CWebBrowser.h:28, from main.cpp:25: /usr/include/kconfiggroup.h:31:47: error: QtCore/QExplicitlySharedDataPointer: Nessun file o directory In file included from /usr/include/kconfiggroup.h:714, from /usr/include/kdialog.h:32, from /usr/include/kfind.h:24, from /usr/include/khtml_part.h:35, from CWebBrowser.h:28, from main.cpp:25: /usr/include/conversion_check.h:26:24: error: QtGui/QColor: Nessun file o directory /usr/include/conversion_check.h:27:23: error: QtGui/QFont: Nessun file o directory /usr/include/conversion_check.h:28:24: error: QtCore/QDate: Nessun file o directory /usr/include/conversion_check.h:29:25: error: QtCore/QPoint: Nessun file o directory /usr/include/conversion_check.h:30:24: error: QtCore/QSize: Nessun file o directory /usr/include/conversion_check.h:31:24: error: QtCore/QRect: Nessun file o directory In file included from /usr/include/kguiitem.h:27, from /usr/include/kdialog.h:33, from /usr/include/kfind.h:24, from /usr/include/khtml_part.h:35, from CWebBrowser.h:28, from main.cpp:25: /usr/include/kicontheme.h:30:24: error: QtCore/QList: Nessun file o directory In file included from /usr/include/kicontheme.h:32, from /usr/include/kguiitem.h:27, from /usr/include/kdialog.h:33, from /usr/include/kfind.h:24, from /usr/include/khtml_part.h:35, from CWebBrowser.h:28, from main.cpp:25: /usr/include/kiconloader.h:27:26: error: QtCore/QObject: Nessun file o directory In file included from /usr/include/kiconloader.h:29, from /usr/include/kicontheme.h:32, from /usr/include/kguiitem.h:27, from /usr/include/kdialog.h:33, from /usr/include/kfind.h:24, from /usr/include/khtml_part.h:35, from CWebBrowser.h:28, from main.cpp:25: /usr/include/kglobal.h:23:33: error: QtCore/QAtomicPointer: Nessun file o directory In file included from /usr/include/kguiitem.h:28, from /usr/include/kdialog.h:33, from /usr/include/kfind.h:24, from /usr/include/khtml_part.h:35, from CWebBrowser.h:28, from main.cpp:25: /usr/include/kicon.h:24:23: error: QtGui/QIcon: Nessun file o directory In file included from /usr/include/kfind.h:24, from /usr/include/khtml_part.h:35, from CWebBrowser.h:28, from main.cpp:25: /usr/include/kdialog.h:35:25: error: QtGui/QDialog: Nessun file o directory In file included from /usr/include/khtml_part.h:37, from CWebBrowser.h:28, from main.cpp:25: /usr/include/klocalizedstring.h:25:24: error: QtCore/QChar: Nessun file o directory /usr/include/klocalizedstring.h:26:30: error: QtCore/QLatin1Char: Nessun file o directory In file included from CWebBrowser.h:28, from main.cpp:25: /usr/include/khtml_part.h:39:26: error: QtCore/QRegExp: Nessun file o directory In file included from CWebBrowser.h:29, from main.cpp:25: /usr/include/kstatusbar.h:26:28: error: QtGui/QStatusBar: Nessun file o directory In file included from /usr/include/dom/dom_doc.h:32, from /usr/include/khtml_part.h:29, from CWebBrowser.h:28, from main.cpp:25: /usr/include/dom/dom_node.h:871: error: ???quint32??? does not name a type /usr/include/dom/dom_node.h:896: error: ???QString??? does not name a type In file included from /usr/include/dom/dom_string.h:26, from /usr/include/dom/css_stylesheet.h:32, from /usr/include/dom/dom_doc.h:33, from /usr/include/khtml_part.h:29, from CWebBrowser.h:28, from main.cpp:25: /usr/include/kdebug.h:72: error: ???QDebug??? does not name a type /usr/include/kdebug.h:79: error: ???QDebug??? does not name a type /usr/include/kdebug.h:85: error: ???QString??? does not name a type /usr/include/kdebug.h:98: error: ???QString??? does not name a type /usr/include/kdebug.h:142: error: ???QDebug??? does not name a type /usr/include/kdebug.h:144: error: ???QDebug??? does not name a type /usr/include/kdebug.h:159: error: ???QDebug??? does not name a type /usr/include/kdebug.h:161: error: ???QDebug??? does not name a type /usr/include/kdebug.h:175: error: ???QDebug??? does not name a type /usr/include/kdebug.h:177: error: ???QDebug??? does not name a type /usr/include/kdebug.h:186: error: ???QDebug??? does not name a type /usr/include/kdebug.h:188: error: ???QDebug??? does not name a type /usr/include/kdebug.h:192: error: typedef ???QDebug??? is initialized (use __typeof__ instead) /usr/include/kdebug.h:192: error: ???KDebugStreamFunction??? was not declared in this scope /usr/include/kdebug.h:193: error: expected initializer before ???operator??? /usr/include/kdebug.h:203: error: ???QDebug??? does not name a type /usr/include/kdebug.h:209: error: expected constructor, destructor, or type conversion before ???operator??? /usr/include/kdebug.h:210: error: expected constructor, destructor, or type conversion before ???operator??? /usr/include/kdebug.h:214: error: ???QDebug??? does not name a type /usr/include/kdebug.h:216: error: ???QDebug??? does not name a type /usr/include/kdebug.h:217: error: ???QDebug??? does not name a type /usr/include/kdebug.h:218: error: ???QDebug??? does not name a type /usr/include/kdebug.h:219: error: ???QDebug??? does not name a type /usr/include/kdebug.h:220: error: ???QString??? does not name a type /usr/include/kdebug.h:222: error: ???QDebug??? does not name a type /usr/include/kdebug.h:234: error: ???QtMsgType??? does not name a type /usr/include/kdebug.h:236: error: expected `)' before ???type??? /usr/include/kdebug.h:239: error: ???QDebug??? declared as an ???inline??? field /usr/include/kdebug.h:239: error: expected ???;??? before ???operator??? /usr/include/kdebug.h:241: error: expected `;' before ???inline??? /usr/include/kdebug.h:241: error: ???QDebug??? declared as an ???inline??? field /usr/include/kdebug.h:241: error: expected ???;??? before ???operator??? /usr/include/kdebug.h:243: error: expected `;' before ???}??? token In file included from /usr/include/dom/css_stylesheet.h:32, from /usr/include/dom/dom_doc.h:33, from /usr/include/khtml_part.h:29, from CWebBrowser.h:28, from main.cpp:25: /usr/include/dom/dom_string.h:53: error: expected ???,??? or ???...??? before ???*??? token /usr/include/dom/dom_string.h:54: error: expected ???,??? or ???...??? before ???&??? token /usr/include/dom/dom_string.h:54: error: ???DOM::DOMString::DOMString(int)??? cannot be overloaded /usr/include/dom/dom_string.h:53: error: with ???DOM::DOMString::DOMString(int)??? /usr/include/dom/dom_string.h:59: error: ???uint??? has not been declared /usr/include/dom/dom_string.h:77: error: ???uint??? has not been declared /usr/include/dom/dom_string.h:83: error: expected ???;??? before ???&??? token /usr/include/dom/dom_string.h:85: error: expected ???,??? or ???...??? before ???c??? /usr/include/dom/dom_string.h:86: error: expected ???,??? or ???...??? before ???c??? /usr/include/dom/dom_string.h:90: error: ???uint??? does not name a type /usr/include/dom/dom_string.h:107: error: expected ???;??? before ???*??? token /usr/include/dom/dom_string.h:109: error: ???QChar??? declared as an ???inline??? field /usr/include/dom/dom_string.h:109: error: expected ???;??? before ???*??? token /usr/include/dom/dom_string.h:110: error: expected `;' before ???QString??? /usr/include/dom/dom_string.h:110: error: ???QString??? does not name a type /usr/include/dom/dom_string.h:139: error: expected initializer before ???operator??? /usr/include/dom/dom_string.h:144: error: expected ???,??? or ???...??? before ???&??? token /usr/include/dom/dom_string.h:147: error: expected ???,??? or ???...??? before ???&??? token /usr/include/dom/dom_string.h: In function ???bool DOM::operator!=(const DOM::DOMString&, int)???: /usr/include/dom/dom_string.h:147: error: ???b??? was not declared in this scope In file included from /usr/include/kparts/part.h:28, from /usr/include/khtml_part.h:32, from CWebBrowser.h:28, from main.cpp:25: /usr/include/kurl.h: At global scope: /usr/include/kurl.h:112: error: expected class-name before ???{??? token /usr/include/kurl.h:114: error: expected ???;??? before ??? References: <49F58FBC.6050802@...1237...> <49F5A04A.3030902@...2075...> Message-ID: <49F61874.6010003@...1237...> Marc Miralles ha scritto: > Hi Leonardo: > > I have compiled gambas 2.12 in some computers with Ubuntu 9.04 without > problems. It works fine > > I have installed all libraries required for installation. In gambas home > page I found this for Ubuntu 8.10: > <...> > With these packages installed, I don't have problems in compilation in > some computers with 9.04 With this list, I got several errors of conflicting packages... I solved these conflicts (or I thinked I had did that...) and got the same result: when I arrived at gb.qt.kde, compilation halted. -- Ciao. Leo. Web: www.leonardomiliani.com E-mail: leonardo at ...1237... Scegli software opensource - Choose opensource software Co-fondatore di Gambas-it.org Il sito di riferimento della comunit? italiana degli utenti di Gambas www.gambas-it.org From leonardo at ...1237... Tue Apr 28 00:02:35 2009 From: leonardo at ...1237... (Leonardo Miliani) Date: Tue, 28 Apr 2009 00:02:35 +0200 Subject: [Gambas-user] Problems compiling under Ubuntu 9.04 In-Reply-To: <49F61874.6010003@...1237...> References: <49F58FBC.6050802@...1237...> <49F5A04A.3030902@...2075...> <49F61874.6010003@...1237...> Message-ID: <49F62B7B.6090205@...1237...> Leonardo Miliani ha scritto: > Marc Miralles ha scritto: >> Hi Leonardo: >> >> I have compiled gambas 2.12 in some computers with Ubuntu 9.04 without >> problems. It works fine >> >> I have installed all libraries required for installation. In gambas home >> page I found this for Ubuntu 8.10: >> > <...> >> With these packages installed, I don't have problems in compilation in >> some computers with 9.04 > > With this list, I got several errors of conflicting packages... I solved > these conflicts (or I thinked I had did that...) and got the same > result: when I arrived at gb.qt.kde, compilation halted. > Strange... I tried it again, and I was able to compile Gambas... very strange. By the way, I'm happy to finally have Ubuntu on my 9.04. -- Ciao. Leo. Web: www.leonardomiliani.com E-mail: leonardo at ...1237... Scegli software opensource - Choose opensource software Co-fondatore di Gambas-it.org Il sito di riferimento della comunit? italiana degli utenti di Gambas www.gambas-it.org From marc at ...2075... Tue Apr 28 00:52:27 2009 From: marc at ...2075... (Marc Miralles) Date: Tue, 28 Apr 2009 00:52:27 +0200 Subject: [Gambas-user] Problems compiling under Ubuntu 9.04 In-Reply-To: <49F62B7B.6090205@...1237...> References: <49F58FBC.6050802@...1237...> <49F5A04A.3030902@...2075...> <49F61874.6010003@...1237...> <49F62B7B.6090205@...1237...> Message-ID: <49F6372B.8050207@...2075...> From gambas.fr at ...626... Tue Apr 28 08:21:16 2009 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 28 Apr 2009 08:21:16 +0200 Subject: [Gambas-user] Problems compiling under Ubuntu 9.04 In-Reply-To: <49F6372B.8050207@...2075...> References: <49F58FBC.6050802@...1237...> <49F5A04A.3030902@...2075...> <49F61874.6010003@...1237...> <49F62B7B.6090205@...1237...> <49F6372B.8050207@...2075...> Message-ID: <6324a42a0904272321qf721cf6t580315f1911ca3ad@...627...> be carefull with the package list on gambasdoc there is some change on packages names. then you need to do ./configure -C --enable-kde=false as gambas configuration script detect kde4 as kde but can't compile the libs because gb.qt.kde deal with kde3 libs that was removed since 8.10 with that all will work... if you wan't to use a new tmie the qt.kde lib you have three solution: - change you distribution - wait for the work on kde4 - help on the gb.qt4 and gb.qt4.kde4 libs work. :) Regards, Fabien Bodard 2009/4/28 Marc Miralles : > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Tue Apr 28 08:28:25 2009 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 28 Apr 2009 08:28:25 +0200 Subject: [Gambas-user] define data-variable as record In-Reply-To: <1240660260.6222.2.camel@...2104...> References: <23229945.post@...1379...> <1240660260.6222.2.camel@...2104...> Message-ID: <6324a42a0904272328j2f57d0c4t45510b4fecb26d25@...627...> not really in gambas in gambas a class can contain only public variable. In this case it's like a type declaration. generally I name this class with a "T" After for a class with procedure and function i use accessor for data querying. PRIVATE $iMyVar as Integer PROPERTY MyVar as Integer SUB MyVar_Read() as Integer Return $iMyVar END FUNCTION MyVar_Write(Value as Integer) $iMyVar = Value END Regards, Fabien Bodard 2009/4/25 Jeff : > Same as the other answers - define a class. It's a good habit to get > into to write accessor methods (set and get) or use properties rather > than public variables. > > On Sat, 2009-04-25 at 01:55 -0700, juelin wrote: >> hello, >> it is possible to define a record into gambas? >> thats mean a variable with different datatypes >> for example: >> type recorda as record >> ? ?a as intger >> ? ?b as string >> ? ?c[99] as float >> endtype >> dim variablename as recorda >> >> kind regards >> J?rgen >> > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensign option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Tue Apr 28 18:59:35 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 28 Apr 2009 19:59:35 +0300 Subject: [Gambas-user] Problems compiling under Ubuntu 9.04 In-Reply-To: <6324a42a0904272321qf721cf6t580315f1911ca3ad@...627...> References: <49F58FBC.6050802@...1237...> <49F5A04A.3030902@...2075...> <49F61874.6010003@...1237...> <49F62B7B.6090205@...1237...> <49F6372B.8050207@...2075...> <6324a42a0904272321qf721cf6t580315f1911ca3ad@...627...> Message-ID: <384d3900904280959l46038124ldcf1a25ef275ae31@...627...> Thank you for information! But I'm just wondering if it's possible to install kde3 libs to 9.04..? With other words, can you have kde3 and kde4 together, and use Gambas only with kde3? Is there intention to merge gb.qt and gb.qt4 in future? Jussi On Tue, Apr 28, 2009 at 09:21, Fabien Bodard wrote: > be carefull with the package list on gambasdoc there is some change on > packages names. > > then you need to do > > ./configure -C --enable-kde=false > > > as gambas configuration script detect kde4 as kde but can't compile > the libs because gb.qt.kde deal with kde3 libs that was removed since > 8.10 > > > with that all will work... > > if you wan't to use a new tmie the qt.kde lib you have three solution: > > - change you distribution > - wait for the work on kde4 > - help on the gb.qt4 and gb.qt4.kde4 libs work. > > :) > > Regards, > Fabien Bodard > > > 2009/4/28 Marc Miralles : >> >> ------------------------------------------------------------------------------ >> Register Now & Save for Velocity, the Web Performance & Operations >> Conference from O'Reilly Media. Velocity features a full day of >> expert-led, hands-on workshops and two days of sessions from industry >> leaders in dedicated Performance & Operations tracks. Use code vel09scf >> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From glenn.fletcher at ...2154... Tue Apr 28 21:25:56 2009 From: glenn.fletcher at ...2154... (glenn) Date: Tue, 28 Apr 2009 20:25:56 +0100 Subject: [Gambas-user] webbrowser Message-ID: <1240946756.14498.2.camel@...2155...> can someone please tell me how to get the html from the webbrowser control.it is soooooooo easy in VB6 but immposible with gambas webbrowser control.i do not wish to have to highlight then paste as this sucks. thanks glenn very close to using VB6 as i have been trying for weeks to do this From gambas.fr at ...626... Tue Apr 28 23:02:18 2009 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 28 Apr 2009 23:02:18 +0200 Subject: [Gambas-user] Problems compiling under Ubuntu 9.04 In-Reply-To: <384d3900904280959l46038124ldcf1a25ef275ae31@...627...> References: <49F58FBC.6050802@...1237...> <49F5A04A.3030902@...2075...> <49F61874.6010003@...1237...> <49F62B7B.6090205@...1237...> <49F6372B.8050207@...2075...> <6324a42a0904272321qf721cf6t580315f1911ca3ad@...627...> <384d3900904280959l46038124ldcf1a25ef275ae31@...627...> Message-ID: <6324a42a0904281402r70009624n3febb7fa483c3d5e@...627...> there is no kde3 devel package in Ubuntu 9.04 and this is the problem ! 2009/4/28 Jussi Lahtinen : > Thank you for information! > But I'm just wondering if it's possible to install kde3 libs to 9.04..? > With other words, can you have kde3 and kde4 together, and use Gambas > only with kde3? > > Is there intention to merge gb.qt and gb.qt4 in future? > > > Jussi > > > > On Tue, Apr 28, 2009 at 09:21, Fabien Bodard wrote: >> be carefull with the package list on gambasdoc there is some change on >> packages names. >> >> then you need to do >> >> ./configure -C --enable-kde=false >> >> >> as gambas configuration script detect kde4 as kde but can't compile >> the libs because gb.qt.kde deal with kde3 libs that was removed since >> 8.10 >> >> >> with that all will work... >> >> if you wan't to use a new tmie the qt.kde lib you have three solution: >> >> - change you distribution >> - wait for the work on kde4 >> - help on the gb.qt4 and gb.qt4.kde4 libs work. >> >> :) >> >> Regards, >> Fabien Bodard >> >> >> 2009/4/28 Marc Miralles : >>> >>> ------------------------------------------------------------------------------ >>> Register Now & Save for Velocity, the Web Performance & Operations >>> Conference from O'Reilly Media. Velocity features a full day of >>> expert-led, hands-on workshops and two days of sessions from industry >>> leaders in dedicated Performance & Operations tracks. Use code vel09scf >>> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> >> ------------------------------------------------------------------------------ >> Register Now & Save for Velocity, the Web Performance & Operations >> Conference from O'Reilly Media. Velocity features a full day of >> expert-led, hands-on workshops and two days of sessions from industry >> leaders in dedicated Performance & Operations tracks. Use code vel09scf >> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Tue Apr 28 23:12:33 2009 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 28 Apr 2009 23:12:33 +0200 Subject: [Gambas-user] Need help on treeview Message-ID: <6324a42a0904281412icd9309cw6c76ef5f8e706cf1@...627...> Private Sub Filter() Dim s As String With $hTreeView .MoveFirst While .Available $hFltCV.Add(.item.Key, .item.Text, .Item.Picture) Print .Key If Not .MoveChild Then Print .Item.Count Filter() .MoveParent Endif .MoveNext Wend Print "sortie" End With End this is a code that intend to copy a treeview on another one :/ but I've missed the curses on treeview, someone have more affinity on this ? My code just detect the first entry and don't purchase on childs.... PLEEAASE HEEELP ! Regards Fabien Bodard From the.at.robert at ...626... Tue Apr 28 23:31:06 2009 From: the.at.robert at ...626... (Mr. Robert) Date: Tue, 28 Apr 2009 14:31:06 -0700 Subject: [Gambas-user] webbrowser In-Reply-To: <1240946756.14498.2.camel@...2155...> References: <1240946756.14498.2.camel@...2155...> Message-ID: I don't know much about this unfortunately, but I must admit, i LOVE VB6. I mean, i'm a c/c++, & php programmer mostly, but vb4 is the first ide i used since starting with basic at age 11, and vb6 is my favorite of all of the M$h!!T vs editions. .net is an absolute joke.... just write a custom control in c and you can emulate .net almost exactly with little extra effort, and heck, you can even use vb6 to create custom controls if you don't know c. that said, i have experienced gambas to be an EXCEPTIONAL project (even better as opensource ;) ), little issues come up where i miss the implicity and simplicity of vb6, but considering how different the projects are and that gambas is basically a one-man + community operation, its amazing. I still like coding in vi or gedit for my c/php work, but for RAD purposes gambas fills that void in linux. I've written apps in both vb6 and gambas2.4/6 which interact with webpages (mostly without a gui), i use sockets and string manipulation functions. depending on your application, it may be possible to get the html direct using sockets, and write to a local temp. file before displaying to the user. (if you are just displaying a page with markup language, trying to use this method as a webbrowser would require a hook somewhere, preferably between clicking the link and the browsers decision to load the page or not, but since i am unfamiliar with this control in gambas, i doubt this is possible. ) sorry for the rant, i'd just like to say i really think gambas is a great piece of software, but it doesn't replace vb6. its not designed to be a vb6 replacement, but functionality is added all the time to help ease the transition for people. good day! On Tue, Apr 28, 2009 at 12:25 PM, glenn wrote: > can someone please tell me how to get the html from the webbrowser > control.it is soooooooo easy in VB6 but immposible with gambas > webbrowser control.i do not wish to have to highlight then paste as > this sucks. > thanks glenn > very close to using VB6 as i have been trying for weeks to do this > > > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From linuxos at ...1896... Wed Apr 29 00:18:07 2009 From: linuxos at ...1896... (linus) Date: Wed, 29 Apr 2009 00:18:07 +0200 Subject: [Gambas-user] Fwd: Need help on treeview In-Reply-To: <447BACDE-DA62-4426-A895-1A55E9AB606F@...1896...> References: <2BE8BEAB-B547-4109-958B-C49C57669282@...1896...> <447BACDE-DA62-4426-A895-1A55E9AB606F@...1896...> Message-ID: <1240957087.3461.4.camel@...2157...> Hi, This my code. I hope that you search for your project: Public sub Compte_Item() DIM KEYSAV as Integer ColumnView1.MoveFirst() WHILE ColumnView1.Available KEYSAV = ColumnView1.Item.Key ' Do what you want here IF ColumnView1.MoveChild() THEN 'PRINT "No child" ColumnView1.MoveTo(KEYSAV2) IF ColumnView1.MoveNext() THEN 'PRINT " No Next" ColumnView1.MoveTo(KEYSAV2) IF NOT ColumnView1.MoveParent() THEN ColumnView1.MoveNext() END IF END IF END IF WEND Olivier > > > De : Fabien Bodard > > > Date : 28 avril 2009 23:12:33 HAEC > > > ? : gambas-user at lists.sourceforge.net > > > Objet : [Gambas-user] Need help on treeview > > > R?pondre ? : mailing list for gambas users > > > > > > > > > > > > Private Sub Filter() > > > > > > Dim s As String > > > > > > With $hTreeView > > > .MoveFirst > > > While .Available > > > $hFltCV.Add(.item.Key, .item.Text, .Item.Picture) > > > Print .Key > > > If Not .MoveChild Then > > > Print .Item.Count > > > Filter() > > > .MoveParent > > > Endif > > > .MoveNext > > > Wend > > > > > > Print "sortie" > > > > > > End With > > > > > > End > > > > > > this is a code that intend to copy a treeview on another one :/ > > > > > > but I've missed the curses on treeview, someone have more affinity > > > on this ? > > > > > > > > > My code just detect the first entry and don't purchase on > > > childs.... > > > > > > PLEEAASE HEEELP ! > > > > > > Regards > > > Fabien Bodard > > > > > > ------------------------------------------------------------------------------ > > > Register Now & Save for Velocity, the Web Performance & > > > Operations > > > Conference from O'Reilly Media. Velocity features a full day of > > > expert-led, hands-on workshops and two days of sessions from > > > industry > > > leaders in dedicated Performance & Operations tracks. Use code > > > vel09scf > > > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user From sourceforge-raindog2 at ...94... Wed Apr 29 00:14:28 2009 From: sourceforge-raindog2 at ...94... (Rob) Date: Tue, 28 Apr 2009 18:14:28 -0400 Subject: [Gambas-user] webbrowser In-Reply-To: <1240946756.14498.2.camel@...2155...> References: <1240946756.14498.2.camel@...2155...> Message-ID: <200904281814.29176.sourceforge-raindog2@...94...> On Tuesday 28 April 2009 15:25, glenn wrote: > can someone please tell me how to get the html from the webbrowser > control.it is soooooooo easy in VB6 but immposible with gambas > webbrowser control.i do not wish to have to highlight then paste as > this sucks. I just looked in the WebBrowser component source, and it seems someone wrote a SelectAll property, but it's commented out, meaning there is no programmatic way in current Gambas versions to select the whole page and then retrieve it using Selection. I may try to uncomment it and recompile to see what the problem was, and package it up if it works, but that won't help users with unmodified Gambas installations. There are other methods for retrieving the HTML from the KHTMLPart widget on which the WebBrowser control is based, but for whatever reason (probably the original author simply didn't need it) they were never exposed. I assume that the KHTMLPart API has changed significantly for KDE4, so the WebBrowser component will have to be reimplemented, and maybe whoever does that will provide access to the HTML text. I'm not sure why this is, but if you need programmatic access to the contents of a web browser control, until some future Gambas release it seems you'll have to go back to VB. Rob From gambas.fr at ...626... Wed Apr 29 00:36:21 2009 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 29 Apr 2009 00:36:21 +0200 Subject: [Gambas-user] Fwd: Need help on treeview In-Reply-To: <1240957087.3461.4.camel@...2157...> References: <2BE8BEAB-B547-4109-958B-C49C57669282@...1896...> <447BACDE-DA62-4426-A895-1A55E9AB606F@...1896...> <1240957087.3461.4.camel@...2157...> Message-ID: <6324a42a0904281536l2837b26dq98e5a3cd2f07b822@...627...> hi olivier Thank you for you help and this is the correct code now : Public Sub WalkOnTree() TreeView1.MoveFirst() While TreeView1.Available ' *******Do what you want here***** Print TreeView1.Item.Key '************************************ If TreeView1.MoveChild() Then 'PRINT "No child" TreeView1.MoveBack If TreeView1.MoveNext() Then 'PRINT " No Next" TreeView1.MoveBack If Not TreeView1.MoveParent() Then TreeView1.MoveNext() End If End If End If Wend End no need to save the previous key ;-) Regards, Fabien Bodard 2009/4/29 linus : > Hi, > > This my code. I hope that you search for your project: > > > > Public sub Compte_Item() > > ?DIM KEYSAV as Integer > > ?ColumnView1.MoveFirst() > ?WHILE ColumnView1.Available > > ? ?KEYSAV = ColumnView1.Item.Key > > ? ?' Do what you want here > > ? ?IF ColumnView1.MoveChild() THEN > ? ? ?'PRINT "No child" > ? ? ?ColumnView1.MoveTo(KEYSAV2) > ? ? ?IF ColumnView1.MoveNext() THEN > ? ? ? ?'PRINT " ?No Next" > ? ? ? ?ColumnView1.MoveTo(KEYSAV2) > ? ? ? ?IF NOT ColumnView1.MoveParent() THEN > ? ? ? ? ColumnView1.MoveNext() > ? ? ? ?END IF > ? ? ?END IF > ? ?END IF > ?WEND > > Olivier > > >> > > De : Fabien Bodard >> > > Date : 28 avril 2009 23:12:33 HAEC >> > > ? : gambas-user at lists.sourceforge.net >> > > Objet : [Gambas-user] Need help on treeview >> > > R?pondre ? : mailing list for gambas users >> > > >> > > >> > > >> > > Private Sub Filter() >> > > >> > > ?Dim s As String >> > > >> > > ? ?With $hTreeView >> > > ? ?.MoveFirst >> > > ? ?While .Available >> > > ? ? ?$hFltCV.Add(.item.Key, .item.Text, .Item.Picture) >> > > ? ? ?Print .Key >> > > ? ? ? ?If Not .MoveChild Then >> > > ? ? ? ? ?Print .Item.Count >> > > ? ? ? ? ?Filter() >> > > ? ? ? ? ?.MoveParent >> > > ? ? ? ?Endif >> > > ? ? ?.MoveNext >> > > ? ?Wend >> > > >> > > ? ?Print "sortie" >> > > >> > > ?End With >> > > >> > > End >> > > >> > > this is a code that intend to copy a treeview on another one :/ >> > > >> > > but I've missed the curses on treeview, someone have more affinity >> > > on this ? >> > > >> > > >> > > My code just detect the first entry and don't purchase on >> > > childs.... >> > > >> > > PLEEAASE HEEELP ! >> > > >> > > Regards >> > > Fabien Bodard >> > > >> > > ------------------------------------------------------------------------------ >> > > Register Now & Save for Velocity, the Web Performance & >> > > Operations >> > > Conference from O'Reilly Media. Velocity features a full day of >> > > expert-led, hands-on workshops and two days of sessions from >> > > industry >> > > leaders in dedicated Performance & Operations tracks. Use code >> > > vel09scf >> > > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf >> > > _______________________________________________ >> > > Gambas-user mailing list >> > > Gambas-user at lists.sourceforge.net >> > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From rterry at ...1946... Wed Apr 29 03:33:38 2009 From: rterry at ...1946... (richard terry) Date: Wed, 29 Apr 2009 11:33:38 +1000 Subject: [Gambas-user] Printing from a PDF Message-ID: <200904291133.38999.rterry@...1946...> There seems no property to print from a pdf, no example of printing code in the pdf example. I wondered if this was possible. Thanks. richard From jbskaggs at ...1871... Wed Apr 29 04:24:06 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Tue, 28 Apr 2009 19:24:06 -0700 (PDT) Subject: [Gambas-user] webbrowser In-Reply-To: <1240946756.14498.2.camel@...2155...> References: <1240946756.14498.2.camel@...2155...> Message-ID: <23289342.post@...1379...> What I do is to save the html to a tmp file and use rich text to manipulate then reload. Not elegant but works. JB glenn-65 wrote: > > can someone please tell me how to get the html from the webbrowser > control.it is soooooooo easy in VB6 but immposible with gambas > webbrowser control.i do not wish to have to highlight then paste as > this sucks. > thanks glenn > very close to using VB6 as i have been trying for weeks to do this > > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > -- View this message in context: http://www.nabble.com/webbrowser-tp23284401p23289342.html Sent from the gambas-user mailing list archive at Nabble.com. From webs37 at ...626... Wed Apr 29 13:24:47 2009 From: webs37 at ...626... (webs37) Date: Wed, 29 Apr 2009 04:24:47 -0700 (PDT) Subject: [Gambas-user] How to input quotation mark in TextBox.Text to mysql Message-ID: <23193181.post@...1379...> Hi all, Please help.., I have error message:"Query failed: You have an error in SQL syntax, check the manual that corresponds to MySQL server version for the right syntaxto use near 'an',address='Saudi Arabia" I want to input text that have a quotation mark like "al Qur'an" here these the syntax: syntax "edit = "UPDATE tbl_user set title='" & TextBox32.Text & "',publisher='" & TextBox35.Text & "',year='" & TextBox33.Text & "',volume='" & TextBox39.Text & "',colation='" & ComboBox14.Text & "',isbn='" & TextBox53.Text & "',city='" & an1!id_city & "',publisher='" & ana3!id_log & "',subject='" & an2!id_log & "',distribution='" & ana4!id_log & "',hp='" & TextBox36.Text & "',status='" & Label159.Caption & "' WHERE id='" & Label92.Caption & "'" rsedit = connection.Exec(edit)" any suggestion thx -- View this message in context: http://www.nabble.com/How-to-input-quotation-mark-in-TextBox.Text-to-mysql-tp23193181p23193181.html Sent from the gambas-user mailing list archive at Nabble.com. From jscops at ...11... Wed Apr 29 13:47:13 2009 From: jscops at ...11... (Jack) Date: Wed, 29 Apr 2009 13:47:13 +0200 Subject: [Gambas-user] How to input quotation mark in TextBox.Text to mysql In-Reply-To: <23193181.post@...1379...> References: <23193181.post@...1379...> Message-ID: <200904291347.14161.jscops@...11...> Le mercredi 29 avril 2009 13:24:47 webs37, vous avez ?crit?: > Hi all, > > Please help.., I have error message:"Query failed: You have an error in SQL > syntax, check the manual that corresponds to MySQL server version for the > right syntaxto use near 'an',address='Saudi Arabia" > > I want to input text that have a quotation mark like "al Qur'an" > > here these the syntax: > > syntax "edit = "UPDATE tbl_user set title='" & TextBox32.Text & > "',publisher='" & TextBox35.Text & "',year='" & TextBox33.Text & > "',volume='" & TextBox39.Text & "',colation='" & ComboBox14.Text & > "',isbn='" & TextBox53.Text & "',city='" & an1!id_city & "',publisher='" & > ana3!id_log & "',subject='" & an2!id_log & "',distribution='" & ana4!id_log > & "',hp='" & TextBox36.Text & "',status='" & Label159.Caption & "' WHERE > id='" & Label92.Caption & "'" > rsedit = connection.Exec(edit)" use this syntax. Connexion.Exec("UPdate tbl_user SET title = &1, publisher = &2, year = &3, status = &4 where id = &5", TextBox32.Text , TextBox35.Text, TextBox33.Text, Label159.Caption, Label92.Caption) Jack From ron at ...1740... Wed Apr 29 13:48:03 2009 From: ron at ...1740... (Ron) Date: Wed, 29 Apr 2009 13:48:03 +0200 Subject: [Gambas-user] How to input quotation mark in TextBox.Text to mysql In-Reply-To: <23193181.post@...1379...> References: <23193181.post@...1379...> Message-ID: <49F83E73.60506@...1740...> webs37 schreef: > Hi all, > > Please help.., I have error message:"Query failed: You have an error in SQL > syntax, check the manual that corresponds to MySQL server version for the > right syntaxto use near 'an',address='Saudi Arabia" > > I want to input text that have a quotation mark like "al Qur'an" > > here these the syntax: > > syntax "edit = "UPDATE tbl_user set title='" & TextBox32.Text & > "',publisher='" & TextBox35.Text & "',year='" & TextBox33.Text & > "',volume='" & TextBox39.Text & "',colation='" & ComboBox14.Text & > "',isbn='" & TextBox53.Text & "',city='" & an1!id_city & "',publisher='" & > ana3!id_log & "',subject='" & an2!id_log & "',distribution='" & ana4!id_log > & "',hp='" & TextBox36.Text & "',status='" & Label159.Caption & "' WHERE > id='" & Label92.Caption & "'" > rsedit = connection.Exec(edit)" > > any suggestion > thx Hi, it's better to use a syntax like this, no need to put in all the quotes yourself: Exec("UPDATE tbl_user SET title = &1 WHERE id = &2", TextBox32.Text, Label92.Caption) Regards, Ron_2nd. From emil at ...1913... Wed Apr 29 14:06:35 2009 From: emil at ...1913... (Emil Tchekov) Date: Wed, 29 Apr 2009 14:06:35 +0200 Subject: [Gambas-user] How to input quotation mark in TextBox.Text to mysql In-Reply-To: <23193181.post@...1379...> Message-ID: Hi, I had this problem in the "good old" VBA too. my solution: use chr(39)!!! also strSQL= ...+"Address="+chr(39)+TextBoxXXX.Text+chr(39)+... result will be as you wish it kind regards Emil P.S. I am not sure or the corect syntax of the CHR function in Gambas, you have to see for this (may be chr$() etc.) -----Ursprungliche Nachricht----- Von: webs37 [mailto:webs37 at ...626...] Gesendet: Mittwoch, 29. April 2009 13:25 An: gambas-user at lists.sourceforge.net Betreff: [Gambas-user] How to input quotation mark in TextBox.Text to mysql Hi all, Please help.., I have error message:"Query failed: You have an error in SQL syntax, check the manual that corresponds to MySQL server version for the right syntaxto use near 'an',address='Saudi Arabia" I want to input text that have a quotation mark like "al Qur'an" here these the syntax: syntax "edit = "UPDATE tbl_user set title='" & TextBox32.Text & "',publisher='" & TextBox35.Text & "',year='" & TextBox33.Text & "',volume='" & TextBox39.Text & "',colation='" & ComboBox14.Text & "',isbn='" & TextBox53.Text & "',city='" & an1!id_city & "',publisher='" & ana3!id_log & "',subject='" & an2!id_log & "',distribution='" & ana4!id_log & "',hp='" & TextBox36.Text & "',status='" & Label159.Caption & "' WHERE id='" & Label92.Caption & "'" rsedit = connection.Exec(edit)" any suggestion thx -- View this message in context: http://www.nabble.com/How-to-input-quotation-mark-in-TextBox.Text-to-mysql-t p23193181p23193181.html Sent from the gambas-user mailing list archive at Nabble.com. ---------------------------------------------------------------------------- -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From eilert-sprachen at ...221... Wed Apr 29 16:26:11 2009 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Wed, 29 Apr 2009 16:26:11 +0200 Subject: [Gambas-user] TreeView: why is error = TRUE? Message-ID: <49F86383.8030605@...221...> Just one question for understanding it better: Why is e. g. MoveNext or MoveChild TRUE in case there is NOTHING and not vice-versa? Seems pretty unlogical and looks somewhat strange in code... Regards Rolf From gambas at ...1938... Wed Apr 29 18:42:13 2009 From: gambas at ...1938... (gambas at ...1938...) Date: Wed, 29 Apr 2009 18:42:13 +0200 Subject: [Gambas-user] Problems compiling under Ubuntu 9.04 In-Reply-To: <6324a42a0904281402r70009624n3febb7fa483c3d5e@...627...> References: <49F58FBC.6050802@...1237...> <384d3900904280959l46038124ldcf1a25ef275ae31@...627...> <6324a42a0904281402r70009624n3febb7fa483c3d5e@...627...> Message-ID: <200904291842.13431.gambas@...1938...> I'm also looking forward using kubuntu 9.04 (AMD64), because it's much faster then my current kubuntu-version. Compiling QT3 from scratch should make no probs, but what's about compiling KDE3 and installing it in my home directory? And another question: When will Gambas support QT4 and KDE4? ...is there a roadmap? Greetz Stevie From gambas at ...1... Wed Apr 29 19:51:32 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Wed, 29 Apr 2009 19:51:32 +0200 Subject: [Gambas-user] Problems compiling under Ubuntu 9.04 In-Reply-To: <200904291842.13431.gambas@...1938...> References: <49F58FBC.6050802@...1237...> <6324a42a0904281402r70009624n3febb7fa483c3d5e@...627...> <200904291842.13431.gambas@...1938...> Message-ID: <200904291951.32580.gambas@...1...> > I'm also looking forward using kubuntu 9.04 (AMD64), because it's much > faster then my current kubuntu-version. > Compiling QT3 from scratch should make no probs, but what's about compiling > KDE3 and installing it in my home directory? > > And another question: When will Gambas support QT4 and KDE4? ...is there a > roadmap? > > Greetz > Stevie > You don't need the KDE3 components, unless you really want KHTML. As for QT3, Ubuntu should have binary packages of it. Otherwise drop this distribution and use another one. :-) Gambas will support QT4. But the component is not finished, there are many bugs it because of the changes between QT3 and QT4. I don't have the time at the moment to finish it, I am very busy with theatre, and my job (I have to put the map of Paris on the internet). As for KDE4, I don't know. KDE4 is full of bugs yet, and what is really useful is a web browser control. I think WebKit will be the solution, as it works both for QT and GTK+. Regards, -- Beno?t From jbskaggs at ...1871... Thu Apr 30 08:25:38 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Wed, 29 Apr 2009 23:25:38 -0700 (PDT) Subject: [Gambas-user] What is most efficient method of creating simple paths for sprites to follow? Message-ID: <23310618.post@...1379...> I need to write a path maker for my game maker- it needs to be a graphical interface s the game maker is geared for people with little to no computer programming skills. Paths are used to define the movement of sprites on the game screen like the aliens in Galaga moving in from the side, etc. Of course there are others uses for these movement paths. I am thinking that in the gamemaker on a drawing window the user can place a series of waypoint objects that an object would move to and when reach that waypoint execute a set of instructions and goto the next waypoint. A line could be drawn between each set of objects to show the user the path. Here is my question: When the game is compiled should the waypoints become actual invisible objects or just x,y coordinates in a table or array? 2nd question: is it faster to load an animation or make one at runtime (ie rotations, scaling, etc)? JB Skaggs -- View this message in context: http://www.nabble.com/What-is-most-efficient-method-of-creating-simple-paths-for-sprites-to-follow--tp23310618p23310618.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas.fr at ...626... Thu Apr 30 09:02:22 2009 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 30 Apr 2009 09:02:22 +0200 Subject: [Gambas-user] TreeView: why is error = TRUE? In-Reply-To: <49F86383.8030605@...221...> References: <49F86383.8030605@...221...> Message-ID: <6324a42a0904300002q110894d7r115c195fe1558a35@...627...> in fact nothing is unlogical ... it's the gambas way... in gambas an error, impossibility, return true... in all the function that return a boolean you can imagine to write this in that way CONST bError as Boolean =True if .MoveChild = bError then ... its the same ! in another way it limit the use of the NOT Function keyword exemple : if .MoveChild then .MoveBack if .MoveNext .MoveBack if .MoveParent then .MoveNext endif endif Endif 2009/4/29 Rolf-Werner Eilert : > Just one question for understanding it better: > > Why is e. g. MoveNext or MoveChild TRUE in case there is NOTHING and not > vice-versa? Seems pretty unlogical and looks somewhat strange in code... > > Regards > > Rolf > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Thu Apr 30 17:21:18 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Thu, 30 Apr 2009 18:21:18 +0300 Subject: [Gambas-user] Problems compiling under Ubuntu 9.04 In-Reply-To: <200904291951.32580.gambas@...1...> References: <49F58FBC.6050802@...1237...> <6324a42a0904281402r70009624n3febb7fa483c3d5e@...627...> <200904291842.13431.gambas@...1938...> <200904291951.32580.gambas@...1...> Message-ID: <384d3900904300821w107a9528g19a02a4c381633dd@...627...> I tested Ubuntu 9.04 with VirtualBox, and I managed easily to install Gambas2 and Gambas3. So there shouldn't be any problems, at least in my use (read what Benoit said). Jussi 2009/4/29 Beno?t Minisini : >> I'm also looking forward using kubuntu 9.04 (AMD64), because it's much >> faster then my current kubuntu-version. >> Compiling QT3 from scratch should make no probs, but what's about compiling >> KDE3 and installing it in my home directory? >> >> And another question: When will Gambas support QT4 and KDE4? ...is there a >> roadmap? >> >> Greetz >> Stevie >> > > You don't need the KDE3 components, unless you really want KHTML. > > As for QT3, Ubuntu should have binary packages of it. Otherwise drop this > distribution and use another one. :-) > > Gambas will support QT4. But the component is not finished, there are many > bugs it because of the changes between QT3 and QT4. I don't have the time at > the moment to finish it, I am very busy with theatre, and my job (I have to > put the map of Paris on the internet). > > As for KDE4, I don't know. KDE4 is full of bugs yet, and what is really useful > is a web browser control. I think WebKit will be the solution, as it works > both for QT and GTK+. > > Regards, > > -- > Beno?t > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From wspinto at ...1405... Thu Apr 30 18:20:33 2009 From: wspinto at ...1405... (Wellington de Souza Pinto) Date: Thu, 30 Apr 2009 13:20:33 -0300 Subject: [Gambas-user] gambas server page. Message-ID: <1241108433.49f9cfd198dcb@...1418...> Hi everyone!!! Please. I'm not understand yet of work the gambas server page. How begin? How install? Work with apache webserver? How call in my browser (firefox) the page generated by gambasserverwebpage? Any samples are welcome! Reguards Souza, Wellington ___________________________________________________________________________________ Para fazer uma liga??o DDD pra perto ou pra longe, faz um 21. A Embratel tem tarifas muito baratas esperando por voc?. Aproveite! From joshiggins at ...1601... Thu Apr 30 19:46:25 2009 From: joshiggins at ...1601... (Joshua Higgins) Date: Thu, 30 Apr 2009 18:46:25 +0100 Subject: [Gambas-user] read a file into a listview - but backwards Message-ID: <4247f5440904301046n7167ca8dnb1481db095243d0c@...627...> Hi all, Is it possible to read a file and load it line by line into a listview, but backwards? I have been using the example from gambasdoc for loading files line by line, but I'm writing a logging page and want to show newest items first. Thanks. -- joshua higgins >>>>>>------ From Karl.Reinl at ...9... Thu Apr 30 20:26:29 2009 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Thu, 30 Apr 2009 20:26:29 +0200 Subject: [Gambas-user] read a file into a listview - but backwards In-Reply-To: <4247f5440904301046n7167ca8dnb1481db095243d0c@...627...> References: <4247f5440904301046n7167ca8dnb1481db095243d0c@...627...> Message-ID: <1241115989.6472.4.camel@...40...> Am Donnerstag, den 30.04.2009, 18:46 +0100 schrieb Joshua Higgins: > Hi all, > > Is it possible to read a file and load it line by line into a listview, but > backwards? I have been using the example from gambasdoc for loading files > line by line, but I'm writing a logging page and want to show newest items > first. > > Thanks. Salut, load it first into an array, reached the end, load them backwards into your listview. -- Amicalment Charlie From m0e.lnx at ...626... Thu Apr 30 21:00:06 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Thu, 30 Apr 2009 14:00:06 -0500 Subject: [Gambas-user] Rounding numbers to pre-set increments Message-ID: <1f1e8c1b0904301200q5d865753mbc8705e0e0fa2153@...627...> This dilema is running circles around my head... I need help I need a way to take a number, say an integer and round it up to the nearest increment of 250. This may imply decreasing or increasing the number. For instance input = 400 I need my app to round up to 500 input = 550 I need my app to round down to 500 The input values come from a text file provided to my from another coworker, which means that using a spinbox is out of the question. I have no control over what is fed to the app, it just needs to round up/down to 250 cut offs. Does anyone have an idea how to work this? From theatre at ...2012... Thu Apr 30 21:30:56 2009 From: theatre at ...2012... (Frank Cox) Date: Thu, 30 Apr 2009 13:30:56 -0600 Subject: [Gambas-user] Rounding numbers to pre-set increments In-Reply-To: <1f1e8c1b0904301200q5d865753mbc8705e0e0fa2153@...627...> References: <1f1e8c1b0904301200q5d865753mbc8705e0e0fa2153@...627...> Message-ID: <20090430133056.4a11dffa.theatre@...2012...> On Thu, 30 Apr 2009 14:00:06 -0500 M0E Lnx wrote: > I need a way to take a number, say an integer and round it up to the > nearest increment of 250. This may imply decreasing or increasing the > number. Divide the number by 250. If the result is > x.5 then (x+1)*250 If the result is < x.5 then x*250 If the number is exactly x.5 then you make an "executive decision" to round it up or down. -- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com From simonart.dominique at ...11... Thu Apr 30 22:19:09 2009 From: simonart.dominique at ...11... (Simonart Dominique) Date: Thu, 30 Apr 2009 22:19:09 +0200 Subject: [Gambas-user] Rounding numbers to pre-set increments In-Reply-To: <20090430133056.4a11dffa.theatre@...2012...> References: <1f1e8c1b0904301200q5d865753mbc8705e0e0fa2153@...627...> <20090430133056.4a11dffa.theatre@...2012...> Message-ID: <49FA07BD.5030605@...11...> Frank Cox a ?crit : > On Thu, 30 Apr 2009 14:00:06 -0500 > M0E Lnx wrote: > > >> I need a way to take a number, say an integer and round it up to the >> nearest increment of 250. This may imply decreasing or increasing the >> number. > > Divide the number by 250. > > If the result is > x.5 then (x+1)*250 > > If the result is < x.5 then x*250 > > If the number is exactly x.5 then you make an "executive decision" to round it > up or down. > A = N mod 250 N = N - A if A > 125 then N += 250 In this case N=125 would be rounded to 0 If you want it rounded to 250 change the test by if A >= 125 ... Dominique Simonart From m0e.lnx at ...626... Thu Apr 30 23:33:05 2009 From: m0e.lnx at ...626... (M0E Lnx) Date: Thu, 30 Apr 2009 16:33:05 -0500 Subject: [Gambas-user] Rounding numbers to pre-set increments In-Reply-To: <49FA07BD.5030605@...11...> References: <1f1e8c1b0904301200q5d865753mbc8705e0e0fa2153@...627...> <20090430133056.4a11dffa.theatre@...2012...> <49FA07BD.5030605@...11...> Message-ID: <1f1e8c1b0904301433i4592c910uf7e1f1495680c5bb@...627...> Thank you guys. The first suggestion worked. On Apr 30, 2009 3:24 PM, "Simonart Dominique" wrote: Frank Cox a ?crit : > On Thu, 30 Apr 2009 14:00:06 -0500 > M0E Lnx wrote: > > >> I need a way to take a number, say an... A = N mod 250 N = N - A if A > 125 then N += 250 In this case N=125 would be rounded to 0 If you want it rounded to 250 change the test by if A >= 125 ... Dominique Simonart ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From rospolosco at ...152... Thu Apr 30 23:59:43 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Thu, 30 Apr 2009 23:59:43 +0200 Subject: [Gambas-user] read a file into a listview - but backwards In-Reply-To: <4247f5440904301046n7167ca8dnb1481db095243d0c@...627...> References: <4247f5440904301046n7167ca8dnb1481db095243d0c@...627...> Message-ID: <200904302359.43898.rospolosco@...152...> Il gioved? 30 aprile 2009 19:46:25 Joshua Higgins ha scritto: > Hi all, > > Is it possible to read a file and load it line by line into a listview, but > backwards? I have been using the example from gambasdoc for loading files > line by line, but I'm writing a logging page and want to show newest items > first. > > Thanks. Or you can using the magic of shell: Dim sReverseFile as String SHELL "tac " & PathToFile TO sReverseFile then load sReverseFile. If file is big consider creating a temporary file for redirecting 'tac' to. Saluti, Stefano