[Gambas-user] RE: Gambas-user Digest, Vol 37, Issue 47
Swee Kwang Tan
sktan007 at ...43...
Fri Jun 26 15:59:21 CEST 2009
Dear Sir,
You are so smart!!!!!!
The code
Dim sChain AS String
Dim ss AS String[]
sChain = "jkl,9080,jim,ren,mu8,vcnm,m83d,m09nc,"
sChain &= "n83f,iiop,qiop,aaa1,bbb1,ccc1,ddd1,eee1,"
sChain &= "fff1,ggg1,hhh1,iii1,j1j1,k1k2,l1a2"
' etc
ss = SPLIT(sChain,",")
can work as what I want.
Thank you
--- 09/6/26 (五),gambas-user-request at lists.sourceforge.net <gambas-user-request at lists.sourceforge.net> 寫道:
寄件者: gambas-user-request at lists.sourceforge.net <gambas-user-request at lists.sourceforge.net>
主旨: Gambas-user Digest, Vol 37, Issue 47
收件者: gambas-user at lists.sourceforge.net
日期: 2009年6月26日,五,上午5:10
Send Gambas-user mailing list submissions to
gambas-user at lists.sourceforge.net
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/gambas-user
or, via email, send a message with subject or body 'help' to
gambas-user-request at lists.sourceforge.net
You can reach the person managing the list at
gambas-user-owner at lists.sourceforge.net
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Gambas-user digest..."
Today's Topics:
1. Re: Blob management (Beno?t Minisini)
2. Re: Blob management (David Villalobos Cambronero)
3. The define style of many element string array (Swee Kwang Tan)
4. Re: Bug in package creator? (Beno?t Minisini)
5. Feature request (Steven James Drinnan)
6. Re: The define style of many element string array
(Steven James Drinnan)
7. Re: Blob management (Werner)
8. Re: The define style of many element string array
(Simonart Dominique)
9. Re: Format$ with different LANG (Doriano Blengino)
----------------------------------------------------------------------
Message: 1
Date: Thu, 25 Jun 2009 23:29:20 +0200
From: Beno?t Minisini <gambas at ...1...>
Subject: Re: [Gambas-user] Blob management
To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Message-ID: <200906252329.21085.gambas at ...1...>
Content-Type: Text/Plain; charset="iso-8859-1"
> Hi, is there a problem with this instuction?
>
> hResultado = $hConn.Exec("SELECT Pic FROM Pics")
> File.Save("/tmp/1.jpg", hResultado["Pic"].Data)
>
>
> I can't get them work!
>
> Regards
>
>
> --
> David
>
Can you give more details? (versions, database driver)...
Does the PictureDatabase example work?
--
Beno?t
------------------------------
Message: 2
Date: Thu, 25 Jun 2009 14:44:01 -0700 (PDT)
From: David Villalobos Cambronero <david_villalobos_c at ...43...>
Subject: Re: [Gambas-user] Blob management
To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Message-ID: <578119.25302.qm at ...1667...>
Content-Type: text/plain; charset=iso-8859-1
Forgot to add more details.
And yes, the example works fine but I don't get it to work in my app.
Here is the senario:
I got a table with a picture (just a record) and I want to save it to the disk, (PictureDatabase does it by the PictureBox not directly).
Driver: mysql, Mandriva 2009.1 32 bits, Gambas 2
Here are my statements
DIM hResultado AS Result
IF NOT Exist("/tmp/mas") THEN MKDIR "/tmp/mas"
hResultado = $hConn.Exec("SELECT * FROM `Pics`")
File.Save("/tmp/1.jpg", hResultado["Pic"].Data)
Or can you provide me an example of saving to disk an image stored in a database?
Regards
--
David
----- Original Message ----
From: Beno?t Minisini <gambas at ...1...>
To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Sent: Thursday, June 25, 2009 3:29:20 PM
Subject: Re: [Gambas-user] Blob management
> Hi, is there a problem with this instuction?
>
> hResultado = $hConn.Exec("SELECT Pic FROM Pics")
> File.Save("/tmp/1.jpg", hResultado["Pic"].Data)
>
>
> I can't get them work!
>
> Regards
>
>
> --
> David
>
Can you give more details? (versions, database driver)...
Does the PictureDatabase example work?
--
Beno?t
------------------------------------------------------------------------------
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------
Message: 3
Date: Thu, 25 Jun 2009 15:40:53 -0700 (PDT)
From: Swee Kwang Tan <sktan007 at ...43...>
Subject: [Gambas-user] The define style of many element string array
To: gambas-user at lists.sourceforge.net
Message-ID: <507194.14101.qm at ...2198...>
Content-Type: text/plain; charset=utf-8
Dear Sir,
Thank you for your reading. I have a string array, there is many element string. like this
dim ss as string[] = ["jkl", "9080|", "jim", "ren", "mu8", "vcnm", "m83d", "m09nc", "n83f", "iiop'", "qiop"......]
a longl long line, it have 65 sub-string. How do I write it smart ? If someone type error or
change someone, editor hard to edit ?
Thank you
_______________________________________
????????????
http://cn.mail.yahoo.com
------------------------------
Message: 4
Date: Fri, 26 Jun 2009 01:12:36 +0200
From: Beno?t Minisini <gambas at ...1...>
Subject: Re: [Gambas-user] Bug in package creator?
To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Message-ID: <200906260112.36143.gambas at ...1...>
Content-Type: Text/Plain; charset="iso-8859-1"
> > An user of my site notified me that he could have found a bug in the
> > Gambas package creator.
> > When he uses the gb.db.sqlite component and creates a .Deb package of
> > his application, that component is not considered as a dependency, so
> > when he installs his application on a different system, the package
> > manager doesn't require it, with the result that the application crashes
> > as soon as launched with a fatal error.
> >
> > Does anybody know about this?
>
> This bug has been fixed recently in the development version. Which version
> of Gambas does it use? I may backport the fix to Gambas2.
In revision #2044, you can now use any database driver as a component and
check it in the IDE project property dialog. This way, they can be an explicit
dependency when generating a package.
So you will get it in the upcoming 2.14 version.
Regards,
--
Beno?t
------------------------------
Message: 5
Date: Fri, 26 Jun 2009 09:28:39 +0800
From: Steven James Drinnan <steven at ...2097...>
Subject: [Gambas-user] Feature request
To: gambas-user at lists.sourceforge.net
Message-ID: <1245979720.3239.2.camel at ...2011...>
Content-Type: text/plain
Hi,
In relation to RPM creation in Gambas. Is there a way of adding other
dependencies.
Say for example I have a program that needs the program 'barcode' to run
it would be good to manually add that requirement to the package when
creating a package.
Just a thought
Steven
------------------------------
Message: 6
Date: Fri, 26 Jun 2009 09:35:55 +0800
From: Steven James Drinnan <steven at ...2097...>
Subject: Re: [Gambas-user] The define style of many element string
array
To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Message-ID: <1245980155.4602.8.camel at ...2011...>
Content-Type: text/plain; charset="UTF-8"
As far as I know just one by one. Write one line by one line.
ss[0] = "jkl"
ss[1] = "9080|"
ss[2] = "jim"
ss[3] = "ren"
ss[4] = "mu8"
I may be wrong and others can give there 2 cents worth.
Steven
On Thu, 2009-06-25 at 15:40 -0700, Swee Kwang Tan wrote:
> Dear Sir,
> Thank you for your reading. I have a string array, there is many element string. like this
> dim ss as string[] = ["jkl", "9080|", "jim", "ren", "mu8", "vcnm", "m83d", "m09nc", "n83f", "iiop'", "qiop"......]
> a longl long line, it have 65 sub-string. How do I write it smart ? If someone type error or
> change someone, editor hard to edit ?
> Thank you
>
>
> _______________________________________
> ????????????
> http://cn.mail.yahoo.com
> ------------------------------------------------------------------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------
Message: 7
Date: Fri, 26 Jun 2009 11:39:52 +0800
From: Werner <wdahn at ...1000...>
Subject: Re: [Gambas-user] Blob management
To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Message-ID: <4A444308.9050707 at ...1000...>
Content-Type: text/plain; charset=ISO-8859-1
David Villalobos Cambronero wrote:
> Forgot to add more details.
>
> And yes, the example works fine but I don't get it to work in my app.
>
> Here is the senario:
>
> I got a table with a picture (just a record) and I want to save it to the disk, (PictureDatabase does it by the PictureBox not directly).
>
> Driver: mysql, Mandriva 2009.1 32 bits, Gambas 2
>
>
> Here are my statements
>
> DIM hResultado AS Result
>
> IF NOT Exist("/tmp/mas") THEN MKDIR "/tmp/mas"
> hResultado = $hConn.Exec("SELECT * FROM `Pics`")
> File.Save("/tmp/1.jpg", hResultado["Pic"].Data)
>
> Or can you provide me an example of saving to disk an image stored in a database?
>
>
> Regards
>
>
> --
> David
>
>
>
> ----- Original Message ----
> From: Beno?t Minisini <gambas at ...1...>
> To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
> Sent: Thursday, June 25, 2009 3:29:20 PM
> Subject: Re: [Gambas-user] Blob management
>
>
>> Hi, is there a problem with this instuction?
>>
>> hResultado = $hConn.Exec("SELECT Pic FROM Pics")
>> File.Save("/tmp/1.jpg", hResultado["Pic"].Data)
>>
>>
>> I can't get them work!
>>
>> Regards
>>
>>
>> --
>> David
>>
>>
>
> Can you give more details? (versions, database driver)...
>
> Does the PictureDatabase example work?
>
>
You are using constructs that I have never seen before. Would this be
better?
DIM hResultado AS Result
IF NOT Exist("/tmp/mas") THEN MKDIR "/tmp/mas"
hResultado = $hConn.Exec("SELECT * FROM `Pics`")
File.Save("/tmp/mas/1.jpg", hResultado!fieldname)
------------------------------
Message: 8
Date: Fri, 26 Jun 2009 05:43:30 +0200
From: Simonart Dominique <simonart.dominique at ...11...>
Subject: Re: [Gambas-user] The define style of many element string
array
To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Message-ID: <4A4443E2.8050302 at ...11...>
Content-Type: text/plain; charset=UTF-8; format=flowed
Steven James Drinnan a ?crit :
> As far as I know just one by one. Write one line by one line.
>
> ss[0] = "jkl"
> ss[1] = "9080|"
> ss[2] = "jim"
> ss[3] = "ren"
> ss[4] = "mu8"
>
> I may be wrong and others can give there 2 cents worth.
>
> Steven
>
>
> On Thu, 2009-06-25 at 15:40 -0700, Swee Kwang Tan wrote:
>> Dear Sir,
>> Thank you for your reading. I have a string array, there is many element string. like this
>> dim ss as string[] = ["jkl", "9080|", "jim", "ren", "mu8", "vcnm", "m83d", "m09nc", "n83f", "iiop'", "qiop"......]
>> a longl long line, it have 65 sub-string. How do I write it smart ? If someone type error or
>> change someone, editor hard to edit ?
>> Thank you
>>
may be like this
Dim sChain AS String
Dim ss AS String[]
sChain = "jkl,9080,jim,ren,mu8,vcnm,m83d,m09nc,"
sChain &= "n83f,iiop,qiop,aaa1,bbb1,ccc1,ddd1,eee1,"
sChain &= "fff1,ggg1,hhh1,iii1,j1j1,k1k2,l1a2"
' etc
ss = SPLIT(sChain,",")
hope this help
Dominique
------------------------------
Message: 9
Date: Fri, 26 Jun 2009 07:12:38 +0200
From: Doriano Blengino <doriano.blengino at ...1909...>
Subject: Re: [Gambas-user] Format$ with different LANG
To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Message-ID: <4A4458C6.5040502 at ...1909...>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Ricardo D?az Mart?n ha scritto:
> I confirm I'm have got the same problem in Spanish configuration. For
> decimals we use "," (coma) and gambas returns "," (coma - it's ok) but for
> milliar we use "." (point) and gambas returns " " (blank). All the rest of
> locale data (date, time and currency are fine)
> ...
>>>>> ? Format$(Val("14555888") / 1000, "#,###.000")
>>>>> 14,555.888
>>>>>
>>>>> ...this is OK
>>>>>
>>>>> LANG="es_ES.utf8" and for LANG="it_IT.utf8"
>>>>>
>>>>> ? Format$(Val("14555888") / 1000, "#,###.000")
>>>>> 14 555,888
>>>>>
>>>>> There is a space where should be a . but I can cope with it
>>>>>
>>>>> For LANG="ru_RU.utf8"
>>>>>
>>>>> ? Format$(Val("14555888") / 1000, "#,###.000")
>>>>> 14??555,888
>>>>>
>>>>> where ?? are 3F3F . These are not recognised as UTF-8 valid
>>>>> characters.
>>>>>
>>>>> ...
>>> I confirm that number formatting (and perhaps dates too - can't remember
>>> well) don't work as expected in italian locale (tried on Debian systems
>>> ...
>>>
>> Gambas takes the data from the standard glib functions. So I think, but I
>> can
>> be wrong, that the glibc locale data may be wrong. I know that for sure
>> because the thousand separator returned for French is false. I added an
>> hack
>> in Gambas to fix that, but if other locales have incorrect data too, a
>> better
>> solution must be found.
>>
>> I will check (again) what the interpreter does. At the same time, it would
>> be
>> cool if some people can check the locale data returned by Gambas for their
>> own
>> language (mainly date, time and thousand separator, and currency
>> characters)
>> and tell me what is wrong. I know French and US locale only!
>>
>> Regards,
>>
Pino Zollo let me know that there is probably an error in
/usr/share/i18n/locales/it_IT.utf8
-------
LC_NUMERIC
decimal_point "<U002C>"
thousands_sep "" <---------- (empty string, not SPACE)
grouping 0;0
END LC_NUMERIC
--------------
I do not have that file, but instead other two, but with the same error.
Perhaps we can contact the author,
It seems strange to me that a danish guy (the author of that file is
danish) made the same mistake on spanish, italian, french (and probably
all the rest of Europe...) which, I think, share the same conventions
about numbers; so someone who knows glibc better than me could verify,
before contact him.
I will try to correct it_IT file and verify, just for curiosity, but if
someone else knows the matter better, please let me know...
Another question is this. I was misguided by the fact that KDE has its
own locale management: it lets you to change locale settings, and I
played with those settings to investigate - but gambas does not seem to
use them. Should gambas use KDE settings when using QT, or when using
the GUI switcher?
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
End of Gambas-user Digest, Vol 37, Issue 47
*******************************************
_______________________________________
辣茩妏蚚閉湮⺍講捇誥蚘眊
http://cn.mail.yahoo.com
More information about the User
mailing list