Re: rangeOfString with .RegularExpressionSearch not matching begin and end of line (Swift)

2015-06-12 Thread Douglas Davidson
By default those match beginning and end of string. If you use NSRegularExpression, there's an AnchorsMatchLines option to control this behavior. Douglas Davidson On Jun 12, 2015, at 3:41 AM, Antonio Nunes devli...@sintraworks.com wrote: Hi, I a trying to find a line within a string

Re: NSSpellChecker exception

2014-08-12 Thread Douglas Davidson
NSSpellChecker uses DO to connect with the spellchecker process. It properly handles any exceptions that may result, so these exceptions would be caught and handled and you do not need to be reporting them. Douglas Davidson On Aug 12, 2014, at 5:22 PM, Dragan Milić mi...@mac.com wrote: I'm

Re: NSSpellChecker -ignoreWord:… for NSTextCheckingTypeGrammar?

2013-08-16 Thread Douglas Davidson
be perfectly reasonable for you to maintain your own ignore list and filter grammar-check results based on it. Douglas Davidson On Aug 8, 2013, at 7:41 AM, Troy Stephens troy_steph...@mac.com wrote: Is NSSpellChecker’s “ignored words” API meant for use with grammar-checking results too

Re: Localization not working based on region with en-US, en-UK and en lproj

2013-02-03 Thread Douglas Davidson
The localization used is determined by matching the AppleLanguages list against the localizations available in the application's main bundle. In this case, the top entry in AppleLanguages is en, so that is the localization that will be used. Douglas Davidson On Feb 3, 2013, at 6:56 AM, Arun

Re: splitting CJK text into words

2012-09-26 Thread Douglas Davidson
On Sep 26, 2012, at 2:12 PM, Martin Wierschin wrote: I've tried a variety of locale identifiers (eg: zh, jp_JP, etc) but no joy. Am I missing something? Try ja for Japanese text, zh-Hans for Simplified Chinese text, zh-Hant for Traditional Chinese text. Douglas Davidson

Re: order of NSRegularExpression matchesInString result

2012-08-15 Thread Douglas Davidson
The matches should be returned in order. Douglas Davidson On Aug 15, 2012, at 8:33 AM, Koen van der Drift koenvanderdr...@gmail.com wrote: I am using NSRegularExpression to search for certain words in a string. To interrogate the results I use something like: NSArray *matches

Re: Losing attachments when saving rtfd

2012-04-25 Thread Douglas Davidson
. Note that the display of the attachments is controlled by the NSTextAttachmentCell, which can work fine even if there is no file representation for the image. You don't mention what image file format you are using. Douglas Davidson ___ Cocoa-dev

Re: drawing lines in and NSTextView

2012-03-31 Thread Douglas Davidson
On Mar 31, 2012, at 6:09 PM, Graham Cox graham@bigpond.com wrote: On 31/03/2012, at 11:08 PM, Koen van der Drift wrote: I have an NSTextView to which I want to add some lines that connect certain words. When the text changes, either by editing, or scrolling, that lines should follow

Re: Displaying an arbitrary unicode character using CGContextShowTextAtPoint or CGContextShowGlyphsAtPoint

2012-03-30 Thread Douglas Davidson
. They are in fact very low-level indeed, so ignore them unless you're prepared to write your own Unicode layout engine on top of them. Use the string drawing APIs instead. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: NSTextView, spell checking and temporary attributes

2012-01-02 Thread Douglas Davidson
Are you making other modifications to temporary attributes? The spelling indicator does use various temporary attributes, though not background color, so (for example) clearing temporary attributes would interfere with it. Douglas Davidson On Jan 2, 2012, at 10:20 AM, Martin Hewitson

Re: Natural language

2011-11-17 Thread Douglas Davidson
, length)]; which specifies that the text is to be treated as being entirely in English. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

Re: Natural language

