Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text Edit and SetControlData returns errDatanotSupported on 10.3.9




On Jun 14, 2007, at 10:18 AM, Charles Gregory wrote:

Hi Frederick,

Thanks for your feedback,
Unfortunately this didn't solve my problem.

I use kControlEntireControl and it works fine.

Re: Also, don't
release text: you didn't create it.

You are right in that example, well spotted, but since it was not working I have just used "hello world " as my debug string. (When i ll get it fixed ) I will revert to CFStringCreateWithFormat to write what I really want to...

Frederick Cheung <email@hidden> wrote:
On 14 Jun 2007, at 14:47, Charles Gregory wrote:
>
> CFStringRef text = CFSTR("Hello world");
> OSStatus status = SetControlData ( StatusField,
> kControlEntireControl, kControlEditTextCFStringTag,
> sizeof (text), &text);

This should work fine for either static text controls or Edit Unicode Text controls, and probably for for edit text controls as well, but I haven't used one those for a while now.


>
> CFRelease (text);
> DrawOneControl (StatusField);

You shouldn't be using this nowadays. You should be using a composited window and calling HIViewSetNeedsDisplay instead.


>
> Why would status returns errDatanotSupported on Os
> 10.3.9
> but work properly on 10.4

Not a clue. It works for me, so there must be something else going on you haven't mentioned.


Larry


Try using kControlEditTextPart instead of kControlEntireControl. 10.4
may be more forgiving in this respect (no idea why). Also, don't
release text: you didn't create it.
>
Fred

_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Fwd: Re: Text Edit and SetControlData returns errDatanotSupported on 10.3.9 (From: Charles Gregory <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.