From: Michal M. <mmi...@gm...> - 2008-01-29 10:31:29
|
Hi! This are my first steps in Rubycocoa and I hope this is the right place to find some help. I so far read few tutorials, and I know only bacics. So let me describe my problem. I'm doing gui like that http://s32721.ps.pl/pid.png but the code is like that (@the end of post) and it's only for that BZ1, still BZ2, BZ3 and so on. So What is the shortest way to save that data somewhere? (By the way I got whole code from Ruby, and I need to transform it to Rubycocoa if its making some changes.) Best Regards Michal class Kontrola < OSX::NSWindowController ib_outlet :a1Sli , :a1Txt , :a2Sli , :a2Txt , :b1Sli , :b1Txt, :k1Sli, :k1Txt, :k11Sli, :k11Txt, :textField, :t1Sli, :t1Txt, :t2Sli, :t2Txt, :t3Sli, :t3Txt #BZ1 #a def bz1a(sender) a1 = @a1Sli.intValue @a1Txt.setStringValue(a1.to_s) end ib_action :bz1a #b def bz1b(sender) b1 = @b1Sli.intValue @b1Txt.setStringValue(b1.to_s) end ib_action :bz1b #k def bz1k(sender) k1 = @k1Sli.intValue @k1Txt.setStringValue(k1.to_s) end ib_action :bz1k #k1 def bz1k1(sender) k11 = @k11Sli.intValue @k11Txt.setStringValue(k11.to_s) end ib_action :bz1k1 #t1 def bz1t1(sender) t1 = @t1Sli.intValue @t1Txt.setStringValue(t1.to_s) end ib_action :bz1t1 #t2 def bz1t2(sender) t2 = @t2Sli.intValue @t2Txt.setStringValue(t2.to_s) end ib_action :bz1t2 #t3 def bz1t3(sender) t3 = @t3Sli.intValue @t3Txt.setStringValue(t3.to_s) end ib_action :bz1t3 #BZ2 #a def bz2a(sender) a = @a2Sli.intValue @a2Txt.setStringValue(a.to_s) @a2 = a; end ib_action :bz2a2 #b #k #k1 #t1 #t2 #t3 |