Constantly amazed

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Constantly amazed

Post by dunbarx » Tue Apr 29, 2025 2:08 pm

Constantly. I thought I at least knew most of the basics of this program.

Nope.

If I drag a new field onto a card, type "XYZ", then tab, then "ABC", I see no space between the "Z" and the "A". The number of chars of that field is 6. If I then, from msg:

Code: Select all

put tab after char 3 of fld 1
I see the space where the tab likely lives, and the number of chars of that field is 7.

Did I miss the fact that the tab character cannot be typed into a field, but can be added from the outside? And since a table field does this without issue, what (single?) property of that field distinguishes it from a "normal" field"?

Craig

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Constantly amazed

Post by Klaus » Tue Apr 29, 2025 3:08 pm

Hi Craig,

this works as advertized, see screenshot before and after the command: put tab after char 3 of fld 1
If you can see this, depends on the FONT your field is set to.
And maybe add some TABSTOPS to the field.

And of course you can add a TAB manually via the TAB key on your keyboard! :shock:


Best

Klaus
Bildschirmfoto 2025-04-29 um 16.06.31.png
Bildschirmfoto 2025-04-29 um 16.06.31.png (10.02 KiB) Viewed 45797 times

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Constantly amazed

Post by dunbarx » Tue Apr 29, 2025 3:26 pm

Klaus.

:? :?
And of course you can add a TAB manually via the TAB key on your keyboard! :shock:
I do not understand. I posted that I can add a tab manually, that is from, say, the message box, but cannot add it from the keyboard.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Constantly amazed

Post by Klaus » Tue Apr 29, 2025 3:31 pm

I correct:
And of course I (EYE) can add a TAB manually via the TAB key on your keyboard!

Cursed, Craig, remember? 8)

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Constantly amazed

Post by dunbarx » Tue Apr 29, 2025 3:37 pm

Klaus,

But you did give me the answer, sort of.

It seems that in a new field the tabStops property is empty by default. Setting that property to any number but empty, even zero, will allow the keyboard to enter (and show) a "tab". Oddly though, if I set the tabStops to 0 and type tab, a small space appears where the new tab lives. That space may depend on the font used, as you sort of mentioned.

So problem solved. The tabStops property is the one I was looking for, and now know it is empty in a new field.

Craig
Last edited by dunbarx on Tue Apr 29, 2025 8:05 pm, edited 2 times in total.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Constantly amazed

Post by dunbarx » Tue Apr 29, 2025 3:39 pm

Klaus.
And of course I (EYE) can add a TAB manually via the TAB key on your keyboard!
WHAT??? You can do that in a new field? And the tabStops of that field are empty??

Anyway, not on my keyboard. That is not a font issue, that is a curse issue.

Craig

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Constantly amazed

Post by Klaus » Wed Apr 30, 2025 8:50 am

Hi Craig,

after I restarted my Mac this morning I gave it another try, and, to ease your mind, I could not reproduce
what I experienced yesterday. Now it works like it is intended to work I think.

New fresh field with not tabstops:
No way to enter a TAB via keyboard. Now THAT makes sense!

If this is the only field on the card then nothing will happen.
If there are more fields on the card then hitting the TAB key the cursor will jump to the next field,
although no AUTOTAB is checked in the inspector for this field.

Sorry for probably having caused another sleepless night for you! :D

Best

Klaus

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Constantly amazed

Post by dunbarx » Wed Apr 30, 2025 2:05 pm

Klaus.

With a single field on a card, I do not agree with you that pressing tab from the keyboard should do nothing. Even with the tabStops property set to empty, it seems that the field should still "accept" that character. In other words, if I press "ABC", then tab, then "XYZ", I should have seven chars in the field, with char 4 being tab. I do not care if there appears to be no space between the "C" and the "X". Press tab after the "C" ten times. There should be 16 chars, and again, maybe no visible space between "C" and "X".

This is character assassination. I am starting a goFundMe campaign to support tab. To all: I accept Venmo.

Craig

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Constantly amazed

Post by Klaus » Wed Apr 30, 2025 2:11 pm

Good luck with your campaign! :D

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Constantly amazed

Post by dunbarx » Wed Apr 30, 2025 2:26 pm

Klaus.

Thank you. How much monetary support may I expect from you?

Craig

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Constantly amazed

Post by Klaus » Wed Apr 30, 2025 2:45 pm

Hi Craig,

unfortunately none actually, I have a very low pension and really live on the breadline.
But you sure can rely on my moral support! :-)


Best

Klaus

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Constantly amazed

Post by dunbarx » Wed Apr 30, 2025 7:07 pm

Klaus.

That will do just fine. :wink:

Craig

Post Reply