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

150 строки
8.0 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%0A%09with%20MonoMac&In-Reply-To=AANLkTikxoLymkgfZowPUcMTBBk55Gg%2BK1AFFsw1122kr%40mail.gmail.com">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="003982.html">
<LINK REL="Next" HREF="004048.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%0A%09with%20MonoMac&In-Reply-To=AANLkTikxoLymkgfZowPUcMTBBk55Gg%2BK1AFFsw1122kr%40mail.gmail.com"
TITLE="[Mono-osx] Introducing MacHint MonoDevelop addin - developed with MonoMac">fforjan at free.fr
</A><BR>
<I>Tue Feb 8 03:18:02 EST 2011</I>
<P><UL>
<LI>Previous message: <A HREF="003982.html">[Mono-osx] Introducing MacHint MonoDevelop addin - developed with MonoMac
</A></li>
<LI>Next message: <A HREF="004048.html">[Mono-osx] Introducing MacHint MonoDevelop addin - developed with MonoMac
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#3986">[ date ]</a>
<a href="thread.html#3986">[ thread ]</a>
<a href="subject.html#3986">[ subject ]</a>
<a href="author.html#3986">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Hello !
Thanks for your answers !
For the monomac dll, i already tried what you said but it seems the MonoMac.dll is not loaded... How to ensure that this dll is already loaded ?
I'm currently on the alpha channel to monodevelop, but maybe these modifications are not part of this channel ? If it's the case I will have to recompile or way to see them in the alpha channel.
Regarding the NSApplication.Init , it's because Growl must be configure -i.e. calling Dlfcn.dlopen (path_to_growl_bin, 0); BEFORE the NSApplication.Init - see <A HREF="http://cocoa-mono.org/archives/254/growl-my-monomac-application-says/">http://cocoa-mono.org/archives/254/growl-my-monomac-application-says/</A> : &quot;we load the framework BEFORE the NSApplication.Init(). I tried multiple places with no success until I finally had to ask on the MonoMac IRC channel to find the answer for this. &quot;
This is why I'm calling it.
I'm sure I can remove it but i think it will need to extension point from the monomac addin to be called before the NSApplication.Init()
Regards,
Frederic
On 08/02/2011, at 6:21 AM, Michael Hutchinson wrote:
&gt;<i> On Mon, Feb 7, 2011 at 8:09 AM, frederic forjan &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">fforjan at free.fr</A>&gt; wrote:
</I>&gt;&gt;<i> * saving document is done by AppleScript. I've discovered and do my first
</I>&gt;&gt;<i> AppleScript for this usage. And at the same start I've done a very basic
</I>&gt;&gt;<i> binding for the NSAppleScript object.
</I>&gt;&gt;<i> There is a bug in my binding, if the script running an error, it will
</I>&gt;&gt;<i> crashed. This is due of my NSAppleScript binding, I didn't find how to bind
</I>&gt;&gt;<i> a pointer of pointer of NSDictionary - means ref NSDictionary in C# ?
</I>&gt;<i>
</I>&gt;<i> FWIW, you can find a more direct AppleScript binding here:
</I>&gt;<i> <A HREF="https://github.com/mono/monodevelop/blob/master/main/src/addins/MacPlatform/Framework/AppleScript.cs">https://github.com/mono/monodevelop/blob/master/main/src/addins/MacPlatform/Framework/AppleScript.cs</A>
</I>&gt;<i>
</I>&gt;&gt;<i> Some remarks :
</I>&gt;&gt;<i> -----
</I>&gt;&gt;<i> * Since the monomac dll is delivered with the addin, What happens if two
</I>&gt;&gt;<i> addins use two differents monomac (or the same) dll ? Are they shared ?
</I>&gt;&gt;<i> Should it be installed in the GAC ?
</I>&gt;<i>
</I>&gt;<i> Ideally, you should not bundle MonoMac. You should instead depend on
</I>&gt;<i> an addin that includes MonoMac.dll. When that addin is loaded, its
</I>&gt;<i> MonoMac.dll will also be loaded. Then, your addin will resolve that
</I>&gt;<i> MonoMac dll.
</I>&gt;<i>
</I>&gt;<i> In MD master, MacPlatform addin references MonoMac.dll, for native
</I>&gt;<i> dialogs. Since MD master will soon become MD 2.6, I recommend you
</I>&gt;<i> target that.
</I>&gt;<i>
</I>&gt;&gt;<i> * There is a NSApplication.Init call also in my addin. How is it working
</I>&gt;&gt;<i> with the NSApplication from the Mac platform ? Is there any conflict ?
</I>&gt;<i>
</I>&gt;<i> In MD master, the MacPlatform addin calls NSApplication.Init at the
</I>&gt;<i> appropriate point, so it should not be necessary for you to call it
</I>&gt;<i> again.
</I>&gt;<i>
</I>&gt;&gt;<i> I'm thinking it's linked but I was not able to use the shared NSWorkspace or
</I>&gt;&gt;<i> the shared NSPasteBoard, MonoDevelop seems to wait indefinitely.
</I>&gt;<i>
</I>&gt;<i> This might be due to the fact that MD is built on GTK#, which uses
</I>&gt;<i> some Cocoa API internally but is not a true Cocoa app. Some things
</I>&gt;<i> work, some things don't. You'll need to investigate the hangs by
</I>&gt;<i> getting stack traces:
</I>&gt;<i> <A HREF="http://monodevelop.com/Developers/Reporting_Bugs#Debugging_Hangs_on_Mac_and_Linux">http://monodevelop.com/Developers/Reporting_Bugs#Debugging_Hangs_on_Mac_and_Linux</A>
</I>&gt;<i>
</I>&gt;&gt;<i> I've mainly starting development on this platform - MonoDevelop, mono and
</I>&gt;&gt;<i> mac ! so i'm happy to any feedback, positive or not.
</I>&gt;&gt;<i> One of my question is, Is it a supported architecture ? Writting a plugin to
</I>&gt;&gt;<i> an existing application to provide feature to the mac platform using monomac
</I>&gt;&gt;<i> ?
</I>&gt;<i>
</I>&gt;<i> Yes, it is. Just beware that using Cocoa &amp; Carbon APIs from a GTK# app
</I>&gt;<i> is not always easy.
</I>&gt;<i>
</I>&gt;&gt;<i> Do you think it's useful ? Do you have any feedback on the feature, on the
</I>&gt;&gt;<i> implementation ? Or any idea for new features ?
</I>&gt;&gt;<i> I was thinking to be able to use the service menu like to send the currently
</I>&gt;&gt;<i> selected text in email or the currently selected solution item as a mail
</I>&gt;&gt;<i> with attachments, use the dock icon to display number of error from the last
</I>&gt;&gt;<i> build.
</I>&gt;<i>
</I>&gt;<i> For &quot;core&quot; features that would be useful to everyone, like displaying
</I>&gt;<i> the number of build errors on the Dock Icon, or adding commands to the
</I>&gt;<i> dock icon's context menu, I would recommend contributing such features
</I>&gt;<i> to the MacPlatform addin so these features can ship with MD core.
</I>&gt;<i>
</I>&gt;<i> I don't want to ship Growl with MD though, so anything depending on
</I>&gt;<i> Growl would have to go in a separate addin, along with &quot;powertoy&quot;
</I>&gt;<i> features like send as email.
</I>&gt;<i>
</I>&gt;<i> --
</I>&gt;<i> Michael Hutchinson
</I>&gt;<i> <A HREF="http://mjhutchinson.com">http://mjhutchinson.com</A>
</I>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="003982.html">[Mono-osx] Introducing MacHint MonoDevelop addin - developed with MonoMac
</A></li>
<LI>Next message: <A HREF="004048.html">[Mono-osx] Introducing MacHint MonoDevelop addin - developed with MonoMac
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#3986">[ date ]</a>
<a href="thread.html#3986">[ thread ]</a>
<a href="subject.html#3986">[ subject ]</a>
<a href="author.html#3986">[ 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>