Re: [Gambas-user] Mysql query question

2008-11-09 Thread Ron
David Villalobos Cambronero wrote:
 Can gb.db.mysql help?

  Regards


 --
 David



 - Original Message 
 From: Benoit Minisini [EMAIL PROTECTED]
 To: mailing list for gambas users gambas-user@lists.sourceforge.net
 Sent: Saturday, November 8, 2008 11:50:11 AM
 Subject: Re: [Gambas-user] Mysql query question

 On mercredi 5 novembre 2008, Ron wrote:
   
 Ron schreef:
 
 Benoit Minisini wrote:
   
 On mardi 4 novembre 2008, Ron wrote:
 
 Hi,

 I'm replacing my buggy mysql query's for correct ones...

 All is well except for this one...

 DIM sTable as String = remarks_tags

 Main.hDB.Exec(SELECT text FROM   sTable   ORDER BY rand() LIMIT
 1)
 This works ok...

 Replaced by...

 Main.hDB.Exec(SELECT text FROM 1 ORDER BY rand() LIMIT 1, sTable)

 Which results in an SQL query syntax error, is this correct behavior?

 Any ideas?

 Regards,
 Ron_2nd
   
 1, 2... are there for quoting SQL values, not SQL table or field
 names.
 Moreover, if you want to insert a table or field name in a SQL
 request, you should use the DB.Quote() function:

 Main.hDB.Exec(SELECT text FROM   DB.Quote(sTable)   ORDER BY
 rand() LIMIT 1)
 
 Ok got it, works ok now.

 Thanks.
   
 Does gambas provide an equivalent for the sql code below?

 sSql = CREATE TABLE capture_camera  iCam   (
 sSql = `id` int(11) NOT NULL auto_increment,
 sSql = `stamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update
 CURRENT_TIMESTAMP,
 sSql = `image` longblob,
 sSql = PRIMARY KEY( `id`),
 sSql = KEY `timestamp` (`stamp`)
 sSql = );
 Main.hDB.Exec(sSql)

 This is what I have so far, but the replacement of the KEY and
 CURRENT_TIMESTAMP on update functionality is unclear to me.
 It seems it's not here, and I have to keep using the method above.

 DIM tableCaptures as Table

 tableCaptures = Main.hDB.Tables.Add(capture_camera  iCam)
 tableCaptures.Fields.Add(id, db.Serial)
 tableCaptures.Fields.Add(stamp, db.date, 32)
 tableCaptures.Fields.Add(image, db.blob)
 tableCaptures.PrimaryKey = [id]
 tableCaptures.Update()

 I'm using the mysql driver.

 Regards,
 Ron_2nd

 

 No, gb.db does not provide an interface to that feature, as it is a mysql 
 syntax only.

 Regards,

   

No problem I have solved it by setting the timestamp from my code.

Regards,
Ron.

-
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=100url=/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Latest Gambas packages for Ubuntu - Broken?

2008-11-09 Thread MaxVK

Hi, please forgive me if I am getting lost along the way here: I'm on and off
of the PC at the moment for various reasons, and I seem to spend my time
trying to catch up!

Anyway, I went to the Gambas website
(http://gambas.sourceforge.net/download.html) to find the latest packages
for Ubuntu but the link (http://gambas.gnulinex.org/ubuntu) to the newer
packages seems to be broken (The page never loads).

Does anyone have an alternative link to the latest Ubuntu deb packages
please. I currently have Gambas 2.0.0, which I seem to remember updating
some time ago now.

regards

Max
-- 
View this message in context: 
http://www.nabble.com/Latest-Gambas-packages-for-Ubuntu---Broken--tp20408776p20408776.html
Sent from the gambas-user mailing list archive at Nabble.com.


-
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=100url=/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Resize event...

2008-11-09 Thread Benoit Minisini
On dimanche 9 novembre 2008, Doriano Blengino wrote:
 Stephen Bungay ha scritto:
 A form, lets call it FormX contains a tabStrip which has another
  form, call it FormY dynamically instantiated inside the TabStrip at
  run-time. FormY has three controls on it, a calendar, a table, and a
  VSplit to seperate them.
 When FormX is resized the TabStrip is resized and I want to couple
  this to FormY by firing it's resize event. I do this by explicitly
  calling what I think is the FormY.Resize event, but FormY.Resize wants
  Width and Height paramters passed to it. This I find kind of strange
  because FormY_Resize has no Width and Height Parameters in the declared
  in the event.
 When the code is stepped through the FormY_Resize does not fire when
  FormY.Resize(Width,Height) is called and the controls stubbornly remain
  the size they were when initialized.
 A couple of questions;
 
  1. Why does FormY.Resize want Width and Height parameters when clearly
  there are no such parameters in the FormY_Resize event?
 
  2. Why is FormY_Resize not firing?

 Do not confuse the resize method with the resize event.

 You use the resize method when you want your form be resized, by program
 code. For example, the program loads a picture from disk, and then wants
 the form to adapt to the size of the picture. So the program issues a
 me.resize(hPhoto.width, hPhoto.height) (well, not exactly so, but you
 catch the idea).

 The resize event is fired from the external world, and the form waits
 for it to do something more than merely readjust its children controls.
 If you want to simply rearrange childrens, then a set of powerful
 features can be used (panels, h/vboxes, expand, ignore...), and chances
 are that you succed.

 So, in the first case, you command the form to resize, and you also have
 to tell it what sizes to assume. In the second case, the world tells you
 that the form dimensions are changed; you can read the new dimensions in
 the Width and Height properties, and take appropriate actions.
 This is why Form.resize() method takes parameters, and Form_Resize()
 takes none; because the latter case is only a signal, and you can be not
 interested in the real dimensions, only want to know that the user
 resized the form.

 Apart from this clarification, I had a hard debate with Benoit about
 embedding forms inside tabstrips. What I remember about the end, is that
 resize events will not raise. Full stop. I think this is an omission,
 because when the size of the form changes, a resize event should be
 fired no matter if the form is child of the desktop or child of a tabstrip.


No, if Resize event is not raised, then it was a bug. Are you sure that we 
talked about that? 

-- 
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=100url=/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Feature request

2008-11-09 Thread richard terry
On Mon, 10 Nov 2008 10:09:10 am Benoit Minisini wrote:
 On dimanche 9 novembre 2008, richard terry wrote:
  I've mentioned this one before, wondered if Benoit could give it
  consideration.
 
  Request: Option on the popup menu over the tab for 'Set as Startup'
 
  See the picture. When you right click over the tab, you get the menu
  which includes the tab names and two options - 'Close current tab',
  'Close all other tabs'. I wondered if 'Set as startup' could be added
  here.
 
  Reason:
 
  When your project has some dozens of forms, and one is constantly
  developing different forms, one may have to scroll down through the list
  at the side, and it is both time consuming and often the classes/mods
  tree is open as well ,which may have another couple of dozen files to
  have to scroll through.
 
  Regards and thanks for the consideration of this.
 
  Richard

 This menu is the menu of the Workspace, I can't change it.

 But I can add a menu entry in the code editor menu and in the form editor
 menu, with a toolbar button too. If you want.

That would be great

thanks

Richard


-
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=100url=/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Feature request

2008-11-09 Thread Benoit Minisini
On dimanche 9 novembre 2008, richard terry wrote:
 I've mentioned this one before, wondered if Benoit could give it
 consideration.

 Request: Option on the popup menu over the tab for 'Set as Startup'

 See the picture. When you right click over the tab, you get the menu which
 includes the tab names and two options - 'Close current tab', 'Close all
 other tabs'. I wondered if 'Set as startup' could be added here.

 Reason:

 When your project has some dozens of forms, and one is constantly
 developing different forms, one may have to scroll down through the list at
 the side, and it is both time consuming and often the classes/mods tree is
 open as well ,which may have another couple of dozen files to have to
 scroll through.

 Regards and thanks for the consideration of this.

 Richard

This menu is the menu of the Workspace, I can't change it.

But I can add a menu entry in the code editor menu and in the form editor 
menu, with a toolbar button too. If you want.

-- 
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=100url=/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Latest Gambas packages for Ubuntu - Broken?

2008-11-09 Thread Epíleg
En/na MaxVK ha escrit:
 Hi, please forgive me if I am getting lost along the way here: I'm on and off
 of the PC at the moment for various reasons, and I seem to spend my time
 trying to catch up!
 
 Anyway, I went to the Gambas website
 (http://gambas.sourceforge.net/download.html) to find the latest packages
 for Ubuntu but the link (http://gambas.gnulinex.org/ubuntu) to the newer
 packages seems to be broken (The page never loads).
 
 Does anyone have an alternative link to the latest Ubuntu deb packages
 please. I currently have Gambas 2.0.0, which I seem to remember updating
 some time ago now.
 
 regards
 
 Max

You can build them Yourself.

http://packages.debian.org/unstable/source/gambas2

Download the three files (gambas2_2.8.2-1.dsc, gambas2_2.8.2.orig.tar.gz and 
gambas2_2.8.2-1.diff.gz) and save them in a folder. With the command line go to 
this folder and type:
$ dpkg-source -x gambas2_2.8.2-1.dsc
$ cd gambas2-2.8.2/
$ sudo dpkg-buildpackage
Probably You will need to install some packages at this moment, do it and try 
the last command again. After a while You will get all .deb's files.

Regards.

-- 
Epíleg


-
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=100url=/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Highlight Editor - setting background?

2008-11-09 Thread Rolf-Werner Eilert
Benoit Minisini schrieb:
 On vendredi 7 novembre 2008, Rolf-Werner Eilert wrote:
 Just one more question: is it possible to set a background color
 property for some of the elements such like

 Editor1.Styles[Highlight.String].Color = Color.DarkRed
   ^

 -|

 Is there a BackColor or Color.Background or something like this?

 Regards

 Rolf

 
 This is possible in Gambas 3.
 
 Regards,
 

Ah :-) good to know...

Regards

Rolf


-
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=100url=/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Resize event...

2008-11-09 Thread Stephen Bungay
   Thanks for the clarification, the resize method is new since I last 
did extensive work with GAMBAS, IMHO it is not required. On thye surface 
of it setting the Width and Height Properties perform the same function 
as the Resize method.

   The timer hack is a major kludge and is not acceptable.

   If one calls the resize method and the form resizes then a resize 
event has occurred and that event should fire.

.Parent form resize event occurs due to user interaction
.. Programmer's code adjusts tabstrip size.
.. Programmer calls embedded forms' resize method with new size params
Embedded form resizes
Embedded forms' resize event fires (it just resized after all!)
..Resize event can be used by programmer to adjust child controls.

   The resize event of an object should fire when that object is 
resized, full stop. Who or what caused the resize to occur is irrelevant.

   Benoit: how can one dynamically resize form objects that are embedded 
in a tabstrip?


Doriano Blengino wrote:
 Stephen Bungay ha scritto:
A form, lets call it FormX contains a tabStrip which has another 
 form, call it FormY dynamically instantiated inside the TabStrip at 
 run-time. FormY has three controls on it, a calendar, a table, and a 
 VSplit to seperate them.
When FormX is resized the TabStrip is resized and I want to couple 
 this to FormY by firing it's resize event. I do this by explicitly 
 calling what I think is the FormY.Resize event, but FormY.Resize wants 
 Width and Height paramters passed to it. This I find kind of strange 
 because FormY_Resize has no Width and Height Parameters in the declared 
 in the event.
When the code is stepped through the FormY_Resize does not fire when 
 FormY.Resize(Width,Height) is called and the controls stubbornly remain 
 the size they were when initialized.
A couple of questions;

 1. Why does FormY.Resize want Width and Height parameters when clearly 
 there are no such parameters in the FormY_Resize event?

 2. Why is FormY_Resize not firing?
   
 Do not confuse the resize method with the resize event.
 
 You use the resize method when you want your form be resized, by program 
 code. For example, the program loads a picture from disk, and then wants 
 the form to adapt to the size of the picture. So the program issues a 
 me.resize(hPhoto.width, hPhoto.height) (well, not exactly so, but you 
 catch the idea).
 
 The resize event is fired from the external world, and the form waits 
 for it to do something more than merely readjust its children controls.
 If you want to simply rearrange childrens, then a set of powerful 
 features can be used (panels, h/vboxes, expand, ignore...), and chances 
 are that you succed.
 
 So, in the first case, you command the form to resize, and you also have 
 to tell it what sizes to assume. In the second case, the world tells you 
 that the form dimensions are changed; you can read the new dimensions in 
 the Width and Height properties, and take appropriate actions.
 This is why Form.resize() method takes parameters, and Form_Resize() 
 takes none; because the latter case is only a signal, and you can be not 
 interested in the real dimensions, only want to know that the user 
 resized the form.
 
 Apart from this clarification, I had a hard debate with Benoit about 
 embedding forms inside tabstrips. What I remember about the end, is that 
 resize events will not raise. Full stop. I think this is an omission, 
 because when the size of the form changes, a resize event should be 
 fired no matter if the form is child of the desktop or child of a tabstrip.
 
 I tried several way to solve, and found none (well, something could be 
 done by using horrible hacks, which breaked form/tabstrip independency). 
 But a stupid trick could be this one:
 
 Put a timer on the form, and declare two private variables like 
 mywidth and myheight.
 Every second, or whatever, the timer event fires, and you do:
 
 sub timer1_timer()
   if mywidth=me.width and myheight=me.height then return   ' nothing 
 happened
   ' form has been resized
   mywidth = me.width
   myheight = me.height
   ' additional code...
 end
 
 Funny uh?
 
 Salutations,
 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=100url=/
 ___
 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