strange behaviour of a text field

Hi,

I’m just writing my first ASS application, it’s fun but I have an odd problem.
The main window of the app is made up of a tab view with two tab view items
and at the bottom a small status line (not within the tab view)
with a spinning progress indicator and a (non editable status) text field.

This handler manages the status line:

on cap_execute(shellString, procText)
	tell window "main"
		set visible of progress indicator "ProcessBar" to true
		set contents of text field "ProcessText" to procText
		start progress indicator "ProcessBar"
		-- display dialog (contents of text field "ProcessText" as string) -- !!
	end tell
	try
		do shell script shellString
	on error errmsg
		display dialog errmsg buttons {"OK"} default button 1 giving up after 5
	end try
	tell window "main"
		stop progress indicator "ProcessBar"
		set visible of progress indicator "ProcessBar" to false
		set contents of text field "ProcessText" to ""
	end tell
end cap_execute

the progress indicator is displayed properly but the text field is not.
If I set the text field with something before calling the handler,
the reset (“”) is performed but not the set with procText.
The confusion is perfect when I add the display dialog line:
Then everything works fine.

PS: the shell command takes a few seconds, even if I change the shell line with a delay
of a few seconds, the behaviour is the same.

Does anybody know this weird probem?

Try content (singular) of text field, instead of contents (plural).