I have a class called SomeClass which should be able to set some TextFields.
But it just does not compile.
And the error message: "'String' is not a subtype of 'AppDelegate'" while 
certainly true, is not too helpful.
I tried several variations, but I just can't get it to compile. Very 
frustrating.

Any insights would be greatly appreciated.


class AppDelegate: NSObject
{
        dynamic var statusString : String?      //      bound to some TextField

        let someThing = SomeClass( myStatusHandler )            <---- this 
creates strange error messages

        func myStatusHandler( s: String )
        {
                statusString = s
        }
}

class SomeClass
{
        private let statusHandler:  (String) -> Void

        init( statusHandler: (String) -> Void ) 
        {
                self.statusHandler = statusHandler
        }
}

Gerriet.


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to