Re: [Gambas-user] About arrays

2010-11-24 Thread Demosthenes Koptsis
Good morning to all,

write this code to see something strange

DIM aInt2[1] AS String

PRINT IsObject(aInt2)

Gambas2-2.21 rev3300
Ubuntu 10.04, AMD64



--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] IsObject(NULL)

2010-11-24 Thread Demosthenes Koptsis

hi,

PRINT IsObject(NULL)

returns
TRUE

The NULL constant is an object?

-- 
Regards,
Demosthenes Koptsis.


--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] About arrays

2010-11-24 Thread Fabien Bodard
2010/11/24 Demosthenes Koptsis demosthen...@gmail.com:
 Good morning to all,

 write this code to see something strange

 DIM aInt2[1] AS String

 PRINT IsObject(aInt2)

 Gambas2-2.21 rev3300
 Ubuntu 10.04, AMD64

that ?

False

*** glibc detected *** menudyn: double free or corruption (fasttop):
0x0217beb0 ***


So isobject work correctly ... it is not an object ... it's an embedded array.

but for the rest ... yes it is not 'normal'

-- 
Fabien Bodard

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] About arrays

2010-11-24 Thread Benoît Minisini
 Good morning to all,
 
 write this code to see something strange
 
 DIM aInt2[1] AS String
 
 PRINT IsObject(aInt2)
 
 Gambas2-2.21 rev3300
 Ubuntu 10.04, AMD64
 

I see nothing strange.

-- 
Benoît Minisini

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] IsObject(NULL)

2010-11-24 Thread Fabien Bodard
2010/11/24 Demosthenes Koptsis demosthen...@gmail.com:

 hi,

 PRINT IsObject(NULL)

 returns
 TRUE

 The NULL constant is an object?

nead the help please !

http://gambasdoc.org/help/lang/isobject


 --
 Regards,
 Demosthenes Koptsis.


 --
 Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
 Tap into the largest installed PC base  get more eyes on your game by
 optimizing for Intel(R) Graphics Technology. Get started today with the
 Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
 http://p.sf.net/sfu/intelisp-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user




-- 
Fabien Bodard

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] About arrays

2010-11-24 Thread Benoît Minisini
  Good morning to all,
  
  write this code to see something strange
  
  DIM aInt2[1] AS String
  
  PRINT IsObject(aInt2)
  
  Gambas2-2.21 rev3300
  Ubuntu 10.04, AMD64
 
 I see nothing strange.

Ah yes, I got the double free error.

-- 
Benoît Minisini

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] About arrays

2010-11-24 Thread Benoît Minisini
   Good morning to all,
   
   write this code to see something strange
   
   DIM aInt2[1] AS String
   
   PRINT IsObject(aInt2)
   
   Gambas2-2.21 rev3300
   Ubuntu 10.04, AMD64
  
  I see nothing strange.
 
 Ah yes, I got the double free error.

Mmm. I'm not sure I will be able to fix that in Gambas 2.

Gambas 3 should be stronger against that, as embedded arrays are accessed 
through internal temporary objects (i.e. IsObject(EmbeddedArray) will return 
TRUE).

-- 
Benoît Minisini

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] IsObject(NULL)

2010-11-24 Thread Benoît Minisini
 hi,
 
 PRINT IsObject(NULL)
 
 returns
 TRUE
 
 The NULL constant is an object?

NULL is almost everything. So IsObject(Null) and IsString(Null) returns TRUE. 
But IsDate(Null) returns FALSE, whereas Null can be a date.

So things are not very logical there.

-- 
Benoît Minisini

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command

2010-11-24 Thread vikram
Hi,

Heres how i fixed it, hope it is the right way to display a wait cursor 
while a process executes.

-
FMain.Mouse = Mouse.Wait
WAIT 
Application.Busy = 1

SHELL sha512sum lenny.iso TO actualSUM

Application.Busy = 0
FMain.Mouse = Mouse.Default
-

I read If you call WAIT from an event handler, you may create infinite 
recursions, and then stack overflows from the Docs, i hope it wouldn't be an 
issue in this case (i.e., if i were to use WAIT for the click event of a 
Button).

Regards,
Vikram


  
--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Removing / Modifying IsXXXX() functions in Gambas 3

2010-11-24 Thread Benoît Minisini
Hi,

I'm currently thinking about modifying/removing all Is() functions in 
Gambas 3.

They mainly test the datatype of their expression. So, either the datatype is 
known at compile time, and there should be no need of testing it ; either you 
are using a Variant, and you can use TypeOf() to get the datatype of the 
value.

I will replace them by some functions that will test if a value can be 
converted safely from a string by using localization. This is what most users 
expected from these functions.

For exemple, in french localization:

IsDate(13/2/20) - True
IsNumber(3,34) - True
IsInteger(3,34) - False
IsNumber(3.34) - False

Internally, they will use Val() and see if the conversion works.

I will kept most of the name, so there will be a big incompatibility between 
Gambas 2, current Gambas 3, and final Gambas 3.

What do you think about that? 

Who is using the Is() functions, and in which context?

-- 
Benoît Minisini

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command

2010-11-24 Thread Benoît Minisini
 Hi,
 
 Heres how i fixed it, hope it is the right way to display a wait cursor
 while a process executes.
 
 -
 FMain.Mouse = Mouse.Wait
 WAIT
 Application.Busy = 1
 
 SHELL sha512sum lenny.iso TO actualSUM
 
 Application.Busy = 0
 FMain.Mouse = Mouse.Default
 -
 
 I read If you call WAIT from an event handler, you may create infinite
 recursions, and then stack overflows from the Docs, i hope it wouldn't be
 an issue in this case (i.e., if i were to use WAIT for the click event of
 a Button).
 
 Regards,
 Vikram
 

