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 ... What

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] EOF problem

2010-04-18 Thread Les Hardy
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. Regards Les Hardy

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. It doesnot help if I set REALTIME prority for the process ... How about

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 'empty' file. This is recognised by eof

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, that modern

Re: [Gambas-user] static const?

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

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, does not even have CONSTs - it goes

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 ? Thanks

Re: [Gambas-user] htonl equal

2010-04-12 Thread Les Hardy
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 LittleEndian: ln PRINT LittleEndian (hex): Hex$(ln, 8) END Regards Les Hardy Mohammad Razeghi wrote: Hi I am

Re: [Gambas-user] Parallel Port

2010-04-08 Thread Les Hardy
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 Macintosh wrote: Hi all, Does anyone have a program

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

2010-03-13 Thread Les Hardy
. Regards, -- Benoît Minisini I am using Gambas 2.20 on Ubuntu 9.04. Lostfocus() works fine for me. I tested on TextBox, TextArea, ListBox, GridView, SpinBox Les Hardy -- Download Intel#174; Parallel Studio

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].Text, cur,

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. For

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 string it

Re: [Gambas-user] Ambiguous expression?

2010-03-10 Thread Les Hardy
is ambiguous without the brackets. 5 \ (2 * 3) = 0 (5 \ 2) * 3 = 6 This is also ambiguous 5/2*3 5 / (2 * 3) = 0.8333 (5 / 2) * 3 = 7.5 Regards Les Hardy -- Download Intel#174; Parallel Studio Eval Try the new

Re: [Gambas-user] Property expand in Tabstrip

2010-03-06 Thread Les Hardy
Regards Les Hardy -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel

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, TextBox1.height) END Les Hardy

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-line package manager

[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

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 jussi.lahti...@gmail.com: Save gif from where? Please show your code you are using

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

2009-12-16 Thread Les Hardy
, 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 of what to try next? Regards Les Hardy Jussi Lahtinen wrote: Save gif from where

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 one do you

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 rte...@pacific.net.au: 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,

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 rte...@pacific.net.au: 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,

Re: [Gambas-user] Cliboard-Problem

2009-12-10 Thread Les Hardy
(S) END CRLF ist just CHR(10) Same error. Thanks in advance Just put a WAIT after Clipboard.Clear and it will be ok. Clipboard.Clear WAIT Regards Les Hardy -- Return on Information: Google Enterprise Search

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 I can

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

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