[Gambas-user] Invalid utf string in pdf example

2010-02-07 Thread richard terry
I wondered how to this this, as I'm in the process of using this sample to do 
some work in my program.

thanks in anticipation.

regards

Richard
<>--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] More Problems turning up

2010-02-07 Thread Jussi Lahtinen
Disturbing... Try to print out whole path (before using it) and
compare it to working fixed path.
If the path is correct, then there must be error in somewhere else.

Jussi


On Sun, Feb 7, 2010 at 04:30, Dag Jarle Johansen
 wrote:
> Hi,
>
> TabsStrip is good, still have the curoius error with user.home, but it
> is not so urgent while programming, give it a fixed path meanwhile.
>
> Regards
> Dag
>
>
>
>
>
> --
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Invalid utf string in pdf example

2010-02-07 Thread Benoît Minisini
> I wondered how to this this, as I'm in the process of using this sample to
>  do some work in my program.
> 
> thanks in anticipation.
> 
> regards
> 
> Richard
> 

What are the contents of txtFind.Text?

The PdfDocument.Find() method does the following internally:

Conv$(txtFind.Text, "UTF-8", "UCS-4LE")

Because the poppler library want Unicode string. What happens if you do the 
same conversion by hand in Gambas?

-- 
Benoît Minisini

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] More Problems turning up

2010-02-07 Thread Dag Jarle Johansen
Hi Jussi,

I tried Debug user.home
Allready here it says, not an object.
Also, autocomplete with user, does not work, as f.ex. in Application.p->
Application.Path
Somehow User is not present, and to be honest, I don't know how to fix
that.


Regards
Dag


Am Sonntag, den 07.02.2010, 13:51 +0200 schrieb Jussi Lahtinen:

> Disturbing... Try to print out whole path (before using it) and
> compare it to working fixed path.
> If the path is correct, then there must be error in somewhere else.
> 
> Jussi
> 
> 
> On Sun, Feb 7, 2010 at 04:30, Dag Jarle Johansen
>  wrote:
> > Hi,
> >
> > TabsStrip is good, still have the curoius error with user.home, but it
> > is not so urgent while programming, give it a fixed path meanwhile.
> >
> > Regards
> > Dag
> >
> >
> >
> >
> >
> > --
> > The Planet: dedicated and managed hosting, cloud storage, colocation
> > Stay online with enterprise data centers and the best network in the 
> > business
> > Choose flexible plans and management services without long-term contracts
> > Personal 24x7 support from experience hosting pros just a phone call away.
> > http://p.sf.net/sfu/theplanet-com
> > ___
> > Gambas-user mailing list
> > Gambas-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> 
> --
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] More Problems turning up

2010-02-07 Thread Jussi Lahtinen
I have no problems with autocomplete either.
When I write "use", it will offer "User", and when I continue to
"User." it offers me all options, included "Home".
Can you provide the source code?

Have you tried to remove Gambas3 and install it again?
To remove:
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

To install again:
./reconf-all
./configure -C
make
sudo make install


Jussi


On Sun, Feb 7, 2010 at 16:50, Dag Jarle Johansen
 wrote:
