public
Description: Native OS X (RubyCocoa) app to manage your EC2 instances
Clone URL: git://github.com/bricooke/ec2mgr.git
DO says ObjC only (makes sense). Working the Ruby Thread.new angle now. 
will tread lightly.
bricooke (author)
Thu Jul 10 07:44:20 -0700 2008
commit  19124c3c4d7e43c0aac12f8c724055588caf3138
tree    3ebdbd4bc4027bcce1276da98c84571d6f63bc7f
parent  e63959a8b55334725252d006c1f713ff1a02fbd1
...
11
12
13
 
 
14
15
16
...
35
36
37
38
39
 
 
 
 
 
 
40
41
42
...
46
47
48
 
 
 
 
49
...
11
12
13
14
15
16
17
18
...
37
38
39
 
 
40
41
42
43
44
45
46
47
48
...
52
53
54
55
56
57
58
59
0
@@ -11,6 +11,8 @@ require 'rubygems'
0
 require 'right_aws'
0
 
0
 class EC2MgrWindowController < NSWindowController
0
+ attr_accessor :images
0
+
0
   def self.initialize
0
     defaults = NSMutableDictionary.dictionary
0
     defaults.setObject_forKey_(nil, "aws_access_key")
0
@@ -35,8 +37,12 @@ class EC2MgrWindowController < NSWindowController
0
         nil)
0
     else
0
       # load running instances
0
- @ec2 = RightAws::Ec2.new(username, keychainItem.password)
0
- puts @ec2.describe_images
0
+ self.showImages(nil)
0
+ Thread.new do
0
+ @ec2 = RightAws::Ec2.new(username, keychainItem.password)
0
+ @images = @ec2.describe_images
0
+ performSelectorOnMainThread_withObject_waitUntilDone_("showImages", nil, false)
0
+ end
0
     end
0
   end
0
   
0
@@ -46,4 +52,8 @@ class EC2MgrWindowController < NSWindowController
0
     # try again
0
     applicationDidFinishLaunching(nil)
0
   end
0
+
0
+ def showImages(ignoreMe)
0
+ puts @images
0
+ end
0
 end

Comments

    No one has commented yet.