2011-11-14 Thread Douglas Davidson
/NSLinguisticTagger_Class/Reference/Reference.html. If you have specific questions, you can send them to the list. Douglas Davidson On Nov 14, 2011, at 7:02 AM, Luca Ciciriello wrote: Yes, indeed!!! On Nov 14, 2011, at 2:56 PM, Eric E. Dolecki wrote: Just started watching this video - it's awesome. - Eric

Re: How to highlight the current line in NSTextView?

2011-11-04 Thread Douglas Davidson
The NSLayoutManager will tell you. Try taking a look at the conceptual documentation and some of the sample code for NSLayoutManager, and let me know if you have any problems. Douglas Davidson On Nov 4, 2011, at 6:19 AM, Nick eveningn...@gmail.com wrote: Hello Basically the question

Re: using AppKit additions in background threads

2011-09-06 Thread Douglas Davidson
of the work, and WebKit runs exclusively on the main thread. The AppKit methods can be invoked on arbitrary threads, but they will transfer WebKit work to the main thread as needed. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

Re: using AppKit additions in background threads

2011-09-06 Thread Douglas Davidson
of conversion we already have a tool on the system, /usr/bin/textutil. There are also other potential methods for parsing HTML, if the intent is for something other than full editable rich text support. Douglas Davidson ___ Cocoa-dev mailing list

Re: Opening a file read-only?

2011-08-10 Thread Douglas Davidson
(into a single malloc allocation, no less). From the header: These methods are deprecated. You should use +dataWithContentsOfURL:options:error: or -initWithContentsOfURL:options:error: with NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead. Douglas Davidson

Re: Dynamically loading NIB files with a common stem

2011-07-06 Thread Douglas Davidson
the header comments: subpath is a relative path to a subdirectory inside the relevant global or localized resource directory, and should be nil if the resource file in question is not in a subdirectory. Douglas Davidson ___ Cocoa-dev mailing list

Re: Using a Soundex category...

2011-07-06 Thread Douglas Davidson
distance, but on it's own it's not good enough. Those results sound perfectly reasonable based on the versions of Soundex that I have seen. Perhaps you are looking for something different? Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev

Re: Writing extremely large RTF or .doc files

2011-06-18 Thread Douglas Davidson
. NSAttributedString can also read it back in later, or if needed /usr/bin/textutil can convert to other formats. Douglas Davidson On Jun 17, 2011, at 10:49 PM, Dave DeLong davedel...@me.com wrote: Fair enough. This is certainly a great alternative to stripping out the document level attributes, but I'd still

Re: Properly comparing file NSURLs for equality?

2011-05-27 Thread Douglas Davidson
that we have resource properties such as NSURLFileResourceIdentifierKey/kCFURLFileResourceIdentifierKey. For other usages of FSRefs, consider file reference URLs instead. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

Re: Linearly Scaling Text

2011-05-25 Thread Douglas Davidson
method scaleUnitSquareToSize: - however this produces fuzzy text. Try taking a look at the source code for TextEdit--it's available as sample code, and it gives an example of scaling for NSTextViews. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev

Re: text orientation/positioning with layout manager

2011-01-31 Thread Douglas Davidson
The layout manager expects to be drawing within a flipped context. Douglas Davidson On Jan 31, 2011, at 2:09 PM, Todd Heberlein wrote: I'm doing a simple experiment using NSTextStorage, NSLayoutManager, NSTextContainer to draw some text (I am basing this on the CircleView example because I

Re: dylib clarification

2011-01-11 Thread Douglas Davidson
or CFBundleLoadExecutable for handling DLLs? If the executable you are trying to load is bundled, then CFBundleLoadExecutable will probably be more convenient. If not, then it may be easier to use dlopen directly. Douglas Davidson ___ Cocoa-dev mailing

Re: Strange error solved by turning off Non-contiguous Layout

2010-12-22 Thread Douglas Davidson
be if the window showed all of it. It would also be helpful if you could file a bug with enough information to reproduce this. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: What defines a paragraph in NSText*?

