Re: [Gambas-user] EXEC progress

2017-03-22 Thread Jussi Lahtinen
> Yes, a progress bar or even just a label showing which operation is
> current.
> hProc = Exec ["ffmpeg", "-i", sPathTape, etc, etc] Wait For Output As
> "Process"
>
> with
>
> Public Sub Process_Read()
> Dim sData As String
> Read #Last, sData, -255
>Label1.caption = sData
> End
>
> doesn't show anything
>

As expected, you declared the process for output, not for input..?



Jussi
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] EXEC progress

2017-03-22 Thread Christof Thalhofer
Am 22.03.2017 um 18:01 schrieb bill-lancaster:
> I have a series of EXEC command line jobs.  The whole lot takes some time and
> it would be nice to have some indication of progress.
> Because there's a series of EXECs, I'm using the 'Wait' function.  In this
> case it seems that 'Process_Read' doesn't report what's happening.
> Any advice would be welcome

Heres a small priject with code I use to display the output of shell
commands in a window. Maybe it's helpful:

http://gambas-club.de/viewtopic.php?f=13=5366#p11986


Alles Gute

Christof Thalhofer

-- 
Dies ist keine Signatur



signature.asc
Description: OpenPGP digital signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Traversing a TreeView (was: Automatically scroll to end of treeview?)

2017-03-22 Thread Gianluigi
Dear Tobias,

you were born teacher. 
Thank you very much for the example and explanations.

Regards
Gianluigi

2017-03-22 19:38 GMT+01:00 Tobias Boege :

> On Wed, 22 Mar 2017, Gianluigi wrote:
> > Hello Tobias,
> > unfortunately I was not able to do better than Wally,
> > I tried but I did not move from here :-(
> > See attached
> > I'm afraid did not understand the original question.
> >
>
> An implementation of what I was talking about is attached.
>
> Regards,
> Tobi
>
> --
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] EXEC progress

2017-03-22 Thread bill-lancaster
Yes, a progress bar or even just a label showing which operation is current.
hProc = Exec ["ffmpeg", "-i", sPathTape, etc, etc] Wait For Output As
"Process"

with

Public Sub Process_Read()
Dim sData As String
Read #Last, sData, -255 
   Label1.caption = sData
End

doesn't show anything

This works, but is not very elegant

 hProc = Exec ["ffmpeg", "-i", sPathTape, etc, etc] For Input
 Do While hProc.State = 1
  Wait
 Loop
 Label1.caption = "process 1 completed"




--
View this message in context: 
http://gambas.8142.n7.nabble.com/EXEC-progress-tp58674p58679.html
Sent from the gambas-user mailing list archive at Nabble.com.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] [Gambas Bug Tracker] Bug #1092: Broken likns on FAQ page

2017-03-22 Thread bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1092=L21haW4-

Stéphane AULERY reported a new bug.

Summary
---

Broken likns on FAQ page

Type : Bug
Priority : Low
Gambas version   : Unknown
Product  : Unknown


Description
---

The links of all screenshots in FAQ page are broken.

For example 

http://gambaswiki.org/image/doc/whatisgambas/:ide-db-manager

should be

http://gambaswiki.org/wiki/doc/whatisgambas/ide-db-manager.png





--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] EXEC progress

2017-03-22 Thread Jussi Lahtinen
Process_Read simply reads output of the executed program. Is something
lost, which is expected to show up?


Jussi

On Wed, Mar 22, 2017 at 7:01 PM, bill-lancaster 
wrote:

> I have a series of EXEC command line jobs.  The whole lot takes some time
> and
> it would be nice to have some indication of progress.
> Because there's a series of EXECs, I'm using the 'Wait' function.  In this
> case it seems that 'Process_Read' doesn't report what's happening.
> Any advice would be welcome
>
> Gambas 3.9.2
> Kubuntu 14.04
>
>
>
> --
> View this message in context: http://gambas.8142.n7.nabble.
> com/EXEC-progress-tp58674.html
> Sent from the gambas-user mailing list archive at Nabble.com.
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Traversing a TreeView (was: Automatically scroll to end of treeview?)

2017-03-22 Thread Tobias Boege
On Wed, 22 Mar 2017, Gianluigi wrote:
> Hello Tobias,
> unfortunately I was not able to do better than Wally,
> I tried but I did not move from here :-(
> See attached
> I'm afraid did not understand the original question.
> 

An implementation of what I was talking about is attached.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk


TestOnTreeView-0.0.2.tar.gz
Description: Binary data
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] EXEC progress

2017-03-22 Thread Matti
I don't know exactly what you want.
My idea would be to show a StatusBar saying which EXEC command is called.
And a ProgressBar after each EXEC command with an estimated value of progress.
Or am I completely wrong?