> Hi Jussi,
>
> I tried Debug user.home
> Allready here it says, not an object.
> Also, autocomplete with user, does not work, as f.ex. in Application.p->
> Application.Path
> Somehow User is not present, and to be honest, I don't know how to fix
> that.
>
>
> Regards
> Dag
>
>
> Am Sonntag, den 07.02.2010, 13:51 +0200 schrieb Jussi Lahtinen:
>
>> Disturbing... Try to print out whole path (before using it) and
>> compare it to working fixed path.
>> If the path is correct, then there must be error in somewhere else.
>>
>> Jussi
>>
>>
>> On Sun, Feb 7, 2010 at 04:30, Dag Jarle Johansen
>>  wrote:
>> > Hi,
>> >
>> > TabsStrip is good, still have the curoius error with user.home, but it
>> > is not so urgent while programming, give it a fixed path meanwhile.
>> >
>> > Regards
>> > Dag
>> >
>> >
>> >
>> >
>> >
>> > --
>> > The Planet: dedicated and managed hosting, cloud storage, colocation
>> > Stay online with enterprise data centers and the best network in the 
>> > business
>> > Choose flexible plans and management services without long-term contracts
>> > Personal 24x7 support from experience hosting pros just a phone call away.
>> > http://p.sf.net/sfu/theplanet-com
>> > ___
>> > Gambas-user mailing list
>> > Gambas-user@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>> >
>>
>> --
>> The Planet: dedicated and managed hosting, cloud storage, colocation
>> Stay online with enterprise data centers and the best network in the business
>> Choose flexible plans and management services without long-term contracts
>> Personal 24x7 support from experience hosting pros just a phone call away.
>> http://p.sf.net/sfu/theplanet-com
>> ___
>> Gambas-user mailing list
>> Gambas-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
> --
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] More Problems turning up

2010-02-07 Thread Dag Jarle Johansen
Hi Jussi,

I'll try it now. I assume the problem is here somewhere.

Thanks
Dag


Am Sonntag, den 07.02.2010, 17:08 +0200 schrieb Jussi Lahtinen:
> I have no problems with autocomplete either.
> When I write "use", it will offer "User", and when I continue to
> "User." it offers me all options, included "Home".
> Can you provide the source code?
> 
> Have you tried to remove Gambas3 and install it again?
> To remove:
> 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
> 
> To install again:
> ./reconf-all
> ./configure -C
> make
> sudo make install
> 
> 
> Jussi
> 
> 
> On Sun, Feb 7, 2010 at 16:50, Dag Jarle Johansen
>  wrote:
> > Hi Jussi,
> >
> > I tried Debug user.home
> > Allready here it says, not an object.
> > Also, autocomplete with user, does not work, as f.ex. in Application.p->
> > Application.Path
> > Somehow User is not present, and to be honest, I don't know how to fix
> > that.
> >
> >
> > Regards
> > Dag
> >
> >
> > Am Sonntag, den 07.02.2010, 13:51 +0200 schrieb Jussi Lahtinen:
> >
> >> Disturbing... Try to print out whole path (before using it) and
> >> compare it to working fixed path.
> >> If the path is correct, then there must be error in somewhere else.
> >>
> >> Jussi
> >>
> >>
> >> On Sun, Feb 7, 2010 at 04:30, Dag Jarle Johansen
> >>  wrote:
> >> > Hi,
> >> >
> >> > TabsStrip is good, still have the curoius error with user.home, but it
> >> > is not so urgent while programming, give it a fixed path meanwhile.
> >> >
> >> > Regards
> >> > Dag
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > The Planet: dedicated and managed hosting, cloud storage, colocation
> >> > Stay online with enterprise data centers and the best network in the 
> >> > business
> >> > Choose flexible plans and management services without long-term contracts
> >> > Personal 24x7 support from experience hosting pros just a phone call 
> >> > away.
> >> > http://p.sf.net/sfu/theplanet-com
> >> > ___
> >> > Gambas-user mailing list
> >> > Gambas-user@lists.sourceforge.net
> >> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >> >
> >>
> >> --
> >> The Planet: dedicated and managed hosting, cloud storage, colocation
> >> Stay online with enterprise data centers and the best network in the 
> >> business
> >> Choose flexible plans and management services without long-term contracts
> >> Personal 24x7 support from experience hosting pros just a phone call away.
> >> http://p.sf.net/sfu/theplanet-com
> >> ___
> >> Gambas-user mailing list
> >> Gambas-user@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> >
> > --
> > The Planet: dedicated and managed hosting, cloud storage, colocation
> > Stay online with enterprise data centers and the best network in the 
> > business
> > Choose flexible plans and management services without long-term contracts
> > Personal 24x7 support from experience hosting pros just a phone call away.
> > http://p.sf.net/sfu/theplanet-com
> > ___
> > Gambas-user mailing list
> > Gambas-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> 
> --
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user



