Developing Reusable Browses
This document explains a generic way to run a reusable browse and return a value.
This can be used both:
When the app is run from a menu, the menu program should use "invokeTaskList(‘Caller’, ‘TLInit’)", where the "TLInit" task list sets the fMain frame visible. If the menu invokes this tasklist, then Caller.TLInit would NOT be in the "Startup tasklist" field on Caller’s root properties screen, since ‘fMain’ would be made visible explicitly when invoked by the menu.
Tasklists in ‘Caller’ app:
a. ‘TLRunBrowse’: to run the browse (when user clicks ‘Browse’ button):
2. Browse.hCallingTL.displayText(‘TLPullBrowseSelection’)
3. (optional) Caller.fMain.setVisible(‘false’), if you want to hide the calling frame while browsing.
4. Browse.fMain.setVisible(‘true’) to just display the browse frame
or Caller.invokeTaskList(‘Browse’, ‘TLFreshBrowse’) to display the browse
frame and run a host task to populate the browse table.
2. Nest ‘TLMainVisible’ to make sure the calling app frame is visible.
3. Optionally, do a host task (like ‘TLGet’) that uses this retrieved
browse value to get and display related DB values.
2. any other stuff the init needs to do (like status msg ‘welcome’)
a. <none>:
b. ‘TLBrowseCancel’: User clicks "Cancel" on browse list or specs
tabs.
1. Browse.hCallingTL.displayText(‘TLMainVisible’)
2. Nest ‘TLBrowseSelect’
2. Browse.invokeTaskList( Browse.hCallingApp.getCurrentValue, Browse.hCallingTL.getCurrentValue
)
2. Browse.tblBrowse.removeRowSelectionInterval(0, Browse.tblBrowse.getRowCount().
3. Browse.hRowid.displayText(‘ ‘)
4. Browse.hBrowseTopRowid.displayText(‘ ‘)
5. Browse.hBrowseBottomRowid.displayText(‘ ‘)
6. Browse.hBrowseIndexNum.displayText(‘1’)
7. Browse.tabBrowseSpec.setComponentDefaultValues
8. Browse.fBrowse.setVisible(‘true’)
9. nest ‘TLBrowseGet’
(TLD 1/6/99)