2010-12-11 Thread Douglas Davidson
attribute will be automatically fixed at attribute fixing time so that it is constant over each paragraph range, because that is needed at layout time. Douglas Davidson On Dec 11, 2010, at 1:10 PM, Rob Nikander rob.nikan...@gmail.com wrote: Hi, I first asked this question on stackoverflow

Re: Cocoa Text System - Temporarily Disabling Layout

2010-09-24 Thread Douglas Davidson
On Sep 23, 2010, at 7:54 AM, Jonathan Dann wrote: In our app, Kaleidoscope, I have 2 text views side-by-side. In one configuration the layout of the text in each text view is dependent both on regions of layout in the sibling text view, and the model objects which represent the the

Re: creating docx file

2010-09-20 Thread Douglas Davidson
structure on disk, e.g. RTFD. Use dataFromRange... instead. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins

Re: AttributedString from NSData on iPhone.

2010-08-07 Thread Douglas Davidson
My recommendation would be that anyone who has needs of this sort should file a bug giving details of the particular needs you have for your application. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: loading French strings being in English language

2010-07-23 Thread Douglas Davidson
. dictionaryWithContentsOfFile: or propertyListFromData:mutabilityOption:format:errorDescription:) and look up the key in the resulting dictionary (the .strings file format is a variant property list format and readable by the property list APIs). Douglas Davidson ___ Cocoa

Re: NSString ambiguities

2010-06-30 Thread Douglas Davidson
On Jun 30, 2010, at 3:02 PM, Ariel Feinerman wrote: If we read whole file as a NSString, will be any conversions between \r\n, \r, \n? Then if not, will be -componentsSeparatedByCharactersInSet: [NSCharacterSet newlineCharacterSet] create empty strings in Win \r\n case? So what is the best:

Re: NSAttributedString with columns

2010-06-14 Thread Douglas Davidson
NSAttributedString's HTML import functionality to convert it into NSAttributedString's table format. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: font glyphs on different hardware

2010-06-01 Thread Douglas Davidson
Let me second Alastair's recommendations. Our standard developer example for this sort of thing is in the SpeedometerView example code, in the SpeedyCategories.m file; take a look at the BezierConversions category on NSString, and the associated BezierNSLayoutManager. Douglas Davidson

Re: How can i disable multiple selection on a NSTextView

2010-05-24 Thread Douglas Davidson
selection that will allow you to impose all sorts of restrictions on the possible selections, including this. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: [iPhone] How to create a unique string

2010-05-13 Thread Douglas Davidson
generation is only probabilistically unique, but the probability of collisions is vanishingly small. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: Help with text input

2010-04-30 Thread Douglas Davidson
whether the receiver responds to the given selector, and if so calls it; otherwise it is passed on to the next responder's doCommandBySelector:. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: Help with text input

2010-04-30 Thread Douglas Davidson
On Apr 30, 2010, at 9:59 AM, Charles Srstka wrote: On Apr 30, 2010, at 11:41 AM, Douglas Davidson wrote: Here is the normal sequence when a text-handling view receives key events: the keyDown: method passes events to interpretKeyEvents:, which is where they enter key binding and input

Re: Help with text input

2010-04-29 Thread Douglas Davidson
this is to make use of an existing class that implements them, such as NSTextView--that's how the standard Cocoa controls do it--but it's always open to you to implement them yourself if necessary. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev

Re: Getting a bezier path for a character

2010-04-28 Thread Douglas Davidson
at bezierWithFont: in the SpeedyCategories.m file. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Re: CFUUID question

2010-04-28 Thread Douglas Davidson
possible with CFUUID. CFUUIDCreate() generates a new random UUID. CFUUIDCreateWithBytes() and CFUUIDCreateFromString() create CFUUID objects based on existing values. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: CSS style string to NSAttributedString attributes conversion

