Wiki
Version 1 (modified by pyros2097, 5 years ago)

Attributes page

Attributes

Cobra has the same type of declarations of attributes just like C# but without square brackets and using the has keyword before the attribute You also declare the attribute after declaring the variable.

You can add attributes to classes and functions and variables also properties e.g. In GTK

class HasAnAttribute
  has TreeNode(listOnly=true)

  var name is String
      has TreeNodeValue(column=0)

  def doSomething is protected, override has STAThread
    pass