Page 1 of 2
Did not know you could get HTMLText of part of field
Posted: Sat Feb 22, 2020 12:46 pm
by kaveh1000
I just thought I would report this interesting feature I discovered that I found useful. I have used
but did not know you could also
Code: Select all
get the HTMLText of char 1 to 100 of fld 1
which is useful for me.
Anyone else surprised by this?
Re: Did not know you could get HTMLText of part of field
Posted: Sat Feb 22, 2020 12:58 pm
by bogs
Heh, there are a lot of useful things you can do, but I'm glad to hear you found this one on your own
kaveh1000 wrote: ↑Sat Feb 22, 2020 12:46 pm
Anyone else surprised by this?
No one longer than probably a year in the language would be I don't think. Some of the new comers maybe though...

Re: Did not know you could get HTMLText of part of field
Posted: Sat Feb 22, 2020 1:04 pm
by kaveh1000
Oh Bogs, don't be mean. I used HyperCard since prerelease!! Someone pls pretend you are surprised, to make me happy!!
Point is HTMLText is a custom property. A field has a custom property, but a chunk of text does not.
Re: Did not know you could get HTMLText of part of field
Posted: Sat Feb 22, 2020 1:15 pm
by Klaus
I was suprised about 18 years ago, if that helps...

Re: Did not know you could get HTMLText of part of field
Posted: Sat Feb 22, 2020 1:16 pm
by kaveh1000
I think you are all lying and this is a conspiracy against me.
Re: Did not know you could get HTMLText of part of field
Posted: Sat Feb 22, 2020 1:24 pm
by bogs
kaveh1000 wrote: ↑Sat Feb 22, 2020 1:04 pm
Oh Bogs, don't be mean. I used HyperCard since prerelease!! Someone pls pretend you are surprised, to make me happy!!
OH WAIT!! I'VE OPENED MY EYES

AND NOW I SEE IT!!! OMG !!!! HOW WAS I SO BLIND !!!!!!!!!!!!!! THIS CHANGES EVERYTHING!!!!!!!!!!!!!
kaveh1000 wrote: ↑Sat Feb 22, 2020 1:16 pm
I think you are all lying and this is a conspiracy against me.
Oh damn, jigs up Klaus, he figured it out

Re: Did not know you could get HTMLText of part of field
Posted: Sat Feb 22, 2020 1:26 pm
by kaveh1000
Phew. I am putting the razor blade back in the drawer.

Re: Did not know you could get HTMLText of part of field
Posted: Sat Feb 22, 2020 1:29 pm
by bogs
Razor blade? You can't cut text from a field with a razor blade, that is just silly talk now

Re: Did not know you could get HTMLText of part of field
Posted: Sat Feb 22, 2020 1:46 pm
by Klaus
But no fooling, I have been using Lc and its ancestors since 1999!
But I still discover something new from time to time, like that we can use "the templateimage"
to get the dimensions of an image file without creating an image object first!

Re: Did not know you could get HTMLText of part of field
Posted: Sat Feb 22, 2020 1:55 pm
by bogs
Example?

Re: Did not know you could get HTMLText of part of field
Posted: Sat Feb 22, 2020 2:22 pm
by Klaus
Re: Did not know you could get HTMLText of part of field
Posted: Sat Feb 22, 2020 3:00 pm
by bogs
Yes, and trying to keep my GPA competitive with the kids in class isn't helping it any

Re: Did not know you could get HTMLText of part of field
Posted: Sat Feb 22, 2020 3:31 pm
by Klaus
GPA?
Please keep in mind that I am german and already have problems understanding the german
(more or less) official abbreviations of whatsoever!

Re: Did not know you could get HTMLText of part of field
Posted: Sat Feb 22, 2020 3:54 pm
by bogs
My apologies, GPA = grade point average. Currently I'm holding my own, but most of my instructors are younger than I am, never mind the students. It is a sad sad sad turn of events in my life.
Re: Did not know you could get HTMLText of part of field
Posted: Sat Feb 22, 2020 4:42 pm
by FourthWorld
kaveh1000 wrote: ↑Sat Feb 22, 2020 1:16 pm
I think you are all lying and this is a conspiracy against me.
There are many conspiracies against you, but this is not one of them. For example, did you know we have a secret forum called "Gossip About Kaveh" here? It's the most popular forum section we have, with permissions set so you're the only person who can't see it.
More seriously, after using LC for more than 20 years I'm still discovering new things I can do with it. For example, just yesterday I learned that using codeunits rather than characters can offer a bit of a performance boost in some cases by using uniform sizes in our Unicode-driven world, and that there's a codeunitOffset function to help with such things.
The richness of programming keeps it exciting, and LiveCode's continual expansion keeps it pleasurable.