2010-04-08 Thread Douglas Davidson
by itself, but if CSS is applied to HTML, AppKit's HTML import will convert it to attributes on the text. You might be able to make use of that. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: Custom NSTextView for text annotations

2010-03-29 Thread Douglas Davidson
from. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription

Re: How to relayout content of NSTextView so that my tab characters are drawn with width of 4 characters

2010-02-19 Thread Douglas Davidson
to surround this with calls to shouldChange/didChange methods--take a look at some of the samples for code examples of this sort of thing. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: -[NSBundle preferredLocalizations]

2010-02-10 Thread Douglas Davidson
On Feb 10, 2010, at 5:52 AM, Kai Brüning wrote: Could somebody with insight confirm whether this is a documentation bug? This is indeed an error in the documentation. Please file a bug against the documentation with the information you have provided. Douglas

Re: NSLayoutManager vertical offset mystery

2010-02-06 Thread Douglas Davidson
Use a flipped context. Douglas Davidson On Feb 6, 2010, at 2:20 PM, Andy O'Meara andrew.ome...@soundspectrum.com wrote: Hi gents, I have a small cocoa text layout issue that I could use some help from the veterans here, and I've been unable to make progress using google, ADC

Re: Arbitrary Attributes affect text layout

2010-02-02 Thread Douglas Davidson
rangeOfComposedCharacterSequenceAtIndex: et al., rather than to individual characters. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev

Re: Arbitrary Attributes affect text layout

2010-02-02 Thread Douglas Davidson
the problems you have been seeing, but I'd suggest using rangeOfComposedCharacterSequenceAtIndex: and the like as a workaround. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Re: Setting the Line Height/ Line Spacing in an NSTextView.

2009-12-24 Thread Douglas Davidson
Use a paragraph style. Douglas Davidson On Dec 24, 2009, at 10:25 AM, Joshua Garnham joshua.garn...@yahoo.co.uk wrote: How would I set the Line Height/ Line Spacing in an NSTextView? e.g How tall each line is or how much space is between each line. Thanks

Re: NSRecursiveLock problems

2009-12-23 Thread Douglas Davidson
will not occur for your layout manager while you are using it on a background thread. If you have done that and still see threading issues, please file a bug. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Releasing an NSBundle

2009-12-21 Thread Douglas Davidson
and wish to continue to use the code from it, you should keep a reference to the NSBundle for as long as you continue to use it. This is definitely the case for code loaded using CFBundle--if you want to continue using it, keep a reference to the CFBundle. Douglas Davidson

Re: NSTextView Bad Behavior

2009-12-14 Thread Douglas Davidson
On Dec 14, 2009, at 10:50 AM, Gordon Apple wrote: Any ideas on how to force a full layout and then prevent NSTextView from further mucking with it? One of NSLayoutManager's -ensureLayout... methods would be a good bet here. Douglas Davidson

Re: Unable to write in InfoPlist.strings file from cpp

2009-12-10 Thread Douglas Davidson
plist format, the contents must be a dictionary of strings. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins

Re: Saving position in NSTextView

2009-12-04 Thread Douglas Davidson
:, and convert the resulting glyph range to a character range. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins

Re: Finding a word from a character position

2009-12-03 Thread Douglas Davidson
that -characterIndexForPoint: is intended for input methods, not for setting the insertion point. Try - characterIndexForInsertionAtPoint: instead. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: How can a plug-in bundle get access to its own resources?

2009-11-10 Thread Douglas Davidson
bug because there are no namespaces, and for the same class name there is only one bundle. As others have said, don't do this. However, to answer your question, the other way to locate your bundle is via bundleWithIdentifier:. Douglas Davidson

Re: NSString of selected text in NSTextView

2009-11-09 Thread Douglas Davidson
underlying string, and these are the character indexes used by the layout manager and the text view. Processes such as copying and pasting, on the other hand, may not preserve character indexes. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa

Re: NSString of selected text in NSTextView