--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] use of ORDER BY in gb.Find

2010-02-07 Thread Bill-Lancaster

The follwing code works

hResult = $hConn.Find("addresses", , "ORDER BY lastname")

but result is not sorted.  Of course I could use .EXEC with full SQL string
but
-- 
View this message in context: 
http://old.nabble.com/use-of-ORDER-BY-in-gb.Find-tp27489573p27489573.html
Sent from the gambas-user mailing list archive at Nabble.com.


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Databases, please help me!

2010-02-07 Thread M. Cs.
The mistery goes on:
I managed to get the results with closing the connection in other part of
code:

altea.Type = "sqlite"
altea.Host = User.Home & "/.GamCat"
TRY altea.Open()
IF NOT altea.Databases.Exist(User.Home & "/.GamCat/ImageThumbs") THEN
altea.Databases.Add("ImageThumbs")
WAIT 0.5
altea.Close()
ENDIF

altea.Name = "ImageThumbs"
altea.Type = "sqlite"
altea.Host = User.Home & "/.GamCat"
'altea.Open()
querry = "CREATE TABLE Thumbs(fajl TEXT,volume TEXT,name BLOB,img BLOB);"
altea.Exec(querry)
altea.Close() 'This what I've added!

I don't know why did the lack of last line disturb the process. Now I'm
facing another difficulties:
I cannot force Treeview elements to have different images, although I'm
getting real images with the procedure  Opener. They are all the same, one
of the existing ones, even I can check that the picture paths are different.
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] More Problems turning up

2010-02-07 Thread Dag Jarle Johansen
Hi Jussi,

tried it out, no change:
I got some warnings at sudo make install:

Compiling gb.form...
warning: cannot read component list file: gb.form.list
OK
Installing gb.form...
Compiling gb.form.dialog...
OK
Installing gb.form.dialog...
Compiling gb.form.mdi...
warning: cannot read component list file: gb.form.mdi.list
OK
Installing gb.form.mdi...
Compiling gb.db.form...
warning: cannot read component list file: gb.db.form.list
OK

I don't know how much this matters.
The warnings were repeated while compiling the examples, don't list them
here.

The source looks like this:

Public Function SysLog_User() As String
  Dim hfile As file
  Dim Sys_User as String
  Dim DateiName As String
  DateiName = user.home & "/gambasdata/user.txt"
  Wait
  Shell "whoami>" & Dateiname Wait

  'Shell "whoami>/home/dag/gambasdata/user.txt" Wait
  hfile = Open DateiName For Read

  'hfile = Open "/home/dag/gambasdata/user.txt" For Read
  Wait
  Line Input #hfile, Sys_User
  Close #hfile
  Return Sys_User
End

regards
Dag

Am Sonntag, den 07.02.2010, 17:08 +0200 schrieb Jussi Lahtinen:

