[Gambas-user] MouseDown event and Gambas3

2011-01-19 Thread Demosthenes Koptsis

Good morning,

the following example is not working in gambas3-svn3475

--
' Gambas class file

Public Function Color() As Integer
  
  Dim Red As Integer
  Dim Green As Integer
  Dim Blue As Integer
  Dim sColor As String
  Dim iColor As Integer
  
  Red = Rnd(0, 256)
  Green = Rnd(0, 256)
  Blue = Rnd(0, 256)
  
  sColor =   Hex(Red, 2)  Hex(Green, 2)  Hex(Blue, 2)  
  Print sColor
  iColor = Val(sColor)
  Return iColor
  
End

Public Sub Form_MouseDown()

  Me.Background = Color()

End
---

The code try to change the bgcolor of Form with random colors on mouse
clicks.

This example is working in Gambas2.

I think Form_MouseDown event is not working or i don't know...

-- 
Regards,
Demosthenes Koptsis.


--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] using echo command within EXEC

2011-01-19 Thread vikram
Hi,

I am using Gambas 2.21, on Debian Squeeze. I am trying to keep a log of the 
things my application does, for instance events like forms opening, errors can 
be logged.

I am thinking of using the SHELL with echo command to write to a log file. 

For example, using SHELL i would use:
SHELL echo \Form1 Entered\Logfile

Could this cause the application to be a resource hog? The only other way I can 
think of to do logging is to use File I/O but that would be a lot of work when 
compated to using SHELL, plus I don't know it will prove to be more of a 
resource hog than using SHELL.

Help!

Thanks in advance,
Regards,
Vikram Nair



  
--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Application logging using SHELL

2011-01-19 Thread vikram
Hi,

I am using Gambas 2.21, on Debian Squeeze. I am trying to keep a log of the 
things my application does, for instance events like forms opening, errors can 
be logged.

I am thinking of using the SHELL with echo command to write to a log file.

For example, using SHELL i would use:
SHELL echo \Form1 Entered\Logfile

Could this cause the application to be a resource hog? The only other way I can 
think of to do logging is to use File I/O but that would be a lot of work when 
compated to using SHELL, plus I don't know it will prove to be more of a 
resource hog than using SHELL.

Help!

Thanks in advance,
Regards,
Vikram Nair

@Mods: kindly delete the earlier thread titled using echo command within 
EXEC, i had sent it with a wrong subject by mistake.



  
--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Application logging using SHELL

2011-01-19 Thread Demosthenes Koptsis
here is an example i did.
if you like it you can use it.


---
' Gambas class file
PUBLIC hLog AS Stream
PUBLIC sFilename AS String = User.Home / .MyLog.txt
PUBLIC sLogEntry AS String

PUBLIC SUB Form_Open()

hLog = OPEN sFilename FOR APPEND 

END

PUBLIC SUB Button1_Click()

  sLogEntry = Button1 was clicked
  WriteToLog(Application.Name   #   Application.Version   #  
Now   #   sLogEntry)

END

PUBLIC SUB WriteToLog(sString AS String)

  PRINT #hLog, sString 

END

PUBLIC SUB Form_Close()
  
  hLog.Close
  
END





On Wed, 2011-01-19 at 02:35 -0800, vikram wrote:
 Hi,
 
 I am using Gambas 2.21, on Debian Squeeze. I am trying to keep a log of the 
 things my application does, for instance events like forms opening, errors 
 can be logged.
 
 I am thinking of using the SHELL with echo command to write to a log file.
 
 For example, using SHELL i would use:
 SHELL echo \Form1 Entered\Logfile
 
 Could this cause the application to be a resource hog? The only other way I 
 can think of to do logging is to use File I/O but that would be a lot of work 
 when compated to using SHELL, plus I don't know it will prove to be more of a 
 resource hog than using SHELL.
 
 Help!
 
 Thanks in advance,
 Regards,
 Vikram Nair
 
 @Mods: kindly delete the earlier thread titled using echo command within 
 EXEC, i had sent it with a wrong subject by mistake.
 
 
 
   
 --
 Protect Your Site and Customers from Malware Attacks
 Learn about various malware tactics and how to avoid them. Understand 
 malware threats, the impact they can have on your business, and how you 
 can protect your company and customers by using code signing.
 http://p.sf.net/sfu/oracle-sfdevnl
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

-- 
Regards,
Demosthenes Koptsis.


Log.tar.gz
Description: application/compressed-tar


.MyLog.txt.tar.gz
Description: application/compressed-tar
--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Gambas2 Application.Dir

2011-01-19 Thread Rolf-Werner Eilert
Just found that with a commandline application started within the IDE, 
Gambas2 will deliver the user's $home for Application.Dir and not the 
directory from the Gambas project. I would have expected the project 
directory.

Example: My project is in /home/user/Gambas2/Project

At least when run on the IDE, Application.Dir will result in /home/user 
and not /home/user/Gambas2/Project

The question is: why? :-)

