Bad name sent ?

Sam.Online

25-10-2008 13:38:38

Hey guys! i'm trying to make a File Dialog with MyGUI and Boost, but i'm having some issue with the name sent by a MultiList... here's the event code i use:



void FileDialog::listHandler(MyGUI::WidgetPtr _sender, size_t _index){
MyGUI::MultiListPtr listing = MyGUI::castWidget<MyGUI::MultiList>(_sender);
std::string selection = listing->getSubItemNameAt(1, _index).asUTF8();
cout << selection << endl;
std::string tempPath;
int currSize = currPath.size();
cout << currSize << endl;
int selectionSize = selection.size();
cout << selectionSize << endl;

if (!LoadedOnce){
cout << "First Reload" << endl;
tempPath = currPath+=selection;
cout << tempPath << endl;
}
else{
cout << "Reload" << endl;
tempPath = currPath+="/"+selection;
cout << tempPath << endl;
}

if (boost::filesystem::is_directory(tempPath)){
listFilesAndFolders(tempPath);
currPath.assign(tempPath);
}
cout << "we'll now assign tempPath to \"\"" << endl;
tempPath.assign("");
cout << "lets see: " << tempPath << " :worked ?" << endl << endl << endl;
LoadedOnce = true;


and 2 screenshot to make sure you understand what i mean:

http://img123.imageshack.us/my.php?image=b4jk0.png
http://img249.imageshack.us/my.php?image=afterkd8.png

for me... its look like listing->getSubItemNameAt(1, _index) is not returning the correct value... am i wrong ? (if you need more info i'll post 'em as soon as possible...)

sorry for bothering you with my problem... but before i start using a multilist (for the sake of simplicity... erf... Yea, Right!) i was using a list and everything worked near well...

my.name

25-10-2008 14:02:31

please wait ...

my.name

26-10-2008 18:43:12

update from svn ...

Sam.Online

30-10-2008 01:37:49

Ok, Thx for checking!