1
0
Просмотр исходного кода

Merge pull request #74 from paulwilke/master

renderContentOn: after wrapper :=; fixed issue 73
Herbert Vojčík 8 лет назад
Родитель
Сommit
be3bb7af10
2 измененных файлов с 8 добавлено и 7 удалено
  1. 4 4
      src/Helios-Core.js
  2. 4 3
      src/Helios-Core.st

+ 4 - 4
src/Helios-Core.js

@@ -2857,7 +2857,8 @@ return $recv($recv(self._wrapper())._asJQuery())._addClass_(self._focusClass());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
 //>>excludeEnd("ctx");
 }));
-$recv($1)._with_((function(){
+self["@wrapper"]=$recv($1)._yourself();
+$recv(self["@wrapper"])._with_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
@@ -2866,7 +2867,6 @@ return self._renderContentOn_(html);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
 //>>excludeEnd("ctx");
 }));
-self["@wrapper"]=$recv($1)._yourself();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.HLFocusableWidget)});
@@ -2874,10 +2874,10 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["html"],
-source: "renderOn: html\x0a    wrapper := html div \x0a    \x09class: self cssClass;\x0a\x09\x09at: 'tabindex' put: '0';\x0a\x09\x09onBlur: [ self wrapper asJQuery removeClass: self focusClass ];\x0a        onFocus: [ self wrapper asJQuery addClass: self focusClass ];\x0a\x09\x09with: [ self renderContentOn: html ];\x0a\x09\x09yourself",
+source: "renderOn: html\x0a    wrapper := html div\x0a    \x09class: self cssClass;\x0a\x09\x09at: 'tabindex' put: '0';\x0a\x09\x09onBlur: [ self wrapper asJQuery removeClass: self focusClass ];\x0a        onFocus: [ self wrapper asJQuery addClass: self focusClass ];\x0a\x09\x09yourself.\x0a\x09\x22must do this later, as renderContentOn may want to use self wrapper\x22\x09\x0a\x09wrapper with: [ self renderContentOn: html ]",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["class:", "div", "cssClass", "at:put:", "onBlur:", "removeClass:", "asJQuery", "wrapper", "focusClass", "onFocus:", "addClass:", "with:", "renderContentOn:", "yourself"]
+messageSends: ["class:", "div", "cssClass", "at:put:", "onBlur:", "removeClass:", "asJQuery", "wrapper", "focusClass", "onFocus:", "addClass:", "yourself", "with:", "renderContentOn:"]
 }),
 $globals.HLFocusableWidget);
 

+ 4 - 3
src/Helios-Core.st

@@ -719,13 +719,14 @@ renderContentOn: html
 !
 
 renderOn: html
-    wrapper := html div 
+    wrapper := html div
     	class: self cssClass;
 		at: 'tabindex' put: '0';
 		onBlur: [ self wrapper asJQuery removeClass: self focusClass ];
         onFocus: [ self wrapper asJQuery addClass: self focusClass ];
-		with: [ self renderContentOn: html ];
-		yourself
+		yourself.
+	"must do this later, as renderContentOn may want to use self wrapper"	
+	wrapper with: [ self renderContentOn: html ]
 ! !
 
 !HLFocusableWidget methodsFor: 'testing'!