2009-11-09 Thread Douglas Davidson
On Nov 9, 2009, at 9:37 AM, Kyle Sluder wrote: On Mon, Nov 9, 2009 at 9:28 AM, Douglas Davidson ddavi...@apple.com wrote: Yes, that's correct. Within a given text view, the character indexes are the same between the text storage and its underlying string, and these are the character

Re: NSString of selected text in NSTextView

2009-11-07 Thread Douglas Davidson
NSTextView will usually take care of making sure that the selection is a reasonable range. One complication is that in general NSTextView supports multiple discontiguous selection ranges, and if such a selection is in use, calling just -selectedRange will ignore it. On Nov 7, 2009, at

Re: NSString of selected text in NSTextView

2009-11-07 Thread Douglas Davidson
). Douglas Davidson On Nov 7, 2009, at 6:06 PM, Kyle Sluder kyle.slu...@gmail.com wrote: On Sat, Nov 7, 2009 at 5:57 PM, Todd Heberlein todd_heberl...@mac.com wrote: This seems like a simple task, but it has become a series of steps. Am I missing a simple method that will do

Re: NSString's handling of Unicode extension B (and C) characters

2009-11-05 Thread Douglas Davidson
to glyph boundaries; a ligature glyph in some cases, such as an fi ligature in Latin script, may require an internal insertion point on a user-perceived character boundary. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

Re: Extract plain text content from a Text View