Regards

Rolf

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Project title not translated

2011-01-19 Thread Emanuele Sottocorno
Hi, not a bug, a minor issue.
The project title does not appear in the translation window. This way if
you set a form Caption = Application.Title it will be in standard
language, regardless the one you selected.
Could be correct?
Regards,
Emanuele


--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] CGI programme with charts

2011-01-19 Thread Vassilis K
Hello Benoit, Dimitri, Doriano and everybody else!

I want to make a kind of astrology programme on a web page with charts,
horoscopes etc,  
You place the date, time and place of birth and get the horoscope chart
and some details of the character...
1.Do you thing that a gambas CGI programme would be suitable for this
purpose?
2.Is there possibility of cooperation with someone of you because I feel
it is beyond my forces?
3.Is it neccesary to be unter GPL licence?. Part of the payment will be
a donation to Gambas. 

I'm waiting for your ideas. 

Vassilis K


--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] MouseDown event and Gambas3

2011-01-19 Thread Matti
Works perfect here, version 3457.

The only thing I did was to rename Color() to RndColor(), because Color is a
gambas class name. Maybe that's the reason why?

Regards
Matti


Am 19.01.2011 10:39, schrieb Demosthenes Koptsis:
 
 Good morning,
 
 the following example is not working in gambas3-svn3475
 
 --
 ' Gambas class file
 
 Public Function Color() As Integer
   
   Dim Red As Integer
   Dim Green As Integer
   Dim Blue As Integer
   Dim sColor As String
   Dim iColor As Integer
   
   Red = Rnd(0, 256)
   Green = Rnd(0, 256)
   Blue = Rnd(0, 256)
   
   sColor =   Hex(Red, 2)  Hex(Green, 2)  Hex(Blue, 2)  
   Print sColor
   iColor = Val(sColor)
   Return iColor
   
 End
 
 Public Sub Form_MouseDown()
 
   Me.Background = Color()
 
 End
 ---
 
 The code try to change the bgcolor of Form with random colors on mouse
 clicks.
 
 This example is working in Gambas2.
 
 I think Form_MouseDown event is not working or i don't know...
 

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] MouseDown event and Gambas3

2011-01-19 Thread Demosthenes Koptsis
ok i change it to RndColor,

nothing
i dont have Mouse Events generally...!

Also other Events of mouse does not work.

--
' Gambas class file

Public Function RndColor() As Integer
  
  Dim Red As Integer
  Dim Green As Integer
  Dim Blue As Integer
  Dim sColor As String
  Dim iColor As Integer
  
  Red = Rnd(0, 256)
  Green = Rnd(0, 256)
  Blue = Rnd(0, 256)
  
  sColor =   Hex(Red, 2)  Hex(Green, 2)  Hex(Blue, 2)  
  Print sColor
  iColor = Val(sColor)
  Return iColor
  
End

Public Sub Form_MouseDown()

  Me.Background = RndColor()

End




On Wed, 2011-01-19 at 19:49 +0100, Matti wrote:
 Works perfect here, version 3457.
 
 The only thing I did was to rename Color() to RndColor(), because Color is a
 gambas class name. Maybe that's the reason why?
 
 Regards
 Matti
 
 
 Am 19.01.2011 10:39, schrieb Demosthenes Koptsis:
  
  Good morning,
  
  the following example is not working in gambas3-svn3475
  
  --
  ' Gambas class file
  
  Public Function Color() As Integer

