Problems with ReplaceFormAndAddSearchProj and ppTextSearchCustom* objects
Hi
I need to write a custom Viewer and starting looking at ReplaceFormAndAddSearchProj for guidance.
In general we need the Preview to be more like adobe, FireFox and the like.
Is this and the plugins it uses (ppTextSearchCustomPreview and ppTextSearchCustomEngine) just examples. I would have thought the ppTextSearch* objects would have been production code.
Problem 1
Closing preview form during search causes AV.
Steps to recreate
a) Search for "Fred"; then
b) Click "x" to close
The Preview is freed, before the it's Search returns.
Problem 2
Direct page requests are ignored after a Search.
a) Search for "name" (Observe it will be found in page 1); then
b) Enter page "4" (or greater) and then attempt to go directly to it.
Observe that the request is simply ignored
Operational Problems
a) From a user's perspective, the way RB's search operates is quite awkward. Hitting a FindIt button, instead of hitting the next button.
b) User sets "Search from current page" to True. Navigates to page 3, searches for "Name", finds it on page 1, user navigates to page 3 again hits prior and goes back to page 1.
General issues.
ppTextSearchPreview derives from ppTextSearchCustomPreview, I would have thought that the separation between these 2 classes would have more sensibily been that the Custom class handle the requests and integrity and the derived class be responsible for the GUI and its implementation.
Generally there seems to be very little in the way of architectural documentation and explanation for the way things work when implementing RB in code.
Some guidance would be most helpful.
Regards
David Manton-Hall
I need to write a custom Viewer and starting looking at ReplaceFormAndAddSearchProj for guidance.
In general we need the Preview to be more like adobe, FireFox and the like.
Is this and the plugins it uses (ppTextSearchCustomPreview and ppTextSearchCustomEngine) just examples. I would have thought the ppTextSearch* objects would have been production code.
Problem 1
Closing preview form during search causes AV.
Steps to recreate
a) Search for "Fred"; then
b) Click "x" to close
The Preview is freed, before the it's Search returns.
Problem 2
Direct page requests are ignored after a Search.
a) Search for "name" (Observe it will be found in page 1); then
b) Enter page "4" (or greater) and then attempt to go directly to it.
Observe that the request is simply ignored
Operational Problems
a) From a user's perspective, the way RB's search operates is quite awkward. Hitting a FindIt button, instead of hitting the next button.
b) User sets "Search from current page" to True. Navigates to page 3, searches for "Name", finds it on page 1, user navigates to page 3 again hits prior and goes back to page 1.
General issues.
ppTextSearchPreview derives from ppTextSearchCustomPreview, I would have thought that the separation between these 2 classes would have more sensibily been that the Custom class handle the requests and integrity and the derived class be responsible for the GUI and its implementation.
Generally there seems to be very little in the way of architectural documentation and explanation for the way things work when implementing RB in code.
Some guidance would be most helpful.
Regards
David Manton-Hall
This discussion has been closed.
Comments
1. I followed the exact steps you gave below for the first problem however
I was unable to recreate the AV. I did notice that the report is not
connected to any data in the example so it is necessary to set the
Report.AutoStop property to True or it will try to create infinite pages.
I'll fix this and re-checkin the example.
2. Thanks for pointing this out. I'm able to recreate this issue with the
default preview as well. I'm currently researching this and will get back
to you as soon as I find a solution.
Pressing the Find Text button simply starts the search process, then the
user can use the next button to navigate through all occurrences of the
word. It is also possible to completely replace the TextSearch form and
functionality using a custom preview and/or descending from the ancestor
TextSearch classes.
In my testing, I was unable to recreate this behavior. Setting Search from
current Page to True always started searching from the page I was viewing.
Are you certain the property was set?
This is precisely how these class are currently designed and working. The
TppTextSearchPreview class is the descendent to the
TppTextSearchCustomPreview class. The TppTextSearchCustomPreview class
provides the necessary routines and properties to essentially attach any UI
and still perform all the tasks need to search the text inside the preview
window. The TppTextSearchPreview class essentially only contain its GUI
implementation which can easily be replaced by a custom UI created by you.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com