Am 22.03.2017 um 18:01 schrieb bill-lancaster:
> I have a series of EXEC command line jobs.  The whole lot takes some time and
> it would be nice to have some indication of progress.
> Because there's a series of EXECs, I'm using the 'Wait' function.  In this
> case it seems that 'Process_Read' doesn't report what's happening.
> Any advice would be welcome
>
> Gambas 3.9.2
> Kubuntu 14.04
>
>
>
> --
> View this message in context: 
> http://gambas.8142.n7.nabble.com/EXEC-progress-tp58674.html
> Sent from the gambas-user mailing list archive at Nabble.com.
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] EXEC progress

2017-03-22 Thread bill-lancaster
I have a series of EXEC command line jobs.  The whole lot takes some time and
it would be nice to have some indication of progress.
Because there's a series of EXECs, I'm using the 'Wait' function.  In this
case it seems that 'Process_Read' doesn't report what's happening.
Any advice would be welcome

Gambas 3.9.2
Kubuntu 14.04



--
View this message in context: 
http://gambas.8142.n7.nabble.com/EXEC-progress-tp58674.html
Sent from the gambas-user mailing list archive at Nabble.com.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Automatically scroll to end of treeview?

2017-03-22 Thread Gianluigi
Hello Tobias,
unfortunately I was not able to do better than Wally,
I tried but I did not move from here :-(
See attached
I'm afraid did not understand the original question.

Regards
Gianluigi

2017-03-22 14:30 GMT+01:00 Tobias Boege :

> On Wed, 22 Mar 2017, Gianluigi wrote:
> > Maybe this topic could help [0]
> >
> > Regards
> > Gianluigi
> >
> > [0]
> > http://gambas.8142.n7.nabble.com/Accessing-the-Treeview-
> Collection-td20313.html#a20317
> >
>
> This looks to me like they were trying to list all keys used by a TreeView.
> That task can be accomplished by your favourite flavour of tree traversal
> algorithm, in particular Depth-first search, which is easy to implement
> recursively, *without* a forest of GOTOs and labels.
>
> The current implementation of TreeView internally has a Collection of all
> the items, which could be used to enumerate all used keys -- but it is not
> exposed through the TreeView interface. So the only way I see to enumerate
> keys is to traverse the tree structure by using TreeView.Move*() methods.
>
> But even if you could enumerate all the keys in the TreeView, it wouldn't
> be relevant at all to scrolling the TreeView or Drag, wouldn't it?
>
> Regards,
> Tobi
>
> --
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>


TestOnTreeView-0.0.1.tar.gz
Description: GNU Zip compressed data
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Automatically scroll to end of treeview?

2017-03-22 Thread Tobias Boege
On Wed, 22 Mar 2017, Gianluigi wrote:
> Maybe this topic could help [0]
> 
> Regards
> Gianluigi
> 
> [0]
> http://gambas.8142.n7.nabble.com/Accessing-the-Treeview-Collection-td20313.html#a20317
> 

This looks to me like they were trying to list all keys used by a TreeView.
That task can be accomplished by your favourite flavour of tree traversal
algorithm, in particular Depth-first search, which is easy to implement
recursively, *without* a forest of GOTOs and labels.

The current implementation of TreeView internally has a Collection of all
the items, which could be used to enumerate all used keys -- but it is not
exposed through the TreeView interface. So the only way I see to enumerate
keys is to traverse the tree structure by using TreeView.Move*() methods.

But even if you could enumerate all the keys in the TreeView, it wouldn't
be relevant at all to scrolling the TreeView or Drag, wouldn't it?

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] collection of collection problem

2017-03-22 Thread Gianluigi
I do not understand why you can not use arrays of arrays ( e.g.
myCollection[][])

Regards
Gianluigi

2017-03-22 11:26 GMT+01:00 PICCORO McKAY Lenz :

