VS:AlertQuestionDontShowAgain

From Vectorworks Developer
Jump to: navigation, search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Displays an alert dialog which alerts the user to a condition or situation that requires the user's decision and input before preceding; such as an impending action with potentially destructive or irreversible consequences with the option to always do the selected action and not show the dialog again. The message should be in the form of a question.


The parameter 'arrOptions' is of type ARRAY [1..3] OF STRING;
arrOpt[1] - Saved setting category to save checkbox value
arrOpt[2] - Saved setting item to save checkbox value
arrOpt[3] - Specify a string to use in overriding the default 'Always do the selection action' checkbox string

FUNCTION AlertQuestionDontShowAgain(
question  :STRING;
advice  :STRING;
defaultButton  :INTEGER;
OKOverrideText  :STRING;
CancelOverrideText  :STRING;
customButtonAText  :STRING;
customButtonBText  :STRING;
arrOptions  :ARRAY) : INTEGER;
def vs.AlertQuestionDontShowAgain(question, advice, defaultButton, OKOverrideText, CancelOverrideText, customButtonAText, customButtonBText, arrOptions):
    return INTEGER

Parameters

question STRING The question to display
advice STRING The text to be added in a smaller font under the main information/message
defaultButton INTEGER Specifies which button is to be made the default
OKOverrideText STRING Specifies a string to use in overriding the 'OK' string
CancelOverrideText STRING Specifies a string to use in overriding the 'Cancel' string
customButtonAText STRING Specifies a string to use for an optional custom button A
customButtonBText STRING Specifies a string to use for a second optional custom button B
arrOptions ARRAY ARRAY [1..3] OF STRING;

Return Value

Return Values

0: the negative button was hit
1: the positive button was hit
2: custom button A was hit
3: custom button B was hit

Remarks

Created by TTF 1/9/2009

Example

VectorScript

PROCEDURE Example;
VAR
	result :INTEGER;
	arrayText : ARRAY[1..3] OF STRING;

BEGIN
	arrayText[1] := 'DontShowDialogAgainCategory';
	arrayText[2] := 'DontShowDialogAgainItem'; {Should be unique for every AlertQuestionDontShowAgain}
	arrayText[3] := '';

	result := AlertQuestionDontShowAgain('Do you want to continue?', '', 0, 'Yes', 'No', '', '', arrayText);
END;
RUN(Example);

Python

def Example():
	arrayText = (   'DontShowDialogAgainCategory',
			'DontShowDialogAgainItem', #{Should be unique for every AlertQuestionDontShowAgain}
			'')

        # python uses a tuple
	vs.AlertQuestionDontShowAgain('Do you want to continue?', '', 0, 'Yes', 'No', '', '', arrayText);
Example()

Version

Availability: from Vectorworks 2010

See Also

VS Functions:

VS:AlertInform | VS:AlertQuestion | VS:AlertCritical | VS:AlertInformDontShowAgain

VS Functions:

[[VS:AlertInform]] | [[VS:AlertQuestion]] | [[VS:AlertCritical]]

| [[VS:AlertInformDontShowAgain]]
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox