WORKSPACE

I have a routine to place a form on the workspace, it expects a Form as
> param.
> and I have cmbForms.Text = "FControl" for example.
>
> How can I tell gambas it should use the string as a form name to open?
>
> It's now complaining about getting a string in instead of an Object.
>
> Often the small things take most of the time ;)
>
>

hForm = Object.New("FormName")

Regards,
Benoit Minisini

PUBLIC SUB Form_KeyPress()
  IF Key.Control
    SELECT CASE Workspace1.Children.Find(Workspace1.ActiveWindow)
     CASE 0 TO Workspace1.Children.Count - 2
        Workspace1.ActiveWindow = Workspace1.Children[Workspace1.Children.Find(Workspace1.ActiveWindow) + 1]
     CASE Workspace1.Children.Count - 1
        Workspace1.ActiveWindow = Workspace1.Children[0]
     CASE ELSE
    END SELECT
  ENDIF
END


You will have to help out a bit more :)

Here is the header of the class Added to the Workspace:

' Gambas class file

Inherits Window

Private $hPHPEditor As Editor

Public Sub _new()

  Me.Arrangement = Arrange.Fill
  Me.Expand = True

  $hPHPEditor = New Editor(Me) As "PHPEditor"
  $hPHPEditor.Expand = True
  $hPHPEditor.Highlight = Highlight.Custom

End Sub

How do I implement the Close event in this case?


