(Redirected from IAMsgBoxCallback)
This page contains changes which are not marked for translation.

Other languages:
English • ‎中文

ADE User Guide > ADE Server Class Reference >

New to ADE 4.6

This interface allows you to implement callbacks that are called when Analytica functions requiring user input are evaluated. You can implement these callbacks to support these user interface interactions in your own application. In many cases, the name of each method corresponds fairly directly with the name of the Analytica function that produces the user interaction.

When your application does not implement this interface, most of the functions requiring user interaction will do nothing when evaluated in ADE.

The "IAde" prefix stands for "Interface ADE". Your own code can define a class that subclasses this interface and implements its method, and then pass it to CAEngine::SetCallbackObject.

To use this, your program must implement a COM class with each of the messages, such as the MsgBox method. As a COM class, it will implement the QueryInterface method from IUnknown, and its QueryInterface method must report that it implements this interface. You then instantiation an instance of the class and pass a pointer to that object to CAEngine::SetCallbackObject.


long MsgBox([in] string title, [in] string text, [in] long buttons)

Called when MsgBox() is evaluated.

bool ShowProgressBar([in] string title, [in] string text, [in] double p)

Called when ShowProgressBar() is evaluated.

void HideProgressBar()

Called when progress bar should be hidden, for example when the computation of the requested result has completed.

string AskMsgText([in] string question, [in] string title, [in] long maxText, [in] string defaultText, [in] bool bPassword, [out] bool *bCancel)

Called when AskMsgText() is evaluated.

double AskMsgNumber([in] string question, [in] BSTR title, [in] bool bShowDefault, [in] double defaultNumber, [out] bool* bCancel)

Called when AskMsgNumber() is evaluated.

long AskMsgChoice(([in] string question, [in] string title, [in] array<string> optionList, [in] long defaultPosition, [in] bool bShowAll, [out] bool * bCancel)

Called when AskMsgChoice() is evaluated, with a Choice-style control specified.

string AskMsgComboBox([in] string question, [in] string title, [in] array<string> optionList, [in] string defaultText, [in] bool bShowAll, [out] bool* bCancel, [out] bool* bAllSelected)

Called when AskMsgChoice() is evaluated, with a combo-box style control specified.

string GetFilename([in] string function, [in] string defaultName, [in] string directory, [in] string extensions, [in] string caption, [in] CAObject* callingIdent, [in] int flags)

Called when ReadTextFile(), SpreadsheetOpen(), ReadImageFile() or ReadExportFile() is called, and needs to ask for a filename. You would generally display a file-open dialog here, or in a web-app, a file-upload prompt. You should return a full path to the file.

void FileOpenCompleted([in] string function, [in] string fullFilePath)

Called when the file requested in the call to IAdeUICallbacks::GetFilename has been fully read. If you created a temporary file for the read (e.g., if the user uploaded a file), you can delete that temporary here.

void ShowPdfFile([in] string filepath, [in] string bookmark, [in] bool bSearch, [in] bool bBookmarks)

Called when ShowPdfFile() is evaluated.

void OpenURL([in] string url, [in] string window, [in] string specs)

Called when OpenURL() is evaluated.

See Also

CAFiller <- IAdeUICallbacks ->

You are not allowed to post comments.