|
From: Thorsten S. <tho...@we...> - 2009-05-30 12:46:07
|
I just discovered my error: in my code I did panel <- _NSOpenPanel # openPanel >>= setCanChooseDirectory True which of course let's panel end up being a () instead of an NSOpenPanel ()... After fixing this, everything was fine. In my mail to the list I deleted the important part with the intention not to clutter the example unneccessary... :-( Sorry for the noise Thorsten Anfang der weitergeleiteten E-Mail: > Von: Thorsten Seitz <tho...@we...> > Datum: 30. Mai 2009 13:24:00 MESZ > An: hoc...@li... > Betreff: what to use for NULL? > > Hi, > > I'm just beginning to use HOC and so far I'm very happy (I did have > to make some adjustments to account for GHC 6.10 and a custom > installation location of Xcode 3). > > Currently I'm stuck on calling - > beginSheetForDirectory:file:types:modalForWindow:modalDelegate:didEndSelector:contextInfo > : because I don't know what to pass for (coid *)contextInfo. I > assumed that nullPtr would be correct, but I get a type error which > I do not understand. > > My code: > > panel <- _NSOpenPanel # openPanel > panel # > beginSheetForDirectoryFileTypesModalForWindowModalDelegateDidEndSelectorContextInfo > nil > nil > nil > window > modalDelegate > (getSelectorForName selector) > nullPtr > > The type error: > > Couldn't match expected type `GHC.Ptr.Ptr > HOC-1.0:HOC.Base.ObjCObject' > against inferred type > `HOC-1.0:HOC.Arguments.EvilDummyForUnit' > When using functional dependencies to combine > ObjCArgument () HOC-1.0:HOC.Arguments.EvilDummyForUnit, > arising from the dependency `a -> b' > in the instance declaration at <no location info> > ObjCArgument () (GHC.Ptr.Ptr HOC-1.0:HOC.Base.ObjCObject), > arising from a use of > ` > beginSheetForDirectoryFileTypesModalForWindowModalDelegateDidEndSelectorContextInfo > ' > > Any help will be greatly appreciated! > > Best regards > Thorsten > |