Setting FMain.Mouse and calling WAIT is useless. Application.Busy should 
already set the busy cursor for every widget in the application. Otherwise 
this is a bug.

Regards,

-- 
Benoît Minisini

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] IsObject(NULL)

2010-11-24 Thread Demosthenes Koptsis
sorry...

i ll be more careful next time.

On Wed, 2010-11-24 at 11:53 +0100, Fabien Bodard wrote:
 2010/11/24 Demosthenes Koptsis demosthen...@gmail.com:
 
  hi,
 
  PRINT IsObject(NULL)
 
  returns
  TRUE
 
  The NULL constant is an object?
 
 nead the help please !
 
 http://gambasdoc.org/help/lang/isobject
 
 
  --
  Regards,
  Demosthenes Koptsis.
 
 
  --
  Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
  Tap into the largest installed PC base  get more eyes on your game by
  optimizing for Intel(R) Graphics Technology. Get started today with the
  Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
  http://p.sf.net/sfu/intelisp-dev2dev
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 
 
 

-- 
Regards,
Demosthenes


--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas 3

2010-11-24 Thread Ron
On 24-11-2010 12:08, Benoît Minisini wrote:
 Hi,

 I'm currently thinking about modifying/removing all Is() functions in
 Gambas 3.

 They mainly test the datatype of their expression. So, either the datatype is
 known at compile time, and there should be no need of testing it ; either you
 are using a Variant, and you can use TypeOf() to get the datatype of the
 value.

 I will replace them by some functions that will test if a value can be
 converted safely from a string by using localization. This is what most users
 expected from these functions.

 For exemple, in french localization:

   IsDate(13/2/20) -  True
   IsNumber(3,34) -  True
   IsInteger(3,34) -  False
   IsNumber(3.34) -  False
   
 Internally, they will use Val() and see if the conversion works.

 I will kept most of the name, so there will be a big incompatibility between
 Gambas 2, current Gambas 3, and final Gambas 3.

 What do you think about that?

 Who is using the Is() functions, and in which context?


I use these in my project, a lot less than expected at first:

Bluetooth.module:IF IsInteger(Val(sRSSI)) THEN
Bluetooth.module:  iRSSI = IsInteger(Val(sRSSI))
Events.module:  IF rResult!rerunenabled = TRUE AND IF 
IsDate(rResult!lastrun) THEN
Events.module:  IF IsBoolean(sValue) THEN sValue = Main.DisplayBool(sValue)
Events.module:  IF IsBoolean(sCond) THEN sCond = Main.DisplayBool(sCond)
Events.module:  ELSE IF IsBoolean(vResult) THEN
JSON.module:  IF NOT IsLetter(sCar) THEN RETURN sCar
JSON.module:IF NOT IsLetter(sCar) THEN
JSON.module:  IF IsNull(vNumber) THEN Error.Raise(Incorrect number)
JSON.module:  ELSE IF sCar = - OR IF IsDigit(sCar) THEN
Mail.module:IF IsString(Main.GlobalVar[Minute]) THEN 
Main.GlobalVar[Minute] = Val(Main.GlobalVar[Minute])
Main.module:  IF NOT IsNull(vValue) THEN
Main.module:IF IsNumber(Val(tv[k, col].Text)) THEN
Main.module:IF IsNumber(Val(gv[k, col].Text)) THEN
Main.module:PUBLIC FUNCTION IsTime(sString AS String) AS Boolean
Main.module:PUBLIC FUNCTION IsBool(sStr AS String) AS Boolean
CDenon.class:  IF IsInteger(sValue) THEN
CDenon.class:  IF IsInteger(sValue) THEN
CDenon.class:  IF IsNull(Val(sZonecat)) THEN
CRFXComRX.class:IF IsDigit(Hex(RecBuf[4])) AND IF 
IsDigit(Hex(Lsr(RecBuf[3], 4))) THEN
CSqueezeServer.class:ELSE IF IsLetter(sCar) OR IF IsDigit(sCar) OR 
IF InStr(*-._, sCar) THEN
FConditionEditor.class:  IF NOT 
(Main.IsBool(Events.EvalFormula(taFormula.Text))) THEN
FConditionEditor.class:  IF IsBoolean(vVal) THEN
FDebug.class:IF IsBoolean(vValue) THEN
FTriggerEditor.class:IF IsBoolean(Main.GlobalVar[cmbVariables.Text]) 
THEN
FTriggerEditor.class:ELSE IF NOT 
IsNumber(Main.GlobalVar[cmbVariables.Text]) THEN
FTriggerEditor.class:IF IsNumber(Val(txtDeviceValue.Text)) THEN

Regards,
Ron_2nd.

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] IsObject(NULL)

2010-11-24 Thread Fabien Bodard
Le 24 novembre 2010 11:59, Benoît Minisini
gam...@users.sourceforge.net a écrit :
 hi,

 PRINT IsObject(NULL)

 returns
 TRUE

 The NULL constant is an object?

 NULL is almost everything. So IsObject(Null) and IsString(Null) returns TRUE.
 But IsDate(Null) returns FALSE, whereas Null can be a date.

 So things are not very logical there.

I think too .. as i can't use a null as an object so it is not an
object... but it depend if isobject test the variable type or the
content.

For exemple
dim o as object

isobject(o) will return true even if o is null... o can only be an object

but
dim v as variant

is object(v) will return false if it is null ... it can be anything


in my mind it will work like that ...



 --
 Benoît Minisini

 --
 Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
 Tap into the largest installed PC base  get more eyes on your game by
 optimizing for Intel(R) Graphics Technology. Get started today with the
 Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
 http://p.sf.net/sfu/intelisp-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user




-- 
Fabien Bodard

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command

2010-11-24 Thread Ron
On 24-11-2010 12:09, Benoît Minisini wrote:
 Hi,

 Heres how i fixed it, hope it is the right way to display a wait cursor
 while a process executes.

 -
 FMain.Mouse = Mouse.Wait
 WAIT
 Application.Busy = 1

 SHELL sha512sum lenny.iso TO actualSUM

 Application.Busy = 0
 FMain.Mouse = Mouse.Default
 -

 I read If you call WAIT from an event handler, you may create infinite
 recursions, and then stack overflows from the Docs, i hope it wouldn't be
 an issue in this case (i.e., if i were to use WAIT for the click event of
 a Button).

 Regards,
 Vikram

 Setting FMain.Mouse and calling WAIT is useless. Application.Busy should
 already set the busy cursor for every widget in the application. Otherwise
 this is a bug.

 Regards,


That was what I thought too, but Application.Busy alone is not showing a 
busy pointer (anymore?) on latest gambas 2 and Ubuntu 10.04 with gb.qt

Regards,
Ron_2nd.

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas 3

2010-11-24 Thread richard terry
On Wednesday 24 November 2010 22:08:34 Benoît Minisini wrote:

Hi Benoit I use isDate() quite a lot, isNumber I think once

Regards
richard

 Hi,
 
 I'm currently thinking about modifying/removing all Is() functions in
 Gambas 3.
 
 They mainly test the datatype of their expression. So, either the datatype
  is known at compile time, and there should be no need of testing it ;
  either you are using a Variant, and you can use TypeOf() to get the
  datatype of the value.
 
 I will replace them by some functions that will test if a value can be
 converted safely from a string by using localization. This is what most
  users expected from these functions.
 
 For exemple, in french localization:
 
   IsDate(13/2/20) - True
   IsNumber(3,34) - True
   IsInteger(3,34) - False
   IsNumber(3.34) - False
 
 Internally, they will use Val() and see if the conversion works.
 
 I will kept most of the name, so there will be a big incompatibility
  between Gambas 2, current Gambas 3, and final Gambas 3.
 
 What do you think about that?
 
 Who is using the Is() functions, and in which context?
 

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] IsObject(NULL)

2010-11-24 Thread Bruce Bruen
On Wed, 24 Nov 2010 06:51:50 pm Demosthenes Koptsis wrote:
 hi,
 
 PRINT IsObject(NULL)
 
 returns
 TRUE
 
 The NULL constant is an object?

I really don't see a problem here.  
Directly from the help:
IsObject 
Syntax
bRes = IsObject ( vRef ) AS Booelan
bRes = Object? ( vRef ) AS Boolean
Returns TRUE if the vRef is an object or a null reference.
IsObject(NULL) doesn't refer to the NULL constant being an object, it is 
answering correctly that a vRef=NULL is a null reference!

-- 
best regards
Bruce Bruen
--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3

2010-11-24 Thread Benoît Minisini
 On 24-11-2010 12:08, Benoît Minisini wrote:
  Hi,
  
  I'm currently thinking about modifying/removing all Is() functions in
  Gambas 3.
  
  They mainly test the datatype of their expression. So, either the
  datatype is known at compile time, and there should be no need of
  testing it ; either you are using a Variant, and you can use TypeOf() to
  get the datatype of the value.
  
  I will replace them by some functions that will test if a value can be
  converted safely from a string by using localization. This is what most
  users expected from these functions.
  
  For exemple, in french localization:
  IsDate(13/2/20) -  True
  IsNumber(3,34) -  True
  IsInteger(3,34) -  False
  IsNumber(3.34) -  False
  
  Internally, they will use Val() and see if the conversion works.
  
  I will kept most of the name, so there will be a big incompatibility
  between Gambas 2, current Gambas 3, and final Gambas 3.
  
  What do you think about that?
  
  Who is using the Is() functions, and in which context?
 
 I use these in my project, a lot less than expected at first:
 
 Bluetooth.module:IF IsInteger(Val(sRSSI)) THEN
 Bluetooth.module:  iRSSI = IsInteger(Val(sRSSI))
 Events.module:  IF rResult!rerunenabled = TRUE AND IF
 IsDate(rResult!lastrun) THEN
 Events.module:  IF IsBoolean(sValue) THEN sValue = Main.DisplayBool(sValue)
 Events.module:  IF IsBoolean(sCond) THEN sCond = Main.DisplayBool(sCond)
 Events.module:  ELSE IF IsBoolean(vResult) THEN
 JSON.module:  IF NOT IsLetter(sCar) THEN RETURN sCar
 JSON.module:IF NOT IsLetter(sCar) THEN
 JSON.module:  IF IsNull(vNumber) THEN Error.Raise(Incorrect number)
 JSON.module:  ELSE IF sCar = - OR IF IsDigit(sCar) THEN
 Mail.module:IF IsString(Main.GlobalVar[Minute]) THEN
 Main.GlobalVar[Minute] = Val(Main.GlobalVar[Minute])
 Main.module:  IF NOT IsNull(vValue) THEN
 Main.module:IF IsNumber(Val(tv[k, col].Text)) THEN
 Main.module:IF IsNumber(Val(gv[k, col].Text)) THEN
 Main.module:PUBLIC FUNCTION IsTime(sString AS String) AS Boolean
 Main.module:PUBLIC FUNCTION IsBool(sStr AS String) AS Boolean
 CDenon.class:  IF IsInteger(sValue) THEN
 CDenon.class:  IF IsInteger(sValue) THEN
 CDenon.class:  IF IsNull(Val(sZonecat)) THEN
 CRFXComRX.class:IF IsDigit(Hex(RecBuf[4])) AND IF
 IsDigit(Hex(Lsr(RecBuf[3], 4))) THEN
 CSqueezeServer.class:ELSE IF IsLetter(sCar) OR IF IsDigit(sCar) OR
 IF InStr(*-._, sCar) THEN
 FConditionEditor.class:  IF NOT
 (Main.IsBool(Events.EvalFormula(taFormula.Text))) THEN
 FConditionEditor.class:  IF IsBoolean(vVal) THEN
 FDebug.class:IF IsBoolean(vValue) THEN
 FTriggerEditor.class:IF IsBoolean(Main.GlobalVar[cmbVariables.Text])
 THEN
 FTriggerEditor.class:ELSE IF NOT
 IsNumber(Main.GlobalVar[cmbVariables.Text]) THEN
 FTriggerEditor.class:IF IsNumber(Val(txtDeviceValue.Text)) THEN
 
 Regards,
 Ron_2nd.
 

When you do IsNumber(Val(...)), you actually want the new behaviour I want to 
implement: checking if a string can be safely converted to what you want. In 
the new syntax, you will directly do IsNumber(...).

The IsDigit(), IsLetter()... functions are not concerned by the change.

IsNull() will be kept unchanged.

Then, please tell me what you are testing exactly with these lines:

Events.module:  IF rResult!rerunenabled = TRUE AND IF 
IsDate(rResult!lastrun) THEN
Events.module:  IF IsBoolean(sValue) THEN sValue = Main.DisplayBool(sValue)
Events.module:  IF IsBoolean(sCond) THEN sCond = Main.DisplayBool(sCond)
Events.module:  ELSE IF IsBoolean(vResult) THEN
Mail.module:IF IsString(Main.GlobalVar[Minute]) THEN
Main.GlobalVar[Minute] = Val(Main.GlobalVar[Minute])
CDenon.class:  IF IsInteger(sValue) THEN
CDenon.class:  IF IsInteger(sValue) THEN
FConditionEditor.class:  IF IsBoolean(vVal) THEN
FDebug.class:IF IsBoolean(vValue) THEN
FTriggerEditor.class:IF IsBoolean(Main.GlobalVar[cmbVariables.Text])
THEN
FTriggerEditor.class:ELSE IF NOT
IsNumber(Main.GlobalVar[cmbVariables.Text]) THEN

Thanks in advance.

-- 
Benoît Minisini

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3

2010-11-24 Thread Benoît Minisini
 On Wednesday 24 November 2010 22:08:34 Benoît Minisini wrote:
 
 Hi Benoit I use isDate() quite a lot, isNumber I think once
 
 Regards
 richard
 

In which context exactly?

-- 
Benoît Minisini

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] IsObject(NULL)

2010-11-24 Thread Demosthenes Koptsis
i will describe my thoughts about that,

i read the

http://gambasdoc.org/help/cat/constants

and i saw that a TRUE or FALSE value is a Language constant.
Also NULL is a Language constant!

So i expected from IsObject() to return FALSE when it is feed with
constants as argument.

So
PRINT IsObject(TRUE)   'False
PRINT IsObject(FALSE)  'False
PRINT IsObject(0)  'False
PRINT IsObject(a string) 'False

But
PRINT IsObject(NULL)   'True

Some more thoughts..
In wiki says that NULL is a void string
and indeed...

PRINT IsObject()  'True

1) But what if someone want to check a void string?
2) How a 
   PRINT IsObject(a string) 'is False
   and a 
   PRINT IsObject() 'is not False

both are strings and not Objects.


On Wed, 2010-11-24 at 12:21 +0100, Fabien Bodard wrote:
 Le 24 novembre 2010 11:59, Benoît Minisini
 gam...@users.sourceforge.net a écrit :
  hi,
 
  PRINT IsObject(NULL)
 
  returns
  TRUE
 
  The NULL constant is an object?
 
  NULL is almost everything. So IsObject(Null) and IsString(Null) returns 
  TRUE.
  But IsDate(Null) returns FALSE, whereas Null can be a date.
 
  So things are not very logical there.
 
 I think too .. as i can't use a null as an object so it is not an
 object... but it depend if isobject test the variable type or the
 content.
 
 For exemple
 dim o as object
 
 isobject(o) will return true even if o is null... o can only be an object
 
 but
 dim v as variant
 
 is object(v) will return false if it is null ... it can be anything
 
 
 in my mind it will work like that ...
 
 
 
  --
  Benoît Minisini
 
  --
  Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
  Tap into the largest installed PC base  get more eyes on your game by
  optimizing for Intel(R) Graphics Technology. Get started today with the
  Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
  http://p.sf.net/sfu/intelisp-dev2dev
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 
 
 

-- 
Regards,
Demosthenes


--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] IsObject(NULL)

2010-11-24 Thread Benoît Minisini
 i will describe my thoughts about that,
 
 i read the
 
 http://gambasdoc.org/help/cat/constants
 
 and i saw that a TRUE or FALSE value is a Language constant.
 Also NULL is a Language constant!
 
 So i expected from IsObject() to return FALSE when it is feed with
 constants as argument.
 
 So
 PRINT IsObject(TRUE)   'False
 PRINT IsObject(FALSE)  'False
 PRINT IsObject(0)  'False
 PRINT IsObject(a string) 'False
 
 But
 PRINT IsObject(NULL)   'True
 
 Some more thoughts..
 In wiki says that NULL is a void string
 and indeed...
 
 PRINT IsObject()'True
 
 1) But what if someone want to check a void string?
 2) How a
PRINT IsObject(a string) 'is False
and a
PRINT IsObject() 'is not False
 
 both are strings and not Objects.
 

In Gambas, NULL and the void string are the same thing.

-- 
Benoît Minisini

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] IsObject(NULL)

2010-11-24 Thread Demosthenes Koptsis
On Wed, 2010-11-24 at 21:57 +1030, Bruce Bruen wrote:
 Returns TRUE if the vRef is an object or a null reference.
 IsObject(NULL) doesn't refer to the NULL constant being an object, it is 
 answering correctly that a vRef=NULL is a null reference!
 

yes i saw now the help about NULL reference or an object.

But IsObject(NULL) i think is different from IsObject(oMyNullObject)
The first is the constant the second is a NULL object.

Also see IsObject() which here is a empty string.

If i am wrong please correct me.

-- 
Regards,
Demosthenes


--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] IsObject(NULL)

2010-11-24 Thread Demosthenes Koptsis
On Wed, 2010-11-24 at 12:21 +0100, Fabien Bodard wrote:

 For exemple
 dim o as object
 
 isobject(o) will return true even if o is null... o can only be an object
 
 but
 dim v as variant
 
 is object(v) will return false if it is null ... it can be anything

hm... i checked this in Gambas2-2.21

DIM v AS Variant = NULL

PRINT IsObject(v) 'True

i see that, if something is NULL is recognized as object anyway.

-- 
Regards,
Demosthenes


--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Print html direct?

2010-11-24 Thread Gregor Burck
Hi,

I'm still experimenting with printing, the scale method was a good hint for me.
But now a other question:
Can I direct print html? 
The background:
I try to improve a application, and I wonder if it is esyer to generate html 
instead of print direkt, cause there are elements for layout.
In this case I want to improve the print of an invoicment, so I need a head, 
tables blocks,... on idea is to generate the html code with css 
and open it with the system browser, other is to print html direct from gambas?

In the moment I prever the first solution,...

Any additional Ideas?

Gregor
-- 




--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Print html direct?

2010-11-24 Thread charlesg

Hi


Gregor Burck wrote:
 
 Can I direct print html? 
 

I shell to htmldoc to turn the html to pdf.
e.g. 
shll = htmldoc --bodyfont Sans --fontsize 6.0 --outfile  
Application.path  /tfc.pdf --webpage   Application.path  /tfc.htm 
SHELL shll WAIT
then:
shll = lpr   Application.path  /tfc.pdf
shell shll wait
-- 
View this message in context: 
http://old.nabble.com/Print-html-direct--tp30296474p30296557.html
Sent from the gambas-user mailing list archive at Nabble.com.


--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] IsObject(NULL)

2010-11-24 Thread Demosthenes Koptsis
On Wed, 2010-11-24 at 21:57 +1030, Bruce Bruen wrote: 
 I really don't see a problem here.  
 Directly from the help:
 IsObject 
 Returns TRUE if the vRef is an object or a null reference.
 IsObject(NULL) doesn't refer to the NULL constant being an object, it is 
 answering correctly that a vRef=NULL is a null reference!
 

ok, may be Bruce is right here,

NULL can be a reference to a NULL object but also a Variant or a Dynamic
array or anything with a NULL reference.

So IsObject() cannot determine the reference to object but to a NULL
reference.

i was just thinking if there is a way the IsObject() can be more
accurate if something is NULL object or anything else.

I was thinking
if it was a NULL object, ok it is an object
If it was anything else NULL, is not an object

for example

DIM aStrings AS String[] 'is a null object
PRINT IsObject(aStrings) 'True

DIM v AS Variant = NULL
PRINT IsObject(v) 'here i expected false

i tried to determine this difference with TypeOf

DIM aStrings AS String[] 'is a null object
PRINT TypeOf(aStrings)  'but i get 15 NULL value

DIM v AS Variant = NULL
PRINT TypeOf(v) 'again 15 NULL value instead 11

so i think there is no way to make difference of objects or anything
else if they are NULL.


-- 
Regards,
Demosthenes



--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas 3

2010-11-24 Thread Bruce Bruen
On Wed, 24 Nov 2010 09:38:34 pm Benoît Minisini wrote:
 Hi,
 
 I'm currently thinking about modifying/removing all Is() functions in
 Gambas 3.
 
 They mainly test the datatype of their expression. So, either the datatype
 is known at compile time, and there should be no need of testing it ;
 either you are using a Variant, and you can use TypeOf() to get the
 datatype of the value.
 
 I will replace them by some functions that will test if a value can be
 converted safely from a string by using localization. This is what most
 users expected from these functions.
 
 For exemple, in french localization:
 
   IsDate(13/2/20) - True
   IsNumber(3,34) - True
   IsInteger(3,34) - False
   IsNumber(3.34) - False
 
 Internally, they will use Val() and see if the conversion works.
 
 I will kept most of the name, so there will be a big incompatibility
 between Gambas 2, current Gambas 3, and final Gambas 3.
 
 What do you think about that?
 
 Who is using the Is() functions, and in which context?

