VS:AlertQuestionDontShowAgain: Difference between revisions
m (1 revision) |
No edit summary |
||
Line 107: | Line 107: | ||
==== Python ==== | ==== Python ==== | ||
<code lang="py"> | <code lang="py"> | ||
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() | |||
</code> | </code> | ||
</sample> | </sample> |
Latest revision as of 15:28, 3 July 2018
.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
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:AlertInform]] | [[VS:AlertQuestion]] | [[VS:AlertCritical]]
| [[VS:AlertInformDontShowAgain]]