Skip to content

looping snippet #60

@gwarah

Description

@gwarah

Let's suppose I intent to insert some attributes with their getters/setterrs methods, so would be nice if it's possible by a looping snippet like this one (example in vb script):

  1. trigger

vbs-attributes(name,age)

  1. linked to these hypothetical snippet:
'''''''''''
' atributes
'''''''''''
$[![(repeat)
private $[![(var)]!]
]!]
 
'''''''''''
' getters and letters 
'''''''''''
$[![(repeat)
    ' attribute $[![(var)]!]
    Public Property Let fun$[![(var)]!](pTxt)
        $[![(var)]!] = pTxt
    End Property
    
    Public Property Get fun$[![(var)]!]()
        fun$[![(var)]!] = $[![(var)]!]
    End Property
]!]


  1. resulting in:
'''''''''''
' atributes
'''''''''''
private name
private age

'''''''''''
' getters and letters 
'''''''''''
' attribute name
Public Property Let funname(pTxt)
      name = pTxt
End Property
    
Public Property Get funname()
      funname = name
End Property

' attribute age
Public Property Let funage(pTxt)
      age = pTxt
End Property
    
Public Property Get funage()
      funage = ageEnd Property
End Property

It's it possible? How?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions