Changes between Version 2 and Version 3 of CobraSyntaxHilights
- Timestamp:
- 01/12/14 04:11:22 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CobraSyntaxHilights
v2 v3 127 127 a = Action.Stop 128 128 if a <> Action.Start 129 Console. WriteLine(a + " is " + (int) a); # Prints "Stop is 1"129 Console.writeLine(a + " is " + (int) a); # Prints "Stop is 1" 130 130 131 131 Console.writeLine(Status.Pass to int) # Prints 70 … … 655 655 set 656 656 .name = value 657 #__name = value657 #__name = value 658 658 659 659 # Read-only property … … 761 761 762 762 # listen EVENT_NAME, METHOD_NAME 763 listen MsgArrivedEvent, MsgArrivedEventHandler(.my_MsgArrivedEventCallback)764 raise MsgArrivedEvent, "Test message" # Throws exception if obj is null763 listen MsgArrivedEvent, ref .my_MsgArrivedEventCallback 764 raise MsgArrivedEvent, "Test message" # fire event : Throws exception if obj is null 765 765 #ignore EVENT_NAME, METHOD_NAME 766 ignore MsgArrivedEvent, MsgArrivedEventHandler(.my_MsgArrivedEventCallback)766 ignore MsgArrivedEvent, ref .my_MsgArrivedEventCallback 767 767 768 768 … … 770 770 771 771 myButton = Button() 772 listen myButton.click, System.EventHandler(ref .myButton_Click) 773 774 def myButton_Click(sender as Object, e as System.EventArgs ) 772 listen myButton.click, ref .myButton_Click 773 #listen myButton.click, ref .myButton_Click to System.EventHandler 774 775 def myButton_Click(sender as Object, e as System.EventArgs ) # same sig as System.EventHandler 775 776 MessageBox.show(this, "Button was clicked", "Info", 776 777 MessageBoxButtons.OK, MessageBoxIcon.Information)