Re: [Gambas-user] make Label background from Database field
Kad Mann ha scritto: On Sat, 2009-10-17 at 22:46 +0300, Vassilis K wrote: Dimitri I don't understand Why don't you take a look at the database example in Gambas? After creating the test table, if you type in an SQL command and click the run button, you will see a gridview with a myriad colours that can be changed based on the data. Surely something like that has to be easier than trying to work out how to manage a hundred labels on a screen, and surely it will offer you much better and easier control of future UI changes, and surely it will offer a more pleasing and intuitive presentation to your user. Surely something like that has to be easier and surely much better and easier control. Yes and no, and once again you have to submit yourself to someone else taste, using components designed for something else. Here the problem is a little different, look more carefully at the whole thread. We are trying to do whatever we want on a UI, based on data in a database. Something far more general than what you are depicting. Vassilis: perhaps I got it (night could have brought good advice)! May be that gambas get confused by: change_bgcolor(Label rsThesi!thesi) I don't know why, but this seems to be a bug in gambas. But using a temporary variable: iTemp = rsThesi!thesi ' an integer temporary variable change_bgcolor(Label iTemp) it should work. If this does not work, then try once more this: sTemp = CStr(rsThesi!thesi) ' a string variable change_bgcolor(Label sTemp) If neither this works, then only Benoit can tell what's going on. Regards, -- Doriano Blengino Listen twice before you speak. This is why we have two ears, but only one mouth. -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] make Label background from Database field
On Sun, 2009-10-18 at 09:08 +0200, Doriano Blengino wrote: Kad Mann ha scritto: On Sat, 2009-10-17 at 22:46 +0300, Vassilis K wrote: Dimitri I don't understand Why don't you take a look at the database example in Gambas? After creating the test table, if you type in an SQL command and click the run button, you will see a gridview with a myriad colours that can be changed based on the data. Surely something like that has to be easier than trying to work out how to manage a hundred labels on a screen, and surely it will offer you much better and easier control of future UI changes, and surely it will offer a more pleasing and intuitive presentation to your user. Surely something like that has to be easier and surely much better and easier control. Yes and no I didn't ask you. -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] make Label background from Database field
Dear Doriano, I have tested both codes with sTemp = CStr(rsThesi!thesi) 'As a string variable AND then with iTemp = rsThesi!thesi 'As Integer I get the results on the console but the code now stops at: sTemp = CStr(rsThesi!thesi) OR at iTemp = rsThesi!thesi with message Result is not available When the code stops the variable sTemp has the last value of the field. (I can see the results on the console with the line that you suggested: PRINT Record: CStr(rsThesi.Index) Result: CStr(rsThesi!thesi)) The results are the following: Record: 0 Result: 2 Record: 1 Result: 12 Record: 2 Result: 57 Record: 3 Result: 56 Record: 4 Result: 44 Record: 5 Result: 11 Record: 6 Result: 78 Record: 7 Result: 3 Record: 8 Result: 89 Record: 9 Result: 23 Record: 10 Result: 67 Record: 11 Result: 33 Record: 12 Result: 34 Record: 13 Result: 34 Record: 14 Result: 78 Record: 15 Result: 34 Record: 16 Result: 2 Record: 17 Result: 1 Record: 18 Result: 32 Record: 19 Result: 43 Record: 20 Result: 12 Record: 21 Result: 3 Record: 22 Result: 1 Record: 23 Result: 1 Record: 24 Result: 1 Record: 25 Result: 12 Record: 26 Result: 1 Record: 27 Result: 23 Record: 28 Result: 23 Record: 29 Result: 34 Record: 30 Result: 34 Record: 31 Result: 56 Record: 32 Result: 1 Record: 33 Result: 56 Record: 34 Result: 89 Record: 35 Result: 12 Record: 36 Result: 4 Record: 37 Result: 1 Record: 38 Result: 3 Record: 39 Result: 34 Record: 40 Result: 12 Record: 41 Result: 1 Record: 42 Result: 2 Record: 43 Result: 3 -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] make Label background from Database field
Kad Mann ha scritto: On Sun, 2009-10-18 at 09:08 +0200, Doriano Blengino wrote: Kad Mann ha scritto: On Sat, 2009-10-17 at 22:46 +0300, Vassilis K wrote: Dimitri I don't understand Why don't you take a look at the database example in Gambas? After creating the test table, if you type in an SQL command and click the run button, you will see a gridview with a myriad colours that can be changed based on the data. Surely something like that has to be easier than trying to work out how to manage a hundred labels on a screen, and surely it will offer you much better and easier control of future UI changes, and surely it will offer a more pleasing and intuitive presentation to your user. Surely something like that has to be easier and surely much better and easier control. Yes and no I didn't ask you. True, and neither Vassilis asked you something... you can't understand him, but I can understand you. In one of your last mail you noticed that data controls don't have all the properties as other textboxes, such alignment and so on. Be prepared for other surprises. Everybody would love to have controls with lots of properties in order to do everything you want, but this is impossible (can you believe it? Once you have put 100 properties in a control, you will find someone asking for the #101). Real programmers prefer to do things their way, with few versatile mechanisms. The more a component gets complicated, the less people understand it; just now, many problems arise from the fact that people don't read documentation, and even when they do, they don't notice some important feature; and often that feature is not exactly you need. To Vassilis: I don't know what more to say about your problem. Better to wait for Benoit. Regards to all, -- Doriano Blengino Listen twice before you speak. This is why we have two ears, but only one mouth. -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] make Label background from Database field
On Sun, 2009-10-18 at 10:47 +0200, Doriano Blengino wrote: Kad Mann ha scritto: On Sun, 2009-10-18 at 09:08 +0200, Doriano Blengino wrote: Kad Mann ha scritto: On Sat, 2009-10-17 at 22:46 +0300, Vassilis K wrote: Dimitri I don't understand Why don't you take a look at the database example in Gambas? After creating the test table, if you type in an SQL command and click the run button, you will see a gridview with a myriad colours that can be changed based on the data. Surely something like that has to be easier than trying to work out how to manage a hundred labels on a screen, and surely it will offer you much better and easier control of future UI changes, and surely it will offer a more pleasing and intuitive presentation to your user. Surely something like that has to be easier and surely much better and easier control. Yes and no I didn't ask you. True, and neither Vassilis asked you something... you can't understand him, but I can understand you. In one of your last mail you noticed that data controls don't have all the properties as other textboxes, such alignment and so on. Be prepared for other surprises. Everybody would love to have controls with lots of properties in order to do everything you want, but this is impossible (can you believe it? Once you have put 100 properties in a control, you will find someone asking for the #101). Of course, the point is, I didn't ask for the features. Did I? I asked is the limitation by design, are there plans to change it, and is there a workaround. Besides, do you feel it is unreasonable for someone to want a box used to show the contents of a Field or edit it, a data-bound control intended to save programming time, to have similar functionality to a TextBox? Real programmers prefer to do things their way, with few versatile mechanisms. So, who do you believe might not be a real programmer? The more a component gets complicated, the less people understand it; just now, many problems arise from the fact that people don't read documentation, and even when they do, they don't notice some important feature; and often that feature is not exactly you need. So, you feel that if a DataControl was given similar functionality to a TextBox, you might not understand it? To Vassilis: I don't know what more to say about your problem. Better to wait for Benoit. Regards to all, -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] make Label background from Database field
Kad Mann ha scritto: On Sun, 2009-10-18 at 10:47 +0200, Doriano Blengino wrote: Kad Mann ha scritto: On Sun, 2009-10-18 at 09:08 +0200, Doriano Blengino wrote: Kad Mann ha scritto: On Sat, 2009-10-17 at 22:46 +0300, Vassilis K wrote: Dimitri I don't understand Why don't you take a look at the database example in Gambas? After creating the test table, if you type in an SQL command and click the run button, you will see a gridview with a myriad colours that can be changed based on the data. Surely something like that has to be easier than trying to work out how to manage a hundred labels on a screen, and surely it will offer you much better and easier control of future UI changes, and surely it will offer a more pleasing and intuitive presentation to your user. Surely something like that has to be easier and surely much better and easier control. Yes and no I didn't ask you. True, and neither Vassilis asked you something... you can't understand him, but I can understand you. In one of your last mail you noticed that data controls don't have all the properties as other textboxes, such alignment and so on. Be prepared for other surprises. Everybody would love to have controls with lots of properties in order to do everything you want, but this is impossible (can you believe it? Once you have put 100 properties in a control, you will find someone asking for the #101). Of course, the point is, I didn't ask for the features. Did I? I asked is the limitation by design, are there plans to change it, and is there a workaround. You are very precise... so I will do too. I didn't say *you* asked for features (did I?). Nevertheless you was talking about features... Besides, do you feel it is unreasonable for someone to want a box used to show the contents of a Field or edit it, a data-bound control intended to save programming time, to have similar functionality to a TextBox? No. Real programmers prefer to do things their way, with few versatile mechanisms. So, who do you believe might not be a real programmer? Are you expecting I say you? No. I don't know who you are, and even if I don't agree with you, I can not say you are not a real programmer. But BEWARE! In some future, perhaps I will do! Even at night! :-) The more a component gets complicated, the less people understand it; just now, many problems arise from the fact that people don't read documentation, and even when they do, they don't notice some important feature; and often that feature is not exactly you need. So, you feel that if a DataControl was given similar functionality to a TextBox, you might not understand it? No, again it was a general talking. But are you sure you fully understand Columnview? I noticed that, for example, checkboxes lack the Autosize property. It would make sense that every control like labels, textboxes, checkboxes and data controls had a set of common properties. But for this kind of things gambas relies on either QT or GTK, and sometimes you find limits in them. Be prepared... I tried (and actually succeded) to write a file manager in gambas. But I faced all kind of problems, and I had to rewrite DirTreeView and DirFileView (or whatever is named). Do it it you too, then you'll better understand what I am trying to say. The more a component has functionalities, the more you will find they are not what you want. Hey guy, keep it cool. Regards, -- Doriano Blengino Listen twice before you speak. This is why we have two ears, but only one mouth. -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] make Label background from Database field
Vassili, Going back and forth through the whole thread I can also see that change_bgcolor is not as efficient as it could be simply because it's doing a loop looking through all the controls trying to match the desired control's name. for change_bgcolor I would suggest this Public SUB change_bgcolor(pos as Integer) SELECT CASE pos CASE 1 Label1.Background = Color.Red CASE 2 Label2.Background = Color.Red . . . . . CASE 100 Label100.Backround = Color.Red CASE ELSE END SELECT END I know this looks tedious to code but the reason why I recommend this is that with the SELECT CASE, change_bgcolor would do 3 moves in every case instead of going through the 100 labels you have in your Camp Ground Scheduling application. As for the Result Not Available message, let's try this; replace everything from the WHILE line up to the WEND line with this 'while the record index is less than the total count of records DO WHILE rsThesi.Index rsThesi.Count 'change the background color of the label that's in a position reported in rsThesi!thesi change_bgcolor(CInt(rsThesi!thesi)) 'move to the next Record rsThesi.MoveNext() LOOP if you still get the Result Not Available error then try replacing rsThesi.Count with an integer value less than your total records for this query (For example 10) and see what you get for that. I hope this helps. Keep up the good work Hope we can see the finished project soon with screenshots and all :) Regards, Dimitris On Sun, Oct 18, 2009 at 4:11 AM, Kad Mann nospam.nospam.nos...@gmail.comwrote: On Sun, 2009-10-18 at 10:47 +0200, Doriano Blengino wrote: Kad Mann ha scritto: On Sun, 2009-10-18 at 09:08 +0200, Doriano Blengino wrote: Kad Mann ha scritto: On Sat, 2009-10-17 at 22:46 +0300, Vassilis K wrote: Dimitri I don't understand Why don't you take a look at the database example in Gambas? After creating the test table, if you type in an SQL command and click the run button, you will see a gridview with a myriad colours that can be changed based on the data. Surely something like that has to be easier than trying to work out how to manage a hundred labels on a screen, and surely it will offer you much better and easier control of future UI changes, and surely it will offer a more pleasing and intuitive presentation to your user. Surely something like that has to be easier and surely much better and easier control. Yes and no I didn't ask you. True, and neither Vassilis asked you something... you can't understand him, but I can understand you. In one of your last mail you noticed that data controls don't have all the properties as other textboxes, such alignment and so on. Be prepared for other surprises. Everybody would love to have controls with lots of properties in order to do everything you want, but this is impossible (can you believe it? Once you have put 100 properties in a control, you will find someone asking for the #101). Of course, the point is, I didn't ask for the features. Did I? I asked is the limitation by design, are there plans to change it, and is there a workaround. Besides, do you feel it is unreasonable for someone to want a box used to show the contents of a Field or edit it, a data-bound control intended to save programming time, to have similar functionality to a TextBox? Real programmers prefer to do things their way, with few versatile mechanisms. So, who do you believe might not be a real programmer? The more a component gets complicated, the less people understand it; just now, many problems arise from the fact that people don't read documentation, and even when they do, they don't notice some important feature; and often that feature is not exactly you need. So, you feel that if a DataControl was given similar functionality to a TextBox, you might not understand it? To Vassilis: I don't know what more to say about your problem. Better to wait for Benoit. Regards to all, -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills,
Re: [Gambas-user] make Label background from Database field
Dimitri it worked !! I put the code that you suggested and it works only when I put a number smaller than rsThesi.Count . For example when I put 10 it shows 10 Labels coloured ! I ' m writing down the code that worked: PUBLIC SUB Form_Open() DIM rsThesi AS Result DIM iTemp AS Integer DIM sTemp AS String MODMain.Connect() rsThesi = MODMain.$Con.exec(select * from egrafes where elenchosAnax = 0 AND thesi 0 ) DO WHILE rsThesi.Index 10 change_bgcolor(CInt(rsThesi!thesi)) rsThesi.MoveNext() LOOP END PUBLIC SUB change_bgcolor(pos AS Integer) SELECT CASE pos CASE 1 Label1.Background = Color.Red CASE 2 Label2.Background = Color.Red CASE 3 Label3.Background = Color.Red CASE 4 ...up to CASE 100 CASE ELSE END SELECT END -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] make Label background from Database field
It is Solved !! It works fine with: rsThesi.Count - 1 DO WHILE rsThesi.Index rsThesi.Count - 1 change_bgcolor(CInt(rsThesi!thesi)) rsThesi.MoveNext() LOOP Thank you Dimitri and Doriano -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] make Label background from Database field
Vassili, Glad to hear that it's working for you :) Keep up the good work :) Regards, Dimitris On Sun, Oct 18, 2009 at 7:22 AM, Vassilis K vka...@otenet.gr wrote: It is Solved !! It works fine with: rsThesi.Count - 1 DO WHILE rsThesi.Index rsThesi.Count - 1 change_bgcolor(CInt(rsThesi!thesi)) rsThesi.MoveNext() LOOP Thank you Dimitri and Doriano -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] make Label background from Database field
Dimitris Anogiatis ha scritto: Vassili, Glad to hear that it's working for you :) I join - congratulations! The only pity is to have such an awful case statement, when 5 or 6 lines of code would do the same job. That SELECT it is not much faster, because it compares case by case until it finds a match, and then exits. For this purpose, I forget to put a return in my subroutine just after the match (when the test is true). Doing so, I bet the speed is comparable. Best regards, -- Doriano Blengino Listen twice before you speak. This is why we have two ears, but only one mouth. -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] make Label background from Database field
Doriano Blengino ha scritto: Dimitris Anogiatis ha scritto: Vassili, Glad to hear that it's working for you :) I join - congratulations! The only pity is to have such an awful case statement, when 5 or 6 lines of code would do the same job. That SELECT it is not much faster, because it compares case by case until it finds a match, and then exits. For this purpose, I forget to put a return in my subroutine just after the match (when the test is true). Doing so, I bet the speed is comparable. I forgot again... if speed is really important, you can cache the results from the routine, ie create an array of labels, and assign them once using either methods (select or loop). Then you use the database value as an index in the array, and obtain in just one instruction the reference for the label. About 50 times faster... Hope it is clear. Best regards, -- Doriano Blengino Listen twice before you speak. This is why we have two ears, but only one mouth. -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Classes and Modules in Gambas Server Pages
Hey guys, I know that in gambas server pages there's #USE that allows us to use gambas components. Is there something similar to PHPs include statement to be able to use classes and modules? and when making modules and classes for server pages are there any changes we need to make or points we need to be careful of? Thanks in advance Regards, Dimitris If you need the same structure as a Gambas project, do not use gambas server pages. Do a real gambas project instead, compile it, and use it as a cgi script server. Gambas server pages were made to see if it was possible to use Gambas as a scripting language, and as HTML generator. But frankly, this is not the right thing to do if you want to do serious work. Note that it is not a problem if the size of your final Gambas CGI script is several megabytes, as the different parts of the executable are loaded only when used. I want to release Gambas 3 with ASP-like page support integrated in the IDE. But I have no time to develop it as fast as I want. Anyway, this is the way I want to develop web applications in Gambas. I don't want to do the PHP way at all! Regards, -- Benoît Minisini -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Missing feature?
TextBoxes and Labels have an alignment property but DataControls do not. Is that by design? Are there plans to change it? Is there a workaround to allow the alignment of a DataControl, apart from hiding the DataControls and mirroring the data in a TextBox? Not really, not really. But it should be not really difficult to add it. The idea behind DataControl is changing the actual control used according to the datatype of the field. So it just a matter of being careful that not all true controls used by DataControl support an Alignment property. If I remember, at the moment, Number are right aligned, and other data left aligned by default. You can look if the source code of DataControl if you like. I cannot guarantee you that I will find time to implement that just now! Also, while I'm asking questions, but on a separate topic... Is there any way to set the foreground and background colours of a disabled TextBox to something other than the almost unreadable colours used in the default linux colour schemes? All suggestions, other than rude suggestions, are welcome. Alas the behaviour of disabled controls mostly depends on the toolkit, the theme used, and the colours used in the control center for KDE. And if setting the background (or foreground) color of a control sets its colour both for normal and disabled mode, there will be no way for the user to see the difference between a normal and a disabled control, which is not a good thing. Regards, -- Benoît Minisini -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Code Editor Problem
On Sat, 2009-10-17 at 16:21 +0200, Benoît Minisini wrote: No such thing happens if the module name is from 1 to 3 characters in length. The problem is, I need a module to be called k, nothing else, and I need the constants to be displayed when I type k and a period. Do you mean that if you type k then a period, you won't see the completion popup of the module k ? Yes, that's correct. Typing k. does not show the completion popup. But with a class whose name is two characters, it works. Funny... -- Benoît Minisini -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Code Editor Problem
On Sat, 2009-10-17 at 16:21 +0200, Benoît Minisini wrote: No such thing happens if the module name is from 1 to 3 characters in length. The problem is, I need a module to be called k, nothing else, and I need the constants to be displayed when I type k and a period. Do you mean that if you type k then a period, you won't see the completion popup of the module k ? Yes, that's correct. Typing k. does not show the completion popup. But with a class whose name is two characters, it works. Funny... I explicitely do not open the automatic completion when the class name is one character only. But I do not remember why I did that. :-( -- Benoît Minisini -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Using masks
Is it possible to use an image as a background of a TabStrip? Are the masks usable for that? How can I attach a mask to an object? I would like to have an example. Thanks! No, mask are only for top-level windows. X-Window allows what you want, but I didn't implement it because of the difference between Qt and GTK+. Regards, -- Benoît Minisini -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] make Label background from Database field
I get error: Result is not available at line: change_bgcolor(Label rsThesi!thesi) of the code: PUBLIC SUB Form_Open() DIM i AS Integer DIM rsThesi AS Result MODMain.Connect() rsThesi = MODMain.$Con.exec(select * from egrafes where elenchosAnax = 0) rsThesi.MoveFirst WHILE rsThesi.Index rsThesi.Count change_bgcolor(Label rsThesi!thesi) rsThesi.MoveNext WEND MODMain.$Con.Commit() END SUB change_bgcolor(labelname AS String) DIM alabel AS Object ' FOR EACH alabel IN Form1.Children IF alabel.name = labelname THEN alabel.background = color.red END IF NEXT END Hi, Vassili. I need your full project source and a SQL dump of your database, and which database backend you are using. And change_bgcolor() can be written this way: SUB change_bgcolor(labelname AS String) Form1[labelName].Background = Color.Red END Regards, -- Benoît Minisini -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] serial port.
hi i want to send data to serial port. when i send a number (for exam: 37) , what is writing gambas to seri port (100101 or 37) ? if gambas write (37) how can i convert decimaltobinary. (are there any module or command ? ___ Yahoo! Türkiye açıldı! http://yahoo.com.tr İnternet üzerindeki en iyi içeriği Yahoo! Türkiye sizlere sunuyor! -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] make Label background from Database field
Benoît Minisini ha scritto: I get error: Result is not available at line: change_bgcolor(Label rsThesi!thesi) of the code: PUBLIC SUB Form_Open() DIM i AS Integer DIM rsThesi AS Result MODMain.Connect() rsThesi = MODMain.$Con.exec(select * from egrafes where elenchosAnax = 0) rsThesi.MoveFirst WHILE rsThesi.Index rsThesi.Count change_bgcolor(Label rsThesi!thesi) rsThesi.MoveNext WEND MODMain.$Con.Commit() END SUB change_bgcolor(labelname AS String) DIM alabel AS Object ' FOR EACH alabel IN Form1.Children IF alabel.name = labelname THEN alabel.background = color.red END IF NEXT END Hi, Vassili. I need your full project source and a SQL dump of your database, and which database backend you are using. And change_bgcolor() can be written this way: SUB change_bgcolor(labelname AS String) Form1[labelName].Background = Color.Red END Funny - the first thing I looked for in the docs was a function returning a reference by control name. I took a look in qt.form, and I missed it... Good to know. Regards, -- Doriano Blengino Listen twice before you speak. This is why we have two ears, but only one mouth. -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] make Label background from Database field
After the function of change_bgcolor that existed and Benoit reminded us, the code is becoming more sophisticated: PUBLIC SUB Form_Open() DIM rsThesi AS Result DIM iTemp AS Integer DIM sTemp AS String MODMain.Connect() rsThesi = MODMain.$Con.exec(select * from egrafes where elenchosAnax = 0 AND thesi 0 ) DO WHILE rsThesi.Index rsThesi.Count - 1 change_bgcolor(Label CInt(rsThesi!thesi)) rsThesi.MoveNext() LOOP END SUB change_bgcolor(labelname AS String) Form1[labelName].Background = Color.Red END -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] make Label background from Database field
Vassilis K ha scritto: After the function of change_bgcolor that existed and Benoit reminded us, the code is becoming more sophisticated: PUBLIC SUB Form_Open() DIM rsThesi AS Result DIM iTemp AS Integer DIM sTemp AS String MODMain.Connect() rsThesi = MODMain.$Con.exec(select * from egrafes where elenchosAnax = 0 AND thesi 0 ) DO WHILE rsThesi.Index rsThesi.Count - 1 change_bgcolor(Label CInt(rsThesi!thesi)) rsThesi.MoveNext() LOOP END SUB change_bgcolor(labelname AS String) Form1[labelName].Background = Color.Red END At this point, there is no need for a separate subroutine - the single instruction inside it can replace the calling of it. Anyway, Benoit, did you read the other messages? There were strange things... Regards, -- Doriano Blengino Listen twice before you speak. This is why we have two ears, but only one mouth. -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] make Label background from Database field
On Sun, 2009-10-18 at 14:00 +0200, Doriano Blengino wrote: Kad Mann ha scritto: On Sun, 2009-10-18 at 10:47 +0200, Doriano Blengino wrote: Kad Mann ha scritto: On Sun, 2009-10-18 at 09:08 +0200, Doriano Blengino wrote: Kad Mann ha scritto: On Sat, 2009-10-17 at 22:46 +0300, Vassilis K wrote: Dimitri I don't understand Why don't you take a look at the database example in Gambas? After creating the test table, if you type in an SQL command and click the run button, you will see a gridview with a myriad colours that can be changed based on the data. Surely something like that has to be easier than trying to work out how to manage a hundred labels on a screen, and surely it will offer you much better and easier control of future UI changes, and surely it will offer a more pleasing and intuitive presentation to your user. Surely something like that has to be easier and surely much better and easier control. Yes and no I didn't ask you. True, and neither Vassilis asked you something... you can't understand him, but I can understand you. In one of your last mail you noticed that data controls don't have all the properties as other textboxes, such alignment and so on. Be prepared for other surprises. Everybody would love to have controls with lots of properties in order to do everything you want, but this is impossible (can you believe it? Once you have put 100 properties in a control, you will find someone asking for the #101). Of course, the point is, I didn't ask for the features. Did I? I asked is the limitation by design, are there plans to change it, and is there a workaround. You are very precise... so I will do too. I didn't say *you* asked for features (did I?). Nevertheless you was talking about features... Then why did you bring up my question in the first place?about it Besides, do you feel it is unreasonable for someone to want a box used to show the contents of a Field or edit it, a data-bound control intended to save programming time, to have similar functionality to a TextBox? No. Real programmers prefer to do things their way, with few versatile mechanisms. So, who do you believe might not be a real programmer? Are you expecting I say you? No. I don't know who you are, and even if I don't agree with you, I can not say you are not a real programmer. Are outright insults like that permitted on a mailing list like this one? Hey guy, keep it cool. Yet you had to resort to insults. -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Missing feature?
On Sun, 2009-10-18 at 17:53 +0200, Benoît Minisini wrote: TextBoxes and Labels have an alignment property but DataControls do not. Is that by design? Are there plans to change it? Is there a workaround to allow the alignment of a DataControl, apart from hiding the DataControls and mirroring the data in a TextBox? Not really, not really. But it should be not really difficult to add it. The idea behind DataControl is changing the actual control used according to the datatype of the field. So it just a matter of being careful that not all true controls used by DataControl support an Alignment property. If I remember, at the moment, Number are right aligned, and other data left aligned by default. Ok, thanks. I'll put it down as a limitation :) Is there any way to set the foreground and background colours of a disabled TextBox to something other than the almost unreadable colours used in the default linux colour schemes? All suggestions, other than rude suggestions, are welcome. Alas the behaviour of disabled controls mostly depends on the toolkit, the theme used, and the colours used in the control center for KDE. And if setting the background (or foreground) color of a control sets its colour both for normal and disabled mode, there will be no way for the user to see the difference between a normal and a disabled control, which is not a good thing. I found a perfect workaround while I was working around the limitation mentioned above. The TextArea control doesn't change the colour of text when it is disabled. Instead of using the TextBox control to replace the DataControls, which I need to align, I now use TextArea. It looks good, like it should. If TextArea isn't supposed to be like that, please don't fix it :) -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] make Label background from Database field
After a more accurate control I discovered that the last record was not included with red color. But when I put the LOOP up to rsThesi.Count it shows up the same old error. so I put just after the LOOP the line : change_bgcolor(Label CInt(rsThesi!thesi)) AND everything is OK at last !! Here's the code with the extra line: DO WHILE rsThesi.Index rsThesi.Count - 1 change_bgcolor(Label CInt(rsThesi!thesi)) rsThesi.MoveNext() LOOP change_bgcolor(Label CInt(rsThesi!thesi)) -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Gambas and Gnome dependencies...
I'm building Gambas on Gentoo and it's dragging in all kinds of gnome libraries... My question is why? Jerry -- * From the desk of: Jerome D. McBride 18:45:33 up 21 days, 26 min, 7 users, load average: 0.02, 0.01, 0.00 * -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] The Gambas wiki...
Is the source code for the wiki available? I understand it's written in gambas... It would make a great tutorial. Jerry -- * From the desk of: Jerome D. McBride 18:46:56 up 21 days, 27 min, 7 users, load average: 0.00, 0.00, 0.00 * -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] make Label background from Database field
Vassilis K wrote: After a more accurate control I discovered that the last record was not included with red color. But when I put the LOOP up to rsThesi.Count it shows up the same old error. so I put just after the LOOP the line : change_bgcolor(Label CInt(rsThesi!thesi)) AND everything is OK at last !! Here's the code with the extra line: DO WHILE rsThesi.Index rsThesi.Count - 1 change_bgcolor(Label CInt(rsThesi!thesi)) rsThesi.MoveNext() LOOP change_bgcolor(Label CInt(rsThesi!thesi)) Hmm, maybe this would work: FOR EACH rsThesi change_bgcolor(Label CInt(rsThesi!thesi)) NEXT We'll make a program out of this yet! :-D Werner -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Code Editor Problem
Because the pop-up list would be too long? Saba Moshe Date: Sun, 18 Oct 2009 18:00:50 +0200 From: Beno?t Minisini gam...@users.sourceforge.net Subject: Re: [Gambas-user] Code Editor Problem To: mailing list for gambas users gambas-user@lists.sourceforge.net Message-ID: 200910181800.50789.gam...@users.sourceforge.net Content-Type: Text/Plain; charset=utf-8 On Sat, 2009-10-17 at 16:21 +0200, Beno?t Minisini wrote: No such thing happens if the module name is from 1 to 3 characters in length. The problem is, I need a module to be called k, nothing else, and I need the constants to be displayed when I type k and a period. Do you mean that if you type k then a period, you won't see the completion popup of the module k ? Yes, that's correct. Typing k. does not show the completion popup. But with a class whose name is two characters, it works. Funny... I explicitely do not open the automatic completion when the class name is one character only. But I do not remember why I did that. :-( -- Beno?t Minisini -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] The Gambas wiki...
On Sunday 18 October 2009 06:47 pm, Jerry McBride wrote: Is the source code for the wiki available? I understand it's written in gambas... It would make a great tutorial. As far as I know, it's included in the Gambas tarball in the app/src/doc.cgi directory. Rob -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user