Re: [Gambas-user] EOF problem

2010-04-18 Thread Les Hardy
Doriano Blengino wrote: > Les Hardy ha scritto: > >> Hi Ed, >> I figured it out. >> First of all, depending how the text file was emptied/created, the >> contents may not be truely empty. >> Gedit for example leaves the 0A (end-of-line) character in the &#x

Re: [Gambas-user] Did anybody try to run stepper motors through paralel port

2010-04-18 Thread Les Hardy
Doriano Blengino wrote: > Les Hardy ha scritto: > >> Zelimir Ikovic wrote: >> >> >>> I have VB6 program that run CNC plasma machine. It work very well and >>> smooth under win200, but in WinXP machine motion is not good. >>> &g

Re: [Gambas-user] EOF problem

2010-04-18 Thread Les Hardy
ot sure if this can be considered a bug in Gambas, but it does mean an eof() is only good for preventing read errors, and is not reliable for testing if a file is empty. The following code gets around the problem. It's not ideal, but it does work. Maybe someone else can improve on it. Re

Re: [Gambas-user] EOF problem

2010-04-18 Thread Les Hardy
Hi Ed, After many tries, I managed to recreate your problem. It happens with your code and the code supplied by Dimitris. I am using Ubuntu 9.04, Kernel 2.6.28-18, Gambas 2.20.2, QT I have not managed to figure out the cause yet. I will do more tests and get back to you. Regards Les Hardy Ed

Re: [Gambas-user] Did anybody try to run stepper motors through paralel port

2010-04-18 Thread Les Hardy
Zelimir Ikovic wrote: > I have VB6 program that run CNC plasma machine. It work very well and smooth > under win200, but in WinXP machine motion is not good. > > It doesnot help if I set REALTIME prority for the process ... > > How about Linux and Gambas? Daes it depent on version of Linux ... >

Re: [Gambas-user] static const?

2010-04-15 Thread Les Hardy
Charlie Reinl wrote: > Am Donnerstag, den 15.04.2010, 19:28 +0200 schrieb Doriano Blengino: > >> Jussi Lahtinen ha scritto: >> Back to gambas - I don't know if the documentation says anything about short-circuit and things like that. May be we can assume it as a standard, tha

Re: [Gambas-user] static const?

2010-04-14 Thread Les Hardy
If you feel hurt I am sorry for that, it was not my intention to hurt you, and I have no wish to prove you wrong. I do still stand by my statement. Regards Les Hardy Doriano Blengino wrote: > Les Hardy ha scritto: > >> >> >>> The C language, in facts

Re: [Gambas-user] static const?

2010-04-14 Thread Les Hardy
ly asking about the scope of constants in classes (in Gambas) Regards Les Hardy -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applica

Re: [Gambas-user] htonl equal

2010-04-12 Thread Les Hardy
eger ln = 1193046 PRINT "Input: " & ln PRINT "Input (hex): " & Hex(ln, 8) lh = htonl(ln) ' to BigEndian PRINT "BigEndian: " & lh PRINT "BigEndian (hex): " & Hex$(lh, 8) ln = ntohl(lh) ' back to LittleEndian PRINT "Little

Re: [Gambas-user] htonl equal

2010-04-12 Thread Les Hardy
I guess *gb.BigEndian* and *gb.LittleEndian* are what you are looking for. *System.ByteOrder* will return the endianness of the operating system. Regards Les Hardy Mohammad Razeghi wrote: > Hi > > I am looking for c++ htonl function equal in gambas can any one help please >

Re: [Gambas-user] Parallel Port

2010-04-08 Thread Les Hardy
& " " WAIT 0.05 NEXT CLOSE #pport END Just a quick mention about seek on ports. Seek simply takes you to the port address. Notice I used a seek before each read or write. 888 (0x378): Data 889 (0x379): Status 890 0x37A) : Control Hope this helps Regards Les Hardy Bjorn Macin

Re: [Gambas-user] LostFocus() not working on ubuntu !

2010-03-13 Thread Les Hardy
where the problem comes from! >>> >>> Is it possible for you to write a little project that isolates the >>> problem? A >>> little project with a LostFocus() that works on OpenSuSE with Gambas >>> 2.17, and >&g

Re: [Gambas-user] TableView.text conversion

2010-03-12 Thread Les Hardy
Keith Clark wrote: > Les, > > Thanks, but I found that that was not actually my problem. The problem > showed up in sending data to a field in my database. I just forgot to > surround the field with single quotes! Sometimes the simplest problem > is hard to see! > > Keith > > Yes, if its a st

Re: [Gambas-user] TableView.text conversion

2010-03-12 Thread Les Hardy
Keith Clark wrote: > I have input a value into a TableView cell, and now I want to read it. > The problem is that I want to read it as a text string. The 'number' is > actually an ISBN code. It can sometimes be a string, as it can contain > an 'X' or a 10 digit number, but starting with a 0. > >

Re: [Gambas-user] Currency and addition/subtraction

