The following code (attach) works in nb, but doent work in the cdf preview. Why? Is it the MessageDialog?