2009-10-16 Thread Douglas Davidson
NSTextStorage is a subclass of NSMutableAttributedString. Is that enough of a hint? Douglas Davidson On Oct 16, 2009, at 12:37 PM, Ian Piper ianpi...@mac.com wrote: Hi all, Is there a way to get the plain text content out of an NSTextStorage object (displaying using a Text View

Re: language based scaning,

2009-10-15 Thread Douglas Davidson
in NSLayoutManager, but that's probably more detailed than you really want. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev

Re: Automatic language detection - a bug (again) or what. Snow Foundation NSSpellServer.

2009-10-08 Thread Douglas Davidson
File a bug against NSSpellChecker and we will look into it. Douglas Davidson On Oct 8, 2009, at 1:35 PM, MacProjects m...@krokoarch.lv wrote: Hello! I'm maintaining system-wide Latvian spell checker for ~ 2 years. It works as intended on 10.4 and 10.5. Just made a dummy spellcheck

Re: NSAttributedString always returns NO for -isEqualToAttributedString with attachments present?

2009-10-07 Thread Douglas Davidson
identity. If you need to compare two attributed strings, you may need to consider exactly what notion of equivalence you're looking for, and implement something to test for that. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev

Re: Displaying characters from the 'Unicode Symbols' font ??

2009-09-25 Thread Douglas Davidson
a bezier path from text--look at bezierWithFont: in http://developer.apple.com/mac/library/samplecode/SpeedometerView/listing9.html . Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: Displaying characters from the 'Unicode Symbols' font ??

2009-09-25 Thread Douglas Davidson
. However, for purposes of getting them into an NSString, you can (for example) represent them in UTF-32 and use one of the conversion methods. Alternatively, you could put them in a file, maybe a text file or a plist, and let the standard import methods deal with encoding issues. Douglas

Re: Distinguishing between return and enter in NSTextField

2009-09-03 Thread Douglas Davidson
Short answer: no. Stay away from keyDown: and look at delegate methods instead. I have a standard rant on this topic; I don't have it handy but it should be in the list archives. Douglas Davidson On Sep 3, 2009, at 10:54 AM, Rick Mann rm...@latencyzero.com wrote: Hi. I'd like to insert

Re: Distinguishing between return and enter in NSTextField

2009-09-03 Thread Douglas Davidson
Try taking a look at the current event. Douglas Davidson On Sep 3, 2009, at 11:18 AM, Rick Mann rm...@latencyzero.com wrote: I would like to use the delegate, but it sends me insertNewLine: for both keys. Is there another method I can implement? On Sep 3, 2009, at 11:14:20, Douglas

Re: Normalize an NSAttributedString

2009-08-26 Thread Douglas Davidson
, there's no guarantee that something like this will work. Depending on the font, something like an o+umlaut may be represented with a single glyph, in which case there's currently no mechanism for coloring the umlaut differently from the o. Douglas Davidson

Re: NSTextView - Image Editing?

2009-07-27 Thread Douglas Davidson
, and is there any easy way that I could use the Image Edit panel within an NSTextView? This option is advisory for attachments; unfortunately the attachment classes do not yet implement this functionality, so if you want to pop up a panel you would need to do it yourself. Douglas Davidson

Re: Efficiency of loading Localizable.strings and NSUserDefaults

2009-07-15 Thread Douglas Davidson
all be cached indefinitely, but in general you can expect that subsequent requests for the same string after the first will be fast. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: document specific as-you-type spell checking

2009-06-25 Thread Douglas Davidson
? If you provide a custom field editor, you can override - spellCheckerDocumentTag. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

Re: -replaceTextStorage: problem

2009-06-08 Thread Douglas Davidson
sure you're calling the super methods. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help

Re: Hiding Glyphs

2009-06-05 Thread Douglas Davidson
the displayed glyphs. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your

Re: How heavy is NSLayoutManager?

2009-06-03 Thread Douglas Davidson
are not expecting to scale that number up by several orders of magnitude in the future. However, every application's usage pattern is different. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Breaking underlining on descenders

2009-05-13 Thread Douglas Davidson
make this easy, but you could probably put something together. You can file an enhancement request for suitable API. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Re: Creating NSAttributedString objects using WebKit in secondary thread

2009-05-11 Thread Douglas Davidson
On May 11, 2009, at 10:53 AM, Dragan Milić wrote: Is there any way to initialise and use WebKit out of the main thread? No, there isn't. This is a fundamental restriction on the use of WebKit. Douglas Davidson ___ Cocoa-dev mailing list

Re: Using CFStringTransform with Attributed strings or runs, maintaining the styling of the Attributes in transformed results.

2009-04-20 Thread Douglas Davidson
. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http

Re: IsBadCodePtr in Cocoa or Unix?

2009-04-16 Thread Douglas Davidson
out all sorts of information about the address space of a process via various Mach APIs. This is pretty deep stuff, so I won't even start to explain it in a mail message; if you want to do it, you had better understand it thoroughly. Douglas Davidson

Re: Screen Savers

2009-04-10 Thread Douglas Davidson
if there's no obviously suitable class to use with +bundleForClass:. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins

Re: Encoding to use for file names

2009-02-05 Thread Douglas Davidson
in the reference for this method: To convert a char * path (such as you might get from a C library routine) to an NSString object, use NSFileManager‘s stringWithFileSystemRepresentation:length: method. Douglas Davidson ___ Cocoa-dev mailing list

Re: How to draw text with fade out effect?

2009-01-30 Thread Douglas Davidson
-- with different affine transforms rather than varying alphas. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins

Re: NSTextView.preferredPasteboardTypeFromArray

2009-01-28 Thread Douglas Davidson
. But it feels like I'm doing the wrong thing somehow, since from the doco it sounds like you shouldn't return a type that is not in the allowedTypes. Try overriding -acceptableDragTypes as well as -readablePasteboardTypes. Douglas Davidson ___ Cocoa

Re: NSTextView and automaticLinkDetection

2009-01-20 Thread Douglas Davidson
this evaluation. This functionality is not yet available. However, we do provide - URLAtIndex:effectiveRange:, which you could use to implement this yourself. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Localize Attributed Strings?

2009-01-06 Thread Douglas Davidson
localized strings and used NSAttributedString's HTML conversion to get attributed strings; etc., etc. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: Overriding NSTextField keyDown?

2009-01-06 Thread Douglas Davidson
keyDown:, because doing so will break most input methods. Dealing with raw key strokes is too crude for the needs of modern text input--that's why we have all of these other override points. Check the archives for my earlier messages on this topic. Douglas Davidson

Re: Overriding NSTextField keyDown?

2009-01-06 Thread Douglas Davidson
to strings. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your

Re: NSAttributedString - XHTML 1.1

2008-12-16 Thread Douglas Davidson
not been configured or tested for the generation of XHMTL 1.1. It does not currently make use of the lang attribute or map element, or the name attribute on a elements, and it is unlikely to do so in the future, but I'm not prepared to make further guarantees. Douglas Davidson

Re: NSSocketPort == BSD Socket

2008-12-05 Thread Douglas Davidson
or CFNetwork, not an NSPort subclass. It is possible to create an NSSocketPort, then extract the socket and use it separately, but that isn't really using an NSSocketPort. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: very different width for space character when not using screen fonts

2008-12-02 Thread Douglas Davidson
and file a bug and we'll track it down. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help

Re: Live editing an NSTextView

2008-11-26 Thread Douglas Davidson
set a flag noting that your change is in progress, and clear it when your change is done. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: Figure out the size of an NSAttributedString

2008-11-26 Thread Douglas Davidson
drawing it to an intermediate image if I really need to?) You'll find the methods you need right alongside those for drawing the attributed string, in NSStringDrawing.h. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: Remove HTML Tags

