[MacRuby-devel] Focus window from second XIB

2011-03-01 Thread Sven Schwyn
Hi For the preferences, I've created a second XIB. However, when the corresponding controller is instantiated, the window does appear but does not gain focus. Any idea what I'm doing wrong here? preferences_controller.rb: class PreferencesController < NSWindowController def windowNibNam

Re: [MacRuby-devel] Focus window from second XIB

2011-03-01 Thread Robert Payne
Hi Sven, Creating a window wont necessarily make it the Key or Main window. What I tend to do is always disable the "visible at launch" checkbox inside interface builder and do something like def menu_preferences(sender) preferences = PreferencesController.new preferences.center

Re: [MacRuby-devel] Focus window from second XIB

2011-03-01 Thread Sven Schwyn
Hi Franco Thanks for the quick reply. However, I get this if I try your hint: undefined method `center' for #http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Re: [MacRuby-devel] Focus window from second XIB

2011-03-01 Thread Robert Payne
Hi Sven, Actually it's preferences.window.center() preferences.window.makeKeyAndOrderFront(self) Sorry! -Robert On Mar 2, 2011, at 8:19 AM, Sven Schwyn wrote: > Hi Franco > > Thanks for the quick reply. However, I get this if I try your hint: > > undefined method `center' for # > I seem t

Re: [MacRuby-devel] Focus window from second XIB

2011-03-01 Thread Sven Schwyn
Forgot to mention that I've tried preferences.windows.center() already, however, preferences.window is nil and therefore the center method call kabooms. (If I check the "visible at launch", the window shows and window is still nil - eventhough the delegate appears to be hooked up okay.) By the

Re: [MacRuby-devel] Focus window from second XIB

2011-03-01 Thread Scott Ribe
On Mar 1, 2011, at 2:34 PM, Sven Schwyn wrote: > eventhough the delegate appears to be hooked up okay. Is the window hooked up to its controller? (Which is probably first responder?) -- Scott Ribe [email protected] http://www.elevated-dev.com/ (303) 722-0567 voice

Re: [MacRuby-devel] Focus window from second XIB

2011-03-01 Thread Sven Schwyn
On Mar 1, 2011, at 9:37 PM, Scott Rybe wrote: > Is the window hooked up to its controller? (Which is probably first > responder?) Well, I've dragged the window outlet of the delegate "Preferences Controller" onto the window object and changed the File's Owner class to PreferencesController. ___

Re: [MacRuby-devel] Focus window from second XIB

2011-03-01 Thread Scott Ribe
On Mar 1, 2011, at 2:46 PM, Sven Schwyn wrote: > On Mar 1, 2011, at 9:37 PM, Scott Rybe wrote: >> Is the window hooked up to its controller? (Which is probably first >> responder?) > > Well, I've dragged the window outlet of the delegate "Preferences Controller" > onto the window object and cha

Re: [MacRuby-devel] Focus window from second XIB

2011-03-01 Thread Robert Payne
You probably need to load it differently PreferencesController.alloc.initWithWindowNibNamed See apples documentation to make sure you're using the correct API. -Robert Sent from my iPhone On Mar 2, 2011, at 10:50 AM, Scott Ribe wrote: > On Mar 1, 2011, at 2:46 PM, Sven Schwyn wrote: >

Re: [MacRuby-devel] Focus window from second XIB

2011-03-01 Thread Sven Schwyn
Turns out that it works if I hook the window outlet to File's Owner instead of the Preferences Controller delegate. (The amount of at first sight reasonnable ways to do things can be confusing at times.) Thanks for your hints! -sven ___ MacRuby-deve

Re: [MacRuby-devel] Focus window from second XIB

2011-03-01 Thread Scott Ribe
On Mar 1, 2011, at 3:31 PM, Sven Schwyn wrote: > Turns out that it works if I hook the window outlet to File's Owner instead > of the Preferences Controller delegate. (The amount of at first sight > reasonnable ways to do things can be confusing at times.) If the file's owner is the controller,

Re: [MacRuby-devel] Focus window from second XIB

2011-03-01 Thread Sven Schwyn
> If the file's owner is the controller, you should not be adding a controller > object to the nib, because then you will wind up with two of them. Makes sense. And reading a little on File's Owner, it seems to be the right choice - at least for other than the MainMenu.xib. Setting up a separat

Re: [MacRuby-devel] Trying to use spotlight programmatically

2011-03-01 Thread Franco Rondini
nt said: "I'm afraid the MD* APIs haven't been covered > by BridgeSupport yet.." > but because of i can see the MDQueryGetResultCount working I hope that there > is a way to enumerate the results of the query to get the attributes ( path > especially ) > I would be very

[MacRuby-devel] macruby_deploy --gem

2011-03-01 Thread Russ McBride
I've stopped fighting with gems and just gave into the new --gem option in macruby_deploy today. Alas, I'm fighting with gems again. My app, which I'm adding features to, btw, has been running quite nicely here at UC Berkeley to drive Selenium as a web app probing and monitoring device. I'm g

[MacRuby-devel] macruby_deploy --gem

2011-03-01 Thread Russ McBride
oh, the command I'm using in my build script PATH="$PATH:/usr/local/bin" macruby_deploy --gem action_mailer --embed "$TARGET_BUILD_DIR/$PROJECT_NAME.app" ___ MacRuby-devel mailing list [email protected] http://lists.macosfo

Re: [MacRuby-devel] macruby_deploy --gem

2011-03-01 Thread Mark Rada
macruby_deploy gets the rubygems source code to actually look up the gem. You mentioned that you use RVM. Did you configure your GEM_PATH and GEM_HOME so that they point to the non-RVM places or were you just making the directories yourself? Rubygems looks for its cache of gemspecs to find the g