Article # 81, added by Geoworks, historical record
| first |
previous |
index |
next |
last |
Find trigger in document control.
Q: In the document control on the OmniGo, the "Find..." button does nothing. What is it supposed to do? If it really is supposed to do nothing in that context, shouldn't it be NOT_ENABLED? A: The "Find" button is managed by a SearchReplaceControl object. It's enabled, because the user ought to be able to search for text within the documents listed -- it's only NOT GS_ENABLED when the File Selector shows no files. It does nothing, because the application needs to handle the searching itself. See the sample application DocUI, which is in the SDK_Omni sample app tree, for an example of using MSG_SEARCH. Q: When I implement the "Find" trigger on the OmniGo in the DocumentControl's FileSelector, it always crashes. What's going on? A: There is a bug in the handler for MSG_SEARCH which requires that an object be at the chunk 002Ch in the object resource that contains the DocumentControl object. The workaround is to manipulate the objects so that an object actually does exist in that chunk. You can use the "objwalk" command in Swat (for the handle use that of the DocumentControl object) to assist in determining where objects are located in the resource.