Could someone please give me a pointer as to why my use of appendText fails?

This is my first bit of programming for 30 years - I'm sorry if its an idiot mistake :)

The program has 2 text fields. You paste a list of url's into the first box (area1), hit the 'Convert' button, and it (should) output a list of properly formatted links in area2 ready to paste into a web page.



<a href= target=_blank></a>

The code snippet I have works perfectly, but nothing gets output to box 2.
If I un-comment the 2 print lines, the link's 'ref' and contents get printed in the interpreter exactly as it should be.

def on_Convert_mouseClick(self, event):
    amountOfLines = self.components.TextArea1.getNumberOfLines()
    while ref < amountOfLines:
        line = self.components.TextArea1.getLineText(ref)
        line = '<a href='+line+' target=_blank>'+line+'</a>\n'
        self.components.TextArea2.appendText = (line)
#       print ref
#       print line

using python 2.7 and pythoncard on win64

This question has already been answered. Start a new discussion instead.