Axaptapedia is now maintained by AgileCadence For more information please click here.

Infolog class

From Axaptapedia
Jump to: navigation, search

This class provides several system level tasks

Methods[edit]

activateWindow[edit]

(xinfo) public final void activateWindow(int _window)

this method will bring a window to front, activate it and give the focus

_window
the handle (hWnd) of the window to activate, bring to front, get the focus
Example
Try the following example with and without the last line 'infolog.activateWindow'
static void Test_activateWindow(Args _args)
{
    FormRun fr;
    Args    args = new Args();
    ;
    args.name(formstr(CustTable));
 
    fr = classfactory.formRunClass(args);
    fr.init();
    fr.run();
    fr.detach();
 
    info("Form was shown, now the infolog will be in front of it");
    infolog.viewUpdate();
 
    infolog.activateWindow(fr.hWnd());
}

See also Axapta_hWnd

breakpoint[edit]

(xinfo) public final container breakpoint([container _breakpoint])

this method will be used to get a list of all breakpoints and/or for set a list of breakpoints

_breakpoint
optional input container for setting the breakpoints
return
container-content
  • the first element contains a '1' (version-number of the container-structure)
for each breakpoint 3 additional elements
  • string:the treenode-path of the method containing the breakpoint
  • integer:the row-number of the breakpoint
  • boolean:is the breakpoint active ?
Example 1
take a look at the form SysBreakPoints [Shift F9]
Example 2
use the editor to set some breakpoints (doesn't matter where)
conview(infolog.breakpoint);

canShutDown[edit]

public boolean canShutDown(boolean _silent)
Asking the shutdown-question

this method will be called by infolog.shutdown and answers the question: can the client shutdown ?

_silent
true the Shutdown-Question will not shown
false the Shutdown-Question will be asked
return
false the client can't shutdown, the user answered no at the shutdown-question
true the client can shutdown, the user answered yes at the shutdown-question

currentAOLayer[edit]

public final UtilEntryLevel currentAOLayer()

return
enum UtilEntryLevel
the current Axapta Object Layer, set in the config

importElement[edit]

Imports contents of the given XPO file

shutDown[edit]

public final void shutDown(boolean _force)
Asking the shutdown-question

Closes the axapta-client.

_force
false gives the user the chance to quit the shutdown,(asking the shutdown-question)
true shuts down the client immediately

viewUpdate[edit]

void viewUpdate()

Forces an update / refresh of the infolog-window
Normally the infolog-window will be shown, whenever the client has time to do this.

Example
Job 1
 Box::info("first infobox");
 info("Adding an entry at the infolog");
 Box::info("after this box, the infolog-window will be shown");
Job 2
 Box::info("first infobox");
 info("Adding an entry at the infolog");
 infolog.viewUpdate();
 Box::info("this box appears after the infolog-window will be shown");