Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

popup menu code



Hi everyone,
What is wrong with this popup menu code or is there a better way to do
it? I get the following errors repeated:
illegal expression, found "unknown"
illegal external declaration, missing ';' after 'isEqualTostring'

Code:

NSString *tmpTitle;
NSString *tmpURL;

tmpTitle =[searchPopup titleOfSelectedItem];
if ([tmpTitle isEqualToString:@"Google" ])
{
NSLog(@"Google Selected");
tmpURL = @"http://www.google.com/search?q=";;
}
if ([tmpTitle isEqualToString:@"Apple Developers Site" ])
{
NSLog(@"Apple Selected");
tmpURL = @"http://developer.apple.com/cgi-bin/search.pl?q=";;
}
if ([tmpTitle isEqualToString:@"Cocoa-Dev List" ])
{
NSLog(@"Cocoa-Dev Selected");
tmpURL =
@"http://cocoa.mamasam.com/search/results.php?words=";;
}


Luke
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.