Wiki

Changes between Version 2 and Version 3 of CobraSyntaxHilights

Show
Ignore:
Timestamp:
01/12/14 04:11:22 (11 years ago)
Author:
hopscc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CobraSyntaxHilights

    v2 v3  
    127127a = Action.Stop 
    128128if 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" 
    130130 
    131131Console.writeLine(Status.Pass to int) # Prints 70 
     
    655655    set 
    656656        .name = value 
    657         #__name =value 
     657        #__name = value 
    658658 
    659659# Read-only property 
     
    761761 
    762762# listen EVENT_NAME, METHOD_NAME 
    763 listen MsgArrivedEvent, MsgArrivedEventHandler(.my_MsgArrivedEventCallback) 
    764 raise MsgArrivedEvent, "Test message"    # Throws exception if obj is null 
     763listen MsgArrivedEvent, ref .my_MsgArrivedEventCallback 
     764raise MsgArrivedEvent, "Test message"    # fire event : Throws exception if obj is null 
    765765#ignore EVENT_NAME, METHOD_NAME 
    766 ignore MsgArrivedEvent, MsgArrivedEventHandler(.my_MsgArrivedEventCallback) 
     766ignore MsgArrivedEvent, ref .my_MsgArrivedEventCallback 
    767767 
    768768 
     
    770770 
    771771myButton = Button()  
    772 listen myButton.click, System.EventHandler(ref .myButton_Click) 
    773  
    774 def myButton_Click(sender as Object, e as System.EventArgs ) 
     772listen myButton.click, ref .myButton_Click 
     773#listen myButton.click, ref .myButton_Click to System.EventHandler 
     774 
     775def myButton_Click(sender as Object, e as System.EventArgs ) # same sig as System.EventHandler 
    775776    MessageBox.show(this, "Button was clicked", "Info", 
    776777        MessageBoxButtons.OK, MessageBoxIcon.Information)