Module: WrapBind

Defined in:
ext/ae-rad/lib/tk/al-tk.rb

Instance Method Summary collapse

Instance Method Details

#procstr(path) ⇒ Object


1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1149

def procstr(path)
  parts = path.split('@')
  file,srow = parts[1].split(':')
  srow.sub!('>','')
  row = srow.to_i
  lines = IO.readlines(file)
  line = lines[row - 1]
  i1 = line.index('proc{') + 5
  result = line[i1..line.length - 1]
  i2 = nil
  while i2 == nil
    i2 = result.index('}')
    if i2
      i2 = i2 + i1 - 1
      result = line[i1..i2]
    else
      row = row + 1
      result = result + lines[row - 1]
    end
  end
  return result
end

#wbind(context, cmd = Proc.new, args = nil) ⇒ Object


1145
1146
1147
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1145

def wbind(context, cmd=Proc.new, args=nil)
  self.bind(context, cmd)
end

#wbind_append(context, cmd = Proc.new, args = nil) ⇒ Object


1141
1142
1143
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1141

def wbind_append(context, cmd=Proc.new, args=nil)
  self.bind_append(context, cmd)
end

#wbind_miniObject


1137
1138
1139
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1137

def wbind_mini()
  p self
end