ASELOBJ()

From Lianjapedia
Jump to: navigation, search

Purpose

Function to load object references for specific current objects into an array

Syntax

ASELOBJ(<array-name>)

See Also

ACLASS(), ADDPROPERTY(), AMEMBERS(), COMPOBJ(), CREATEOBJECT(), DEFINE CLASS, DISPLAY CLASSES, DODEFAULT(), FOREACH, LIST CLASSES, LOADOBJECT(), NEWOBJECT(), OBJECT(), PEMSTATUS(), PRINT_HTML(), PRINT_JSON(), PRINT_R(), PRINT_XML(), REMOVEPROPERTY(), REQUIRE_ONCE(), SAVEOBJECT(), SQL SELECT, WITH

Description

The ASELOBJ() function is used to load load object references for the following current objects into the specified array at the following element positions:

  1. Active Page
  2. Active Section
  3. Active Formitem
  4. Active Grid Column
  5. Object under cursor

If there is no current object of the specified type, the element will contain .F. (False).

If the <array-name> array already exist, it will be overwritten as a one-dimensional array of 5 elements.

Example

proc page1_section1_field1_click()
	// Object browser
	aselobj(refs)
 
	for i = 1 to 5
		if type('refs[&i]') <> 'O'
			loop
		endif
 
		release props
		amembers(props, refs[&i], 1)
		select 0
		create table if not exists _amembers (name char(32), type char(20), datatype char(20), value char(255))
		if !used('_amembers')
			use _amembers
		else
			select _amembers
		endif
		zap
		append from array props
		goto top
		browse
	endfor
endproc