зеркало из https://github.com/mono/mail-archives.git
115 строки
4.3 KiB
HTML
115 строки
4.3 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-osx] MonoMac NSAttributedString.h
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20MonoMac%20NSAttributedString.h&In-Reply-To=u2jd57001c11004210739r580e02eby4a22ef60f0580f3%40mail.gmail.com">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="002839.html">
|
|
<LINK REL="Next" HREF="002842.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-osx] MonoMac NSAttributedString.h</H1>
|
|
<B>Miguel de Icaza</B>
|
|
<A HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20MonoMac%20NSAttributedString.h&In-Reply-To=u2jd57001c11004210739r580e02eby4a22ef60f0580f3%40mail.gmail.com"
|
|
TITLE="[Mono-osx] MonoMac NSAttributedString.h">miguel at novell.com
|
|
</A><BR>
|
|
<I>Wed Apr 21 12:15:02 EDT 2010</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="002839.html">[Mono-osx] MonoMac NSAttributedString.h
|
|
</A></li>
|
|
<LI>Next message: <A HREF="002842.html">[Mono-osx] MonoMac NSAttributedString.h
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#2841">[ date ]</a>
|
|
<a href="thread.html#2841">[ thread ]</a>
|
|
<a href="subject.html#2841">[ subject ]</a>
|
|
<a href="author.html#2841">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>Hello Duane,
|
|
|
|
I could not find in the bindings for these:
|
|
><i>
|
|
</I>><i> APPKIT_EXTERN NSString *NSFontAttributeName; // NSFont,
|
|
</I>><i> default Helvetica 12
|
|
</I>><i> APPKIT_EXTERN NSString *NSParagraphStyleAttributeName; //
|
|
</I>><i> NSParagraphStyle, default defaultParagraphStyle
|
|
</I>><i> APPKIT_EXTERN NSString *NSForegroundColorAttributeName; // NSColor,
|
|
</I>><i> default blackColor
|
|
</I>><i> etc....
|
|
</I>><i>
|
|
</I>><i> How should these be exposed in the bindings? My guess is it needs to
|
|
</I>><i> follow the same pattern as in CTStringAttributeKey.cs with the call to
|
|
</I>><i> Dlfcn.GetStringConstant. Is that correct?
|
|
</I>><i>
|
|
</I>
|
|
This is correct. I struggle with this because I feel that we should add
|
|
support to the generator for this instead of writing this by hand every
|
|
time.
|
|
|
|
My concern is the following: for a class that has say 200 of those
|
|
APPKIT_EXTERN declarations, we have multiple options:
|
|
|
|
(a) initialize them all in the static constructor, slows down a class
|
|
startup for no reason.
|
|
(b) initialize them on demand doing an open/find/close per symbol every time
|
|
(expensive if you need all keys)
|
|
|
|
And it just occurred to me that what we could do is open the handle on the
|
|
static constructor for the library (to avoid the GetSlowStringConstant
|
|
slowness) and load the data on demand.
|
|
|
|
The remaining issue is: how do we teach the generator about these constants?
|
|
|
|
Perhaps a [Field] attribute applied to properties?
|
|
|
|
Miguel.
|
|
|
|
><i>
|
|
</I>><i> Duane
|
|
</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>-------------- next part --------------
|
|
An HTML attachment was scrubbed...
|
|
URL: <A HREF="http://lists.ximian.com/pipermail/mono-osx/attachments/20100421/f1c1a0a8/attachment.html">http://lists.ximian.com/pipermail/mono-osx/attachments/20100421/f1c1a0a8/attachment.html</A>
|
|
</PRE>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="002839.html">[Mono-osx] MonoMac NSAttributedString.h
|
|
</A></li>
|
|
<LI>Next message: <A HREF="002842.html">[Mono-osx] MonoMac NSAttributedString.h
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#2841">[ date ]</a>
|
|
<a href="thread.html#2841">[ thread ]</a>
|
|
<a href="subject.html#2841">[ subject ]</a>
|
|
<a href="author.html#2841">[ 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>
|