> yeap.. maybe u said "oh, please crear a class map for your data", or
> whatever..
>
> but when u work with a big organization and want to migrate linux.. have
> some "guindowsers" uses, and i must use a step by step and clear "similar"
> desing ..  so in this way other also can follow the develop process.. for
> more furter info see Modeling Process and
> https://en.wikipedia.org/wiki/Business_process_modeling .. Java its a
> specially focused in that, and i must put all of similar for good
> transition..
>
> the needs was as i explain.. as i drawing in the previous mail, i want to
> use something as Beans, but without making DAO objects.. o
> Hibernate-mapping similars..
>
> Lenz McKAY Gerardo (PICCORO)
> http://qgqlochekone.blogspot.com
>
> 2017-03-22 4:17 GMT-04:00 Fabien Bodard :
>
> > Why did you want to use collections ?... as it slow down all the stuff
> > ? can you be more precise in your need so i can help you
> >
> > 2017-03-21 23:06 GMT+01:00 PICCORO McKAY Lenz :
> > > 2017-03-21 11:24 GMT-04:00 Charlie :
> > >> Can you simplify the code so we can run it or upload the program.
> > >
> > > lets get simple:
> > >
> > > i want a registri "order" that have many "products" so :
> > >
> > > object (1 element with many attrs)
> > >
> > > and one of those attrs, its the cod_contenido , of the products of the
> > order
> > >
> > > attr:cod_contenido-> (object with many elements, and each element many
> > > atrrs)
> > >
> > > In java, theres DAO objects, but with collections, and in php more
> easy,
> > > only an array in array!
> > >
> > > i mean:
> > >
> > > |-|
> > > |   ORD101|
> > > |-|
> > > | cod_orde:101|
> > > | des_order:description bla bl||
> > > | cod_contents:1011   |CON1011 |
> > > |-||
> > >   |cod_product:101,|
> > >   |cod_order:101,  |
> > >   |can_product:2   |
> > >   ||
> > >   |cod_product:102 |
> > >   |cod_order:101   |
> > >   |can_product:12  |
> > >   ||
> > > 
> > --
> > > Check out the vibrant tech community on one of the world's most
> > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > > ___
> > > Gambas-user mailing list
> > > Gambas-user@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> >
> >
> > --
> > Fabien Bodard
> >
> > 
> > --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > ___
> > Gambas-user mailing list
> > Gambas-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Automatically scroll to end of treeview?

2017-03-22 Thread Gianluigi
Maybe this topic could help [0]

Regards
Gianluigi

[0]
http://gambas.8142.n7.nabble.com/Accessing-the-Treeview-Collection-td20313.html#a20317


2017-03-22 11:27 GMT+01:00 Riccardo :

> Thank very much Tobias, for the valuable advice.
>
> Because I know what I'm adding it simply worked to apply your recommended
> approach immediately after adding the new node without the loop or the
> condition:
>
>trvLog.Add(trvLog.Count, logtext)
>trvLog.Item.EnsureVisible
>
> And also the caveat about the TreeView is timely...I'll find a different
> approach.
>
> cheers.
>
>
>
> --
> View this message in context: http://gambas.8142.n7.nabble.
> com/Automatically-scroll-to-end-of-treeview-tp58666p58669.html
> Sent from the gambas-user mailing list archive at Nabble.com.
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Automatically scroll to end of treeview?

2017-03-22 Thread Riccardo
Thank very much Tobias, for the valuable advice.

Because I know what I'm adding it simply worked to apply your recommended
approach immediately after adding the new node without the loop or the
condition:

   trvLog.Add(trvLog.Count, logtext)
   trvLog.Item.EnsureVisible

And also the caveat about the TreeView is timely...I'll find a different
approach.

cheers.



--
View this message in context: 
http://gambas.8142.n7.nabble.com/Automatically-scroll-to-end-of-treeview-tp58666p58669.html
Sent from the gambas-user mailing list archive at Nabble.com.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] collection of collection problem

2017-03-22 Thread PICCORO McKAY Lenz
yeap.. maybe u said "oh, please crear a class map for your data", or
whatever..

but when u work with a big organization and want to migrate linux.. have
some "guindowsers" uses, and i must use a step by step and clear "similar"
desing ..  so in this way other also can follow the develop process.. for
more furter info see Modeling Process and
https://en.wikipedia.org/wiki/Business_process_modeling .. Java its a
specially focused in that, and i must put all of similar for good
transition..

the needs was as i explain.. as i drawing in the previous mail, i want to
use something as Beans, but without making DAO objects.. o
Hibernate-mapping similars..

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com

2017-03-22 4:17 GMT-04:00 Fabien Bodard :

> Why did you want to use collections ?... as it slow down all the stuff
> ? can you be more precise in your need so i can help you
>
> 2017-03-21 23:06 GMT+01:00 PICCORO McKAY Lenz :
> > 2017-03-21 11:24 GMT-04:00 Charlie :
> >> Can you simplify the code so we can run it or upload the program.
> >
> > lets get simple:
> >
> > i want a registri "order" that have many "products" so :
> >
> > object (1 element with many attrs)
> >
> > and one of those attrs, its the cod_contenido , of the products of the
> order
> >
> > attr:cod_contenido-> (object with many elements, and each element many
> > atrrs)
> >
> > In java, theres DAO objects, but with collections, and in php more easy,
> > only an array in array!
> >
> > i mean:
> >
> > |-|
> > |   ORD101|
> > |-|
> > | cod_orde:101|
> > | des_order:description bla bl||
> > | cod_contents:1011   |CON1011 |
> > |-||
> >   |cod_product:101,|
> >   |cod_order:101,  |
> >   |can_product:2   |
> >   ||
> >   |cod_product:102 |
> >   |cod_order:101   |
> >   |can_product:12  |
> >   ||
> > 
> --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > ___
> > Gambas-user mailing list
> > Gambas-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
>
> --
> Fabien Bodard
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Automatically scroll to end of treeview?

