зеркало из https://github.com/mono/mail-archives.git
193 строки
9.1 KiB
HTML
193 строки
9.1 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-osx] PermFormSelectOnMainThread patch for monomac
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20PermFormSelectOnMainThread%20patch%20for%20monomac&In-Reply-To=BANLkTimpvCqz%2BkNbGRO%2BdSoUMWNof-9g1Q%40mail.gmail.com">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="004322.html">
|
|
<LINK REL="Next" HREF="004324.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-osx] PermFormSelectOnMainThread patch for monomac</H1>
|
|
<B>Maxi Combina</B>
|
|
<A HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20PermFormSelectOnMainThread%20patch%20for%20monomac&In-Reply-To=BANLkTimpvCqz%2BkNbGRO%2BdSoUMWNof-9g1Q%40mail.gmail.com"
|
|
TITLE="[Mono-osx] PermFormSelectOnMainThread patch for monomac">maxi.combina at passwordbank.com
|
|
</A><BR>
|
|
<I>Mon May 23 09:48:00 EDT 2011</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="004322.html">[Mono-osx] PermFormSelectOnMainThread patch for monomac
|
|
</A></li>
|
|
<LI>Next message: <A HREF="004324.html">[Mono-osx] PermFormSelectOnMainThread patch for monomac
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#4323">[ date ]</a>
|
|
<a href="thread.html#4323">[ thread ]</a>
|
|
<a href="subject.html#4323">[ subject ]</a>
|
|
<a href="author.html#4323">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>Hi,
|
|
I attach the patch in this message.
|
|
I am not sure which is the best way to submit the patch, please let me know.
|
|
|
|
Regards,
|
|
Maxi
|
|
|
|
2011/5/23 Duane Wandless <<A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">duane at wandless.net</A>>
|
|
|
|
><i> Yes adding obj == null ? IntPtr.Zero : obj.Handle to the implementation of
|
|
</I>><i> InvokeOnMainThread is correct. Did you submit that patch?
|
|
</I>><i>
|
|
</I>><i> Duane
|
|
</I>><i>
|
|
</I>><i> On Mon, May 23, 2011 at 8:24 AM, Maxi Combina <
|
|
</I>><i> <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">maxi.combina at passwordbank.com</A>> wrote:
|
|
</I>><i>
|
|
</I>>><i> I have tried now and they didn't work.
|
|
</I>>><i>
|
|
</I>>><i> However, I found the problem:
|
|
</I>>><i> The patch I sent passes "obj == null ? IntPtr.Zero : obj.Handle", but the
|
|
</I>>><i> implementation of InvokeOnMainThread() uses "obj.Handle" without checking
|
|
</I>>><i> for null.
|
|
</I>>><i>
|
|
</I>>><i> My selector does not take argument, so I use null as argument...
|
|
</I>>><i> and InvokeOnMainThread() fails. If I change
|
|
</I>>><i> monomac/src/Foundation/NSObject.cs:InvokeOnMainThread() to check for null,
|
|
</I>>><i> it works.
|
|
</I>>><i>
|
|
</I>>><i> So: could this small change be added? Or is it mandatory to pass a
|
|
</I>>><i> non-null paramter to InvokeOnMainThread()?
|
|
</I>>><i>
|
|
</I>>><i> Thanks!
|
|
</I>>><i> maxi
|
|
</I>>><i>
|
|
</I>>><i> 2011/5/23 Duane Wandless <<A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">duane at wandless.net</A>>
|
|
</I>>><i>
|
|
</I>>>><i> Did you try NSObject.BeginInvokeOnMainThread or
|
|
</I>>>><i> NSObject.InvokeOnMainThread?
|
|
</I>>>><i>
|
|
</I>>>><i> <A HREF="http://wiki.monotouch.net/HowTo/Threading">http://wiki.monotouch.net/HowTo/Threading</A>
|
|
</I>>>><i>
|
|
</I>>>><i> Duane
|
|
</I>>>><i>
|
|
</I>>>><i> On Mon, May 23, 2011 at 6:35 AM, Maxi Combina <
|
|
</I>>>><i> <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">maxi.combina at passwordbank.com</A>> wrote:
|
|
</I>>>><i>
|
|
</I>>>>><i> Hi,
|
|
</I>>>>><i>
|
|
</I>>>>><i> I need the functionallity of performing a selector on the main thread
|
|
</I>>>>><i> (as WebKit methods can't be invoked from secundary threads). As I could not
|
|
</I>>>>><i> find a way to achieve this with the current MonoMac API, I binded
|
|
</I>>>>><i> NSObject.performSelectorOnMainThread:withObject:waitUntilDone:
|
|
</I>>>>><i>
|
|
</I>>>>><i> I would appreciate if this (o a better) patch is included in mainstream.
|
|
</I>>>>><i> Or, if there is another way to perform a selector on the main thread without
|
|
</I>>>>><i> this patch, you could give me some pointer :)
|
|
</I>>>>><i>
|
|
</I>>>>><i> Please let me know. Kind regards,
|
|
</I>>>>><i> maxi
|
|
</I>>>>><i>
|
|
</I>>>>><i> --
|
|
</I>>>>><i> *Maxi Combina*
|
|
</I>>>>><i> Cell:+1 408 300 3614
|
|
</I>>>>><i> Tel: +1 408 524 1579
|
|
</I>>>>><i> 440 N. Wolfe Road. Sunnyvale. CA. 94085. USA
|
|
</I>>>>><i>
|
|
</I>>>>><i> <<A HREF="http://www.passwordbank.com/">http://www.passwordbank.com/</A>>www.PasswordBank.com<<A HREF="http://www.passwordbank.com/">http://www.passwordbank.com/</A>>
|
|
</I>>>>><i> This message and its attachments are sent from PasswordBank, Inc. and
|
|
</I>>>>><i> may contain information that is
|
|
</I>>>>><i> confidential. If you are not the intended recipient, you are prohibited
|
|
</I>>>>><i> from printing, copying, forwarding or
|
|
</I>>>>><i> saving them. Please delete the message and attachments without printing,
|
|
</I>>>>><i> copying, forwarding or saving
|
|
</I>>>>><i> them, and notify the sender immediately. Message transmission is not
|
|
</I>>>>><i> guaranteed to be secure.
|
|
</I>>>>><i>
|
|
</I>>>>><i>
|
|
</I>>>>><i> _______________________________________________
|
|
</I>>>>><i> Mono-osx mailing list
|
|
</I>>>>><i> <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">Mono-osx at lists.ximian.com</A>
|
|
</I>>>>><i> <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">http://lists.ximian.com/mailman/listinfo/mono-osx</A>
|
|
</I>>>>><i>
|
|
</I>>>>><i>
|
|
</I>>>><i>
|
|
</I>>><i>
|
|
</I>>><i>
|
|
</I>>><i> --
|
|
</I>>><i> *Maxi Combina*
|
|
</I>>><i> Cell:+1 408 300 3614
|
|
</I>>><i> Tel: +1 408 524 1579
|
|
</I>>><i> 440 N. Wolfe Road. Sunnyvale. CA. 94085. USA
|
|
</I>>><i>
|
|
</I>>><i> <<A HREF="http://www.passwordbank.com/">http://www.passwordbank.com/</A>>www.PasswordBank.com<<A HREF="http://www.passwordbank.com/">http://www.passwordbank.com/</A>>
|
|
</I>>><i> This message and its attachments are sent from PasswordBank, Inc. and may
|
|
</I>>><i> contain information that is
|
|
</I>>><i> confidential. If you are not the intended recipient, you are prohibited
|
|
</I>>><i> from printing, copying, forwarding or
|
|
</I>>><i> saving them. Please delete the message and attachments without printing,
|
|
</I>>><i> copying, forwarding or saving
|
|
</I>>><i> them, and notify the sender immediately. Message transmission is not
|
|
</I>>><i> guaranteed to be secure.
|
|
</I>>><i>
|
|
</I>>><i>
|
|
</I>><i>
|
|
</I>
|
|
|
|
--
|
|
*Maxi Combina*
|
|
Cell:+1 408 300 3614
|
|
Tel: +1 408 524 1579
|
|
440 N. Wolfe Road. Sunnyvale. CA. 94085. USA
|
|
|
|
<<A HREF="http://www.passwordbank.com/">http://www.passwordbank.com/</A>>www.PasswordBank.com<<A HREF="http://www.passwordbank.com/">http://www.passwordbank.com/</A>>
|
|
This message and its attachments are sent from PasswordBank, Inc. and may
|
|
contain information that is
|
|
confidential. If you are not the intended recipient, you are prohibited from
|
|
printing, copying, forwarding or
|
|
saving them. Please delete the message and attachments without printing,
|
|
copying, forwarding or saving
|
|
them, and notify the sender immediately. Message transmission is not
|
|
guaranteed to be secure.
|
|
-------------- next part --------------
|
|
An HTML attachment was scrubbed...
|
|
URL: <A HREF="http://lists.ximian.com/pipermail/mono-osx/attachments/20110523/cfa14071/attachment-0001.html">http://lists.ximian.com/pipermail/mono-osx/attachments/20110523/cfa14071/attachment-0001.html</A>
|
|
-------------- next part --------------
|
|
A non-text attachment was scrubbed...
|
|
Name: invokeOnMainThreadNullCheck.patch
|
|
Type: text/x-patch
|
|
Size: 702 bytes
|
|
Desc: not available
|
|
Url : <A HREF="http://lists.ximian.com/pipermail/mono-osx/attachments/20110523/cfa14071/attachment-0001.bin">http://lists.ximian.com/pipermail/mono-osx/attachments/20110523/cfa14071/attachment-0001.bin</A>
|
|
</PRE>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="004322.html">[Mono-osx] PermFormSelectOnMainThread patch for monomac
|
|
</A></li>
|
|
<LI>Next message: <A HREF="004324.html">[Mono-osx] PermFormSelectOnMainThread patch for monomac
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#4323">[ date ]</a>
|
|
<a href="thread.html#4323">[ thread ]</a>
|
|
<a href="subject.html#4323">[ subject ]</a>
|
|
<a href="author.html#4323">[ 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>
|