Browse Source

Renames button label accessors in HLModalWidget

Nicolas Petton 10 years ago
parent
commit
8f2eff1a3e
2 changed files with 30 additions and 30 deletions
  1. 19 19
      src/Helios-Core.js
  2. 11 11
      src/Helios-Core.st

+ 19 - 19
src/Helios-Core.js

@@ -4317,7 +4317,7 @@ referencedClasses: []
 globals.HLManager.klass);
 
 
-smalltalk.addClass('HLModalWidget', globals.HLWidget, ['confirmactionText', 'cancelText'], 'Helios-Core');
+smalltalk.addClass('HLModalWidget', globals.HLWidget, ['confirmButtonLabel', 'cancelButtonLabel'], 'Helios-Core');
 globals.HLModalWidget.comment="I implement an abstract modal widget.";
 smalltalk.addMethod(
 smalltalk.method({
@@ -4337,22 +4337,22 @@ globals.HLModalWidget);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "cancelText",
+selector: "cancelButtonLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $2,$1;
-$2=self["@cancelText"];
+$2=self["@cancelButtonLabel"];
 if(($receiver = $2) == nil || $receiver == null){
 $1="Cancel";
 } else {
 $1=$2;
 };
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"cancelText",{},globals.HLModalWidget)})},
+}, function($ctx1) {$ctx1.fill(self,"cancelButtonLabel",{},globals.HLModalWidget)})},
 args: [],
-source: "cancelText\x0a\x09^ cancelText ifNil: [ 'Cancel' ]",
+source: "cancelButtonLabel\x0a\x09^ cancelButtonLabel ifNil: [ 'Cancel' ]",
 messageSends: ["ifNil:"],
 referencedClasses: []
 }),
@@ -4360,14 +4360,14 @@ globals.HLModalWidget);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "cancelText:",
+selector: "cancelButtonLabel:",
 protocol: 'accessing',
 fn: function (anObject){
 var self=this;
-self["@cancelText"]=anObject;
+self["@cancelButtonLabel"]=anObject;
 return self},
 args: ["anObject"],
-source: "cancelText: anObject\x0a\x09cancelText := anObject",
+source: "cancelButtonLabel: anObject\x0a\x09cancelButtonLabel := anObject",
 messageSends: [],
 referencedClasses: []
 }),
@@ -4391,22 +4391,22 @@ globals.HLModalWidget);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "confirmactionText",
+selector: "confirmButtonLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $2,$1;
-$2=self["@confirmactionText"];
+$2=self["@confirmButtonLabel"];
 if(($receiver = $2) == nil || $receiver == null){
 $1="Confirm";
 } else {
 $1=$2;
 };
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"confirmactionText",{},globals.HLModalWidget)})},
+}, function($ctx1) {$ctx1.fill(self,"confirmButtonLabel",{},globals.HLModalWidget)})},
 args: [],
-source: "confirmactionText\x0a\x09^ confirmactionText ifNil: [ 'Confirm' ]",
+source: "confirmButtonLabel\x0a\x09^ confirmButtonLabel ifNil: [ 'Confirm' ]",
 messageSends: ["ifNil:"],
 referencedClasses: []
 }),
@@ -4414,14 +4414,14 @@ globals.HLModalWidget);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "confirmactionText:",
+selector: "confirmButtonLabel:",
 protocol: 'accessing',
 fn: function (anObject){
 var self=this;
-self["@confirmactionText"]=anObject;
+self["@confirmButtonLabel"]=anObject;
 return self},
 args: ["anObject"],
-source: "confirmactionText: anObject\x0a\x09confirmactionText := anObject",
+source: "confirmButtonLabel: anObject\x0a\x09confirmButtonLabel := anObject",
 messageSends: [],
 referencedClasses: []
 }),
@@ -4518,7 +4518,7 @@ $3=_st(html)._button();
 $ctx2.sendIdx["button"]=1;
 _st($3)._class_("button");
 $ctx2.sendIdx["class:"]=2;
-_st($3)._with_(self._cancelText());
+_st($3)._with_(self._cancelButtonLabel());
 $ctx2.sendIdx["with:"]=2;
 $4=_st($3)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
