|
pfc_default
|
|
Full name
|
pfc_w_filtersimple.pfc_default
|
Access
|
public
|
Extend of
|
|
Return value
|
|
Prototype
|
event pfc_default()
|
Name
|
Datatype
|
lds_test
|
datastore
|
li_rc
|
integer
|
ls_testfilter
|
string
|
event pfc_default;call super::pfc_default;//////////////////////////////////////////////////////////////////////////////
//
// Event: pfc_Default
//
// (Arguments: None)
//
// (Returns: None)
//
// Description: Construct the new filter string, test the filter,
// and close this dialog
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.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.
//
//////////////////////////////////////////////////////////////////////////////
string ls_testfilter
integer li_rc=1
datastore lds_test
// Get the new filter.
ls_testfilter = of_BuildfilterString()
// Determine if the Filter Test is needed.
If Len(ls_testfilter) > 0 Then
// Create the Test-filter datastore.
lds_test = CREATE n_ds
// Associate the correct DataObject to the Test-filter datastore.
lds_test.DataObject = inv_filterattrib.idw_dw.DataObject
// Test the new filter.
li_rc = lds_test.SetFilter(ls_testfilter)
// Destroy the Test-filter datastore.
Destroy lds_test
// Check if the Test of the new filter failed.
If li_rc <> 1 Then
// Test of the new filter failed. Do not allow the window to close via the OK.
of_MessageBox('pfc_filtersimple_failedfilter',this.Title,'Invalid Filter.', &
Information!, OK!, 1)
Return
End If
End If
// A Test the filter was not needed or the Test was successful.
// Set the return code to mean succesful operation.
inv_return.ii_rc = 1
// Set the new sort string.
inv_return.is_rs = ls_testfilter
// Close the window.
CloseWithReturn ( this, inv_return )
end event