> I have no problems with autocomplete either.
> When I write "use", it will offer "User", and when I continue to
> "User." it offers me all options, included "Home".
> Can you provide the source code?
> 
> Have you tried to remove Gambas3 and install it again?
> To remove:
> 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
> 
> To install again:
> ./reconf-all
> ./configure -C
> make
> sudo make install
> 
> 
> Jussi
> 
> 
> On Sun, Feb 7, 2010 at 16:50, Dag Jarle Johansen
>  wrote:
> > Hi Jussi,
> >
> > I tried Debug user.home
> > Allready here it says, not an object.
> > Also, autocomplete with user, does not work, as f.ex. in Application.p->
> > Application.Path
> > Somehow User is not present, and to be honest, I don't know how to fix
> > that.
> >
> >
> > Regards
> > Dag
> >
> >
> > Am Sonntag, den 07.02.2010, 13:51 +0200 schrieb Jussi Lahtinen:
> >
> >> Disturbing... Try to print out whole path (before using it) and
> >> compare it to working fixed path.
> >> If the path is correct, then there must be error in somewhere else.
> >>
> >> Jussi
> >>
> >>
> >> On Sun, Feb 7, 2010 at 04:30, Dag Jarle Johansen
> >>  wrote:
> >> > Hi,
> >> >
> >> > TabsStrip is good, still have the curoius error with user.home, but it
> >> > is not so urgent while programming, give it a fixed path meanwhile.
> >> >
> >> > Regards
> >> > Dag
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > The Planet: dedicated and managed hosting, cloud storage, colocation
> >> > Stay online with enterprise data centers and the best network in the 
> >> > business
> >> > Choose flexible plans and management services without long-term contracts
> >> > Personal 24x7 support from experience hosting pros just a phone call 
> >> > away.
> >> > http://p.sf.net/sfu/theplanet-com
> >> > ___
> >> > Gambas-user mailing list
> >> > Gambas-user@lists.sourceforge.net
> >> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >> >
> >>
> >> --
> >> The Planet: dedicated and managed hosting, cloud storage, colocation
> >> Stay online with enterprise data centers and the best network in the 
> >> business
> >> Choose flexible plans and management services without long-term contracts
> >> Personal 24x7 support from experience hosting pros just a phone call away.
> >> http://p.sf.net/sfu/theplanet-com
> >> ___
> >> Gambas-user mailing list
> >> Gambas-user@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> >
> > --
> > The Planet: dedicated and managed hosting, cloud storage, colocation
> > Stay online with enterprise data centers and the best network in the 
> > business
> > Choose flexible plans and management services without long-term contracts
> > Personal 24x7 support from experience hosting pros just a phone call away.
> > http://p.sf.net/sfu/theplanet-com
> > ___
> > Gambas-user mailing list
> > Gambas-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> 
> --
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> ___
> Gambas-

Re: [Gambas-user] Databases, please help me!

2010-02-07 Thread M. Cs.
I'm slightly going angry.

This excerpt shows the part of code which aims to give each file in the
TreeView its thumbnail image:

querry = "SELECT FPath,FName,FSubs FROM " & CD
valasz = DBconX.Exec(querry)
FOR EACH valasz
fle.Add(valasz!"FName")
pth.Add(valasz!"FPath")
subs.Add(valasz!"FSubs")
tipus = valasz!"FSubs"
SELECT tipus
CASE 0 ' here the story starts

  amo = Split(valasz!"FName", ".")
  exty = Upper$(amo[amo.Count - 1])
SELECT exty
   CASE "PDF"
  mokka = "pdf.png"
   CASE "JPG"

  IF showthumbs.Value = TRUE THEN
mokka = GetThumb(valasz!"FName", CD)' Send the filename and the
volumename
  ELSE
   mokka = "jpg.png"
  ENDIF
   CASE "TTF"
  mokka = "ttf.png"
   CASE "XCF"
  mokka = "xcf.png"
   CASE "PNG"
  mokka = "png.png"
   CASE "SWF"
  mokka = "swf.png"
   CASE "K3B"
  mokka = "k3b.png"
   CASE "FLV"
  mokka = "swf.png"
   CASE "MP3"
  mokka = "mp3.png"
   CASE "BIN"
  mokka = "run.png"
   CASE "SH"
  mokka = "sh.png"
   CASE "PY"
  mokka = "sh.png"
   CASE "PS"
  mokka = "ps.png"
   CASE "XML"
  mokka = "xml.png"
   CASE "OTF"
  mokka = "otf.png"
   CASE "WMF"
  mokka = "wmf.png"
   CASE "SLA"
  mokka = "sla.png"
   CASE "MP4"
  mokka = "mp4.png"
   CASE "RUN"
  mokka = "run.png"
   CASE "PPT"
  mokka = "ppt.png"
   CASE "PPS"
  mokka = "pps.png"
   CASE "TXT"
  mokka = "txt.png"
   CASE "SRT"
  mokka = "txt.png"
   CASE "SUB"
  mokka = "txt.png"
   CASE "DOC"
  mokka = "doc.png"
   CASE "XLS"
  mokka = "xls.png"
   CASE "ISO"
  mokka = "iso.png"
   CASE "WAV"
  mokka = "wav.png"
   CASE "WMA"
  mokka = "wma.png"
   CASE "OGG"
  mokka = "ogg.png"
   CASE "AVI"
  mokka = "avi.png"
   CASE "MPEG"
  mokka = "mpg.png"
   CASE "ODT"
  mokka = "odt.png"
   CASE "ODS"
  mokka = "ods.png"
   CASE "ODP"
  mokka = "odp.png"
   CASE "ODG"
  mokka = "odg.png"
   CASE "MPG"
  mokka = "mpg.png"
   CASE "DEB"
  mokka = "deb.png"
   CASE "RPM"
  mokka = "rpm.png"
   CASE "HTM"
  mokka = "htm.png"
   CASE "HTML"
  mokka = "htm.png"
   CASE "GIF"
  mokka = "gif.png"
