RunWRDEntityEditDialog (open)

Run an entity add/edit screen


LOADLIB "mod::wrd/lib/dialogs.whlib";

INTEGER FUNCTION RunWRDEntityEditDialog(OBJECT owner, OBJECT wrdtype, INTEGER entityid, RECORD options)


OBJECT owner

Owner screen

OBJECT wrdtype

WRD type

INTEGER entityid

WRD id of the entity to edit, 0 to add a new entity

RECORD options


OBJECT component

Component for error reporting

RECORD entitycontext

Values that are set at creation/update, and cannot be edited

BOOLEAN initordering

If TRUE, initialize WRD_ORDERING for new entities to one higher than other entities matching the entitycontext

STRING screen

Reference to the screen to use. If not set, runs a default editor

RECORD userdata

Additional data sent to the screen's init function

Return value


The id of the created or edited entity. 0 if the dialog was cancelled