Re: [Gambas-user] Bug / changed behaviour of Input

2012-03-14 Thread Emil Lenngren
Yeah :) 2012/3/15 Benoît Minisini > Le 14/03/2012 19:46, Jussi Lahtinen a écrit : > >> That's the difference, If you pass the string "1234" to Read As Integer, > >> you get the Integer 875770417, because "1234" is in ascii 49 50 51 52, > and > >> 49 + 50*(2^8) + 51*(2^16) + 52*(2^24) = 875770417

Re: [Gambas-user] Bug / changed behaviour of Input

2012-03-14 Thread Benoît Minisini
Le 14/03/2012 19:46, Jussi Lahtinen a écrit : >> That's the difference, If you pass the string "1234" to Read As Integer, >> you get the Integer 875770417, because "1234" is in ascii 49 50 51 52, and >> 49 + 50*(2^8) + 51*(2^16) + 52*(2^24) = 875770417. >> > > True. I'm slow today. Maybe it's my fe

Re: [Gambas-user] Bug / changed behaviour of Input

2012-03-14 Thread Jussi Lahtinen
> That's the difference, If you pass the string "1234" to Read As Integer, > you get the Integer 875770417, because "1234" is in ascii 49 50 51 52, and > 49 + 50*(2^8) + 51*(2^16) + 52*(2^24) = 875770417. > True. I'm slow today. Maybe it's my fever, but I just can't lay down doing nothing. Makes m

Re: [Gambas-user] Bug / changed behaviour of Input

2012-03-14 Thread Emil Lenngren
That's the difference, If you pass the string "1234" to Read As Integer, you get the Integer 875770417, because "1234" is in ascii 49 50 51 52, and 49 + 50*(2^8) + 51*(2^16) + 52*(2^24) = 875770417. If Input only returns the raw string, the user can do the Val on his/her own afterwards, if he/she

Re: [Gambas-user] Bug / changed behaviour of Input

2012-03-14 Thread Jussi Lahtinen
> Lol, there is a LOT of usage for scanf :) > Yes, I'm sure it has (it's on stdio). I just haven't need it. > If we say c++ istream instead, then you have cin >> a >> b >> ... > If I want to read a text file word by word, (where a word is something > whitespace-separated, space on newline), cin

Re: [Gambas-user] Bug / changed behaviour of Input

2012-03-14 Thread Emil Lenngren
Lol, there is a LOT of usage for scanf :) If we say c++ istream instead, then you have cin >> a >> b >> ... If I want to read a text file word by word, (where a word is something whitespace-separated, space on newline), cin >> is quite easy to use. Gambas Input works about in the same way, but the

Re: [Gambas-user] Bug / changed behaviour of Input

2012-03-14 Thread Jussi Lahtinen
> Read reads data in binary format. Input reads data in text format. > I know what you mean, I just don't know usage for it. > Currently I find no way in Gambas to do the C equivalent of scanf("%s", > str); > Well... I don't see much usage for scanf() either. You still need to validate the inp

Re: [Gambas-user] Bug / changed behaviour of Input

2012-03-14 Thread Emil Lenngren
Read reads data in binary format. Input reads data in text format. Currently I find no way in Gambas to do the C equivalent of scanf("%s", str); 2012/3/14 Jussi Lahtinen > > Input never returns something with spaces in it. It works about the same > > way as scanf("%s", ...), scanf("%d", ...). It

Re: [Gambas-user] Bug / changed behaviour of Input

2012-03-14 Thread Jussi Lahtinen
> Input never returns something with spaces in it. It works about the same > way as scanf("%s", ...), scanf("%d", ...). It splits up the input on white > spaces. > Oh yes, of course. And apparently CDate() writes "16/05/2002 00:00:00", and "00:00:00" is interpreted as null. I think Input is kind

Re: [Gambas-user] Bug / changed behaviour of Input

2012-03-14 Thread Emil Lenngren
Input never returns something with spaces in it. It works about the same way as scanf("%s", ...), scanf("%d", ...). It splits up the input on white spaces. I think Input is kind of wierd when it uses Val. If I write Dim s As String Input s Print s Then I might expect that I always get the string

Re: [Gambas-user] Bug / changed behaviour of Input

2012-03-14 Thread Jussi Lahtinen
Wait... How input determines how much is read? To read all what is written with this; hFile = Open "/tmp/testingtesting/Test.txt" For Output Create Print #hFile, "Test1" Print #hFile, 123 Print #hFile, CDate(2484515) Print #hFile, " 1-2/3/4/5_6*7-8+9" Close hFile I need to call inpu

Re: [Gambas-user] Bug / changed behaviour of Input

2012-03-14 Thread Jussi Lahtinen
Yes, it works now. Jussi 2012/3/14 Benoît Minisini > Le 14/03/2012 13:12, Jussi Lahtinen a écrit : > >hFile = Open "/tmp/testingtesting/Test.txt" For Output Create > >Print #hFile, "Test1" > >Close hFile > > > >sStr = "" > >hFile = Open "/tmp/testingtesting/Test.txt" For I

