Re: [Gambas-user] Q:how to save a file.png into Postgresql [solved]
On jeudi 04 septembre 2008, richard terry wrote: > On Wed, 3 Sep 2008 07:51:03 pm Ron_1st wrote: > > Finally solved. > > I did try and try inserting the E in the hint, but put in inside the qotes > and not outside it so this works: > > insert into Insert into clin_consult.temp_image(piccie) values > (E'\\211PNG\\015\\012\\032\\012\\') > > Thanks to everyone who helped. Syan mailed my via the postgres novice list. > I never could intrepret documentation very well. > > Regards > > Richard > Can you provide a link to the postgresql documentation that depicts this feature, so that I can fix the Gambas postgresql driver too? It would be a good idea, wouldn't it? :-) Regards, -- Benoit Minisini - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Creating a library
Am Mittwoch, 3. September 2008 10:56:37 schrieb [EMAIL PROTECTED]: > Hi List! > > I've written a kind of library, where I droped my standard routines. At the > moment, I have to compile this class every time with my projects. > > Is there someone on this list, who can tell me, what I have to do, to > compile the library separately and how I can get access to the methods in > the library, when I want to use them in my project? > > Thanks in advance! > > Greetz > Stevie Sorry for bothering you again. ...is this question to stupid or to complex? Greetz Stevie - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Creating a library
[EMAIL PROTECTED] ha scritto: > Am Mittwoch, 3. September 2008 10:56:37 schrieb [EMAIL PROTECTED]: > >> Hi List! >> >> I've written a kind of library, where I droped my standard routines. At the >> moment, I have to compile this class every time with my projects. >> >> Is there someone on this list, who can tell me, what I have to do, to >> compile the library separately and how I can get access to the methods in >> the library, when I want to use them in my project? >> When you speak about "compile this class every time", I think your libray is a gambas source code. If it is so, then you can not compile it separately; you can make instead a component and export it (by the clause EXPORT), and create an executable which can be later reused every time you want (by specifying it in the "components" page of the project properties). More info about this, if you want. If you are not talking about a gambas source code, then more infos are available, if you want - but specify better the situation. I suppose it is the first case, thought. Regards, Doriano Blengino - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Creating a library
I am sorry, I am not skilled enough to answer. Why do you not try to search the wikis & message archive. I think you can find what you are looking for regards Emil -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von [EMAIL PROTECTED] Gesendet: Donnerstag, 4. September 2008 14:25 An: mailing list for gambas users Betreff: Re: [Gambas-user] Creating a library Am Mittwoch, 3. September 2008 10:56:37 schrieb [EMAIL PROTECTED]: > Hi List! > > I've written a kind of library, where I droped my standard routines. At the > moment, I have to compile this class every time with my projects. > > Is there someone on this list, who can tell me, what I have to do, to > compile the library separately and how I can get access to the methods in > the library, when I want to use them in my project? > > Thanks in advance! > > Greetz > Stevie Sorry for bothering you again. ...is this question to stupid or to complex? Greetz Stevie - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Creating a library
Am Donnerstag, 4. September 2008 14:33:03 schrieb Doriano Blengino: > [EMAIL PROTECTED] ha scritto: > > Am Mittwoch, 3. September 2008 10:56:37 schrieb [EMAIL PROTECTED]: > >> Hi List! > >> > >> I've written a kind of library, where I droped my standard routines. At > >> the moment, I have to compile this class every time with my projects. > >> > >> Is there someone on this list, who can tell me, what I have to do, to > >> compile the library separately and how I can get access to the methods > >> in the library, when I want to use them in my project? > > When you speak about "compile this class every time", I think your > libray is a gambas source code. If it is so, then you can not compile it > separately; you can make instead a component and export it (by the > clause EXPORT), and create an executable which can be later reused every > time you want (by specifying it in the "components" page of the project > properties). More info about this, if you want. > > If you are not talking about a gambas source code, then more infos are > available, if you want - but specify better the situation. I suppose it > is the first case, thought. Hi Doriano! Yes!! ..it is the first case! :-) ...and I appreciate any further info about this topic! :-) greetz Stevie - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Creating a library
[EMAIL PROTECTED] ha scritto: > Am Donnerstag, 4. September 2008 14:33:03 schrieb Doriano Blengino: > >> [EMAIL PROTECTED] ha scritto: >> >>> Am Mittwoch, 3. September 2008 10:56:37 schrieb [EMAIL PROTECTED]: >>> Hi List! I've written a kind of library, where I droped my standard routines. At the moment, I have to compile this class every time with my projects. >> When you speak about "compile this class every time", I think your >> libray is a gambas source code. If it is so, then you can not compile it >> Make a (dummy?) project with your libray in it; give it a meaningful name. Edit the library source: put a "EXPORT" alone in a line at the beginning: ' Gambas module file EXPORT PUBLIC SUB printit(st AS String) PRINT st END Run the project, or compile it. Go to the project properties (General, Options, Components...); in the "Options" tab set "This project is a component" to YES; further tabs should appear on the right of the window (Provides and Requires). Go the tab "Provides", and click on the line starting with your library name, under the column "Type", and set "Class". Confirm with "OK". Next, create an executable: Main menu/Project/Create/Executable; a window will open asking for a location. For this kind of things, I use the same path as the project, but could be better to choose a location accessible by other users too, I don't know. Before continuing, expand the last item in the window named "Options": two checkboxes will appear. Check the "Install components in the user directory" or something similar. Confirm with OK. Quit Gambas. In your home directory you shoud find two directories: .local/lib/gambas2/ .local/share/gambas2/ with things inside them (symbolic links to the executable you created before). If you don't find ~/.local, or one of the other subdirectory, try to create them and repeat the create executable step. I don't remember whther gambas creates them automatically or it expects them to be there. Restart gambas, open/create another project (not the old one, I suppose...), go to the project properties under the section "Components". In the list of available components, you should find a line containing the name of the project you did in the first step. Check it, and now in your project you can use the methods declared in your library. Referring to the source code above, I called that module "alib", and put it inside a project "provalib". So, in another project, I can check the line "provalib", and the methods are accessible by writing "alib.printit()". Some notes: I use gambas 2.0.0, quite an old version, with italian localization. Your version could be a little different... I am testing what I am just writing to you, and it works. But there could be better/preferrable methods. Good luck, hope this solves. Cheers, Doriano. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Creating a library
Am Donnerstag, 4. September 2008 16:39:06 schrieb Doriano Blengino: > Make a (dummy?) project with your libray in it; give it a meaningful name. > Edit the library source: put a "EXPORT" alone in a line at the beginning: > > ' Gambas module file > > EXPORT > > PUBLIC SUB printit(st AS String) > > PRINT st > > END > > Run the project, or compile it. > Go to the project properties (General, Options, Components...); in the > "Options" tab set "This project is a component" to YES; further tabs > should appear on the right of the window (Provides and Requires). > Go the tab "Provides", and click on the line starting with your library > name, under the column "Type", and set "Class". > Confirm with "OK". > > Next, create an executable: Main menu/Project/Create/Executable; a > window will open asking for a location. > For this kind of things, I use the same path as the project, but could > be better to choose a location accessible by other users too, I don't > know. Before continuing, expand the last item in the window named > "Options": two checkboxes will appear. Check the "Install components in > the user directory" or something similar. > > Confirm with OK. > > Quit Gambas. In your home directory you shoud find two directories: > > .local/lib/gambas2/ > .local/share/gambas2/ > > with things inside them (symbolic links to the executable you created > before). > If you don't find ~/.local, or one of the other subdirectory, try to > create them and repeat the create executable step. I don't remember > whther gambas creates them automatically or it expects them to be there. > > Restart gambas, open/create another project (not the old one, I > suppose...), go to the project properties under the section > "Components". In the list of available components, you should find a > line containing the name of the project you did in the first step. Check > it, and now in your project you can use the methods declared in your > library. > Referring to the source code above, I called that module "alib", and put > it inside a project "provalib". So, in another project, I can check the > line "provalib", and the methods are accessible by writing > "alib.printit()". > > Some notes: > > I use gambas 2.0.0, quite an old version, with italian localization. > Your version could be a little different... > > I am testing what I am just writing to you, and it works. But there > could be better/preferrable methods. > > Good luck, hope this solves. Hi Doriano, thank you so much for this guide. :-) I will check this, with my current version of Gambas! Greetz Stevie - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Listbox.List(x) error
Hi All! I have a problem. I want get a Listbox item text value to a label.caption .. label.caption = ListBox.list(1) but I have an error message : Not a function What I mistaked? Regards, Sevoir - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Listbox.List(x) error
Le Thursday 04 September 2008 20:35:47 Sevoir, vous avez écrit : > Hi All! > > I have a problem. > I want get a Listbox item text value to a label.caption .. > label.caption = ListBox.list(1) > but I have an error message : > Not a function > > What I mistaked? > > Regards, Sevoir Use label.Text is better no ? Jacky - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Listbox.List(x) error
Hi, Thanks your answer, but problem still Regards, Sevoir 2008. 09. 4, csütörtök keltezéssel 21.26-kor Jacky ezt írta: > Le Thursday 04 September 2008 20:35:47 Sevoir, vous avez écrit : > > Hi All! > > > > I have a problem. > > I want get a Listbox item text value to a label.caption .. > > label.caption = ListBox.list(1) > > but I have an error message : > > Not a function > > > > What I mistaked? > > > > Regards, Sevoir > > Use label.Text is better no ? > > Jacky > > > - > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Listbox.List(x) error
Le Thursday 04 September 2008 20:35:47 Sevoir, vous avez écrit : > Hi All! > > I have a problem. > I want get a Listbox item text value to a label.caption .. > label.caption = ListBox.list(1) > but I have an error message : > Not a function > > What I mistaked? label.caption = ListBox.list[1] Jacky - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Listbox.List(x) error
On Thu, Sep 4, 2008 at 10:35 PM, Sevoir <[EMAIL PROTECTED]> wrote: > Hi, > > Thanks your answer, but problem still > > Regards, Sevoir > > 2008. 09. 4, csütörtök keltezéssel 21.26-kor Jacky ezt írta: > > Le Thursday 04 September 2008 20:35:47 Sevoir, vous avez écrit : > > > Hi All! > > > > > > I have a problem. > > > I want get a Listbox item text value to a label.caption .. > > > label.caption = ListBox.list(1) > > > but I have an error message : > > > Not a function > > > > > > What I mistaked? > > > > > > Regards, Sevoir > > > > Use label.Text is better no ? > > > > Jacky > So basic problem is how to get specified element from to listbox. I can get selected element by using the listbox.current.text. I also can get all listbox elements by using listbox.list.join("|"). Listbox.list returns array[]-type so it should be possible to index it - but as I am beginner with Gambas - I don't know. I would also like to know so gurus tell us :-) Best Regards Kari - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Listbox.List(x) error
Thx this working. Regards, Norbert 2008. 09. 4, csütörtök keltezéssel 21.44-kor Jacky ezt írta: > Le Thursday 04 September 2008 20:35:47 Sevoir, vous avez écrit : > > Hi All! > > > > I have a problem. > > I want get a Listbox item text value to a label.caption .. > > label.caption = ListBox.list(1) > > but I have an error message : > > Not a function > > > > What I mistaked? > > label.caption = ListBox.list[1] > > Jacky > > > - > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Best control for a game
Hi again Well, I've made some research in DrawingArea. I've been reading the documentation on the wiki, and, if I understand it, for drawing I have to draw into a DrawingArea enclosing all draw commands in a Draw.Begin(DrawingArea)...Draw.End group of code. It seems to work, but, I see that you can start drawing if you put a command button, or a menu or something like this, but it does not work in a Form_Open event. Is it like this? Thanks El dj 28 de 08 del 2008 a les 11:57 +0200, en/na Benoit Minisini va escriure: > On jeudi 28 août 2008, Tomas Eroles i Forner wrote: > > Hi all > > I'm trying to write a gambas scrabble (yes, I'm in holidays :-), and I'm > > thinking which is the best control to do that. > > I've tried to use a 15x15 matrix text label, but I think perhaps there > > is a better control. > > > > What do you think about? > > If using a GridView or TableView, is it possible to paint some squares > > (for 2xWord, 3xWord, 2xLetter...) > > > > Thanks in advance > > Draw everything yourself in a DrawingArea, this is the fastest. > > Or create your own "scrabble cell" control based on a DrawingArea, and put > 225 > of them inside a container. > > Regards, > - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Listbox.List(x) error
On jeudi 04 septembre 2008, Sevoir wrote: > Thx this working. > > > Regards, Norbert > > 2008. 09. 4, csütörtök keltezéssel 21.44-kor Jacky ezt írta: > > Le Thursday 04 September 2008 20:35:47 Sevoir, vous avez écrit : > > > Hi All! > > > > > > I have a problem. > > > I want get a Listbox item text value to a label.caption .. > > > label.caption = ListBox.list(1) > > > but I have an error message : > > > Not a function > > > > > > What I mistaked? > > > > label.caption = ListBox.list[1] > > > > Jacky > > The syntax in Gambas is different from the vb syntax: Label.Caption = ListBox[1] If you do Label.Caption = ListBox.List[1], you get the same result, because you actually get the second element of what returns ListBox.List, which is an array of all listbox elements. If the listbox has 1 items, you are killing a fly with a hammer then. Regards, -- Benoit Minisini - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Best control for a game
Tomas Eroles i Forner wrote: > Hi again > Well, I've made some research in DrawingArea. > I've been reading the documentation on the wiki, and, if I understand > it, for drawing I have to draw into a DrawingArea enclosing all draw > commands in a Draw.Begin(DrawingArea)...Draw.End group of code. > > It seems to work, but, I see that you can start drawing if you put a > command button, or a menu or something like this, but it does not work > in a Form_Open event. > > Is it like this? > > Thanks > It is meant to be used somewhat differently. You can put all your drawing commands in a Draw.Begin(DrawingArea)...Draw.End group of code. However, it is much more practical to use the drawing area's draw event http://gambasdoc.org/help/comp/gb.qt/drawingarea/.draw because it will also deal with needs to redraw that come from outside the application i.e.other applications' windows that were partially overlapping. Have a look at the "Analog Watch" example. So your Draw event would look like this: PUBLIC SUB dwgScrabble_Draw() 'don't use BEGIN and END, it is already done ... ... END Also, do not use WAIT statements in here if there is any slight chance that something elsewhere wanted to be drawn. I learned this the hard way :-D Regards Werner - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Best control for a game
Werner ha scritto: > Tomas Eroles i Forner wrote: > >> commands in a Draw.Begin(DrawingArea)...Draw.End group of code. >> >> It seems to work, but, I see that you can start drawing if you put a >> command button, or a menu or something like this, but it does not work >> in a Form_Open event. >> >> Is it like this? >> > However, it is much more practical to use the drawing area's draw event > http://gambasdoc.org/help/comp/gb.qt/drawingarea/.draw > > because it will also deal with needs to redraw that come from outside the > application i.e.other applications' windows that were partially overlapping. > Have a look at the "Analog Watch" example. > Werner is right but, perhaps, you can still get what you want if you set the "Cached" property of the DrawingArea. By setting that property, the DrawingArea repaints automatically itself when needed; whether to go this way or the other depends on several factors: dimension of the drawing, complexity of the drawing, complexity of the code needed to remember what to draw... I suppose that the main difference between the two methods is this. If you use the Cached property, your code can update the drawing when it wants; the result is a cached bitmap that can consume a lot of memory, but still is a simple bitmap. This is the easiest way. If you don't use the Cached property, your code to update the drawing is called every time the DrawingArea "unveals". If this code is fast, then this method is better. However, this second method is a little more complicated to understand: when the program, asynchronously, wants to change the appearance, it can Draw() directly, but it must also remember the sequence of operations needed to refresh the entire drawing, so a double job is needed. And this is the harder way... Cheers, Doriano Blengino - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user