Logo Search packages:      
Sourcecode: mago version File versions  Download package

def mago::application::main::Application::save (   self,
  save_menu = 'mnuSave' 
)

Given an application, it tries to save the current document. 
This method gives very basic functionality. Please, override this method in the subclasses for error checking.
 
@type save_menu: string
@param save_menu: The name of the Save menu of the application. If not mentioned the default will be used ("Save").

Definition at line 109 of file main.py.

00109                                        :
        """
        Given an application, it tries to save the current document. 
        This method gives very basic functionality. Please, override this method in the subclasses for error checking.
         
        @type save_menu: string
        @param save_menu: The name of the Save menu of the application. If not mentioned the default will be used ("Save").
        """
        try:
            app = ooldtp.context(self.name)
            try:
                actualMenu = app.getchild(save_menu)
            except ldtp.LdtpExecutionError:
                raise ldtp.LdtpExecutionError, "The " + save_menu + " menu was not found."

            actualMenu.selectmenuitem()
        except ldtp.LdtpExecutionError:
            raise ldtp.LdtpExecutionError, "Mmm, something went wrong when saving the current document."

    def write_text(self, text, txt_field=''):


Generated by  Doxygen 1.6.0   Back to index