I Need Help...

martinatkinson

Registered
Hello!

I need help with programming an app. I have a window with a list view and a text box. (by the way I am using Project Builder and Interface Builder and programming in the Cocoa lanquage) I would like there to be a list of choices in the list view and when the user clicks on a choice, text appears in the text box below (open Apple's "Mail.app" as an example. Click on a message in their list view, the body of the message appears in the text box below. That is pretty much waht I want although the text in the list view is NOT user defined.) Could you help me out with this or refer me to a website that can help?:(

Thank you so much!

Albert
 
That should keep me busy! :D

Thanks for the links! Looks like it would be a good investment to purchase that book. I need help with only one more thing (at this time). Do you know how I would link a button or a menu item to a URL? I would like to have a button that users can click to go to my website to check out the latest news, updates, etc.

Again thanks!

Albert
 
That's an easy one :)

Just add an action called visitWebPage (or whatever) to your object, connect the button to it, and add the following code in PB:

Code:
-(IBAction)visitWebPage:(id)sender
{
	[[NSWorkspace sharedWorkspace] openURL:
	[NSURL URLWithString:@"http://url.to/page/goes/here/"]];
}

Note that the internet prefs in 10.0.4 can get screwed up fairly easily, so if this doesn't work, check that.
 
Hello again!

OK, first of all I would like to rename my default NIB file from MainMenu.nib to something else. The only problem is that Project Builder has in its code (somewhere) the name of the default NIB file so when I rename it I get messed up. Where is the name of the NIB file in the code so I can change it?

Secondly, I would like to link one NIB file to another one (if at all possible). When the user clicks a button a the second NIB file would be opened and one of its windows would be displayed. How is this done? If it is possible to do will the window contained in the previous window still be open or will it close when the second NIB file is opened.

Thanks for your help!

Albert
 
OK, first of all I would like to rename my default NIB file from MainMenu.nib to something else. The only problem is that Project Builder has in its code (somewhere) the name of the default NIB file so when I rename it I get messed up. Where is the name of the NIB file in the code so I can change it?

Project Menu > Edit Active Target > Application Settings tab > Main nib file


Secondly, I would like to link one NIB file to another one (if at all possible). When the user clicks a button a the second NIB file would be opened and one of its windows would be displayed. How is this done? If it is possible to do will the window contained in the previous window still be open or will it close when the second NIB file is opened.

look at AppKit/NSNibLoading.h
 
Back
Top