Benoît,

MAJOR PANIC!  I use IsNumber extensively to do quick checks on field parsing 
across heterogeneous databases.  Using the 80-20 rule I can parse text fields 
for junk appendices to an expected numeric. 
Code such as 

vItem=split(result!note, ,NULL,TRUE)[0]
   IF IsNumber(vItem) THEN RETURN Val(vItem)
' else begin parsing diabolical note structure
.

abounds.

Please reconsider this.

-- 
best regards
Bruce Bruen

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3

2010-11-24 Thread Benoît Minisini
 
 Benoît,
 
 MAJOR PANIC!  I use IsNumber extensively to do quick checks on field
 parsing across heterogeneous databases.  Using the 80-20 rule I can parse
 text fields for junk appendices to an expected numeric.
 Code such as
 
   vItem=split(result!note, ,NULL,TRUE)[0]
IF IsNumber(vItem) THEN RETURN Val(vItem)
 ' else begin parsing diabolical note structure
 .
 
 abounds.
 
 Please reconsider this.

Then you are using IsNumber() the wrong way: in your code, vItem is a string 
(I guess), and so IsNumber(vItem) will always return FALSE.

You used IsNumber() as if it would tell you if a string can be converted to a 
number, which it does not at the moment! And which is exactly what I want to 
change!

-- 
Benoît Minisini

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Print html direct?

2010-11-24 Thread Rolf-Werner Eilert
Am 24.11.2010 13:54, schrieb charlesg:

 Hi


 Gregor Burck wrote:

 Can I direct print html?


 I shell to htmldoc to turn the html to pdf.
 e.g.
 shll = htmldoc --bodyfont Sans --fontsize 6.0 --outfile 
 Application.path  /tfc.pdf --webpage   Application.path  /tfc.htm
 SHELL shll WAIT
 then:
 shll = lpr   Application.path  /tfc.pdf
 shell shll wait

This is really cool dude :-) I'll print it and pin it on my wall, will 
certainly be used next time I've got to do something like this!

By the way, htmldoc doesn't seem to be on my system, do you know where 
it comes from?

Regards

Rolf


--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Print html direct?

2010-11-24 Thread Dimitris Anogiatis
Hey guys,

Does htmldoc have any UTF-8 support?

Regards,
Dimitrios


On Wed, Nov 24, 2010 at 7:36 AM, Rolf-Werner Eilert 
eilert-sprac...@t-online.de wrote:

 Am 24.11.2010 13:54, schrieb charlesg:
 
  Hi
 
 
  Gregor Burck wrote:
 
  Can I direct print html?
 
 
  I shell to htmldoc to turn the html to pdf.
  e.g.
  shll = htmldoc --bodyfont Sans --fontsize 6.0 --outfile 
  Application.path  /tfc.pdf --webpage   Application.path  /tfc.htm
  SHELL shll WAIT
  then:
  shll = lpr   Application.path  /tfc.pdf
  shell shll wait

 This is really cool dude :-) I'll print it and pin it on my wall, will
 certainly be used next time I've got to do something like this!

 By the way, htmldoc doesn't seem to be on my system, do you know where
 it comes from?

 Regards

 Rolf



 --
 Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
 Tap into the largest installed PC base  get more eyes on your game by
 optimizing for Intel(R) Graphics Technology. Get started today with the
 Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
 http://p.sf.net/sfu/intelisp-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas 3

2010-11-24 Thread Rolf-Werner Eilert
Am 24.11.2010 12:08, schrieb Benoît Minisini:
 Hi,

 I'm currently thinking about modifying/removing all Is() functions in
 Gambas 3.

 They mainly test the datatype of their expression. So, either the datatype is
 known at compile time, and there should be no need of testing it ; either you
 are using a Variant, and you can use TypeOf() to get the datatype of the
 value.

 I will replace them by some functions that will test if a value can be
 converted safely from a string by using localization. This is what most users
 expected from these functions.

 For exemple, in french localization:

   IsDate(13/2/20) -  True
   IsNumber(3,34) -  True
   IsInteger(3,34) -  False
   IsNumber(3.34) -  False
   
 Internally, they will use Val() and see if the conversion works.

 I will kept most of the name, so there will be a big incompatibility between
 Gambas 2, current Gambas 3, and final Gambas 3.

 What do you think about that?

 Who is using the Is() functions, and in which context?


I just checked it. As far as I remember and due to my search within my 
most important projects, I have only used IsNull so far.

In one project, I used it very often to manage Val() because Val() 
doesn't understand empty strings or strings without numbers. Wasn't it 
you or Fabien who once pointed me to this fact and gave me the tip to 
use IsNull for it?

In that project there are lots of places where wrong inputs could occur, 
so there are lots of IF IsNull(bla) THEN RETURN bullshit or IF NOT 
IsNull(bla) THEN RETURN Val(bla) ;-)

So from my point of view, if you let be Val() less critical, you my 
discard IsNull, otherwise leave it there or replace it by something useful.

Regards

Rolf


--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Fwd: Re: Removing / Modifying IsXXXX() functions in Gambas3

2010-11-24 Thread Benoît Minisini
On Wed, 24 Nov 2010 11:53:20 pm you wrote:
  Benoît,
  
  MAJOR PANIC!  I use IsNumber extensively to do quick checks on field
  parsing across heterogeneous databases.  Using the 80-20 rule I can
  parse text fields for junk appendices to an expected numeric.
  Code such as
  
  vItem=split(result!note, ,NULL,TRUE)[0]
  
 IF IsNumber(vItem) THEN RETURN Val(vItem)
  
  ' else begin parsing diabolical note structure
  
  .
  
  abounds.
  
  Please reconsider this.
 
 Then you are using IsNumber() the wrong way: in your code, vItem is a
 string (I guess), and so IsNumber(vItem) will always return FALSE.
 
 You used IsNumber() as if it would tell you if a string can be converted
 to a number, which it does not at the moment! And which is exactly what
 I want to change!

