[Gambas-user] "Incorrect property value"

ron ronstk at ...239...
Fri Apr 28 13:10:21 CEST 2006


On Friday 28 April 2006 10:30, Benoit Minisini wrote:
> On Friday 28 April 2006 10:24, Jose J. Rodriguez wrote:
> > On 4/28/06, Benoit Minisini <benoit.minisini at ...2...> wrote:
> > > On Friday 28 April 2006 09:54, Jose J. Rodriguez wrote:
> > > > Anybody else getting these "Incorrect property value" popups while
> > > > trying to change a lot of widget properties in the IDE (Gambas
> > > > 1.9.29)? Happens even with simple stuff like the Enabled property of a
> > > > button. They all work in code, but it makes for some pretty boring
> > > > form load events...
> > > >
> > > > Regards,
> > > > Joe1962
> > >
> > > Actually a project converter will have to be written so that a 1.0
> > > project can be ported to 2.0 easily.
> >
> > Yes, but that's not the problem, it happens with new projects created
> > by Gambas 1.9.29 itself.
> >
> > Regards,
> > Joe1962
> >
> 
> I think you have a problem in your gambas installation or compilation... Can 
> you send me the output of ./configure, make & make install ?
> 

Or the Val() function does wrong.
I have checked then FProperty code

PRIVATE FUNCTION SaveProperty() AS Boolean
$sType ask for "b"

    CASE "i", "l" ', "b"
      vVal = Val(vVal) '<---- in vVal is "TRUE" as string
      IF IsNull(vVal) THEN GOTO _BAD

As TRUE should be True it returns NULL


Suggest
    CASE "b"
      vVal = CBool(vVal) 

    CASE "i", "l" ', "b"
      vVal = Val(vVal)
      IF IsNull(vVal) THEN GOTO _BAD

The error is gone but the enabled property of a button stay at true if true
Changing from False to True works but True to False goes back to true.

CASE "b"
  'vVal = CBool(vVal) 
  IF vVal = "False" THEN 
    vVal = 0
  ELSE 
    vVal = 1
  ENDIF

And this let worked again.
I do not know if there are some other places but it seams to me 
the Val function has something wrong.


Ron











More information about the User mailing list