Browse Source

Merge pull request #724 from srikumarks/master

BUGFIX: Inspecting a string in Helios breaks into the debugger.
Nicolas Petton 11 years ago
parent
commit
8958d0d218
2 changed files with 10 additions and 3 deletions
  1. 9 2
      js/Helios-Core.js
  2. 1 1
      st/Helios-Core.st

+ 9 - 2
js/Helios-Core.js

@@ -2462,12 +2462,19 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 smalltalk.HLListWidget.superclass.fn.prototype._refresh.apply(_st(self), []);
+$1=self._selectedItem();
+$ctx1.sendIdx["selectedItem"]=1;
+if(($receiver = $1) == nil || $receiver == null){
+$1;
+} else {
 self._ensureVisible_(self._findListItemFor_(self._selectedItem()));
+};
 return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLListWidget)})},
 args: [],
-source: "refresh\x0a\x09super refresh.\x0a\x09self ensureVisible: (self findListItemFor: self selectedItem)",
-messageSends: ["refresh", "ensureVisible:", "findListItemFor:", "selectedItem"],
+source: "refresh\x0a\x09super refresh.\x0a\x09self selectedItem ifNotNil: [self ensureVisible: (self findListItemFor: self selectedItem)].",
+messageSends: ["refresh", "ifNotNil:", "selectedItem", "ensureVisible:", "findListItemFor:"],
 referencedClasses: []
 }),
 smalltalk.HLListWidget);

+ 1 - 1
st/Helios-Core.st

@@ -836,7 +836,7 @@ focus
 
 refresh
 	super refresh.
-	self ensureVisible: (self findListItemFor: self selectedItem)
+	self selectedItem ifNotNil: [self ensureVisible: (self findListItemFor: self selectedItem)].
 !
 
 selectItem: anObject