Arggh, yer right again.  After calming down I checked.
 IF IsNumber(Val(vItem)) THEN RETURN Val(vItem)
Sorry, I just get the panics over my precious code :-)
--
best regards
Bruce Bruen

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Print html direct?

2010-11-24 Thread charlesg


Dimitris Anogiatis wrote:
 
 Hey guys,
 
 Does htmldoc have any UTF-8 support?
 

Looking at www.htmldoc.org I don't think there is UTF-8 support. I just use
it for formatting tables.

It is in the Ubuntu repository (sudo apt-get install htmldoc) but I don't
know about other distros.

rgds
-- 
View this message in context: 
http://old.nabble.com/Print-html-direct--tp30296474p30298482.html
Sent from the gambas-user mailing list archive at Nabble.com.


--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Result object, again

2010-11-24 Thread tobias
good evening all,
i have another question about my eternal punishment: the result object :-)
caveat answered to a former question about results in general:

 If you got into the habit of reading all the
 records you've selected into memory (or even if the Result object
 worked
 that way behind the scenes...), you'd soon find everything breaking with
 Out Of Memory errors as soon as you start doing anything serious.

my question now is, how the result works behind the scenes, is there a 
counter (result.index?) that tells a layer (the driver?) which record is 
to be given back?

regards,
tobi

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Print html direct?

2010-11-24 Thread Jorge Carrión
Hi:
Try wkhtmltopdf, in ubuntu repositories too... If you html code carry on the
Utf-8 esecification it works...

Goog Luck

2010/11/24 charlesg char...@pearceshardware.co.uk



 Dimitris Anogiatis wrote:
 
  Hey guys,
 
  Does htmldoc have any UTF-8 support?
 

 Looking at www.htmldoc.org I don't think there is UTF-8 support. I just
 use
 it for formatting tables.

 It is in the Ubuntu repository (sudo apt-get install htmldoc) but I don't
 know about other distros.

 rgds
 --
 View this message in context:
 http://old.nabble.com/Print-html-direct--tp30296474p30298482.html
 Sent from the gambas-user mailing list archive at Nabble.com.



 --
 Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
 Tap into the largest installed PC base  get more eyes on your game by
 optimizing for Intel(R) Graphics Technology. Get started today with the
 Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
 http://p.sf.net/sfu/intelisp-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] To the wish list: FHelpBrowser

2010-11-24 Thread math.e...@t-online.de

   Thanks, Benoît.
   The make error has gone, the help browser behaves like any other window,
   and I even learned how to copy from help. Fine!
   -Original-Nachricht-
   Subject: Re: [Gambas-user] To the wish list: FHelpBrowser
   Date: Tue, 23 Nov 2010 18:57:25 +0100
   From: Benoît Minisini gam...@users.sourceforge.net
   To: mailing list for gambas users gambas-user@lists.sourceforge.net
1. As I asked before, why does the HelpBrowser have to be a utility
window that you can't minimize? I can't see no reason why it couldn't be a
normal window that could be used much easier. Read, minimize, try, and
read again...
   
   Upgrade to the latest revision, and set Use utility windows to No in the
   IDE option dialog.
   Regards,
   --
   Benoît Minisini
   
   --
   Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
   Tap into the largest installed PC base  get more eyes on your game by
   optimizing for Intel(R) Graphics Technology. Get started today with the
   Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
   http://p.sf.net/sfu/intelisp-dev2dev
   ___
   Gambas-user mailing list
   Gambas-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Removing / Modifying IsXXXX() functio ns in Gambas 3

2010-11-24 Thread math.e...@t-online.de

   If I understand you right,
  If Not IsDigit(TextBox.Text) Then...
   wouldn't be changed?
   -Original-Nachricht-
   Subject: [Gambas-user] Removing / Modifying Is() functions in Gambas 3
   Date: Wed, 24 Nov 2010 12:08:34 +0100
   From: Benoît Minisini gam...@users.sourceforge.net
   To: gambas-user@lists.sourceforge.net
   Who is using the Is() functions, and in which context?
--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3

2010-11-24 Thread richard terry
On Wednesday 24 November 2010 22:32:26 Benoît Minisini wrote:
  On Wednesday 24 November 2010 22:08:34 Benoît Minisini wrote:
 
  Hi Benoit I use isDate() quite a lot, isNumber I think once
 
  Regards
  richard
 
 In which context exactly?
 
When I've got textboxes and user has entered what is meant to be a date, for 
example on the lost_focus event

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] isNull()

2010-11-24 Thread richard terry
I use IsNull extensively, is that going to be removed?

richard

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Type Mismatch error with max neg long int as constant

2010-11-24 Thread nando
In Gambas2, I get a type mismatch error...but no error if ends in a 7

PUBLIC CONST LOWESTLONG AS Long = -9223372036854775808   'from wiki:
-9.223.372.036.854.775.808

-Fernando

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Result object, again