CASE "SVG"
  mokka = "svg.png"
CASE "BMP"
  mokka = "bmp.png"
CASE "EXE"
  mokka = "exe.png"
CASE "RTF"
  mokka = "rtf.png"
CASE ELSE
  mokka = "pot.png"
END SELECT

CASE 1
mokka = "fold.png"
CASE 3
mokka = "arch.png"
END SELECT
imager.Add(mokka)
NEXT


FOR i = 0 TO imager.Count - 1
IF (subs[i] = 1 AND pth[i] = "/") THEN
fView.Add(pth[i] & fle[i], fle[i], Picture.Load(imager[i]), pth[i])
ENDIF
IF (subs[i] = 1 AND pth[i] <> "/") THEN
fView.Add(pth[i] & "/" & fle[i], fle[i], Picture.Load(imager[i]),
pth[i])
ENDIF
IF (subs[i] = 0 OR subs[i] = 3) THEN
   fView.Add(pth[i] & "/" & fle[i], fle[i], Picture.Load(imager[i]), pth[i])
ENDIF
NEXT

I did everything: I've separated the filename, filepath and filetype and
file/folder identificator into different arrays. Still EVERY element with .
jpg extension gets the same thumbnail, which is the last image loaded at
all. How on earth is possible to manage this dinamically? Gambas is so
unlogical! Every imager[i] is different, what's wrong for God's sake?!
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Databases, please help me!

2010-02-07 Thread Benoît Minisini
> > I'm almost there. Still I have a big problem and a possible bug:
> > When I do a querry:
> > querry="SELEC * FROM Thumbs WHERE fajl='b1.jpg' AND volume='ALPHA';"
> >
> > I'm getting 0 hits, although when I do the same querry in terminal, I
> > have exactly 1 shot, as it has to be.
> >
> > Structure of table:
> >
> > Thumbs(fajl TEXT,volume TEXT,name BLOB,img BLOB)
> >
> > Is it a bug?
> 
> Apparently. Can you send me your database?
> 

When I said "send me", I meant to my private e-mail, not on the mailing-list. 

But I got it anyway in the list of rejected e-mails. And I couldn't reproduce 
your bug. I did the same query in the connection window in the IDE (use the 
latest revision because of a bug), and got the expected result.

Regards,

-- 
Benoît Minisini

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Databases, please help me!

2010-02-07 Thread Benoît Minisini
> I'm slightly going angry.
> 
> This excerpt shows the part of code which aims to give each file in the
> TreeView its thumbnail image:
> 
> querry = "SELECT FPath,FName,FSubs FROM " & CD
> valasz = DBconX.Exec(querry)
> FOR EACH valasz
> fle.Add(valasz!"FName")

Don't use quote there. It is:

