[Gambas-user] Does really nobody have an idea???
I've been waiting for some hints about reading from a TableView, was the question really so stupid? :-) (Please take another look at my mail from last week.) At least I'd expected some teacherly look at this page or try reading this better... Really no idea? Rolf -- Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to read keys from a TreeView in Gambas2?
MoveBelow doesn't seem to exist anymore (Gambas2 won't show an Is MoveBelow (and MoveChild etc..) not a method of TreeView rather than TreeViewItem .. ? Does it work if you use; FOR i = 1 TO baum.Current.Children ==baum.MoveBelow IF Left$(baum.Item.Key, 1) = # THEN namenKeys.Add(baum.Item.Key) ELSE BREAK END IF NEXT ?? Gareth. - Original Message - From: Rolf-Werner Eilert eilert-sprac...@t-online.de To: mailing list for gambas users gambas-user@lists.sourceforge.net Sent: Thursday, 8 January, 2009 10:44:20 AM GMT +00:00 GMT Britain, Ireland, Portugal Subject: [Gambas-user] How to read keys from a TreeView in Gambas2? Proceeding to convert a Gambas1 app to Gambas2, I found that reading key values or stepping through the values is different now. The TreeView shows names of persons sorted under groups/classes/filters sorted under years sorted under a root header, in brief: Root1 2004 2005 2006 Group1 Group2 -- Cursor John Benoit Michael Rolf Group3 2007 2008 Root2 What I want is when the cursor is on Group2 and I call my function, it expands and reads all keys of the names within this group. This is the code in Gambas1: baum.Current.Expanded = TRUE namenKeys.Clear FOR i = 1 TO baum.Current.Children baum.Item.MoveBelow IF Left$(baum.Item.Key, 1) = # THEN namenKeys.Add(baum.Item.Key) ELSE BREAK END IF NEXT baum is the TreeView, namenKeys is an array that should return the keys which were found. The idea was to read the keys either up to the number of children or until the next key doesn't have a #. This doesn't run in Gambas2 this way, but I didn't find a way to make it run. MoveBelow doesn't seem to exist anymore (Gambas2 won't show an error, however), and I tried any possible combination of using MoveAfter() with Item and Current, but to no avail. So, can anybody help here? Thanks so much! Rolf -- Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Managing Director, Encryptec Limited Tel: 0845 5082719, Mob: 0785 3305393 Email: gar...@encryptec.net Statements made are at all times subject to Encryptec's Terms and Conditions of Business, which are available upon request. -- Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] How to read keys from a TreeView
Proceeding to convert a Gambas1 app to Gambas2, I found that reading key values or stepping through the values is different now. The TreeView shows names of persons sorted under groups/classes/filters sorted under years sorted under a root header, in brief: Root1 2004 2005 2006 Group1 Group2 -- Cursor John Benoit Michael Rolf Group3 2007 2008 Root2 What I want is when the cursor is on Group2 and I call my function, it expands and reads all keys of the names within this group. This is the code in Gambas1: baum.Current.Expanded = TRUE namenKeys.Clear FOR i = 1 TO baum.Current.Children baum.Item.MoveBelow IF Left$(baum.Item.Key, 1) = # THEN namenKeys.Add(baum.Item.Key) ELSE BREAK END IF NEXT baum is the TreeView, namenKeys is an array that should return the keys which were found. The idea was to read the keys either up to the number of children or until the next key doesn't have a #. This doesn't run in Gambas2 this way, but I didn't find a way to make it run. MoveBelow doesn't seem to exist anymore (Gambas2 won't show an error, however), and I tried any possible combination of using MoveAfter() with Item and Current, but to no avail. So, can anybody help here? Thanks so much! Rolf -- Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Does really nobody have an idea???
Rolf-Werner Eilert ha scritto: I've been waiting for some hints about reading from a TableView, was the question really so stupid? :-) (Please take another look at my mail from last week.) I cannot find your post - perhaps sourceforge is eating messages again... I also sended al least a message last week, which does not show up yet. Regards, Doriano -- Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to read keys from a TreeView
On lundi 12 janvier 2009, Rolf-Werner Eilert wrote: Proceeding to convert a Gambas1 app to Gambas2, I found that reading key values or stepping through the values is different now. The TreeView shows names of persons sorted under groups/classes/filters sorted under years sorted under a root header, in brief: Root1 2004 2005 2006 Group1 Group2 -- Cursor John Benoit Michael Rolf Group3 2007 2008 Root2 What I want is when the cursor is on Group2 and I call my function, it expands and reads all keys of the names within this group. This is the code in Gambas1: baum.Current.Expanded = TRUE namenKeys.Clear FOR i = 1 TO baum.Current.Children baum.Item.MoveBelow IF Left$(baum.Item.Key, 1) = # THEN namenKeys.Add(baum.Item.Key) ELSE BREAK END IF NEXT baum is the TreeView, namenKeys is an array that should return the keys which were found. The idea was to read the keys either up to the number of children or until the next key doesn't have a #. This doesn't run in Gambas2 this way, but I didn't find a way to make it run. MoveBelow doesn't seem to exist anymore (Gambas2 won't show an error, however), and I tried any possible combination of using MoveAfter() with Item and Current, but to no avail. So, can anybody help here? Thanks so much! Rolf MoveBelow() is a method of TreeView in Gambas 2, and moves the internal cursor one item below. (In Gambas 1, this method did not work in all cases). But as you want the child items of a node, you must not use MoveBelow(). It moves one item below, whether it is a child or not of the initial parent item. So if one of the child has children too, you routine won't work. You must use MoveNext() instead: baum.Current.Expanded = TRUE namenKeys.Clear ' Move the internal cursor to the current item baum.MoveCurrent() ' Then move to the first child of the current item baum.MoveChild() ' While the internal cursor is valid, i.e. while there is ' a child to look at. WHILE baum.Available IF Left$(baum.Item.Key, 1) = # THEN namenKeys.Add(baum.Item.Key) ELSE BREAK END IF ' Move to the next sibling item, i.e. the next item having ' the same parent. baum.MoveNext() WEND See the documentation of the methods in the wiki to know what they are doing exactly. Regards, -- Benoit Minisini -- Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] local directorie structure in Source Archive?
On lundi 12 janvier 2009, wig wrote: In an open project: Make installation package; Cannot make executable. gba: ERROR: Cannot create temporary archive file: /home/wig/Upload/facs/executables/facs.gambas Indeed this directory does not exist. Not on this machine. This is a freshly installed Mandriva 2009, freshly installed Gambas2. I only downloaded the Source Archive made on another machine (Gambas 2.6). Does such a Source Archive contain personal information as local directories? I cannot see/reach it via the IDE (project, Properties) Yes. When the IDE makes an executable, it uses the last path memorized in the make executable dialog. So you should use make an executable and specify a directory that exists on the new machine. I admit that the packager should be more clever, and uses a location that always exist, as it makes an executable only for making the package. But at the moment the IDE makes no distinction between an executable that must be put in a well-defined place, and an executable that is just temporary. Regards, -- Benoit Minisini -- Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Save as ?not working
On dimanche 11 janvier 2009, richard terry wrote: Tried to save the project as another name nowhere to type in the new name (build 75) Save as here means that the project is copied in another place, but its name does not change. But there should be no problem to be able to change the name too. -- Benoit Minisini -- Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to read keys from a TreeView
Benoit Minisini schrieb: On lundi 12 janvier 2009, Rolf-Werner Eilert wrote: Proceeding to convert a Gambas1 app to Gambas2, I found that reading key values or stepping through the values is different now. The TreeView shows names of persons sorted under groups/classes/filters sorted under years sorted under a root header, in brief: Root1 2004 2005 2006 Group1 Group2 -- Cursor John Benoit Michael Rolf Group3 2007 2008 Root2 What I want is when the cursor is on Group2 and I call my function, it expands and reads all keys of the names within this group. This is the code in Gambas1: baum.Current.Expanded = TRUE namenKeys.Clear FOR i = 1 TO baum.Current.Children baum.Item.MoveBelow IF Left$(baum.Item.Key, 1) = # THEN namenKeys.Add(baum.Item.Key) ELSE BREAK END IF NEXT baum is the TreeView, namenKeys is an array that should return the keys which were found. The idea was to read the keys either up to the number of children or until the next key doesn't have a #. This doesn't run in Gambas2 this way, but I didn't find a way to make it run. MoveBelow doesn't seem to exist anymore (Gambas2 won't show an error, however), and I tried any possible combination of using MoveAfter() with Item and Current, but to no avail. So, can anybody help here? Thanks so much! Rolf Thanks Benoit for this insight... MoveBelow() is a method of TreeView in Gambas 2, and moves the internal cursor one item below. (In Gambas 1, this method did not work in all cases). But as you want the child items of a node, you must not use MoveBelow(). It moves one item below, whether it is a child or not of the initial parent item. So if one of the child has children too, you routine won't work. You are right, and now the BREAK clause in my code becomes superfluous. You must use MoveNext() instead: baum.Current.Expanded = TRUE namenKeys.Clear ' Move the internal cursor to the current item baum.MoveCurrent() ' Then move to the first child of the current item baum.MoveChild() ' While the internal cursor is valid, i.e. while there is ' a child to look at. WHILE baum.Available IF Left$(baum.Item.Key, 1) = # THEN namenKeys.Add(baum.Item.Key) ELSE BREAK END IF ' Move to the next sibling item, i.e. the next item having ' the same parent. baum.MoveNext() WEND Thank you very much for that code, it runs perfectly (of course... :-) ). See the documentation of the methods in the wiki to know what they are doing exactly. You see, I have my problems with reading documentations. Often I just can't see where to go and what's important. Maybe that's why I've never become a professional programmer... :-( But when I have a small example of what to do and how, this will mostly help me understand reading the documentation. Regards Rolf -- Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Two minor bugs
On jeudi 8 janvier 2009, Rolf-Werner Eilert wrote: Hi everyone! When converting one of my apps from Gambas1 to Gambas2, I found 2 minor items: 1. The status of Tool Box Collection is not saved and always starts as switched off when starting the Gambas2 IDE. But maybe this is wanted? I don't know if I wanted that. Its status is just not saved, so it starts hidden. 2. The last (rightmost) column of a TableView is stretched to the ultimate width of the tableview and ignores if a Width value is given for it. Well, it just looks sort of ugly, but I found it worth mentioning anyway. The width of the last column is ignored only if it is smaller than the GridView/TableView contents. I don't find that ugly. On the contrary, I did that because I found ugly when there is space between the last column and the right border of the GridView. Regards, -- Benoit Minisini -- Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Alignment or Gridview problem?
On lundi 12 janvier 2009, Dominique SIMONART wrote: Benoit Minisini a écrit : On jeudi 8 janvier 2009, Dominique SIMONART wrote: Hi everybody, Happy new year, ... Here are two little screen captures to show my problem. In the Bad.png, look at the width of the Gridview, that ends with +64 In the Good.png, look the same line that ends with +65. This is the unique difference, but what a different effect! In fact, I don't need the extra width at all. If you change Align.Center by Align.Left, all is OK with +2 (it doesn't work with Align.Right however) In case you want to test, I add the whole project below (Open Suse 11.0 / KDE 3.5 / QT / Gambas 2.8) With the last 2.x version, putting 64 or 65 changes nothing except the one pixel difference. In both cases you get the first screenshot, which what is expected. Regards, Sorry, but the TestThree.png was wrong. Here is the good one! Thanks Benoit, I think there is a problem with the *last* column of a gridview, but may be I missed something instead. 1) In the TestOne, the code is what I want to get (the usage of 'k' is for the test only!), but the display is not what I expected (nothing visible in the las column) 2) If I remove the Alignment instruction (TestTwo), I get what I expect, but not what I wished! 3) As a workaround (TestThree), I add a column to my gridview, I mask it with the width limitation (role of k=1), and I restore the alignment. As you can see, the problem is just with the last column with centered text Is the first case works as expected? Please send me your project. It will be simpler for me to deal with the real thing instead of reproducing it from what you say. Regards, -- Benoit Minisini -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Gambas2 components?
Hi new to Gambas and have been browsing for other peoples components (3rd party). not had too much luck in finding anything as yet. I'm interested in finding out how to go about creating reusable components and how to install 3rd party ones. Lastly is there a database component (ie one that you can set via properties from within the ide for the DB of choice? have created a test project and said i wanted database components in it but looking at all of them there is no database component (something that allows you to say via properties to setup the connection strings) with the others there looks like there is no visible property to connect the thing to a table or rdbms. I'm thinking of what was/is available in the likes of Delhpi 3 where you had a database component a datasource grids and table views thus the DB handled the link to into the db and datasource handled the link to a table with the db and the grid/views dblabels db textboxes handled the display or entry into fields and db control manages the scrolling through the db records. hope i can get some feed back, regards, dave. Easy recipes for Christmas entertaining on Yahoo!Xtra Lifestyle- http://nz.lifestyle.yahoo.com/food-recipes -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user