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

Regan Sarwas rsarwas at gmail.com
Mon Mar 14 02:04:46 EDT 2011


Oops.
Please ignore imagekit.patch from the previous post.  The correct file is
attached to this post.
-regan

On Sun, Mar 13, 2011 at 9:44 PM, Regan Sarwas <rsarwas at gmail.com> wrote:

> Hello all,
>
> 1) The monomac build from git is broken (at least for me: OSX 10.6.6, mono
> 2.10.1.0). 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
> #ifdef
> **
>
> 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<http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/DragandDrop/Concepts/dragdestination.html%23//apple_ref/doc/uid/20000977-BAJBJFBG> 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.
> **
>
> 4) *imagekit.patch* (for monomac) revises the drag and drop code in the
> imagekit sample to use the changes in dragging.patch. It should not be
> applied unless dragging.patch is applied.
>
> 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.
>
> 6) lastly, *appkit.patch* clarifies a couple of deprecation warnings.
>
> Enjoy.
>
> - Regan
>
>
> **
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20110313/8482d9b4/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagekit.patch
Type: application/octet-stream
Size: 3137 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-osx/attachments/20110313/8482d9b4/attachment.obj 


More information about the Mono-osx mailing list