Dim Red As Integer
Dim Green As Integer
Dim Blue As Integer
Dim sColor As String
Dim iColor As Integer

Red = Rnd(0, 256)
Green = Rnd(0, 256)
Blue = Rnd(0, 256)

sColor =   Hex(Red, 2)  Hex(Green, 2)  Hex(Blue, 2)  
Print sColor
iColor = Val(sColor)
Return iColor

  End
  
  Public Sub Form_MouseDown()
  
Me.Background = Color()
  
  End
  ---
  
  The code try to change the bgcolor of Form with random colors on mouse
  clicks.
  
  This example is working in Gambas2.
  
  I think Form_MouseDown event is not working or i don't know...
  
 
 --
 Protect Your Site and Customers from Malware Attacks
 Learn about various malware tactics and how to avoid them. Understand 
 malware threats, the impact they can have on your business, and how you 
 can protect your company and customers by using code signing.
 http://p.sf.net/sfu/oracle-sfdevnl
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

-- 
Regards,
Demosthenes


--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] MouseDown event and Gambas3

2011-01-19 Thread Fabien Bodard
2011/1/19 Matti math.e...@t-online.de:
 Works perfect here, version 3457.

 The only thing I did was to rename Color() to RndColor(), because Color is a
 gambas class name. Maybe that's the reason why?
IT's the reason why ! : :)



 Regards
 Matti


 Am 19.01.2011 10:39, schrieb Demosthenes Koptsis:

 Good morning,

 the following example is not working in gambas3-svn3475

 --
 ' Gambas class file

 Public Function Color() As Integer

   Dim Red As Integer
   Dim Green As Integer
   Dim Blue As Integer
   Dim sColor As String
   Dim iColor As Integer

   Red = Rnd(0, 256)
   Green = Rnd(0, 256)
   Blue = Rnd(0, 256)

   sColor =   Hex(Red, 2)  Hex(Green, 2)  Hex(Blue, 2)  
   Print sColor
   iColor = Val(sColor)
   Return iColor

 End

 Public Sub Form_MouseDown()

   Me.Background = Color()

 End
 ---

 The code try to change the bgcolor of Form with random colors on mouse
 clicks.

 This example is working in Gambas2.

 I think Form_MouseDown event is not working or i don't know...


 --
 Protect Your Site and Customers from Malware Attacks
 Learn about various malware tactics and how to avoid them. Understand
 malware threats, the impact they can have on your business, and how you
 can protect your company and customers by using code signing.
 http://p.sf.net/sfu/oracle-sfdevnl
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user




-- 
Fabien Bodard

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Project title not translated

2011-01-19 Thread Benoît Minisini
 Hi, not a bug, a minor issue.
 The project title does not appear in the translation window. This way if
 you set a form Caption = Application.Title it will be in standard
 language, regardless the one you selected.
 Could be correct?
 Regards,
 Emanuele
 

I think it should be fixed in revision #3479 of Gambas 3, but I'm not 100% 
sure. Can you confirm?

-- 
Benoît Minisini

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gb.qte

2011-01-19 Thread Benoît Minisini
 Can someone tell me what the trick is to get gb.gte to pass the
 configure script. I'm pretty sure I have all the dependencies required
 installed. (libqt3-mt-dev_3.3.8-b-6ubuntu2_i386.deb)
 
 
 Ubuntu 32 10.10
 

You can safely ignore the compilation of gb.qte. Unless you find the libqte 
library somewhere!

I've never found it. I did that on a user request, but always use fake 
libraries to make the Gambas package. That component has been removed in 
Gambas 3 anyway.

Regards,

-- 
Benoît Minisini

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas API options

2011-01-19 Thread Benoît Minisini
 Hi List,
 
 Does Gambas provide a API other languages can access? (shared object) I
 would like to create the framework for an application in Gambas and
 interface with it with ScriptBasic. The .so libraries I did peek at
 didn't seem to have anything useful exported.
 
 
 The following link will show a few examples of scripting libraries and
 embedding.
 
 http://www.scriptbasic.org/forum/index.php/topic,211.0.html
 
 John
 

What do you want to do ?

Call a ScriptBasic program from a Gambas program?

Or call a Gambas program from a ScriptBasic program?

