Hi:
I want to create a custom dictionary which can be used by
Dictionary.app with Dictionary Manager. However, I don't know
Dictionary Manager at all, even carbon. It's a good idea to write a
program using Dictionary Manager's API to manipulate with the built-in
New Oxford American Dictionary for practice.
1) I register the file and open it without errors.
2) I know there's 192577 records in NOAD.dict by calling
DCMCountRecord(). DCMGetDictionaryFieldInfo().
3) DCMGetDictionaryPropertyList() tells me there's 5 properties in NOAD:
1.pcls(2 bytes) [ 0x0000 ]
2.perm(2 bytes) [ 0x0000 ]
3.list(2 bytes) [ 0x0001 ]
4.mtnc(2 bytes) [ 0x000A ]
5.dbas(12 bytes) [ 0x00000001 dsky 0x00000004 ]
4) DCMGetDictionaryFieldInfo(), AEGetDescDataSize() and
AEGetDescData() returns a "field info record", whose 'descriptorType'
field is 'list' and the 'dataHandle field' points to a 420 bytes
lengthed memory block. So, what is "field info record"?
5) According to this reference:
http://developer.apple.com/documentation/Carbon/Reference/Dictionary_Manager/dm_refchap/chapter_38.2_section_8.html#//apple_ref/doc/uid/TP30000141-DontLinkChapterID_2-F12963
DCMGetNextRecord(dictRef, '****', 0, NULL, 0, maxKeySize,
&nextKeySize, dataBuf, &nextUniqueID); should return the 1st record in
this dictionary. But I always get a -7113 error, which means "no such
field exists". I'm curious about what's wrong. Then I make a loop from
0x00000000 to 0xFFFFFFFF to test, if there is any keyFieldTag('****'
in the call) that can get rid of -7113 error. Surprisingly, it said
"no such field exists" for every possible tag.
How can I get the record in the "/Library/Dictionaries/New Oxford
American Dictionary.dict" one by one? Any idea? Thanks.
I ask google but there's no other reference for Dictionary Manager
except this: http://developer.apple.com/documentation/Carbon/Reference/Dictionary_Manager/
yllan
_______________________________________________
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