RunWRDEntityEditDialog (open)
Run an entity add/edit screen
Syntax
LOADLIB "mod::wrd/lib/dialogs.whlib";
INTEGER FUNCTION RunWRDEntityEditDialog(OBJECT owner, OBJECT wrdtype, INTEGER entityid, RECORD options)Parameters
OBJECT ownerOwner screen
OBJECT wrdtypeWRD type
INTEGER entityidWRD id of the entity to edit, 0 to add a new entity
RECORD optionsOptions
OBJECT componentComponent for error reporting
RECORD entitycontextValues that are set at creation/update, and cannot be edited
BOOLEAN initorderingIf TRUE, initialize WRD_ORDERING for new entities to one higher than other entities matching the entitycontext
STRING screenReference to the screen to use. If not set, runs a default editor
RECORD userdataAdditional data sent to the screen's init function
Return value
INTEGERThe id of the created or edited entity. 0 if the dialog was cancelled