The List_Tables and List_Users routines can be executed from the command line in the system editor. What can be used in an event handler to get at the same data? (I suppose that they can't be used in a script to return data because they are routines and not functions.)
I realize that you can use the global varible @tables to get the table information for the current application, but it would be nice to exclude system tables from the list.
Any suggestions would be appreciated.
Greg,
I think you have do it the hard way - loop through @Tables yourself and pick out the files you want. To exclude system tables and dicts I do:
function Get_UserTableNames( Void ) TableNames=@tables NoOfTables=count( TableNames, @FM ) + (TableNames '') UserTableNames=' for T=1 to NoOfTables if (TableNames1, 5 NE 'DICT.') and (TableNames1, 3 NE 'SYS') then UserTableNames=TableNames end next T return UserTableNames(Hey - what about making a user table with a name starting in "SYS" to see if OI is as dumb as this routine?)
- Oystein -
Oystein,
Thanks for the help. That will work just fine for what I need.
Greg
You need to use the system receiver to return this type of information. These programs are actually routines (which pretty much means they are holdovers from OI 1.0) and don't return information, but information through C and the send_dyn program. Funny enough, the example code in the system has an example that really seems to apply here.
* capture text results of list_users
Set_Property ("SYSTEM", "RECEIVER", @window: ".EDITBOX_RESULTS")
Set_Property (@window: ".EDITBOX_RESULTS", "TEXT", "")
Call List_Users
Users=Get_Property (@window: ".EDITBOX_RESULTS", "TEXT")
Set_Property ("SYSTEM", "RECEIVER", "")
akaplan@sprezzatura.com