Re: [Gambas-user] Slow Gridview creation

2009-03-27 Thread Rolf-Werner Eilert
No, you don't fill it, it fills itself :-)

As soon as you change anything in the gridview (number of rows/columns 
for instance) or there is any event forcing it to rewrite its contents 
(the user switching screens or a .Refresh by your code), it jumps into 
the _Data event for every cell and reloads them.

So you just have to keep the contents prepared for it in the array in 
the background as Fabien has shown:

dim myarray[16000,16000]

Here is where you store your data for each cell.

As soon as you or your code gives the gridview a reason to start 
updating (in Fabien's example: Rows.Count and Columns.Count), it will 
jump into the _Data event and fetch its data for every cell from there:

public sub gridview1_data(row as integer, column as integer)

   gridview1.data.text = myarray[row, column]

end


Hope it helps...

Rolf


Jesus Guardon schrieb:
 Thanks for reply, but still not clear...
 
 Your example only draws a grid with empty cells. I can't figure out how 
 to fill the grid with a database result object, even with a simple 
 array. Please, open my eyes!! :-((
 
 Jesus
 
 Fabien Bodard escribió:
 in fact jesus , you don't feel the grid,
 the grid just call the visible cells content via the event.

 dim myarray[16000,16000]

 public sub _New()

   gridview1.Rows.Count = 16000
   gridView1.Columns.Count = 16000

 end


 public sub gridview1_data(row as integer, column as integer)

   gridview1.data.text = myarray[row, column]

 end


 so you don't make any change in the data in the gridview but in the
 array it self...

 it's a data/view model.  a variable that store the datas and a widget
 that just walk on the content.

 2009/3/26 Jesus Guardon jguar...@telefonica.net:
 Hi all

 I'm trying to implement the Data event handler, but I cannot understand
 the way it must be done. I am locked out, sorry for my awkwardness.
 Can anyone provide a basic working example? I need to fill a gridview
 with 16000+ rows.

 Thanks in advance!

 Jesús

 Benoit Minisini escribió:

 You must do exactly what is written in the documentation: instead of 
 setting
 the data explicitely, you must implement the Data event handler. In this
 event handler, you will receive the Row and Column of the cell to fill, and
 in return you set the properties of the GridView.Data property to define 
 the
 cell contents.

 PUBLIC SUB MyGridView_Data(Row AS Integer, Column AS Integer)

   MyGridView.Data.Text = Row   :   Column

 END

 --
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

 --
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

 
 
 --
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 


--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Problem with gambas..

2009-03-27 Thread Mike Keehan
Carlos Humberto Llumiquinga Hidalgo wrote:
 Hi all
 
 I have a problem with a code on gambas..
 
 I'm trying.. this code.. EXEC [rm, application.Path  /imagenes/*.*]
 ... just I wanna erase the content of images folder.
 
 But I got an error.. on console... rm: can't erase
 «/home/carlosh/Prueba/imagenes/*.*»: File don't exists
 
 Help Please.. what's wrong.. 
 

Hi Carlos,

Try using SHELL instead of EXEC.  The *.* expression gets expanded by 
the Shell not by individual programs like rm.

Mike.


--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] PB using tableview object

2009-03-27 Thread Benoît Minisini
 Hi,

 I'm trying to use the Tableview object in a project and I have 2
 Columns configured.

 I have configured the TableView to be able to edit each Cell in the
 right column and lock the left Column
 but in real, by using the key, in edition mode,  I can always acces to
 the left Column that is locked and write text inside.


 I don't know how to lock completly the left column as in the Gambas
 IDE = Object Properties Panel ?

 Does anyone can help me please ?

 Olivier Cruilles
 Mail: linu...@club-internet.fr


You are not very clear: please provide your source code!

The TableView won't edit any cell unless you explicitely call its Edit (or 
EditWith) method during a Select event. Just don't call Edit() if the current 
column is zero.

And the object properties panel uses a GridView, not a TableView.

Regards,

-- 
Benoît


--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Unable to change valuebox contents after selecting record from combobox

2009-03-27 Thread Benoît Minisini
 I am new to Gambas  am having a small problem with a simple stock control
 program. When th program starts a file is read and each record is loaded
 and broken down and the element values are assigned to separate arrays, a
 combobox is loaded with the names of the stock items. On my form when
 running the program I can select what record I want to change with the
 combobox, and the correct details for each record are displayed where they
 are meant to be, the problem is that I cant edit the contents of the on
 screen information other than the combobox contents. All the other info is
 stored in valuebox's with type number. Why wont it let me edit the other
 contents ??

Can you provide your full source code?

-- 
Benoît


--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Sdl.sound and Qt dependencies not satisfiable

2009-03-27 Thread Benoît Minisini
 I checked the Deban contents and theses are the components listed below:

 I do not see gambas2-gb-sdl-sound

 gambas2
 Complete visual development environment for Gambas
 gambas2-dev
 Gambas compilation tools
 gambas2-doc
 Gambas documentation
 gambas2-gb-chart
 The Gambas charting component
 gambas2-gb-compress
 The Gambas compression component
 gambas2-gb-compress-bzlib2
 The Gambas bzlib2 component
 gambas2-gb-compress-zlib
 The Gambas zlib compression component
 gambas2-gb-crypt
 The Gambas crypt encription component
 gambas2-gb-db
 Gambas database access common libraries
 gambas2-gb-db-firebird
 The Firebird driver for the Gambas database component
 gambas2-gb-db-form
 Gambas database bound controls
 gambas2-gb-db-mysql
 The MySQL driver for the Gambas database component
 gambas2-gb-db-odbc
 The Gambas ODBC driver database component
 gambas2-gb-db-postgresql
 The PostgreSQL driver for the Gambas database component
 gambas2-gb-db-sqlite
 The Gambas sqlite3 driver database component
 gambas2-gb-db-sqlite2
 The Gambas sqlite2 driver database component
 gambas2-gb-desktop
 Gambas Portland project compatibility component
 gambas2-gb-form
 A gambas native form component
 gambas2-gb-form-dialog
 A gambas native mdi form component
 gambas2-gb-form-mdi
 A gambas native mdi form component
 gambas2-gb-gtk
 The Gambas gtk component
 gambas2-gb-gtk-ext
 The Gambas extended gtk GUI component
 gambas2-gb-gtk-svg
 The Gambas SVG importing component
 gambas2-gb-gui
 The graphical toolkit selector component
 gambas2-gb-image
 A Gambas image effects component
 gambas2-gb-info
 A Gambas information component
 gambas2-gb-net
 The Gambas networking component
 gambas2-gb-net-curl
 The Gambas advanced networking component
 gambas2-gb-net-smtp
 Gambas component to use smtp protocol
 gambas2-gb-opengl
 The OpenGL component for Gambas
 gambas2-gb-pcre
 The Gambas regexp component
 gambas2-gb-pdf
 The Gambas pdf component
 gambas2-gb-qt
 The Gambas Qt GUI component
 gambas2-gb-qt-ext
 The Gambas extended Qt GUI component
 gambas2-gb-qt-kde
 The Gambas KDE component
 gambas2-gb-qt-kde-html
 The Gambas KHTML component
 gambas2-gb-qt-opengl
 OpenGL with QT toolkit Gambas component
 gambas2-gb-report
 Gambas report component
 gambas2-gb-sdl
 The Gambas SDL component
 gambas2-gb-settings
 Gambas utilities class
 gambas2-gb-v4l
 The Gambas video for Linux component
 gambas2-gb-vb
 The Gambas to Visual Basic(tm) compatibility component
 gambas2-gb-web
 Gambas CGI for web applications component
 gambas2-gb-xml
 Gambas XML component
 gambas2-gb-xml-rpc
 Gambas RPC component
 gambas2-gb-xml-xslt
 Gambas XSLT component
 gambas2-ide
 Visual development environment for the Gambas programming language
 gambas2-runtime
 The Gambas runtime
 gambas2-script
 The Gambas scripter

 JB Skaggs


This is a forgotten package: in the Gambas source code directory, one package 
must me made for each gb.* directory, and there is a gb.sdl.sound directory.

Why this package is missing, I don't know. You must ask the Debian packager!

-- 
Benoît


--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Floodfill / pie chart

2009-03-27 Thread Fabien Bodard
hi jussi, can you send me the vb code ?

i'm working on gb.chart component... it may interest me just to
complete my component

(this component work fine only on svn version)


thanks
Le 27 mars 2009 11:31, Benoît Minisini gam...@users.sourceforge.net a écrit :
 Hi!

 I need pie chart in my application, and I have old vb6 code that does
 what I need, but it is based on floodfill.
 Do Gambas have any equivalent function? Or alternatively, method to
 draw filled sectors?
 I'm using Gambas3.
 Thanks!


 Jussi


 I think that Draw.Ellipse() will draw what you need by using its last two
 optional arguments.

 Regards,

 --
 Benoît


 --
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Problem with gambas..

2009-03-27 Thread Rolf Schmidt
Hi Carlos

 I have a problem with a code on gambas..

 I'm trying.. this code.. EXEC [rm, application.Path  /imagenes/*.*]
 ... just I wanna erase the content of images folder.

 But I got an error.. on console... rm: can't erase
 «/home/carlosh/Prueba/imagenes/*.*»: File don't exists

The exex comand runs without a shell and so there is no envrionment and rm 
will not be found in the local directory.

Either you use rm with a full path or use the shell command.

HTH
Rolf


signature.asc
Description: This is a digitally signed message part.
--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Unable to change valuebox contents after selecting record from combobox

2009-03-27 Thread CelticBhoy

Thanx for the reply's but I managed to sort it, it was a problem with the
combobox.index returning a negative number, and using the wrong event ( I
had used change, worked with click ). After finding the problems it was
simple to sort.

Thanx again for quick reply's.

-- 
View this message in context: 
http://www.nabble.com/Unable-to-change-valuebox-contents-after-selecting-record-from-combobox-tp22723578p22743699.html
Sent from the gambas-user mailing list archive at Nabble.com.


--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Slow Gridview creation

2009-03-27 Thread Jesus Guardon
Still nothing... Data event seems to be not fired.

Please, check the modified example:

http://www.ea7dfh.es/demotableview.tar.gz

This includes the sqlite3 database and is too big to attach in the 
e-mail.( ~600 Kb)

What I'm doing wrong?

Regards and thanks for your patience

Jesús

--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Slow Gridview creation

2009-03-27 Thread Fabien Bodard
simply the handle name is not good... you have named your gridview
gv and not GridView1... it's an usual copypaste error ;-)

PUBLIC SUB gv_Data(Row as integer, Column as integer)

you have put the column between comma... this pactice is for the
translated strings... but if you translate column headers ... they
will not match with  the db entries... i think it will be better to
use a separate string array to store the fields name.



private $aMyFields as string[]= [field1, field2, Field3, Field4]

public sub _new()
gv.columns.count = $aMyFields.count

gv.columns[0].text = id
gv.Columns[1].text = (name)' that can be nom in french
etc...



public sub gv_data(...

result.moveto(row)
gv.data.text=result[$aMyFields[column]]



Regards,
Fabien


2009/3/27 Jesus Guardon jguar...@telefonica.net:
 Still nothing... Data event seems to be not fired.

 Please, check the modified example:

 http://www.ea7dfh.es/demotableview.tar.gz

 This includes the sqlite3 database and is too big to attach in the
 e-mail.( ~600 Kb)

 What I'm doing wrong?

 Regards and thanks for your patience

 Jesús

 --
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] My first rodeo in using the network component

2009-03-27 Thread M0E.lnx
But there has to be a way to do this using gambas objects, at least I would 
imagine.

Of couse, I could use external commands to to get the results I want.
Like curl -G url
store the output in a string or string[] and work my way off of there.

but I was kind of hoping there was a way to do this internally using pure 
gambas objects/code.

--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Sdl.sound and Qt dependencies not satisfiable

2009-03-27 Thread jbskaggs

Well I install 2.12 on 64 bit ubuntu via ./configure /make install and My
LORD what a pain if your are missing dependencies!  Its like some type of
fraternity treasure hunt and the dependencies are not easy to find or even
neccessarily easy to define especially if the install is looking for a
certian version no longer maintained.

Anyway it is all up and running again and I now have 2.12 on Ubuntu 64bit
Wolvix 2.0 beta and Wolvix 1.10.

The wolvix distributor has created a Wolvix package on his repository that
is slackware 12.2 based.  www.wolvix.org

Though I think he did not have Corba configured.

There was another slackware 12.2 package at:
http://darkstar.ist.utl.pt/slackware/addon/slacky/slackware-12.2/development/gambas/

JB SKaggs



jbskaggs wrote:
 
 I am running ubuntu 8.10 64 bit, Gambas 2.7 (highest packaged for 64bit
 8.1).
 
 I add the gb.sdl.sound and now cannot install packages because I get
 Dependencies not satisfiable for gb.sdl.sound.
 
 So I figured maybe I need to add gb.sdl but I can't because my program is
 qt based and it says qt and sdl incompatible.
 
 When I run my program without gb.sdl installed and with gb.sdl.sound
 installed it runs fun from IDE. I can create executable, and I can package
 it but I cannot install the package without the error popping about
 dependencies.
 
 All I want to do is have a wav file played without having to call an
 external shell.
 
 How can I do that with qt?  Or how do I fix this dependency issue?
 
 
 JB SKaggs
 

-- 
View this message in context: 
http://www.nabble.com/Sdl.sound-and-Qt-dependencies-not-satisfiable-tp22696057p22746201.html
Sent from the gambas-user mailing list archive at Nabble.com.


--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Sdl.sound and Qt dependencies not satisfiable

2009-03-27 Thread jbskaggs

Well I install 2.12 on 64 bit ubuntu via ./configure /make install and My
LORD what a pain if your are missing dependencies!  Its like some type of
fraternity treasure hunt and the dependencies are not easy to find or even
neccessarily easy to define especially if the install is looking for a
certian version no longer maintained.

Anyway it is all up and running again and I now have 2.12 on Ubuntu 64bit
Wolvix 2.0 beta and Wolvix 1.10.

The wolvix distributor has created a Wolvix package on his repository that
is slackware 12.2 based.  www.wolvix.org

Though I think he did not have Corba configured.

There was another slackware 12.2 package at:
http://darkstar.ist.utl.pt/slackware/addon/slacky/slackware-12.2/development/gambas/

JB SKaggs



jbskaggs wrote:
 
 I am running ubuntu 8.10 64 bit, Gambas 2.7 (highest packaged for 64bit
 8.1).
 
 I add the gb.sdl.sound and now cannot install packages because I get
 Dependencies not satisfiable for gb.sdl.sound.
 
 So I figured maybe I need to add gb.sdl but I can't because my program is
 qt based and it says qt and sdl incompatible.
 
 When I run my program without gb.sdl installed and with gb.sdl.sound
 installed it runs fun from IDE. I can create executable, and I can package
 it but I cannot install the package without the error popping about
 dependencies.
 
 All I want to do is have a wav file played without having to call an
 external shell.
 
 How can I do that with qt?  Or how do I fix this dependency issue?
 
 
 JB SKaggs
 

-- 
View this message in context: 
http://www.nabble.com/Sdl.sound-and-Qt-dependencies-not-satisfiable-tp22696057p22746202.html
Sent from the gambas-user mailing list archive at Nabble.com.


--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Slow Gridview creation

2009-03-27 Thread Jesus Guardon

Fabien Bodard escribió:

simply the handle name is not good... you have named your gridview
gv and not GridView1... it's an usual copypaste error ;-)



Ha ha... it's my mistake. Finally I get it working, really really fast 
method. A lot of thanks for your help, I was mind-closed for a while!


Here is the final class:


Thanks again

Jesús


frmGridView.class
Description: application/java-vm
--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Missing Component Directory in Ubuntu and Debian packages

2009-03-27 Thread jbskaggs

Could whoever packages the Ubuntu and / or Debian Packages look into fixing
the gb-sdl-sound directories?  They are missing and do not get installed.

JB Skaggs
-- 
View this message in context: 
http://www.nabble.com/Missing-Component-Directory-in-Ubuntu-and-Debian-packages-tp22746203p22746203.html
Sent from the gambas-user mailing list archive at Nabble.com.


--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Missing Component Directory in Ubuntu and Debian packages

2009-03-27 Thread José Luis Redrejo
2009/3/27 jbskaggs jbska...@skaggsworld.com


 Could whoever packages the Ubuntu and / or Debian Packages look into fixing
 the gb-sdl-sound directories?  They are missing and do not get installed.



Which one is missed? :
http://packages.debian.org/squeeze/i386/gambas2-gb-sdl/filelist


José L.
--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] How to compile Gambas in Fedora 10

2009-03-27 Thread Marc Miralles
Hi all:

Some idea or link about how to compile Gambas 2.12 or Gambas 3 in Fedora 10

In gambas website don't have information about what packages are 
necessaries for compile Gambas in Fedora 10 and some components are 
disabled when compile in Fedora 10.

Please, I'm seek for this information in Internet and don't have exit. 
Some people have this information? thanks

Marc

--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Missing Component Directory in Ubuntu and Debian packages

2009-03-27 Thread jbskaggs

gb-sdl and gb-sdl-sound are two seperate components and should have their own
directories.  I discovered this by accident when I ran Gambas on slackware
and noticed it installed sdl-sound seperate form sdl.

And sdl.sound component did not work on my Gambas package or the debian
package and Benoit said they should have seperate directories and to ask the
package makers.

So I have. :)

JB Skaggs



jbskaggs wrote:
 
 Could whoever packages the Ubuntu and / or Debian Packages look into
 fixing the gb-sdl-sound directories?  They are missing and do not get
 installed.
 
 JB Skaggs
 

-- 
View this message in context: 
http://www.nabble.com/Missing-Component-Directory-in-Ubuntu-and-Debian-packages-tp22746203p22751883.html
Sent from the gambas-user mailing list archive at Nabble.com.


--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Catch NULL character

2009-03-27 Thread CelticBhoy

What is wrong with this line :-

IF sElement[iLoop] = NULL THEN sElement[iLoop] = 0

I want to catch a null character and change it to 0.
-- 
View this message in context: 
http://www.nabble.com/Catch-NULL-character-tp22751957p22751957.html
Sent from the gambas-user mailing list archive at Nabble.com.


--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] How to compile Gambas in Fedora 10

2009-03-27 Thread Simonart Dominique
Marc Miralles a écrit :
 Hi all:
 
 Some idea or link about how to compile Gambas 2.12 or Gambas 3 in Fedora 10
 
 In gambas website don't have information about what packages are 
 necessaries for compile Gambas in Fedora 10 and some components are 
 disabled when compile in Fedora 10.
 
 Please, I'm seek for this information in Internet and don't have exit. 
 Some people have this information? thanks
 
 Marc
 
 --
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 

Hi,
I don't know about Fedora, but did you read this ?

http://gambasdoc.org/help/readme

hope this help
Dominique Simonart


--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user