2010-11-24 Thread Benoît Minisini
 good evening all,
 i have another question about my eternal punishment: the result object :-)
 
 caveat answered to a former question about results in general:
  If you got into the habit of reading all the
  records you've selected into memory (or even if the Result object
  worked
  that way behind the scenes...), you'd soon find everything breaking with
  Out Of Memory errors as soon as you start doing anything serious.
 
 my question now is, how the result works behind the scenes, is there a
 counter (result.index?) that tells a layer (the driver?) which record is
 to be given back?
 
 regards,
 tobi
 

A result object stores the entire query of the result in memory, because of 
the stupidity of most SQL backends.

The gb.db.form implements a system that only keep a small part of the query 
result, by using the  operator on the table key, Order By, and the 
Limit() method. That way, you can use a DataBrowser to browse a table that is 
located on a far server easily.

Regards,

-- 
Benoît Minisini

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3

2010-11-24 Thread Benoît Minisini
 On Wednesday 24 November 2010 22:32:26 Benoît Minisini wrote:
   On Wednesday 24 November 2010 22:08:34 Benoît Minisini wrote:
   
   Hi Benoit I use isDate() quite a lot, isNumber I think once
   
   Regards
   richard
  
  In which context exactly?
 
 When I've got textboxes and user has entered what is meant to be a date,
 for example on the lost_focus event
 

I mean which code. IsDate() only tells you if a variant is a Date. If you want 
to check that a string is a date, you have to do that:

dDate = Val(sTextBoxString)
If IsNull(dDate) Then 
  Print Enter a date!
Endif

-- 
Benoît Minisini

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas 3

2010-11-24 Thread Benoît Minisini
If I understand you right,
   If Not IsDigit(TextBox.Text) Then...
wouldn't be changed?

No. All IsXXX() functions that just test characters won't be changed.

-- 
Benoît Minisini

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas 3

2010-11-24 Thread Michael
Benoit,
The IsXXX functions confused me because when testing IsNumber(123) I 
got an error similar to Expected number got a string. It seems you 
needed to know the type before testing for it. I therefore do not use 
it. However I believe new versions of software should be backward 
compatible so I suggest giving the new functions a slightly different 
name. EG: IsNumeric.
Regards
Mike
On 24/11/10 22:08, Benoît Minisini wrote:
 Hi,

 I'm currently thinking about modifying/removing all Is() functions in
 Gambas 3.

 They mainly test the datatype of their expression. So, either the datatype is
 known at compile time, and there should be no need of testing it ; either you
 are using a Variant, and you can use TypeOf() to get the datatype of the
 value.

 I will replace them by some functions that will test if a value can be
 converted safely from a string by using localization. This is what most users
 expected from these functions.

 For exemple, in french localization:

   IsDate(13/2/20) -  True
   IsNumber(3,34) -  True
   IsInteger(3,34) -  False
   IsNumber(3.34) -  False
   
 Internally, they will use Val() and see if the conversion works.

 I will kept most of the name, so there will be a big incompatibility between
 Gambas 2, current Gambas 3, and final Gambas 3.

 What do you think about that?

 Who is using the Is() functions, and in which context?


--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3

2010-11-24 Thread Benoît Minisini
 Benoit,
 The IsXXX functions confused me because when testing IsNumber(123) I
 got an error similar to Expected number got a string. It seems you
 needed to know the type before testing for it. 

Yes. Not really useful, except with variants.

 I therefore do not use
 it. However I believe new versions of software should be backward
 compatible so I suggest giving the new functions a slightly different
 name. EG: IsNumeric.
 Regards
 Mike
 

I think I can be not backward compatible there, because nobody apparently uses 
this useless function. I don't want to keep these useless functions in the 
interpreter.

Regards,

-- 
Benoît Minisini

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Result object, again

2010-11-24 Thread Ian Haywood
2010/11/25 Benoît Minisini gam...@users.sourceforge.net:
 good evening all,
 i have another question about my eternal punishment: the result object :-)

 caveat answered to a former question about results in general:
  If you got into the habit of reading all the
  records you've selected into memory (or even if the Result object
  worked
  that way behind the scenes...), you'd soon find everything breaking with
  Out Of Memory errors as soon as you start doing anything serious.

 my question now is, how the result works behind the scenes, is there a
 counter (result.index?) that tells a layer (the driver?) which record is
 to be given back?

 regards,
 tobi


 A result object stores the entire query of the result in memory, because of
 the stupidity of most SQL backends.
Postgresql definately supports cursors (being able to retrieve rows in groups
and not hold them all in memory)

Ian

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command

2010-11-24 Thread vikram
 Setting FMain.Mouse and calling WAIT is useless. Application.Busy should 
 already set the busy cursor for every widget in the application. Otherwise 
 this is a bug.
Application.Busy alone is not showing a busy pointer on Debian Squeeze, with 
Gambas 2.21.

Regards,
Vikram



  
--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command

2010-11-24 Thread Dimitris Anogiatis
I use

INC Application.Busy

and

DEC Application.Busy

in my applications on Debian Lenny (with LXDE)
and Gambas 2.21 and it works just fine.

Regards,
Dimitris


On Wed, Nov 24, 2010 at 9:23 PM, vikram austin...@yahoo.com wrote:

  Setting FMain.Mouse and calling WAIT is useless. Application.Busy should
  already set the busy cursor for every widget in the application.
 Otherwise
  this is a bug.
 Application.Busy alone is not showing a busy pointer on Debian Squeeze,
 with Gambas 2.21.

 Regards,
 Vikram





 --
 Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
 Tap into the largest installed PC base  get more eyes on your game by
 optimizing for Intel(R) Graphics Technology. Get started today with the
 Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
 http://p.sf.net/sfu/intelisp-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user