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

Brilliant !

Thank you :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.