aboutsummaryrefslogtreecommitdiff
path: root/examples/002-ApplicationList.rb
blob: c2ec1680907ff64b635f0d4c4e50f208f4265fbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/ruby

$:.unshift( ".." )

require "ivy"

ivy = IVY.new( "TestRbAppList", "TestRbAppList Ready" )
ivy.start( )

msg = ivy.bindmsg( nil, "^quit$" ) { |app, data, tab|
  ivy.stop( )
}

msg2 = ivy.bindmsg( nil, "^who$" ) { |app, data, tab| 
  ivy.applicationList.each do |x|
    ivy.sendmsg( "APP: #{x}" )
  end
}

ivy.mainloop( )