On Mon, Jan 23, 2017 at 9:26 AM, Offray Vladimir Luna Cárdenas < offray.l...@mutabit.com> wrote:
> Hi, > > I'm having problems understanding how #chooseDirectory: works. When I run > this code: > > GrafoscopioDocumentation current localPlace: (UIManager default > chooseDirectory: 'Path to the documents Folder') > > from a playground and choose a folder in my home directory, results in > localPlace containing a FileReference to '/home/offray/Documents/Grafoscopio', > which is what I expect. But if I put a similar code here: > > """ > > GrafoscopioDocumentation >> updateDocsPlace > > self current localPlace: (UIManager default chooseDirectory: 'Path to > the documentation folder') > > """ > > and choose the same folder, I got a relative FileReference to > 'Grafoscopio', instead of the one to the full path, that doesn't point to > anything existing in my system. > > What I'm missing here? > > > Totally wild speculation (I'm not very familiar with it and I'm away where I can check) it could be that #chooseDirectory: or something it calls raises a notification that is handled by the outer UI code, which is not done when executed from Playground. Try a halt before each UIManager and check if the execution paths are different. cheers -ben