2017-03-22 Thread Tobias Boege
On Wed, 22 Mar 2017, Riccardo wrote:
> How do I automatically scroll to the end of a TreeView when a new node is
> added?
> 
> I've tried /trvLog.MoveLast/ but that doesn't work?
> 

TreeView.MoveLast() only sets the internal cursor to the last element.
The documentation is very unclear here. According to the source code
(gb.gui.base), "last element" means "last child of the TreeView root".
So this is not what you want. You want the lowest visible element.
Also setting the internal cursor only will not affect the GUI (because
it's called the *internal* cursor). Thus once you arrive at the lowest
element, you have to call TreeView.Item.EnsureVisible().

I don't know of any better method than this loop to get you there:

  ' Take a shortcut to the last child of the root, which saves some
  ' MoveBelow() calls
  If hTreeView.MoveLast() Then Return ' your tree is empty
  Do
' Empty body! Everything is done in the Until condition
  Loop Until hTreeView.MoveBelow() ' move to lowest *visible* element
  hTreeView.MoveBack()
  hTreeView.Item.EnsureVisible()

> Also, can I make the Drag.Move setting apply to a node (record) in a
> TreeView. That is, if I drag a record in a TreeView to another location
> within the same control, can I have the drag action automatically move the
> original record? Setting trvLog.Action = Drag.Move doesn't work...
> 

I can't help you here. TreeView apparently doesn't support Drag by
itself, so setting any Drag properties won't accomplish anything, and
I myself failed at least twice already to implement a TreeView with
draggable entries (using Item.Reparent()). My code seems to work at the
beginning but after enough drags, the TreeView control crashes reliably.
I haven't gotten around to submit a bug report yet.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Automatically scroll to end of treeview?

2017-03-22 Thread Riccardo
How do I automatically scroll to the end of a TreeView when a new node is
added?

I've tried /trvLog.MoveLast/ but that doesn't work?

Also, can I make the Drag.Move setting apply to a node (record) in a
TreeView. That is, if I drag a record in a TreeView to another location
within the same control, can I have the drag action automatically move the
original record? Setting trvLog.Action = Drag.Move doesn't work...




--
View this message in context: 
http://gambas.8142.n7.nabble.com/Automatically-scroll-to-end-of-treeview-tp58666.html
Sent from the gambas-user mailing list archive at Nabble.com.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] collection of collection problem

2017-03-22 Thread Fabien Bodard
Why did you want to use collections ?... as it slow down all the stuff
? can you be more precise in your need so i can help you

2017-03-21 23:06 GMT+01:00 PICCORO McKAY Lenz :
> 2017-03-21 11:24 GMT-04:00 Charlie :
>> Can you simplify the code so we can run it or upload the program.
>
> lets get simple:
>
> i want a registri "order" that have many "products" so :
>
> object (1 element with many attrs)
>
> and one of those attrs, its the cod_contenido , of the products of the order
>
> attr:cod_contenido-> (object with many elements, and each element many
> atrrs)
>
> In java, theres DAO objects, but with collections, and in php more easy,
> only an array in array!
>
> i mean:
>
> |-|
> |   ORD101|
> |-|
> | cod_orde:101|
> | des_order:description bla bl||
> | cod_contents:1011   |CON1011 |
> |-||
>   |cod_product:101,|
>   |cod_order:101,  |
>   |can_product:2   |
>   ||
>   |cod_product:102 |
>   |cod_order:101   |
>   |can_product:12  |
>   ||
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user



-- 
Fabien Bodard

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Show records on a WebTable

2017-03-22 Thread Fabien Bodard
Herberth :

Private $rs as Result
Private $Fields as New String[]

'or somewhere else
Public sub _New()
dim f as ResultField
dim i as integer


 M_DB.Connect()

'DB is the last connected db
  $rs = DB.Exec("SELECT Title FROM tbapps where tbapps.Title like  '%'")


If rs.Available Then
'  Setup Columns count
  TableView1.Columns.Count = rs.Fiels.Count
  'Setup tableHeader
  For each f in rs.Field
 TableView1.Columns[i].Text = f.name
 inc i
  Next
  'Launch table filling
  TableView1.Rows.Count = rs.Count
EndIf

end


Public Sub WebTable1_Data(Row As Integer, Column As Integer, Data As
WebTableData)

  $rs.MoveTo(Row)
'Use the Column Text to get the Field name
Data.Text = $rs[Last.Columns[Column].Text]

End

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user