@@ -4528,7 +4528,7 @@ $ctx2.sendIdx["onClick:"]=1;
 $4;
 $5=_st(html)._button();
 _st($5)._class_("button default");
-_st($5)._with_(self._confirmationText());
+_st($5)._with_(self._confirmButtonLabel());
 $6=_st($5)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._confirm();
@@ -4540,8 +4540,8 @@ $ctx1.sendIdx["with:"]=1;
 self._giveFocusToButton_(confirmButton);
 return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,confirmButton:confirmButton},globals.HLModalWidget)})},
 args: ["html"],
-source: "renderButtonsOn: html\x0a\x09| confirmButton |\x0a\x09\x0a\x09html div \x0a\x09\x09class: 'buttons';\x0a\x09\x09with: [\x0a\x09\x09\x09html button\x0a\x09\x09\x09\x09class: 'button';\x0a\x09\x09\x09\x09with: self cancelText;\x0a\x09\x09\x09\x09onClick: [ self cancel ].\x0a\x09\x09\x09confirmButton := html button\x0a\x09\x09\x09\x09class: 'button default';\x0a\x09\x09\x09\x09with: self confirmationText;\x0a\x09\x09\x09\x09onClick: [ self confirm ] ].\x0a\x0a\x09self giveFocusToButton:confirmButton",
-messageSends: ["class:", "div", "with:", "button", "cancelText", "onClick:", "cancel", "confirmationText", "confirm", "giveFocusToButton:"],
+source: "renderButtonsOn: html\x0a\x09| confirmButton |\x0a\x09\x0a\x09html div \x0a\x09\x09class: 'buttons';\x0a\x09\x09with: [\x0a\x09\x09\x09html button\x0a\x09\x09\x09\x09class: 'button';\x0a\x09\x09\x09\x09with: self cancelButtonLabel;\x0a\x09\x09\x09\x09onClick: [ self cancel ].\x0a\x09\x09\x09confirmButton := html button\x0a\x09\x09\x09\x09class: 'button default';\x0a\x09\x09\x09\x09with: self confirmButtonLabel;\x0a\x09\x09\x09\x09onClick: [ self confirm ] ].\x0a\x0a\x09self giveFocusToButton:confirmButton",
+messageSends: ["class:", "div", "with:", "button", "cancelButtonLabel", "onClick:", "cancel", "confirmButtonLabel", "confirm", "giveFocusToButton:"],
 referencedClasses: []
 }),
 globals.HLModalWidget);

+ 11 - 11
src/Helios-Core.st

@@ -1455,27 +1455,27 @@ new
 ! !
 
 HLWidget subclass: #HLModalWidget
-	instanceVariableNames: 'confirmactionText cancelText'
+	instanceVariableNames: 'confirmButtonLabel cancelButtonLabel'
 	package: 'Helios-Core'!
 !HLModalWidget commentStamp!
 I implement an abstract modal widget.!
 
 !HLModalWidget methodsFor: 'accessing'!
 
-cancelText
-	^ cancelText ifNil: [ 'Cancel' ]
+cancelButtonLabel
+	^ cancelButtonLabel ifNil: [ 'Cancel' ]
 !
 
-cancelText: anObject
-	cancelText := anObject
+cancelButtonLabel: anObject
+	cancelButtonLabel := anObject
 !
 
-confirmactionText
-	^ confirmactionText ifNil: [ 'Confirm' ]
+confirmButtonLabel
+	^ confirmButtonLabel ifNil: [ 'Confirm' ]
 !
 
-confirmactionText: anObject
-	confirmactionText := anObject
+confirmButtonLabel: anObject
+	confirmButtonLabel := anObject
 !
 
 cssClass
@@ -1525,11 +1525,11 @@ renderButtonsOn: html
 		with: [
 			html button
 				class: 'button';
-				with: self cancelText;
+				with: self cancelButtonLabel;
 				onClick: [ self cancel ].
 			confirmButton := html button
 				class: 'button default';
-				with: self confirmationText;
+				with: self confirmButtonLabel;
 				onClick: [ self confirm ] ].
 
 	self giveFocusToButton:confirmButton