[Mono-osx] [MonoMac] A few new patches
Regan Sarwas
rsarwas at gmail.com
Mon Mar 14 01:44:12 EDT 2011
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#//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/de472f43/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: coremedia.patch
Type: application/octet-stream
Size: 637 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-osx/attachments/20110313/de472f43/attachment-0006.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NSFileManager.patch
Type: application/octet-stream
Size: 4209 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-osx/attachments/20110313/de472f43/attachment-0007.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dragging.patch
Type: application/octet-stream
Size: 4654 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-osx/attachments/20110313/de472f43/attachment-0008.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagekit.patch
Type: application/octet-stream
Size: 16904 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-osx/attachments/20110313/de472f43/attachment-0009.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample.patch
Type: application/octet-stream
Size: 5679 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-osx/attachments/20110313/de472f43/attachment-0010.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: appkit.patch
Type: application/octet-stream
Size: 1222 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-osx/attachments/20110313/de472f43/attachment-0011.obj
More information about the Mono-osx
mailing list