Re: effectiveRange?
Re: effectiveRange?
- Subject: Re: effectiveRange?
- From: Henry McGilton <email@hidden>
- Date: Thu, 17 Apr 2003 15:49:34 -0700
On Thursday, April 17, 2003, at 03:11 PM, Mark Ogilvie wrote:
I've been trying to write a simple program that will go through an
NSAttributedString and display in another window a list of all the
attributes (font, color and such) for that string. I thought this
would do it
characterAttributes = [stringFromTextStorage attributesAtIndex:count
effectiveRange:range];
with characterAttributes being an NSDictionary. But the
effectiveRange: portion will not accept any range object I assign it
too. When I try to use NSMakeRange(0,0) I get this message:
lMyDocument.m:63: incompatible type for argument 4 of indirect function
call
and it refuses to compile. It does the same thing when I try a
different number instead of 0. What does the second half of
attributesAtIndex: effectiveRange: want?
As far as I can tell, the effectiveRange: parameter wants an
NSRangePointer, so you need to provide a pointer to the return
value from NSMakeRange().
Best Wishes,
........ Henry
===============================+============================
Henry McGilton | Trilithon Software
Boulevardier, Java Composer | Seroia Research
-------------------------------+----------------------------
mailto:email@hidden |
http://www.trilithon.com
===============================+============================
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.