I've been trying to port a small app I've written in MacRuby with a nib file over to HotCocoa. When the app launches a modal sheet is displayed asking the user for credentials. This is done by having both the main window and the credentials sheet in the MainMenu.nib file. In the applicationDidFinishLaunching method of the app delegate I call NSApp's beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo: to display the sheet. This works like a champ with the in MacRuby with the nib. However in HotCocoa the sheet displays but is both detached from the main window and goes to the back as soon as you click on anything. On other mailing-lists I've seen the problem attributed to having the "Visible at launch" property enabled on the sheet window. But I'm trying to do it with HotCocoa and I can't, for the life of me, figure out the equivalent method call. I've toyed with loading the credentials window from a nib, but I'd like to do this with HotCocoa for demonstration purposes. If anyone has any ideas I'd love any insights or suggestions. Cheers, Alex ---- Musings & Notes — http://alexvollmer.com Track what you lend and borrow — http://moochbot.com
Rich Kilmer and I have been working on a new MVC approach for HotCocoa and Rich is currently implementing a new delegation system between the views and the controllers to make things way easier. I didn't check on the modal sheet yet and I don't really know how to programmatically set all the options, but you might want to look at setting up/extending some mappings to make the task easier. - Matt On Mon, May 4, 2009 at 9:17 PM, Alex Vollmer <alex.vollmer@gmail.com> wrote:
I've been trying to port a small app I've written in MacRuby with a nib file over to HotCocoa. When the app launches a modal sheet is displayed asking the user for credentials. This is done by having both the main window and the credentials sheet in the MainMenu.nib file. In the applicationDidFinishLaunching method of the app delegate I call NSApp's beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo: to display the sheet. This works like a champ with the in MacRuby with the nib. However in HotCocoa the sheet displays but is both detached from the main window and goes to the back as soon as you click on anything. On other mailing-lists I've seen the problem attributed to having the "Visible at launch" property enabled on the sheet window. But I'm trying to do it with HotCocoa and I can't, for the life of me, figure out the equivalent method call.
I've toyed with loading the credentials window from a nib, but I'd like to do this with HotCocoa for demonstration purposes. If anyone has any ideas I'd love any insights or suggestions.
Cheers,
Alex ---- Musings & Notes — http://alexvollmer.com Track what you lend and borrow — http://moochbot.com
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
participants (2)
-
Alex Vollmer
-
Matt Aimonetti