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: clearing edit controls



Thanks Laurence.
 
I ended up adding a menu to the dialog so I can catch the paste from kHICommandPaste.
 
Thanks for all the advise given.
 
SDM


 
On Sat, Apr 26, 2008 at 7:43 AM, Laurence Harris <email@hidden> wrote:

On Apr 25, 2008, at 9:22 AM, Sam Mauney wrote:

Thanks for the feedback everyone.

I see what I'm doing wrong. I'm trying to change the value of the edit control in the
event handler kEventTextShouldChangeInRange.

I overlooked the event handler's description:
"Returns whether the text should be changed in editable text fields." Doh!

Yes, reading documentation is such a waste of time until you waste even more writing code without understand what things do. ;-)

If you return noErr the text won't change. I believe that if you set different text and return eventNotHandledErr, the new text will be used instead of the original text.


Is there an appropiate event handler where I should be making my changes to the contents?

Or are the event handlers not appropiate for this?

Not generally appropriate. Could you be more specific about what you want to do? You're asking low level questions. Tell us what you want to accomplish.

Larry




I'm new to apple's event handler setup so any advice would be greatly appreciated.

thanks,
SDM

On Thu, Apr 24, 2008 at 10:26 PM, Philip Aker <email@hidden> wrote:
On 08-04-24, at 15:57, Sam Mauney wrote:

>> Are you saying it appends the space to the current text? Yes indeed.

The space was just one of the ways I've tried. I've also tried ("").

Is there a better way?

err = HIViewSetText( view, CFSTR( "" ) );

works on my setup -- nib: com.apple.HITextField, Xcode 3.0, Max OS X 10.5.2.


Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@

Sent from my SE/30


 _______________________________________________
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


 _______________________________________________
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: 
 >clearing edit controls (From: "Sam Mauney" <email@hidden>)
 >Re: clearing edit controls (From: Laurence Harris <email@hidden>)
 >Re: clearing edit controls (From: "Sam Mauney" <email@hidden>)
 >Re: clearing edit controls (From: Philip Aker <email@hidden>)
 >Re: clearing edit controls (From: "Sam Mauney" <email@hidden>)
 >Re: clearing edit controls (From: Laurence Harris <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.