From: Jason Wang on
Sorry for bumping such an old topic! I just spent all afternoon finding the solution to this problem. I used FindJObj, which sort of worked, but was a ridiculously convoluted process. Turns out, the solution was to just put a short "pause" before retrieving the string. For example

pause(.5)
pathname=get(handles.pathBox,'String');

I'm not sure if this is ridiculously trivial, but I thought it might be useful to point out anyways, since it doesn't seem like anyone else has. Matlab's documentation on the function callbacks are way too sparse IMO!