valasz!FName

Or

valasz["FName"]

> pth.Add(valasz!"FPath")
> subs.Add(valasz!"FSubs")
> tipus = valasz!"FSubs"
> SELECT tipus
> CASE 0 ' here the story starts
> 
>   amo = Split(valasz!"FName", ".")
>   exty = Upper$(amo[amo.Count - 1])
> SELECT exty
>CASE "PDF"
>   mokka = "pdf.png"
>CASE "JPG"
> 
>   IF showthumbs.Value = TRUE THEN
> mokka = GetThumb(valasz!"FName", CD)' Send the filename and the
> volumename
>   ELSE
>mokka = "jpg.png"
>   ENDIF
>CASE "TTF"
>   mokka = "ttf.png"
>CASE "XCF"
>   mokka = "xcf.png"
>CASE "PNG"
>   mokka = "png.png"
>CASE "SWF"
>   mokka = "swf.png"
>CASE "K3B"
>   mokka = "k3b.png"
>CASE "FLV"
>   mokka = "swf.png"
>CASE "MP3"
>   mokka = "mp3.png"
>CASE "BIN"
>   mokka = "run.png"
>CASE "SH"
>   mokka = "sh.png"
>CASE "PY"
>   mokka = "sh.png"
>CASE "PS"
>   mokka = "ps.png"
>CASE "XML"
>   mokka = "xml.png"
>CASE "OTF"
>   mokka = "otf.png"
>CASE "WMF"
>   mokka = "wmf.png"
>CASE "SLA"
>   mokka = "sla.png"
>CASE "MP4"
>   mokka = "mp4.png"
>CASE "RUN"
>   mokka = "run.png"
>CASE "PPT"
>   mokka = "ppt.png"
>CASE "PPS"
>   mokka = "pps.png"
>CASE "TXT"
>   mokka = "txt.png"
>CASE "SRT"
>   mokka = "txt.png"
>CASE "SUB"
>   mokka = "txt.png"
>CASE "DOC"
>   mokka = "doc.png"
>CASE "XLS"
>   mokka = "xls.png"
>CASE "ISO"
>   mokka = "iso.png"
>CASE "WAV"
>   mokka = "wav.png"
>CASE "WMA"
>   mokka = "wma.png"
>CASE "OGG"
>   mokka = "ogg.png"
>CASE "AVI"
>   mokka = "avi.png"
>CASE "MPEG"
>   mokka = "mpg.png"
>CASE "ODT"
>   mokka = "odt.png"
>CASE "ODS"
>   mokka = "ods.png"
>CASE "ODP"
>   mokka = "odp.png"
>CASE "ODG"
>   mokka = "odg.png"
>CASE "MPG"
>   mokka = "mpg.png"
>CASE "DEB"
>   mokka = "deb.png"
>CASE "RPM"
>   mokka = "rpm.png"
>CASE "HTM"
>   mokka = "htm.png"
>CASE "HTML"
>   mokka = "htm.png"
>CASE "GIF"
>   mokka = "gif.png"
> CASE "SVG"
>   mokka = "svg.png"
> CASE "BMP"
>   mokka = "bmp.png"
> CASE "EXE"
>   mokka = "exe.png"
> CASE "RTF"
>   mokka = "rtf.png"
> CASE ELSE
>   mokka = "pot.png"
> END SELECT
> 
> CASE 1
> mokka = "fold.png"
> CASE 3
> mokka = "arch.png"
> END SELECT
> imager.Add(mokka)
> NEXT
> 
> 
> FOR i = 0 TO imager.Count - 1
> IF (subs[i] = 1 AND pth[i] = "/") THEN
> fView.Add(pth[i] & fle[i], fle[i], Picture.Load(imager[i]), pth[i])
> ENDIF
> IF (subs[i] = 1 AND pth[i] <> "/") THEN
> fView.Add(pth[i] & "/" & fle[i], fle[i], Picture.Load(imager[i]),
> pth[i])
> ENDIF
> IF (subs[i] = 0 OR subs[i] = 3) THEN
>fView.Add(pth[i] & "/" & fle[i], fle[i], Picture.Load(imager[i]),
>  pth[i]) ENDIF
> NEXT
> 
> I did everything: I've separated the filename, filepath and filetype and
> file/folder identificator into different arrays. Still EVERY element with .
> jpg extension gets the same thumbnail, which is the last image loaded at
> all. How on earth is possible to manage this dinamically? Gambas is so
> unlogical! Every imager[i] is different, what's wrong for God's sake?!

