EnumAttributes

Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.

SalNumber EnumAttributes( ref SalArray<SalString> sNames,
ref SalArray<SalString> sValues)

The EnumAttributes enumerates all message attributes and their values.

Parameters

Name Description
ref SalArray<SalString> sNames Array that is set to contain all attribute names in the message.
ref SalArray<SalString> sValues) Array that is set to contain all attribute values in the message.

Returns

This method does not return a value.

Example

public SalNumber CreateTableFromEditLayout(SalString sLayout)
{
	#region Local Variables
	cMessage Layout = new cMessage();
	SalArray<SalString> sAttributes = new SalArray<SalString>();
	SalArray<SalString> sValues = new SalArray<SalString>();
	SalNumber nEnties = 0;
	SalNumber nCount = 0;
	#endregion
	
	#region Actions
	using (new SalContext(this))
	{
		Sal.TblReset(i_hWndSelf);
		Layout.Unpack(sLayout);
		nEnties = Layout.EnumAttributes(sAttributes, sValues);
		// Create a default layout to always hold all attributes.
		CreateDefaultEditLayout(Layout);
		// Override default values with real ones.
		nCount = 0;
		while (nEnties > nCount) 
		{
			Layout.SetAttribute(sAttributes[nCount], sValues[nCount]);
			nCount = nCount + 1;
		}
		...........