choose file - arbitrary results

if i create a soft or a hard link of applications, and try to select that app-link via : choose file dialog, the chooser picks not the application, but goes deeper into the package.
Unfortunately, not even -without showing package contents- helps. In my script (1470 paragraphs long) the choose file handler is nested 4 levels deep and invoked by using the -standard commands-

the test-script below works flawlessly, but i get other results in my longer script. Why?

set orig_file to "/Applications/"
set linked_copy to "~/Desktop/"
#create a link
set cmd to "ln -s " & orig_file & " " & linked_copy
	do shell script cmd
end try

set ch to (choose file default location (path to desktop folder) without showing package contents)

some help?

Difficult to help you when the script behaves flawlessly here.

Yvan KOENIG (VALLAURIS, France) jeudi 11 décembre 2014 19:13:42

Hey Joy,

Put the flawlessly working code in a handler and call it from within your larger script.

See if that makes any difference.