[Mono-osx] [MonoMac] A few new patches

Regan Sarwas rsarwas at gmail.com
Mon Mar 14 17:14:56 EDT 2011

On Mon, Mar 14, 2011 at 9:53 AM, Miguel de Icaza <miguel at novell.com> wrote:

> Hello Regan,
>    Thanks for this fabulous list of patches:
> > 1) The monomac build from git is broken (at least for me: OSX 10.6.6,
> mono
> > 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.
> Applied.
> > 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
> > #ifdef
> Applied.
> > 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
> > NSDraggingInfo.
> Could you contribute a sample that shows this?
> Gladly.  The ImageKit sample already shows
using NSDraggingDestination.  I'll work up a sample for NSBrowser,
NSTableView, etc

> 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.
> I'm not a member of the Mac Developer Program, and I don't know how else to
get a hold of the Lion docs.

> > 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
> > MonoDevelop.
> 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.
> Oops. Thanks for catching this.

> Miguel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20110314/0438ab36/attachment-0001.html 

More information about the Mono-osx mailing list