I've never seen that behaviour... Can you provide the full source code? Which 
system language do you use?

-- 
Benoît Minisini

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Sqlite and Gambas and image blobs

2010-02-07 Thread Matti
Hi M. Cs.,

I'm not really sure what you want.

Is it: the user chooses a picture directory, and you want to display the
thumbnails of the pictures? In PictureBoxes, or frames containing PictureBoxes?

Then you wouldn't need any database, and I could help you. Did this with just an
array of file names, and a function that looks for the system thumbs, or creates
them if they don't exist.

Just tell me if you need something like that.
Matti


Am 05.02.2010 14:05, schrieb M. Cs.:
> Hi,
> I'd like to know how can I store image thumbnails (~10 KByte each) inside
> the sqlite database using Gambas. I'd like to use the stored thumbs as
> preview images, so I'd have to know how to read the blob data out of
> database and use it as a content of a Picture container.
> 
> Once more:
> CREATE TABLE thumbs(name TEXT, img BLOB);
> I suppose that would create a table for thumbnails. How to write into
> thumbs, and how to get back the image, let say into PicFrame?
> Thanks!
> --
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Sqlite and Gambas and image blobs

2010-02-07 Thread M. Cs.
I'm developing the GamCat cataloging program. I'd like to add possibilities
to scan CD/DVDs and to create thumbnail images, which would be stored in a
database file, and the user could optionaly see the thumbnails of the
pictures in a TreeView , which would visually display the content of the
archived volume. I've already managed to create and store the thumbs, but I
have problems with displaying them, since when you have a TreeView.Add
command you should define key,string,image, and parent. My problem is that
image is dinamically loaded with Picture.Load(imager[i]) command, where
imager is an array containing the picture paths. The TreeView building
process is nested into a FOR..NEXT cycle and the problem is that all files
are getting the same thumbnail...the last one loaded. I've doubled the post
with 'Database help please!'. Maybe you could help me trace down the
problem.
The apps page:
http://www.opendesktop.org/content/show.php?content=100682
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Setting default values on a listbox

2010-02-07 Thread P. Hightower
I've been trying to find an answer to this question all afternoon and can't
seem to find it or figure it out from experimentation.

I'm working on a small program that relies on ListBox controls for selecting
an option. Right now the Form loads with the ListBox with nothing selected
and a value of null. What I'd like is for the form to come up with a
particular option in the ListBox preselected.

I've tried setting a text value for the listbox from form_open but that only
gives me an error saying the listbox.text is read only.

What am I missing?
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Sqlite and Gambas and image blobs

2010-02-07 Thread Matti
Sorry, don't think I can help you here.
Matti

Am 07.02.2010 20:17, schrieb M. Cs.:
> I'm developing the GamCat cataloging program. I'd like to add possibilities
> to scan CD/DVDs and to create thumbnail images, which would be stored in a
> database file, and the user could optionaly see the thumbnails of the
> pictures in a TreeView , which would visually display the content of the
> archived volume. I've already managed to create and store the thumbs, but I
> have problems with displaying them, since when you have a TreeView.Add
> command you should define key,string,image, and parent. My problem is that
> image is dinamically loaded with Picture.Load(imager[i]) command, where
> imager is an array containing the picture paths. The TreeView building
> process is nested into a FOR..NEXT cycle and the problem is that all files
> are getting the same thumbnail...the last one loaded. I've doubled the post
> with 'Database help please!'. Maybe you could help me trace down the
> problem.
> The apps page:
> http://www.opendesktop.org/content/show.php?content=100682
> --
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Databases, please help me!

