company logo

GUIBaseContext :: executeWindow - Execute Window

The function executes the window with name passed in wnames. The window must be defined in the class passed in class_name. The content being displayed is taken from the property handle, which must correspond to the class structure, but it need not to be identical, i.e. it may inherit).

The window called should be designed as modal dialog. Otherwise, the function returns control before the dialog has been finished. The function resets the wait pointer before calling the window and restores it after finishing.

The function returns false, when the dialog has been terminated with Cancel or when using the close button in the right upper corner of the dialog. When closing the dialog using the OK button, the dialogue returns true. When the dialog is not system modal, the function always returns false. Besides, the result (true or false) is stored as string in the result property of the context.

In case of errors (e.g. form could not be loaded), the function returns -1. In this case, the result property is empty.

  Property    form(dataDB().dictionary(),"FORM_NewAccount")

  //  init form fields

  *form.value("name") = "A00001";    // use form fields

  if ( executeWindow(&form,"FORM_NewKonto","Edit",NO) )

    CreateAccount(form.value("name").toString());

Return value:  State of function return ( bool  )

A State true indicates, that the function was executed successfully. Otherwise state is false.

Implementation details

bool GUIBaseContext  :: executeWindow ( odaba::Property &rProperty, odaba::String &sClassName, odaba::String &sWindow, bool bCollection )
  • rProperty - Propery handle
  • sClassName - Class name

    The class name is the name of an implementation class (usually) defined in the database. Class names must not exceed 40 characters.

    In order to pass no class name, an empty string ( String() ) might be passed.

  • sWindow - Window name

    Person::Edit

  • bCollection - Data source refers to a collection

    A referenced data source or path refers to a collection (true), which might also be a single reference.