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: Data Browser text editing




On Mar 2, 2005, at 4:54 AM, Graham Westlake wrote:

On 2 Mar 2005, at 12:18, Frederick Cheung wrote:

Yes, this is working for me too. To clarify, my edit session begins and I can edit the text perfectly; the problem is that I don't get the documented Item callback (aka GetSetData callback) when the editing session is ended by the user.

Have you tried running your app with the debug versions of the libraries? That could reveal some useful info.

OK, I'm now running under the debug libs, and I get the GetSetData callback when editing has ended. The changeValue parameter is false though, although I can get round this by confirming the edit control is still present by using GetDataBrowserEditItem.

I'm surprised that I get different behaviour under the debug libraries.


I do what Frederick suggested. Here's my code that exists in the setValue = TRUE switch statement (error checking removed)

if (setValue)
{
switch(property)
{
case kLevelName :
GetDataBrowserItemDataText(itemData,&cfString);
if (CFStringGetCString(cfString,&(levelName[sizeof(levelName),kCFStringEncodingMacRoman))
set_LevelName(itemID,levelName);
}
}

What I would do is throw in a couple of printf statements. One inside of the setValue section and one inside of the particular case section.
My usual bug in this situation would be to have the constant not match the constant I set in IB. I believe you could also use DebugStr instead of printf.
The output shows up in the Log. That would at least tell you if anything was called when not in Debug mode.

Mike
 _______________________________________________
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: 
 >Data Browser text editing (From: Graham Westlake <email@hidden>)
 >Re: Data Browser text editing (From: Mike Lazear <email@hidden>)
 >Re: Data Browser text editing (From: Graham Westlake <email@hidden>)
 >Re: Data Browser text editing (From: Frederick Cheung <email@hidden>)
 >Re: Data Browser text editing (From: Graham Westlake <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.