in this case, how can we use the function of FGLDIR/src
ON ACTION find
CALL fglfind (r , -notfound)
||<<<<<<<<<<<<< Value of parameters we must give ?
Is there an example somewehre
Thanks
... I'm not sure why you want to do that. All that will do is popup the find window but it won't do any of the actual finding. (but to answer your question, look at the source. Even though English may not be your first language you should be able to figure the structure of r and what the _notfound boolean is used for)
The built-in find is an action that is added automatically, just like accept, cancel, close, editcopy etc. You don't have to explicitly code it.
What Rene is saying is that the defaultView attribute is hard-coded to "no". So even if you change the defaultView attribute in your .4ad to "yes" or "auto", you will not see in your action panel a button labelled "Find". It will still be available in the context-menu (right-click), and if you add a toolbar item named "find" or a topmenu item named "find" or a button named "find", those widgets will be visible and if you click on them they will trigger the built-in find functionality.
What we do recognize is that the user-interface we have created for this window may not be to the same standards or language that the rest of your application is coded to.
So if you look in FGLDIR/lib/default.4ad you should find the "find" action defined. You are free to change that. So if you don't want it to say "Find" but to say perhaps "Trouvaille" (courtesy of Babelfish) and have an accelerator of Control-T, you can do that by editing your .4ad.
Similarly if you don't like the appearance of the form. You can edit FGLDIR/src/fglfind.per to get an appearance that matches your application. That may mean changing the field prompts so that they are left-justified instead of right-justified, adding a : between the label and field, or as you want to do either add buttons for accept/cancel, or change the style of the window so that the action panel (with buttons for accept/cancel) is displayed.
That same principle applies to other functions you can find in FGLDIR/src. For instance FGLDIR/src/fglreport which contains the code to display the report to screen via START REPORT TO SCREEN. If you don't like the appearance of that window, you can alter that code.
You could also change the source in fglfind.4gl but you shouldn't change the function interface. The runner is calling it passing a record (with 4 elements) and a BOOLEAN
FUNCTION fglfind(r, _notfound)
DEFINE r RECORD
pattern STRING,
ignoreCase BOOLEAN,
wrapAround BOOLEAN,
fieldId INT
END RECORD
...
RETURN r.*
END FUNCTION
so in the rare event that you did want to change the source in fglfind.4gl you would have to keep the function interface the same.
Hope that helps,
Reuben