Re: [Gambas-user] gb.desktop.x11

2014-06-04 Thread Fabien Bodard
Benoit have added an example in the gambas examples Le 4 juin 2014 06:46, herberth guzman herberthguz...@gmail.com a écrit : Hi Benoit Thanks for the SystemTray instance I saw the example gb.gui or gb.gtk3 and gives me the following error Null Object With gb.qt4 if it works but only shows

Re: [Gambas-user] Accessing the nth item in a collection

2014-06-04 Thread Tobias Boege
On Wed, 04 Jun 2014, Jussi Lahtinen wrote: If I remember correctly Benoit warned that collections doesn't necessarily keep the items in order. But I don't know what would make it to lose the order. Maybe he will enlighten the issue. Anyway I suggest you use array of objects, which you declare

Re: [Gambas-user] Accessing the nth item in a collection

2014-06-04 Thread Tobias Boege
On Wed, 04 Jun 2014, Tobias Boege wrote: On Wed, 04 Jun 2014, Jussi Lahtinen wrote: If I remember correctly Benoit warned that collections doesn't necessarily keep the items in order. But I don't know what would make it to lose the order. Maybe he will enlighten the issue. Anyway I

Re: [Gambas-user] Accessing the nth item in a collection

2014-06-04 Thread Ian Haywood
On Wed, Jun 4, 2014 at 9:59 PM, Tobias Boege tabo...@gmail.com wrote: Oh, I just saw the added to bit. That's not possible with AvlTree and also won't be with Collection. Then I suppose that you create a custom Collection class and make it record the first and last items added. For the

Re: [Gambas-user] Accessing the nth item in a collection

2014-06-04 Thread Jussi Lahtinen
AFAIK, Collection is a hash table and of course, you cannot assume a particular order of keys in a hash table. That is my understanding also. But they always seems to be in order they have been added, when you iterate them with For Each What would cause the disorder? Jussi

Re: [Gambas-user] Accessing the nth item in a collection

2014-06-04 Thread Jussi Lahtinen
OK, thanks for the answer! But can you elaborate bit further? If the insertion order is no longer kept, then what dictates the order For Each will enumerate the items? Order of memory addresses? I mean would the enumeration order be unchanging, but when new item is added it would be inserted in

[Gambas-user] SystemTray (Problems gb.gui or gb.gtk3)

2014-06-04 Thread herberth guzman
Benoit have added an example in the gambas examples Thanks Fabien, I have installed Gambas3 rev 6301, i have the example SystemTray but does not work with component gb.gtk3 gb.gui, when I run it I get the following error: Public Sub draSystemTray_Arrange () line (DH = 1 + draSystemTray.H / $

Re: [Gambas-user] Accessing the nth item in a collection

2014-06-04 Thread Randall Morgan
In some languages, FOR EACH doesn't guaranty the order of the items processed. It only guaranties you will process each item in the collection. I think it is a bad habit to use For Each when order of processing is important. Unless you are using an array or other data structure that is known to

[Gambas-user] (no subject)

2014-06-04 Thread Fabián Flores Vadell
Hi folks. I'm trying to implement a decoration chain, but until now I can't get success. Let me explain the problem in detail. I have a class C, that is decorated by the class B, that is decorated by the class A. So, from the point of view of the client class, the class A must respond to

[Gambas-user] Changing Error Background Color or Font Color

2014-06-04 Thread Randall Morgan
Hi Folks, I've had an issue for sometime now and I haven't found the solution yet. Anytime I get an error message in the IDE it is displayed as a pale yellow background with white text. It is almost impossible to read! Is there some way to change the font color or background color of just the

Re: [Gambas-user] Changing Error Background Color or Font Color

2014-06-04 Thread Randall Morgan
Sorry, meant to attach a screen shot of the issue. So here it is. Again, just looking for a way to changed the background of font color of the popup error messages so they will be readable. On Wed, Jun 4, 2014 at 2:40 PM, Randall Morgan rmorga...@gmail.com wrote: Hi Folks, I've had an issue

Re: [Gambas-user] Accessing the nth item in a collection

2014-06-04 Thread VonZorch
If the key values aren't important then use something like Collection.add(Value,str(Collection.count+1)) then you can access any given item by Value=Collection[str(Index)] -- View this message in context:

Re: [Gambas-user] Accessing the nth item in a collection

2014-06-04 Thread Jussi Lahtinen
In some languages, FOR EACH doesn't guaranty the order of the items processed. It only guaranties you will process each item in the collection. I think it is a bad habit to use For Each when order of processing is important. I agree and that is not my requirement. I only need to know when

Re: [Gambas-user] Accessing the nth item in a collection

2014-06-04 Thread B Bruen
Thanks to all for their interest an input here. At the very least it has helped me to crystallize what my problem is. I may have over generalised my problem. So I'll try to explain. The issue is, as some have realised, the temporal order in which things are added to the collection, not some

Re: [Gambas-user] Accessing the nth item in a collection

2014-06-04 Thread B Bruen
On Wed, 4 Jun 2014 17:07:46 -0700 (PDT) VonZorch vonzo...@gmail.com wrote: If the key values aren't important then use something like Collection.add(Value,str(Collection.count+1)) then you can access any given item by Value=Collection[str(Index)] No, the key values are important

[Gambas-user] [Aside] Re: Accessing the nth item in a collection

2014-06-04 Thread B Bruen
An interesting thought just occurred, almost totally unrelated to this thread. Is a gb.db Result a collection or an array? It is hard to tell from the help This class represents the result of a SQL request. This class is not creatable. This class acts like a read / write array. This class is