Did not know you could get HTMLText of part of field

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 539
Joined: Sun Dec 18, 2011 7:23 pm
Contact:

Did not know you could get HTMLText of part of field

Post by kaveh1000 »

I just thought I would report this interesting feature I discovered that I found useful. I have used

Code: Select all

get the HTMLText of fld 1
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?
Kaveh
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Did not know you could get HTMLText of part of field

Post 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 :D
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... :wink:
Image
kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 539
Joined: Sun Dec 18, 2011 7:23 pm
Contact:

Re: Did not know you could get HTMLText of part of field

Post 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.
Kaveh
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Did not know you could get HTMLText of part of field

Post by Klaus »

I was suprised about 18 years ago, if that helps... 8)
kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 539
Joined: Sun Dec 18, 2011 7:23 pm
Contact:

Re: Did not know you could get HTMLText of part of field

Post by kaveh1000 »

I think you are all lying and this is a conspiracy against me.
Kaveh
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Did not know you could get HTMLText of part of field

Post 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 :shock: AND NOW I SEE IT!!! OMG !!!! HOW WAS I SO BLIND !!!!!!!!!!!!!! THIS CHANGES EVERYTHING!!!!!!!!!!!!!
Image Image Image Image Image Image Image
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 Image
Last edited by bogs on Sat Feb 22, 2020 1:27 pm, edited 1 time in total.
Image
kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 539
Joined: Sun Dec 18, 2011 7:23 pm
Contact:

Re: Did not know you could get HTMLText of part of field

Post by kaveh1000 »

Phew. I am putting the razor blade back in the drawer. :-)
Kaveh
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Did not know you could get HTMLText of part of field

Post by bogs »

Razor blade? You can't cut text from a field with a razor blade, that is just silly talk now Image
Image
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Did not know you could get HTMLText of part of field

Post by Klaus »

:D :D :D

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! 8)
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Did not know you could get HTMLText of part of field

Post by bogs »

Example? :|
Image
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Did not know you could get HTMLText of part of field

Post by Klaus »

You really have a very bad memory, my friend! 8)
https://forums.livecode.com/viewtopic.php?f=9&t=33277
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Did not know you could get HTMLText of part of field

Post by bogs »

Yes, and trying to keep my GPA competitive with the kids in class isn't helping it any :(
Image
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Did not know you could get HTMLText of part of field

Post by Klaus »

GPA? :shock:

Please keep in mind that I am german and already have problems understanding the german
(more or less) official abbreviations of whatsoever! 8)
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Did not know you could get HTMLText of part of field

Post 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.
Image
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10103
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Did not know you could get HTMLText of part of field

Post 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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Post Reply