2010-03-12 Thread Les Hardy
Keith Clark wrote: > I have a TableView object and have imported some data into it that is > formatted as currency. How can I know take that and add it to a Float > variable? > > Keith > > > > dim cur as string = "£" dim floatvar as float floatvar = Val(Replace(TableView1[TableView1.row, 1].Te

Re: [Gambas-user] Ambiguous expression?

2010-03-10 Thread Les Hardy
gt; use of brackets. > > Morever, that error is actually just a warning. I can suppress it, and Gambas > will just apply its operator evaluation order without telling anything. But I > don't think I will do it! > > Regards, >

Re: [Gambas-user] Property expand in Tabstrip

2010-03-06 Thread Les Hardy
craf wrote: > Hi. > > How can I set a textbox to the width of a tastrip?.The property does not > expand. > > Regards > > > You can also do it directly on the tabstrip... PUBLIC SUB TabStrip1_Arrange() TextBox1.Move(5, TextBox1.top, TabStrip1.width - 10, TextB

Re: [Gambas-user] Property expand in Tabstrip

2010-03-06 Thread Les Hardy
Strip1.width - 10, TextBox1.height) END Regards Les Hardy -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performa

Re: [Gambas-user] Font selection vaporises gambas3

2010-03-05 Thread Les Hardy
richard terry wrote: > I was looking at the different fonts in the preference, saw one called > 'newspaper', clicked on it > gambas up in smoke, no warning, no sig 11, just > disappeared. > > Can anyone re-produce that. don't worry, it dosn't destroy anthing. Maybe its > a kde4.4 thing. > > Rega

Re: [Gambas-user] Shell sudo

2009-12-24 Thread Les Hardy
sudo allows you to pass a password to the shell with -S The following should do it. sudo -S apt-get install PACKAGENAME << EOF PASSWORD EOF Regards Les Hardy M. Cs. wrote: > I'd like to make my app able to download and install packages via apt-get > (or any other command-lin

Re: [Gambas-user] Cannot save a gif image

2009-12-16 Thread Les Hardy
Yes, You have it. Just checked. Looks like QImageIO was compiled without gif support on ubuntu 9.04 , and I am using gb.qt. My Thanks to all that responded. Regards Les Hardy Benoît Minisini wrote: > > In Gambas 2, the image save function is managed by the GUI component: which &g

Re: [Gambas-user] Cannot save a gif image

2009-12-16 Thread Les Hardy
y of file handling, but I don't generally use gifs. I tried it with images, pictures, pictureboxes. and in every case I can save anything but a gif. Its driving me nuts. I cannot see any other postings about this problem. So I guess it must be something with my setup. Have you any ideas

Re: [Gambas-user] Cannot save a gif image

2009-12-16 Thread Les Hardy
Yes, I have libgif-4.1.6-6. I tried reinstalling all image libraries that I could find. Still no good. Regards Les Hardy Fabien Bodard wrote: > have you libgif installed ? > > 2009/12/16 Jussi Lahtinen : > >> Save gif from where? >> Please show your code you are u

[Gambas-user] Cannot save a gif image

2009-12-16 Thread Les Hardy
Can anyone tell me how to save a gif image. I can save other images, but not gifs gambas 2.18 on ubuntu 9.04 Regards Les Hardy -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of

Re: [Gambas-user] Really dumb question about dialog forms

2009-12-11 Thread Les Hardy
richard terry wrote: > On Friday 11 December 2009 17:22:54 you wrote: >> 2009/12/11 richard terry : >>> Hi List, >>> >>> My really stupid question for the week. >> I'm sorry. You've already done that three times this week. >> >>> If I had a textbox on the form and wanted to return its contents, wha

Re: [Gambas-user] Really dumb question about dialog forms

2009-12-11 Thread Les Hardy
richard terry wrote: > On Friday 11 December 2009 17:22:54 you wrote: >> 2009/12/11 richard terry : >>> Hi List, >>> >>> My really stupid question for the week. >> I'm sorry. You've already done that three times this week. >> >>> If I had a textbox on the form and wanted to return its contents, wha

Re: [Gambas-user] Cliboard-Problem

2009-12-10 Thread Les Hardy
") & CRLF > S = S & Left("Feld" & String(25, " "), 25) & Left("Wert" & String(40, > " "), 40) & "Datentyp" & CRLF > S = S & String(75, "_") & CRLF > S = S & String(

Re: [Gambas-user] Serial port data being changed ????

2009-12-09 Thread Les Hardy
Benoît Minisini wrote: > > I'm not a serial port user at all, and I find that behaviour a bit strange. > > Would it be useful to make a property for that? Or maybe it does already > exist > in the SerialPort class, and I didn't see it. > Nothing strange really. Its been like that as long as

Re: [Gambas-user] Serial port data being changed ????

2009-12-09 Thread Les Hardy
Benoît Minisini wrote: > > I'm not a serial port user at all, and I find that behaviour a bit strange. > > Would it be useful to make a property for that? Or maybe it does already > exist > in the SerialPort class, and I didn't see it. > Nothing strange really. Its been like that as long as

Re: [Gambas-user] Serial port data being changed ????

2009-12-08 Thread Les Hardy
Kadaitcha Man wrote: I first have to figure out if icrnl flaf is a typo or an esoteric command line :) > Yes, esoteric, makes me feel special. Only a few know about flafs. Then again, it could just be flag. -- Return o

Re: [Gambas-user] Serial port data being changed ????

2009-12-08 Thread Les Hardy
mike wrote: > I'm having trouble with Gambas and the serial ports. > Something is changing binary &h0d to &h0a when received > from a serial port. I noticed it in a program that I've > been working on that receives packets of binary data > from a microprocessor. I wrote a little test program to >