[macruby-changes] [368] MacRuby/trunk/sample-macruby/HotCocoa/layout_view.rb

source_changes at macosforge.org source_changes at macosforge.org
Thu Jul 10 18:37:47 PDT 2008


Revision: 368
          http://trac.macosforge.org/projects/ruby/changeset/368
Author:   rich at infoether.com
Date:     2008-07-10 18:37:46 -0700 (Thu, 10 Jul 2008)
Log Message:
-----------
add layoutmanaged module so my view can be put in a layoutview

Modified Paths:
--------------
    MacRuby/trunk/sample-macruby/HotCocoa/layout_view.rb

Modified: MacRuby/trunk/sample-macruby/HotCocoa/layout_view.rb
===================================================================
--- MacRuby/trunk/sample-macruby/HotCocoa/layout_view.rb	2008-07-11 01:27:02 UTC (rev 367)
+++ MacRuby/trunk/sample-macruby/HotCocoa/layout_view.rb	2008-07-11 01:37:46 UTC (rev 368)
@@ -2,6 +2,8 @@
 include HotCocoa
 
 class MyView < NSView
+  
+  include LayoutManaged
 
   DefaultSize = [30, 30]
 
@@ -11,7 +13,7 @@
   
   def initWithFrame(frame)
     super
-    @layout = HotCocoa::LayoutOptions.new(self)
+    self.layout = {}
     self
   end
   
@@ -19,7 +21,7 @@
     setFrameSize(DefaultSize)
   end
   
-  attr_accessor :number, :layout
+  attr_accessor :number
  
   def drawRect(rect)
     (color :red => 0.29, :green => 0.26, :blue => 0.55).set
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20080710/d6104225/attachment-0001.html 


More information about the macruby-changes mailing list