Changes between Version 4 and Version 5 of ObjectiveC/Classes


Ignore:
Timestamp:
Jan 12, 2009 1:36:54 PM (6 years ago)
Author:
chak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ObjectiveC/Classes

    v4 v5  
    11 
    22 
    3 = Haskell Objective-C FFI: Declaring Objective-C Classes = 
     3= Haskell Objective-C FFI: Objective-C Classes = 
     4 
     5== Using classes == 
     6 
     7We might import ObjC classes like so: 
     8{{{ 
     9foreign import objc "@class UIView" o'UIView :: Class 
     10}}} 
     11''Problem:''' We also need to introduce the class type `C'UIView`. So far, the FFI has no support for the import of types. 
     12 
     13== Declaring classes == 
    414 
    515One option might be something like 
     
    818}}} 
    919 
    10 == Option 1: value definition == 
     20=== Option 1: value definition === 
    1121 
    1222The class definition value `myUIView` contains the details of the class definition.  However, it is odd, because `C'UIView` should usually be the type of instances if of `UIView`. 
    1323 
    14 == Option 2: incremental definition == 
     24=== Option 2: incremental definition === 
    1525 
    1626In addition to the `foreign export` declaring the class, the class is populated with methods in further `foreign export` declarations.