mail-archives/mono-osx/2011-February/003977.html

130 строки
6.6 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-osx] Introducing MacHint MonoDevelop addin - developed with MonoMac
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20Introducing%20MacHint%20MonoDevelop%20addin%20-%20developed%20with%0A%09MonoMac&In-Reply-To=">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="003985.html">
<LINK REL="Next" HREF="003982.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-osx] Introducing MacHint MonoDevelop addin - developed with MonoMac</H1>
<B>frederic forjan</B>
<A HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20Introducing%20MacHint%20MonoDevelop%20addin%20-%20developed%20with%0A%09MonoMac&In-Reply-To="
TITLE="[Mono-osx] Introducing MacHint MonoDevelop addin - developed with MonoMac">fforjan at free.fr
</A><BR>
<I>Mon Feb 7 08:09:42 EST 2011</I>
<P><UL>
<LI>Previous message: <A HREF="003985.html">[Mono-osx] [MonoMac] CoreText Sample
</A></li>
<LI>Next message: <A HREF="003982.html">[Mono-osx] Introducing MacHint MonoDevelop addin - developed with MonoMac
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#3977">[ date ]</a>
<a href="thread.html#3977">[ thread ]</a>
<a href="subject.html#3977">[ subject ]</a>
<a href="author.html#3977">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Hello All !
I'm currently writing this email to introduce the new mono addin I was developing during the week-end.
This addin was written as learning the MonoMac API, which means it's dedicated to the Mac platform. I choose MacHint as name .
The goal ? Trying to introduce new features dedicated to the Mac !
So first point, I'm discovering development on Mac platform and MonoDevelop at the same time since i used to develop under Windows with VS ...
Today, there is only two features which was introduce due to my own need :
-------
* Usage of Growl :
a notification is send to Growl to inform you that a build is finished with the error information - it can be deactivate, fully activated or only when MonoDevelop doesn't have the focus, with a minimum time.
under this minimum time, the notification is not send, since you should be still in front of your application ;)
by not having the focus, it means if you're launching a build , go to your web browser or mail client doing any activities, in this case the notification is sent. If you're still on MonoDevelop, the notification is not sent.
* Automatic saving of Interface Builder document.
When i started to develop with MonoMac, the first problem I have was to manually save the Interface Builder document before launching the build, which i often forget to do!
I've introduced this new feature which save ALL documents opened in the Interface Builder whereas they belong OR NOT to the current solution.
Some implementation details :
-----
* the growl binary is provided with the addins thus you don't need to install growl. It was against the path taken by the tutorial on cocoa-mono.org but I think it was useful.
* since it's an addon, growl cannot get information from the Application bundle. There is a SimpleGrowlNotifier class which take a enum as template parameter with application name/id and icon.
All those information are used to dynamically build the growl information.
Don't forget to configure growl to play a sound with this notification !
* saving document is done by AppleScript. I've discovered and do my first AppleScript for this usage. And at the same start I've done a very basic binding for the NSAppleScript object.
There is a bug in my binding, if the script running an error, it will crashed. This is due of my NSAppleScript binding, I didn't find how to bind a pointer of pointer of NSDictionary - means ref NSDictionary in C# ?
Some remarks :
-----
* Since the monomac dll is delivered with the addin, What happens if two addins use two differents monomac (or the same) dll ? Are they shared ? Should it be installed in the GAC ?
* There is a NSApplication.Init call also in my addin. How is it working with the NSApplication from the Mac platform ? Is there any conflict ?
I'm thinking it's linked but I was not able to use the shared NSWorkspace or the shared NSPasteBoard, MonoDevelop seems to wait indefinitely.
How to install it :
-----
* Grab the binary from GitHub : <A HREF="https://github.com/fforjan/MonoDevelop.MacHint,">https://github.com/fforjan/MonoDevelop.MacHint,</A> download version 0.2, untar it into your .config/MonoDevelop/addins directory
Yes It seems the mdtool should be use for this binary distribution, i planned to spend more time on it for the next versions, mainly for the hosting point.
* You can also get the source code from GitHub and have a look !
Open points:
-----
I've mainly starting development on this platform - MonoDevelop, mono and mac ! so i'm happy to any feedback, positive or not.
One of my question is, Is it a supported architecture ? Writting a plugin to an existing application to provide feature to the mac platform using monomac ?
Do you think it's useful ? Do you have any feedback on the feature, on the implementation ? Or any idea for new features ?
I was thinking to be able to use the service menu like to send the currently selected text in email or the currently selected solution item as a mail with attachments, use the dock icon to display number of error from the last build.
Also using growl for the unit test result.
Thanks all !
Regards,
Frederic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <A HREF="http://lists.ximian.com/pipermail/mono-osx/attachments/20110208/213487b2/attachment.html">http://lists.ximian.com/pipermail/mono-osx/attachments/20110208/213487b2/attachment.html</A>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="003985.html">[Mono-osx] [MonoMac] CoreText Sample
</A></li>
<LI>Next message: <A HREF="003982.html">[Mono-osx] Introducing MacHint MonoDevelop addin - developed with MonoMac
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#3977">[ date ]</a>
<a href="thread.html#3977">[ thread ]</a>
<a href="subject.html#3977">[ subject ]</a>
<a href="author.html#3977">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/mono-osx">More information about the Mono-osx
mailing list</a><br>
</body></html>