User login
|
|
|
Frontpage Sponsor
|
|
|
Poll
|
How long have you been using Baan-related products? 1 year or less 12% between 1 and 3 years 14% between 3 and 6 years 14% between 6 and 10 years 23% 10 years or more 37% Total votes: 139 |
|
|
|
Generic Browser Framework Example
|
|
By patvdv at 26 Feb 2008 - 21:57
|
|
Example of Generic Browser Framework
The following main application example displays all defined icons by icongroup in the current installation.
|************************************************************************ |* Framework test |************************************************************************ |* Script Type: 0 |************************************************************************ | Type : 3GL Main program |************************************************************************ table tttdsk900 | Icon groups table tttdsk903 | Icons
|************************************************************************ | Includes |************************************************************************ #include <bic_gbf> | GBF defines
|************************************************************************ | Main entry point for the menu browser driver | It initializes the browser display program and sends all menu options |************************************************************************ function main() { long retval |to test return values
retval = gbf.init(gbf.current.library(), "", GBF.MENU.ALL + GBF.MENU.FILE.OPEN + GBF.MENU.FILE.READ))
if retval < 0 then exit(retval) endif
exit(gbf.start()) |Show and read the first level }
|************************************************************************ |* functions to read a tables with parent child relations |* here this will be ttdsk900 and ttdsk903 |************************************************************************
function extern long gbf.get.children(const string Icongroup(), long object.value, long level) { long retval
select ttdsk903.* from ttdsk903 where ttdsk903.icgp = :Icongroup and ttdsk903._compnr = 0 selectdo | add the just found icon as leaf icon | in case of an error, use the default leaf icon retval = gbf.set.leaf.icon( congroup, ttdsk903.icon, ttdsk903.icon, FALSE) if retval < 0 then retval = 0 | indicates default leaf icon endif
| add the icon description as new object to the tree, | with itself as display icon, and use default functions | there is no help function so application specific help | options are insensitive if gbf.add.object(ttdsk903.icon, ttdsk903.desc, 0, GBF.LEAF, retval) < 0 then return (GBF.DO.EXIT) endif endselect
return (0) }
function extern long gbf.get.top.level() { select ttdsk900.* from ttdsk900 where ttdsk900._compnr = 0 selectdo | set icongroups with default icons and functions if gbf.add.interior(ttdsk900.icgp, ttdsk900.desc, 0) < 0 then return (GBF.DO.EXIT) endif endselect
return (0) }
Related topics
|
|
All times are GMT +2. The time now is 23:26.