Sort_Func

Category: Objects / Search
Since engine version: 1.0 OC

Description

Sort criterion: Sorts the found objects by the int result of the indicated function. Objects with smaller values first.

Syntax

array Sort_Func(string function,  ...);

Parameters

function:
Function to call
...:
[opt] Parameters of the function.

Remarks

Warning: never use this with a function which might have side effects. If a function is not guaranteed to be harmless, a new, side-effect-free function needs to be written.
For additional information on the use of this function see FindObjects.

Example

FindObjects(Find_Distance(100), Sort_Func("GetDefWidth"))
Sorts all objects inside a maximum distance of 100 pixels by their width, beginning with small objects.
See also: FindObjects
Newton, 2009-07