2008-11-24 Thread Douglas Davidson
, and examine the various options available to you to see how well they agree with what you want. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: Is -rangeOfUserTextChange: supposed to wipe out marked text/diacritical marks?

2008-11-20 Thread Douglas Davidson
, suddenly accented characters stop working. Yes, these methods unmark the text. They're generally intended to be called when a change is actually going to be made. One alternative would be for you to call -isEditable and -selectedRange in your validation code instead. Douglas Davidson

Re: NSAttributedString rendering bugs when rendered with Cocoa Text (rdar://6379047)

2008-11-18 Thread Douglas Davidson
, because text generally runs from top to bottom rather than the reverse. You didn't post code, so I'm not sure exactly what you're doing, but this is a good general rule. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

Re: SOLVED Re: NSAttributedString rendering bugs when rendered with Cocoa Text (rdar://6379047)

2008-11-18 Thread Douglas Davidson
. If you are going to be drawing using the layout manager directly, this is a hard- and-fast rule. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: SOLVED Re: NSAttributedString rendering bugs when rendered with Cocoa Text (rdar://6379047)

2008-11-18 Thread Douglas Davidson
need to rejig things so the complex custom views embed an NSView rather than draw the attributed string manually. The other alternative would be to use the NSStringDrawing APIs instead of using NSLayoutManager directly. Douglas Davidson

Re: Remove '\n' char from NSString

2008-11-17 Thread Douglas Davidson
terminators more generally, you can use e.g. - getParagraphStart:end:contentsEnd:forRange: in a little loop. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: NSAttributedString rendering bugs when rendered with Cocoa Text (rdar://6379047)

2008-11-17 Thread Douglas Davidson
appear to be intrepreted inverted, in that 1 for superscript produces subscript, positive obliqueness is a leftward tilt, etc. In normal controls the attributes render as expected. Make sure that you are drawing in a flipped context. Douglas Davidson

Re: Notifying that a TextView's content has been changed?

2008-11-14 Thread Douglas Davidson
and notifications, call -shouldChangeTextInRange:replacementString: before making the change, and if the value is YES, make the change, then call -didChangeText. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: NSImage in NSAttributedString

2008-11-12 Thread Douglas Davidson
data for a persistent representation of your image--something like - tiffRepresentation--from which you can create a regular-file NSFileWrapper via -initRegularFileWithContents:. Be sure to call - setPreferredFilename: with an appropriate filename and extension. Douglas Davidson

  1   2   >