question regarding getting data from NSComoBox
question regarding getting data from NSComoBox
- Subject: question regarding getting data from NSComoBox
- From: "Alan Smith" <email@hidden>
- Date: Wed, 17 May 2006 13:25:49 -0400
Hi everyone,
I need to get the NSString value from two NSComboBoxes. I've tried
using type-casting but it doesn't wrok.
- (NSString*)fullStoragePath
{
NSString *importType = [@"/"
stringByAppendingString:(NSString*)[gameMenu
objectValueOfSelectedItem]];
importType = [importType stringByAppendingString:@" "];
importType = [importType
stringByAppendingString:(NSString*)[importMenu
objectValueOfSelectedItem]];
importType = [importType stringByAppendingString:@"s"];
return [textPaths storageFor:importType];
}
gameMenu and importMenu are the two comboboxes. They each have a
string in them, and in the awakeFromNib I used selectItemAtIndex on
them both.
'[textPaths storageFor:importType]'
TextPaths is a custom class with the method 'storageFor:' It takes
input and appends that on to ~/Application Support/EV Manager/ after
expanding the tilde. Then it returns the new string.
I shall demonstrate:
gameMenu = @"Plugin"
importMenu = @"EV Nova"
importType:
line 1: @"/EV Nova"
line 2: @"/EV Nova "
line 3: @"/EV Nova Plugin"
line 4: @"/EVNova Plugins"
line 5: @"/Users/alan/Library/Application Support/EV Manager/EV Nova Plugins"
Now, I know that folder exists becuase I can see it in the Finder.
Also, something that suggests that it's not the folder or the path, is
that if I hard code the path it works fine, but I don't want to do
that. I test the path with fileExistsAtPath of NSFileManager.
So, my guess is that my type-casting is not working the way I want.
What can I do?
Thanks, Alan Smith
--
// Quotes from yours truly -------------------------
"You don't forget, you just don't remember."
"Maturity resides in the mind."
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden