1885 |
1885 |
1886 confirmWithCancel:aString labels:labelArray |
1886 confirmWithCancel:aString labels:labelArray |
1887 "launch a Dialog, which allows user to enter cancel, no or yes. |
1887 "launch a Dialog, which allows user to enter cancel, no or yes. |
1888 Return true for 'yes', false for 'no', nil for 'cancel'. |
1888 Return true for 'yes', false for 'no', nil for 'cancel'. |
1889 The default is yes. |
1889 The default is yes. |
1890 The buttons labels are given in labelArray, cancel being first, yes being last |
1890 The buttons labels are given in labelArray with order #(cancel, no, yes) |
1891 (notice that the order may get reversed in some styles)" |
1891 (notice that the order may get reversed in some styles)" |
1892 |
1892 |
1893 ^ self |
1893 ^ self |
1894 confirmWithCancel:aString |
1894 confirmWithCancel:aString |
1895 labels:(self classResources array:labelArray) |
1895 labels:(self classResources array:labelArray) |
1901 Dialog confirmWithCancel:'really ?' labels:#( 'Oops' 'Nope' 'Yea') |
1901 Dialog confirmWithCancel:'really ?' labels:#( 'Oops' 'Nope' 'Yea') |
1902 Dialog confirmWithCancel:'really ?' |
1902 Dialog confirmWithCancel:'really ?' |
1903 " |
1903 " |
1904 |
1904 |
1905 "Modified: / 02-03-2007 / 15:10:34 / cg" |
1905 "Modified: / 02-03-2007 / 15:10:34 / cg" |
1906 "Modified: / 15-02-2019 / 09:16:11 / Claus Gittinger" |
1906 "Modified (comment): / 15-02-2019 / 09:19:32 / Claus Gittinger" |
1907 ! |
1907 ! |
1908 |
1908 |
1909 confirmWithCancel:aString labels:buttonLabels default:default |
1909 confirmWithCancel:aString labels:buttonLabels default:default |
1910 "launch a Dialog, which allows user to enter yes, no and cancel. |
1910 "launch a Dialog, which allows user to enter yes, no and cancel. |
1911 Return true for 'yes', false for 'no', nil for 'cancel'. |
1911 Return true for 'yes', false for 'no', nil for 'cancel'. |
1912 The strings for cancel, no and yes are to be passed in |
1912 The strings for cancel, no and yes are to be passed in |
1913 buttonLabels, with cancel/abort being the first. |
1913 buttonLabels, with order #(cancel, no, yes). |
1914 The default argument (if non-nil) defines the index of the |
1914 The default argument (if non-nil) defines the index of the |
1915 return button (1 to 3)" |
1915 return button (1 to 3)" |
1916 |
1916 |
1917 ^ self |
1917 ^ self |
1918 confirmWithCancel:aString |
1918 confirmWithCancel:aString |
1930 ) |
1930 ) |
1931 " |
1931 " |
1932 |
1932 |
1933 "Created: / 18-10-1996 / 14:50:51 / cg" |
1933 "Created: / 18-10-1996 / 14:50:51 / cg" |
1934 "Modified: / 21-10-1998 / 15:49:16 / cg" |
1934 "Modified: / 21-10-1998 / 15:49:16 / cg" |
1935 "Modified: / 15-02-2019 / 09:15:45 / Claus Gittinger" |
1935 "Modified (comment): / 15-02-2019 / 09:19:37 / Claus Gittinger" |
1936 ! |
1936 ! |
1937 |
1937 |
1938 confirmWithCancel:aString labels:labelArray title:title |
1938 confirmWithCancel:aString labels:labelArray title:title |
1939 "launch a Dialog, which allows user to enter cancel, no or yes. |
1939 "launch a Dialog, which allows user to enter cancel, no or yes. |
1940 Return true for 'yes', false for 'no', nil for 'cancel'. |
1940 Return true for 'yes', false for 'no', nil for 'cancel'. |
1941 The default is yes. |
1941 The default is yes. |
1942 The buttons labels are given in labelArray, cancel being first, yes being last |
1942 The buttons labels are given in labelArray with order #(cancel, no, yes) |
1943 (notice that the order may get reversed in some styles)" |
1943 (notice that the order may get reversed in some styles)" |
1944 |
1944 |
1945 ^ self |
1945 ^ self |
1946 confirmWithCancel:aString |
1946 confirmWithCancel:aString |
1947 labels:(self classResources array:labelArray) |
1947 labels:(self classResources array:labelArray) |
1959 |
1959 |
1960 confirmWithCancel:aString labels:buttonLabels values:buttonValues default:default |
1960 confirmWithCancel:aString labels:buttonLabels values:buttonValues default:default |
1961 "launch a Dialog, which allows user to click on any button. |
1961 "launch a Dialog, which allows user to click on any button. |
1962 Return the corresponding value from the values array. |
1962 Return the corresponding value from the values array. |
1963 The labels for the buttons are to be passed in |
1963 The labels for the buttons are to be passed in |
1964 buttonLabels, with cancel/abort being the first. |
1964 buttonLabels, with order #(cancel, no, yes). |
1965 The default argument (if non-nil) defines the index of the |
1965 The default argument (if non-nil) defines the index of the |
1966 return button (1 to n)" |
1966 return button (1 to n)" |
1967 |
1967 |
1968 ^ self |
1968 ^ self |
1969 confirmWithCancel:aString |
1969 confirmWithCancel:aString |
2003 |
2004 |
2004 confirmWithCancel:aString labels:buttonLabels values:buttonValues default:default check:checkLabelOrNil on:checkHolderOrNil title:boxLabelOrNil |
2005 confirmWithCancel:aString labels:buttonLabels values:buttonValues default:default check:checkLabelOrNil on:checkHolderOrNil title:boxLabelOrNil |
2005 "launch a Dialog, which allows user to click on any button. |
2006 "launch a Dialog, which allows user to click on any button. |
2006 Return the corresponding value from the values array. |
2007 Return the corresponding value from the values array. |
2007 The labels for the buttons are to be passed in |
2008 The labels for the buttons are to be passed in |
2008 buttonLabels, with cancel/abort being the first. |
2009 buttonLabels, with order #(cancel, no, yes). |
2009 The default argument (if non-nil) defines the index of the return button (1 to n). |
2010 The default argument (if non-nil) defines the index of the return button (1 to n). |
2010 If checkLabel/checkHolder are not nil, and additional labelled checkBox is added to operate on |
2011 If checkLabel/checkHolder are not nil, and additional labelled checkBox is added to operate on |
2011 checkHolder. This can be used for 'do not show this box again' checkItems." |
2012 checkHolder. This can be used for 'do not show this box again' checkItems." |
2012 |
2013 |
2013 |box buttons answer i| |
2014 |box buttons answer i| |
2067 title:'hello there' |
2068 title:'hello there' |
2068 ) |
2069 ) |
2069 " |
2070 " |
2070 |
2071 |
2071 "Created: / 02-03-2007 / 15:08:49 / cg" |
2072 "Created: / 02-03-2007 / 15:08:49 / cg" |
|
2073 "Modified (comment): / 15-02-2019 / 09:20:00 / Claus Gittinger" |
2072 ! |
2074 ! |
2073 |
2075 |
2074 confirmWithCancel:aString labels:buttonLabels values:buttonValues default:default title:boxLabelOrNil |
2076 confirmWithCancel:aString labels:buttonLabels values:buttonValues default:default title:boxLabelOrNil |
2075 "launch a Dialog, which allows user to click on any button. |
2077 "launch a Dialog, which allows user to click on any button. |
2076 Return the corresponding value from the values array. |
2078 Return the corresponding value from the values array. |
2077 The labels for the buttons are to be passed in |
2079 The labels for the buttons are to be passed in |
2078 buttonLabels, with cancel/abort being the first. |
2080 buttonLabels, with order #(cancel, no, yes). |
2079 The default argument (if non-nil) defines the index of the |
2081 The default argument (if non-nil) defines the index of the |
2080 return button (1 to n)" |
2082 return button (1 to n)" |
2081 |
2083 |
2082 ^ self |
2084 ^ self |
2083 confirmWithCancel:aString |
2085 confirmWithCancel:aString |
2097 title:'hello there' |
2099 title:'hello there' |
2098 ) |
2100 ) |
2099 " |
2101 " |
2100 |
2102 |
2101 "Created: / 02-03-2007 / 15:08:49 / cg" |
2103 "Created: / 02-03-2007 / 15:08:49 / cg" |
|
2104 "Modified (comment): / 15-02-2019 / 09:20:04 / Claus Gittinger" |
2102 ! |
2105 ! |
2103 |
2106 |
2104 confirmWithCancel:aString onCancel:cancelValue |
2107 confirmWithCancel:aString onCancel:cancelValue |
2105 "launch a Dialog, which allows user to enter yes, no and cancel. |
2108 "launch a Dialog, which allows user to enter yes, no and cancel. |
2106 return true for 'yes', false for 'no', cancelValues value for 'cancel'" |
2109 return true for 'yes', false for 'no', cancelValues value for 'cancel'" |
2141 ! |
2144 ! |
2142 |
2145 |
2143 confirmWithRaiseAbortOnCancel:aString |
2146 confirmWithRaiseAbortOnCancel:aString |
2144 "launch a Dialog, which allows user to enter yes, no and cancel. |
2147 "launch a Dialog, which allows user to enter yes, no and cancel. |
2145 Return true for 'yes', false for 'no'. |
2148 Return true for 'yes', false for 'no'. |
2146 Raise the abort signal 'cancel'" |
2149 Raise the abort signal on 'cancel'" |
2147 |
2150 |
2148 |answer| |
2151 |answer| |
2149 |
2152 |
2150 answer := self |
2153 answer := self |
2151 confirmWithCancel:aString |
2154 confirmWithCancel:aString |