lib/osx/sugarcube-appkit/nsstring.rb in sugarcube-2.8.1 vs lib/osx/sugarcube-appkit/nsstring.rb in sugarcube-2.8.2
- old
+ new
@@ -28,15 +28,11 @@
return label
end
# @return [NSImageView]
def nsimageview
- image = NSImage.imageNamed(self)
- unless image
- NSLog("No image named #{self}")
- end
image_view = NSImageView.alloc.init
- image_view.image = image
+ image_view.image = self.nsimage
frame = image_view.frame
frame.size = image_view.intrinsicContentSize
image_view.frame = frame
return image_view
end