well where is your connect statement ? is it being executed before the dialog instance is created ?
add the connect statement under the line where you instantiate the dialog class ie under dialog= new Dialog(this) and see what happens
the note about the "str" was just to avoid hard coding didn't have anything with the error.
Bookmarks