Le 30 oct. 06 à 17:10 Soir, Bart Pietercil a écrit:

Hi,

although i think I understand why this is happening what way would I need to go ?

Now i can device a way around this, how do I test if an integer has been initialised ? Obviously I cannot test if myLeft <> 0 since 0 is a legal value. Any value is legal....
puzzled

Is -65536 a legal value? You may set MyLeft to -65536 before the if.

But, better, you add a boolean:

  Dim myText As String
  Dim myLeft,myTop,myWidth,myHeight As Integer

dim Initialized as boolean

  if App.CurrentWindow <> Nil then
    myLeft = App.CurrentWindow.Left
    myTop = App.CurrentWindow.Top
    myWidth = App.CurrentWindow.Width
    myHeight = App.CurrentWindow.Height

Initialized=true

  end if

  Select Case node.Text
  case "Beheer Gebruikers"

    App.CurrentWindow = new studentswindow

  case "Beheer Opdrachten"
    App.CurrentWindow = new KeyFilesWindow
  end Select


' if myLeft <> Nil then<-------------------------------------------------this won't compile because myLeft is an integer not an object

if Initialized=true then

    App.CurrentWindow.Left = myLeft
    App.CurrentWindow.Top = myTop
    App.CurrentWindow.Width = myWidth
    App.CurrentWindow.Height = myHeight
  end if

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to