Changes between Version 2 and Version 3 of ObjectiveC/Messaging


Ignore:
Timestamp:
Jan 10, 2009 1:23:41 PM (7 years ago)
Author:
chak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ObjectiveC/Messaging

    v2 v3  
    1717This will translate to something which essentially has the same effect as
    1818{{{
    19 objc_msgSend_stret (touchedPoint, myTouchObject, @SELECTOR("locationInView), currentView);
     19objc_msgSend_stret (touchedPoint, myTouchObject, sel_getUid("locationInView"), currentView);
    2020}}}
    2121
    2222''Implementation note:'' The foreign import should arrange for a call to `sel_getUid` at program start or when an imported selector is used for the first time.  The result should be cached to speed up subsequent uses of the same selector in the same program.
     23
     24''Usage note:'' To wrap imported functions handling C structs in a nice way, we define a `Foreign.Storable` instance and a convenience wrapper as usual.
    2325
    2426== Distinguishing the three messaging types ==