• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Still cannot get CF terminology correct
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Still cannot get CF terminology correct


  • Subject: Re: Still cannot get CF terminology correct
  • From: Shane Stanley <email@hidden>
  • Date: Thu, 25 Sep 2014 21:18:55 +1000

On 25 Sep 2014, at 8:17 pm, Brian Christmas <email@hidden> wrote:

I think I'm correct in saying that to get a non-concrete Attributable text string, I need  to use the  method, so, I've tried, with no success.

No. In this context, concrete means nothing to you; it's just a subclass of attributed string. It's nothing to do with mutability, if that's what you're thinking.

set x to current application's NSAttributedString's alloc()'s initWithString:"blah"
current application's NSLog("%@", x's |class|())
--> NSConcreteAttributedString
x's isKindOfClass:(current application's NSAttributedString)
--> 1


I've tried (amongst others) the five permutations below, each with an 'unrecognised selector' error trap error. Without the error trap, the log reports the same.

I found this 
  	CFAttributedStringCreateMutableCopy(NULL, 0, attr_text));
 on the net, but it does not seem to relate to the ASObjC method that's required.

CFAttributedStringCreateMutableCopy() is a C function, not an Objective-C method, and it belongs to CoreFoundation.framework -- thus the CF. As such, you basically can't use it in ASObjC. See my book, page 2.

Two questions, please.

1. Am I on the right track to create a non-concrete Attributable string, and if so…

You're on the wrong track worrying about concrete anything.

2. What's the correct terminology please?

It's not obvious to me what you're actually after. If you want a mutable copy,  just use mutableCopy().

-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Still cannot get CF terminology correct
      • From: Brian Christmas <email@hidden>
References: 
 >Still cannot get CF terminology correct (From: Brian Christmas <email@hidden>)

  • Prev by Date: Still cannot get CF terminology correct
  • Next by Date: Re: Still cannot get CF terminology correct
  • Previous by thread: Still cannot get CF terminology correct
  • Next by thread: Re: Still cannot get CF terminology correct
  • Index(es):
    • Date
    • Thread