Problems opening remote folder

I writing a app to connect to a Windows SMB share and move some files. I have this working with AppleScript Editor but i want to move the code over to Xcode so i can add more GUI functionality. The code is establishing the connection to the Windows PC and I can navigate through Finder but i am unable to script it. I am very new to this and I am sure it is something dumb.

script Data_TransferAppDelegate
	property parent : class "NSObject"
    -- Outlet's
    property textPCName : missing value
    property textShareName : missing value
    property lblOS : missing value
    property theprogressBar : missing value
    
    on buttonClick_(sender)
        set theComputerName to textPCName's stringValue()
        set theShareName to textShareName's stringValue()
        mount volume "smb://" & theComputerName & "/" & theShareName
        
        tell application "Finder"
            if folder "Contacts" of disk theShareName exists then
                  -- the Windows PC is Windows 7 and start copying
            else
                  -- the Windows PC is Windows XP and start copying
            end if
        end tell
    end buttonClick_