Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 21 OCT 1998 06:48:54PM Greg James, ISIS, Inc. wrote:

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.


At 22 OCT 1998 04:31AM Oystein Reigem wrote:

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 -


At 22 OCT 1998 02:00PM Greg James wrote:

Oystein,

Thanks for the help. That will work just fine for what I need.

Greg


At 31 OCT 1998 06:11PM Aaron Kaplan wrote:

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

Sprezzatura, Inc.

www.sprezzatura.com_zz.jpg

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/fa0c9cf27f104489852566a4007d53cf.txt
  • Last modified: 2024/01/04 21:00
  • by 127.0.0.1