2010-02-07 Thread M. Cs.
Thanks to all of you! I was a totally idiot! I've commented out one part of
the querry text, where the WHERE clausule were defined.[?]
Csaba
<<338.gif>>--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Invalid utf string in pdf example

2010-02-07 Thread Benoît Minisini
> > I wondered how to this this, as I'm in the process of using this sample
> > to do some work in my program.
> >
> > thanks in anticipation.
> >
> > regards
> >
> > Richard
> 
> What are the contents of txtFind.Text?
> 
> The PdfDocument.Find() method does the following internally:
> 
>   Conv$(txtFind.Text, "UTF-8", "UCS-4LE")
> 
> Because the poppler library want Unicode string. What happens if you do the
> same conversion by hand in Gambas?
> 

The bug should be fixed in revision #2672. Moreover, now the PdfDocument class 
now returns all dimensions as Float for more precision.

Regards,

-- 
Benoît Minisini

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TabStrip not visible

2010-02-07 Thread Benoît Minisini
> hi,
> 
> I installed SVN 3 rev 2663 from the scratch yesterday; the old problems
> are gone, one new: I can paint a TabStrip, but it is completly
> transparent, no borders, no tabs, no nothing - can't even find it on the
> form, when not selecting a big area around where I presume it.
> 
> (Ubuntu 9.10 AMD64)
> 
> regards
> Dag
> 
> 

The bug has been fixed in revision #2666.

Regards,

-- 
Benoît Minisini

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Setting default values on a listbox

2010-02-07 Thread Werner
On 08/02/10 03:56, P. Hightower wrote:
> I've been trying to find an answer to this question all afternoon and can't
> seem to find it or figure it out from experimentation.
>
> I'm working on a small program that relies on ListBox controls for selecting
> an option. Right now the Form loads with the ListBox with nothing selected
> and a value of null. What I'd like is for the form to come up with a
> particular option in the ListBox preselected.
>
> I've tried setting a text value for the listbox from form_open but that only
> gives me an error saying the listbox.text is read only.
>
> What am I missing?
>   
You could use Setting for storing default and/or user set values.
http://gambasdoc.org/help/comp/gb.settings/settings

Regards
Werner


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] printer problem

2010-02-07 Thread Rolf-Werner Eilert
Am 06.02.2010 00:52, schrieb Benoît Minisini:
>> Salut,
>>
>> I still haven't solved the Draw.Text tab problem, but I'v a new one (a
>> problem).
>>
>> If you open the printer-setup the first time, the 'Print to printer' is
>> chosen, and the target-file behind 'Print to file' is empty.
>>
>> If you check 'Print to file' and fill the target-file and then you
>> switch back to 'Print to printer', the target-file field is disabled.
>> (Setup Printer.png)
>>
>> Everything seems to be alright.
>>
>> But, and there is my new problem, in my code I can't see what should be
>> done. (printing 5 times to file, makes no sense)
>>
>> Where is the magic pointer, which shows me the chosen device?
>> (Printer Properties.png)
>>
>> Gambas2=2.19.0  Revision: 2654
>> qt
>>
>
> Just a few word to tell that the printer support has been redesigned in Gambas
> 3, this is why I didn't touch the Gambas 2 one anymore.
>
> Now in Gambas 3, it should work as it should have worked since the beginning,
> with both Qt and GTK+.
>
> Regards,
>

That means, no need to print into a file anymore? Great news, Benoit!

On the other hand, after having worked with the workaround for such a 
long time, I found some advantages in working with print files, e. g. I 
now can store every form or letter I printed for the students so I can 
look them up later if anything is unclear or no copy available ("what 
the hack did I print for her then...")

Regards

Rolf


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user