For anyone else making use of XojoScript :(

Just bumped into another mismatch of documentation vs what the compiler accepts

Docs say in a script a class can implement many interfaces
But the compiler seems to disallow it

interface foo
  
  Sub bar()
  
End Interface

Interface morefoo
  Function other() As Integer
End Interface

Class Class1
  
End Class


Class CustomClass1
  Inherits Class1
  Implements foo, morefoo
  Sub bar()
    
  End Sub
  
  Function other() As Integer
    
  End Function
  
  
End Class

reported as Xojo: Account Login

@npalardy I use scripts with classes implementing multiple interfaces. The trick is only one interface per implements line, but you can have several. i.e.

Class CustomClass1
  Inherits Class1
  Implements foo
  Implements morefoo
  Sub bar()
2 Likes

seems so fundamentally wrong but if that works

I’ll make my parser handle both so

Implements foo, morefoo

and

Implements foo
implements morefoo

both work

And the docs should mention something about this (which they really dont - at least not clearly)

1 Like