Classes

Discussion in 'Basic4ppc Wishlist' started by JesseW, Oct 16, 2008.

  1. JesseW

    JesseW Active Member Licensed User

    I would *LOVE* to see classes implemented in B4P!! That would give a more oop flavor to development. I would imagine something like this...

    Code:
    Public Class Classname
       
    'Declare methods and properties here
       Public Method Methodname(arglist...)
       
    Private Input Output Property Propertyname1(arg)
       
    Public Input Output Property Propertyname2(arg)
    End Class

    Public Sub ClassInitialize
    End Sub

    Public Sub ClassDispose
    End Sub

    Public Sub Methodname(arglist...)
    End Sub

    Private Sub Propertyname1(arg)
       
    ' No need for class-scoped variables -- use properties for true oop
       Static p1
       
    If isInput(arg) Then
          p1 = arg
       
    End If
       
    Return p1
    End Sub

    Public Sub Propertyname2(arg)
       Static p1
       
    ' How to 'self reference'
       If isInput(arg) Then
          p1 = p1 + .Propertyname1
       
    End If
       
    Return p1
    End Sub
    Well, what do you think???
     
  2. Cableguy

    Cableguy Expert Licensed User

    Classes are already usable as long as they are created and compiled in c#....
     
  3. JesseW

    JesseW Active Member Licensed User

    compiled as external libraries? then imported as objects in the components screen? problem is i am a basic programmee and dont like c... :(
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice