OK @Bogs,
Time to get off that couch!
I've made some good progress in understanding the basics of LC text, but I'm still having trouble with HTMLtext. I am trying to set the HTMLtext in a field when I open the card where the field lives. I was ecstatic when I cut a bit of my html text from one of my apps and pasted it into a field. I started on mainCard and went to the second card. It actually worked. The text was formatted properly.
However, when I went from the previous card to the mainCard and back again to the 2nd card, the field was stripped of the html. It simply displayed as content text without any styling.
Here's my code:
The first mainCard in the stack has only a button to go next card (I've given up on getting nice refreshes in LC. The lack of that continually seems to cause me trouble. I'm used to calling my browser from an IDE and there is a refresh so everything works as I expect. I know this has to be me not understanding LC yet.)
mainCard:
At any rate, the second card in the stack has a scrolling field and a button to go to the previous main card in the stack.
The field on the second card has some html text in the
Content Area with the normal html tags. ie <p><h3><i> and so forth. The first time, from the browse tool, it works. If I go back to the mainCard and hit the "next" button again, The html tags are stripped away and I just see the text in plain form.
How do I over come this? My user would not want to have to use a button click on the card every time to see the HTML styled text. I think this is a baby coding question, but I'm lost. Maybe it has to do with the tTemp variable. My goal is to show the html text properly every time the user goes to the card.
The second card has the following code:
Code: Select all
on preopenCard
put field "Field" into tTemp
set the htmlText of field "Field" to tTemp
end preopenCard
I understand that we are able to enter everything using code rather than the
Content Area. Maybe I'm not supposed to use the
Content Area for this type of thing??
Hope you had a nice long rest. Chunks and textStyling were a little challenging for me, but also, a lot more understandable than string manipulation can be. Would sure love to be able to use HTML since I do understand how to style text using the elements there. Although, the built in LC styling isn't too bad.
Thanks again,
-Rachel