[Gambas-user] the other side of Completion

Charlie Reinl Karl.Reinl at ...9...
Tue Sep 19 20:43:16 CEST 2006


Salut Benoît,

on gambas2-1.9.42

this is a form with a Columnview and a Button.

That ist the Class from this Form.

'-------------------------------------------------------------------
' Gambas class file

PRIVATE sVarName AS String
PUBLIC SUB Run(sInVarName AS String) AS Boolean
  sVarName = sInVarName
  ME.Text = Subst(("Values for '&1'"), sVarName)
  RETURN NOT ME.ShowModal()
END
PUBLIC SUB btnOK_Click()
  ME.Close(TRUE)
END
PUBLIC SUB Form_Open()
  WITH cvwInfo2
    .Columns.Count = 2
    .Columns[0].Width = 128
    .Columns[0].Text = ("Key")
    .Columns[1].Text = ("Value")
    .Font.Grade = If(Settings["/UseSmallFont", FALSE], -1, 0)
  END WITH
  Test_Element(sVarName)
END
PRIVATE SUB Test_Element(sVar 
'-------------------------------------------------------------------

My Problem is minior, but try to finish the last line.

PRIVATE SUB Test_Element(sVar 

The name of the passed Variable should NOT be 'sVarName' 
If I try to set a SPACE after sVar, I get 'sVarName'.

I found the only way is, to ignore that, finish my line with ' AS String)' and 
then go back and change the variable name.

NOT realy confortable.

Amicalment
Charlie




More information about the User mailing list