Changeset 60 for NEWT0/trunk

Show
Ignore:
Timestamp:
06/17/06 00:29:38 (2 years ago)
Author:
pguyot
Message:

Fix sample to follow new API.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • NEWT0/trunk/contrib/NewtObjC/example/objc.newt

    r31 r60  
    3939 
    4040    local NSCalendarDate := GetObjCClass("NSCalendarDate"); 
    41     foreach s, v in NSCalendarDate._proto._proto._proto do 
    42         Print( s & "\n" ); 
     41//  foreach s, v in NSCalendarDate._proto._proto._proto do 
     42//      Print( s & "\n" ); 
    4343    local theDate := NSCalendarDate:calendarDate(); 
    4444    local theDescription := theDate:description(); 
     
    7575    // I'll use libc's sleep for that purpose. 
    7676    local libc := OpenNativeLibrary("libc"); 
    77     libc:DefineGlobalFn({ 
     77    libc:DefGlobalFn('|libc.sleep|, { 
    7878        name: "sleep", 
    79         symbol: '|libc.sleep|, 
    8079        args: ['uint32], 
    8180        result: 'uint32}); 
     
    8887        repeat 
    8988            |libc.sleep|(1); 
    90         until (theSound:isPlaying() <> kObjCFalse); 
     89        until (theSound:isPlaying() = kObjCFalse); 
    9190    end; 
    9291