pfc_propertysyntax


pfcutil.pbl   >   pfc_u_tabpg_dwproperty_srvfilter   >   pfc_propertysyntax   

Full name pfc_u_tabpg_dwproperty_srvfilter.pfc_propertysyntax
Access public
Extend of
Return value
Prototype event pfc_propertysyntax()

Name Datatype
No Data

Name Datatype
lb_desired boolean
li_cnt integer
li_excludecount integer
li_index integer
li_rc integer
li_styledesired integer
li_upper integer
lnv_conversion n_cst_conversion
ls_exclude string
ls_excludecols string[]
ls_syntax string

event pfc_propertysyntax;call super::pfc_propertysyntax;//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		pfc_propertysyntax
//
//	Access:    		Public
//
//	Arguments:  	None
//
//	Returns:   		String
//	  The syntax required to create the currently selections.
//   '!' in error
//
//	Description:  
//	Create the required syntax to match the current selections.
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	6.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996-1997 Sybase, Inc. and its subsidiaries.  All rights reserved.
//	Any distribution of the PowerBuilder Foundation Classes (PFC)
//	source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////

integer	li_upper
integer	li_cnt
integer 	li_rc
integer	li_styledesired
integer	li_index
integer	li_excludecount=0
string	ls_excludecols[]
string	ls_exclude
string	ls_syntax
boolean	lb_desired
n_cst_conversion lnv_conversion

// Validate references.
If IsNull(idw_requestor) or Not IsValid(idw_requestor) Then
	Return '!'
End If
If IsNull(idw_requestor.inv_filter) or Not IsValid(idw_requestor.inv_filter) Then
	Return '!'
End If


// -- Start the service. --
ls_syntax += 'This.of_SetFilter(True)~r~n'

// -- Style. --
li_styledesired = ii_style - 1
Choose Case li_styledesired
	Case idw_requestor.inv_filter.DEFAULT
		ls_syntax += '~r~nThis.inv_filter.of_SetStyle(inv_filter.DEFAULT)'
	Case idw_requestor.inv_filter.EXTENDED
		ls_syntax += '~r~nThis.inv_filter.of_SetStyle(inv_filter.EXTENDED)'
	Case idw_requestor.inv_filter.SIMPLE
		ls_syntax += '~r~nThis.inv_filter.of_SetStyle(inv_filter.SIMPLE)'
	Case Else
	ls_syntax += '~r~nThis.inv_filter.of_SetStyle('+String(li_styledesired)+')'
End Choose

// -- Visible Only. --
lb_desired = cbx_visibleonly.Checked
ls_syntax += '~r~nThis.inv_filter.of_SetVisibleOnly('+lnv_conversion.of_String(lb_desired)+')'

// -- Exclude Columns. --
// Get the number of items in the ListBox.
li_upper = lb_excludecols.TotalItems( )
For li_cnt = 1 to li_upper
	// Is the item selected?
	If lb_excludecols.State(li_cnt) = 1 THEN  
		li_excludecount ++
		ls_exclude += '~r~nls_exclude['+string(li_excludecount)+'] = "'+ &
							lb_excludecols.text(li_cnt)+'"'
	End If
Next
If li_excludecount > 0 Then
	// -- Defined required variables.  -- 
	ls_syntax = 'String	ls_exclude[]~r~n~r~n' + ls_syntax
	ls_syntax += ls_exclude
	ls_syntax += '~r~nThis.inv_filter.of_SetExclude(ls_exclude)'
End If

Return ls_syntax

end event

     
Name Owner
No Data

     
Name Owner
listbox.state listbox
listbox.text listbox
listbox.totalitems listbox
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.string systemfunctions
pfc_n_cst_conversion.of_string pfc_n_cst_conversion
pfc_u_tabpg_dwproperty_base.pfc_propertysyntax pfc_u_tabpg_dwproperty_base

     
Full name
pfc_u_tabpg_dwproperty_srvfilter

     
Name Scope
No Data