Re: [Gambas-user] Bug / changed behaviour of Input

2012-03-14 Thread Benoît Minisini
Le 14/03/2012 13:12, Jussi Lahtinen a écrit : >hFile = Open "/tmp/testingtesting/Test.txt" For Output Create >Print #hFile, "Test1" >Close hFile > >sStr = "" >hFile = Open "/tmp/testingtesting/Test.txt" For Input >Input #hFile, sStr >Close hFile > > >> From revision 4549

[Gambas-user] Bug / changed behaviour of Input

2012-03-14 Thread Jussi Lahtinen
hFile = Open "/tmp/testingtesting/Test.txt" For Output Create Print #hFile, "Test1" Close hFile sStr = "" hFile = Open "/tmp/testingtesting/Test.txt" For Input Input #hFile, sStr Close hFile >From revision 4549, sStr remains null. Jussi GambasTester-0.9.24.tar.gz Description: G

Re: [Gambas-user] Question about gambas2/3 on pandaboard and ubuntu 12.04 rc/beta

2012-03-14 Thread Jussi Lahtinen
Download latest Gambas 3 source, and delete all Gambas related binaries. 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 Try to compile with (you might need to change "Desktop"): (

Re: [Gambas-user] R: Prog.gambas only one process

2012-03-14 Thread Rolf-Werner Eilert
Am 14.03.2012 10:39, schrieb abbat: > Dim sOutput As String >> >> Exec ["pgrep", "-f", "-l", "NameOfYourProgram.gambas"] Wait To sOutput >> >> If Split(Trim$(sOutput), gb.NewLine).Count> 1 Then >> Quit >> Endif I just tested it and inserted it into some of my projects (Gambas2). I

Re: [Gambas-user] Bug in gambas3

2012-03-14 Thread Benoît Minisini
>> 2 - In the last rev of Gambas 3 you add in the IDE the possibility to >> use the proxy to acces to the help >> but you forgot to remove the following instruction in the IDE sources: >> >> Public Sub LoadProxyConfig() >> >> Return< Line to remove >> >> With WebSettings.Proxy >> > > I will fix

Re: [Gambas-user] Bug in gambas3

2012-03-14 Thread Benoît Minisini
Le 14/03/2012 11:53, linu...@club-internet.fr a écrit : > Hi Benoit, > > 1 - Since the rewrite of the GridView in Gambas 3, in the TableView object > the ColumnResize does not > work now. I will add it, but cann you tell me why you need this event, I'm curious... > > 2 - In the last rev of Gamba

[Gambas-user] Bug in gambas3

2012-03-14 Thread linuxos
Hi Benoit, 1 - Since the rewrite of the GridView in Gambas 3, in the TableView object the ColumnResize does not work now. 2 - In the last rev of Gambas 3 you add in the IDE the possibility to use the proxy to acces to the help but you forgot to remove the following instruction in the IDE sourc

Re: [Gambas-user] Update statement on Blob in SQLite3 database table

2012-03-14 Thread John Rose
The problem is not how to load the photo from a .jpg file. The problem is what to put into the Update statement (or other code before that line) i.e. what should the ? be. -- Virtualization & Cloud Management Using Ca

Re: [Gambas-user] Update statement on Blob in SQLite3 database table

2012-03-14 Thread Алексей Беспалов
My code for simple: Dim sql As String Dim ImageBlob As String Dim ResultImg As Result ImageBlob = File.Load(sFile) Conn = Connections["Connection1"] This code works: ResultImg = Conn.Create("images_test") ResultImg["dirname"] = sFile ResultImg["image"] = ImageBlob ResultImg

Re: [Gambas-user] Update statement on Blob in SQLite3 database table

2012-03-14 Thread Алексей Беспалов
img.Save(tempFile) newPicture["thumb"] = File.Load(tempFile) 2012/3/14 John Rose > How do I set a Blob field in an SQLite3 database's table to an image > value (of a photo's jpg file) held in an Image variable using an SQL > update statement? > > Code would be something like: > Dim img As

[Gambas-user] Update statement on Blob in SQLite3 database table

2012-03-14 Thread John Rose
How do I set a Blob field in an SQLite3 database's table to an image value (of a photo's jpg file) held in an Image variable using an SQL update statement? Code would be something like: Dim img As Image 'Holds photo Dim sql As String sql = "Update t1 Set img = ? Where ." dbConnection.Exec(

Re: [Gambas-user] R: Prog.gambas only one process

2012-03-14 Thread abbat
Hi Jussi You solution works and is wery usefull Thank you very much :-) Jussi Lahtinen wrote: > > This is code that I use: > > Dim sOutput As String > > Exec ["pgrep", "-f", "-l", "NameOfYourProgram.gambas"] Wait To sOutput > > If Split(Trim$(sOutput), gb.NewLine).Count > 1 Then > Qu