-- 
Benoît Minisini

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Form Key press event raised twice?

2011-01-19 Thread Benoît Minisini
 Hi,
 
 New project with new FMain:
 
 PUBLIC SUB Form_KeyPress()
   PRINT Key.Code, Key.Text
 END
 
 In run-time, when I press a key, eg. 'a', I get:
 
 97  a
 97  a
 
 Gambas 2.22, Fedora 14
 I want to know if it's a bug?. If it's a bug, it will be fixed, so I wait.
 But if it's a feature, I have to change some code..
 
 
 Best regards.

I think it is a bug...

-- 
Benoît Minisini

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gui question = menu shadow left on screen after click

2011-01-19 Thread Benoît Minisini
 On Monday 10 January 2011 08:04:26 Benoît Minisini wrote:
   Hi list
   
   Enclosed is picture - when I click on  a menu item, and the code
   attatched to a menu item
  
  attached how ? Where ?
 
 to explain further
 
 Menu may have several items:
 -- display result
 -- delete document
 -- display audit trail
 
 etc.
 
 I've quickly made this code up to illustrate:
 
 public sub mnu_click()
 
 Select case  last.tag
   case show result
   Webbrowser1.html = shtml
   case delete
   case audit trail
   Audit_Trail_Show()
 End select
 end
 
 Public sub Audit_Trail_Show()
   ... do lots of stuff in here
   ... eg.  database queries
   ... prepare html
   .. show in webview etc
 end
 
 Now, because say show result is really quick, the code executes, the spot
 on the screen where the menu wndow was is removed by gambas or whatever
 and no shadow appears
 
 The code under Audit_Trail_Show() is alot slower, and it seems to be
 executed first completely, before gambas decides to refresh the screen
 area where the menu was occupying, so that a gray area remains on the
 screen as per the picture until the screen is refreshed, which seems to
 take place after the Audit_Trail_Show occurs.
 
 Does that make more sense?
 
 rEgards
 
 Richard
 

I can't reproduce that behaviour with Gambas 3. The GUI under the menu is 
correctly refreshed before the heavy process starts.

Did you try with different widget styles?

-- 
Benoît Minisini

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Balloon no more displayed

2011-01-19 Thread Benoît Minisini
 Hi Benoît,
 return to this after a while because it seems not a compiz related
 problem, or at least, not only.
 If your first opened Form isn't the FMAIN and is Modal then the balloon
 is hidden by the form. If you open the FMAIN and then open a Modal Form
 the balloon is corretly displayed.
 The attached sample demonstrate the problem. Run it and you can see the
 balloon moving the Form1 apart; then set the FMain as start up class and
 now the balloon is visible.
 Regards,
 Emanuele
 

What I see is normal (with KDE4  KWin). Note that your modal form is stacked 
below, so you can't see it anyway, unless every other window is minimized.

Regards,

-- 
Benoît Minisini

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] MouseDown event and Gambas3

2011-01-19 Thread Demosthenes Koptsis
i attach the project.

gambas3-svn3442 @ x32
gambas3-svn3475 @ x64

ubuntu, gtk

none of mouse events are working.

On Thu, 2011-01-20 at 02:27 +0100, Benoît Minisini wrote:
  Good morning,
  
  the following example is not working in gambas3-svn3475
  
  --
  ' Gambas class file
  
  Public Function Color() As Integer
  
Dim Red As Integer
Dim Green As Integer
Dim Blue As Integer
Dim sColor As String
Dim iColor As Integer
  
Red = Rnd(0, 256)
Green = Rnd(0, 256)
Blue = Rnd(0, 256)
  
sColor =   Hex(Red, 2)  Hex(Green, 2)  Hex(Blue, 2)  
Print sColor
iColor = Val(sColor)
Return iColor
  
  End
  
  Public Sub Form_MouseDown()
  
Me.Background = Color()
  
  End
  ---
  
  The code try to change the bgcolor of Form with random colors on mouse
  clicks.
  
  This example is working in Gambas2.
  
  I think Form_MouseDown event is not working or i don't know...
 
 Plase provide a full project as much as possible.
 
 Regards,
 

-- 
Regards,
Demosthenes


RndColor.tar.bz2
Description: application/bzip-compressed-tar
--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user