[Mono-osx] [MonoMac] A few new patches
Miguel de Icaza
miguel at novell.com
Mon Mar 14 13:53:16 EDT 2011
Thanks for this fabulous list of patches:
> 1) The monomac build from git is broken (at least for me: OSX 10.6.6, mono
> 22.214.171.124). Seems some changes
> to maccore/src/CoreMedia/CMSampleBuffer.cs requires CoreMedia on
> monomac, However CoreMedia is not a public framework on OSX.
> coremedia.patch (for monomac) fixes this by adding a path in
> monomac/src/Constants.cs to a private framework, but it may be better to
> revisit CMSampleBuffer.cs.
> 2) NSFileManager.patch (for maccore) adds the 'Url' methods to the
> NSFileManager type in maccore/src/foundation.cs and some supporting enums.
> These are new in iOS 4, and have been attributed with [Since(4,0)], however
> if you would prefer to only have them in monomac, I can surround with an
> 3) I think I finally understand the Drag/Drop classes for monomac, and have
> provided dragging.patch (for monomac) with the appropriate changes to
> appkit.cs. In essence the messages that are sent to delegates that might
> respond to 'drag events' are sent an object that implements NSDraggingInfo.
> NSDraggingInfo is a protocol, but implementing this as a [Model] does not
> work because this object is not created by clients, and the runtime cannot
> cast the actual object created by appkit to the C# class. Drag and Drop
> Programming Topics for Cocoa mentions that the system creates an
> undocumented NSDragDestination object which implements NSDraggingInfo.
> Since the docs refer to NSDraggingInfo and not NSDragDestination, and since
> NSDraggingInfo is a more descriptive name, it is used in appkit.cs, and the
> Name attribute is used to register NSDraggingInfo to NSDragDestination. I
> tested this with NSDraggingDestination and NSBrowserDelegate, and all seems
> well. It could be improved by privatizing the constructors for
Could you contribute a sample that shows this?
The other thing to keep in mind is that this is an area that got
revisited in Lion, would you mind checking the documentation for Lion,
because I get the feeling that they improved things in this area.
> 5) sample.patch eliminates some warnings and errors from the monomac
> samples. It relies on NSFileManager.patch. pretty minor stuff, but it is
> nice to have samples that build without warnings/errors. There is an issue
> with the macdoc sample, but It may be specific to me. The sample gives
> errors when built from the command line (make/mdtools), but builds fine from
The removal of the timer means that we can call destroy when the timer
gets GCed, so it would terminate the timer after a GC pass.
More information about the Mono-osx