Wiki

Changes between Initial Version and Version 1 of Attributes

Show
Ignore:
Timestamp:
01/24/13 13:07:29 (11 years ago)
Author:
pyros2097
Comment:

Attributes page

Legend:

Unmodified
Added
Removed
Modified
  • Attributes

    v1 v1  
     1== Attributes == 
     2Cobra has the same type of declarations of attributes just like C# but without square brackets and using the has keyword before the attribute 
     3You also declare the attribute after declaring the variable. 
     4 
     5You can add attributes to classes and functions and variables also properties e.g. In GTK 
     6{{{ 
     7class HasAnAttribute 
     8  has TreeNode(listOnly=true) 
     9 
     10  var name is String 
     11      has TreeNodeValue(column=0) 
     12 
     13  def doSomething is protected, override has STAThread 
     14    pass 
     15}}}