[MacRuby-devel] Close Current window and Pass Data

Buddy Lindsey, Jr. percent20 at gmail.com
Sun Feb 6 19:23:15 PST 2011


Okay, i think that makes sense. I guess need to figure out some way to get
the reference to the current window that is open, so I can call the close
method on it.

Is that a correct approach?

Also any ideas on passing data from one window to the other?

---
Buddy Lindsey
http://www.buddylindsey.com
http://www.twitter.com/buddylindsey


On Sun, Feb 6, 2011 at 8:49 PM, Charles Steinman <acharlieblue at gmail.com>wrote:

> On Sun, Feb 6, 2011 at 3:01 PM, Buddy Lindsey, Jr. <percent20 at gmail.com>
> wrote:
> > I have had some good success in getting large chunks of my app done, but
> > there are a few things that I can't seem to figure out, or at least get
> to
> > working.
> > I was able to figure out how to open up a new window that was based on a
> xib
> > file, but what I really want to do is open the new window and close the
> > current one which opened the new one.
> > Also in the process of opening the new window I want to pass some data,
> at
> > this point a single string. What is the best way to go about this? My
> lack
> > of experience with cocoa, and by extension objective-c, is really killing
> me
> > on figuring this out. Unfortuneatly there isn't just a simple close()
> method
> > to call.
>
> There actually is a simple close method, both on NSWindow[1] and
> NSWindowController[2]. Unless I'm misunderstanding, you should be able
> to proceed pretty much as you described.
>
> — Chuck
>
> [1]:
> http://developer.apple.com/library/mac/documentation/cocoa/reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html#//apple_ref/occ/instm/NSWindow/close
> [2]:
> http://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindowController_Class/Reference/Reference.html#//apple_ref/occ/instm/NSWindowController/close
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20110206/0ad081a4/attachment.html>


More information about the MacRuby-devel mailing list