Can't maintain textSize properties

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: 9731
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Can't maintain textSize properties

Post by dunbarx » Mon May 13, 2024 4:39 pm

Yep. me again.

In my largest project, now and then, the textSizes of some of the many fields in that project just change on their own. Sometimes larger, sometimes smaller, but usually larger. The textSizes of the cards themselves are empty.

Last week on a handful of cards, all of which are built sort of the same way, the textSizes increased dramatically on 80% of the fields on those cards. The fields are of fixed size, so the contents became unreadable. I fixed that by restoring the fields to the way they were built, and then stored several pertinent text properties of all of them in custom properties of each. Now, as the user accesses those cards, a short routine sets the "base" field text properties automatically. This solves the problem, but without my having any understanding of that problem.

It just happened again on a different card entirely, so I am going to do the same kludge there, and maybe everywhere in the stack and its subStacks.

Any ideas? Just me? LC 9.6.9. Mac 13.4, on a Mac M2 mini.

Craig

stam
Posts: 2736
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Can't maintain textSize properties

Post by stam » Mon May 13, 2024 4:42 pm

Just a thought - you haven't used responsiveLayout at some point previously on the stack?

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9731
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Can't maintain textSize properties

Post by dunbarx » Mon May 13, 2024 5:15 pm

Stam.

What do I look like, a power user??? :roll:

No, though. :cry:

Craig

stam
Posts: 2736
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Can't maintain textSize properties

Post by stam » Mon May 13, 2024 5:20 pm

dunbarx wrote:
Mon May 13, 2024 5:15 pm
Stam.

What do I look like, a power user??? :roll:

No, though. :cry:

Craig
It was just a random thought... but yes you are a power user ;)

I can only the imagine the issue is some weird inheritance from some parent object or that you have some code somewhere that is unintentionally doing this. I take it you've done a full stack search for 'textSize' just in case?

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9731
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Can't maintain textSize properties

Post by dunbarx » Mon May 13, 2024 6:04 pm

Stam.

Everything you say is spot on.

Property inheritance from the parents was my first thought quite a while ago. I checked those, even though I rarely prepare card or stack text properties. I assume my controls' properties will stick all on their own out of the box. Likely not grown-up management but I have never had a similar issue with any other stack I have ever made.

All these errant changes appear in the IDE; all of a sudden, button and field textSizes just change from the previous day.

Anyway, until I hear about some "global" reason for this, I will kludge the restoration method. Thank heavens custom properties are rock solid, and I can simply restore the properties I expect for each control, over and over and always, whether they have secretly changed in the night or not.

Craig

stam
Posts: 2736
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Can't maintain textSize properties

Post by stam » Mon May 13, 2024 6:24 pm

Three questions then:
1. Have you experienced anything like this with other stacks/applications (eg trying to rebuild a portion of this app from scratch)?

2. Has anyone else had this issue or is it just you? (I certainly haven't heard of this before or seen it posted on the forums, but then you have much more experience than me).

3. Does the problem go away if you use a different LC installation?

If the answer to 1 & 2 is "no" then you may need to consider either errant code or some weird corruption in your stack. Either way, it may be better to start again from scratch with a fresh stack, if you want to be 100% sure.

I mention 3 because the issue may be with your installation (scratching the barrel of possibilities here... but just in case).

Stam

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9731
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Can't maintain textSize properties

Post by dunbarx » Mon May 13, 2024 8:20 pm

Three questions then:
1. Have you experienced anything like this with other stacks/applications (eg trying to rebuild a portion of this app from scratch)? Nope.

2. Has anyone else had this issue or is it just you? (I certainly haven't heard of this before or seen it posted on the forums, but then you have much more experience than me). No, it appears only in the IDE, where I am the developer on a Mac. Windows standalones of the latest version are distributed to others by me as the stack progresses.

3. Does the problem go away if you use a different LC installation? That I have not tried. Hmmm.

If the answer to 1 & 2 is "no" then you may need to consider either errant code or some weird corruption in your stack. Either way, it may be better to start again from scratch with a fresh stack, if you want to be 100% sure. I am confident there is no errant code. Some of the mangled cards that I see in the IDE have not been touched by me for a long time, though the users of the standalones use them regularly. This project has 21,000 active lines of code, that is, not counting empty or commented lines. I am loathe to even think about restarting.

I mention 3 because the issue may be with your installation (scratching the barrel of possibilities here... but just in case). But I have lots of other stacks, and none of those have the problem. I am empty of ideas, though full of fears.

stam
Posts: 2736
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Can't maintain textSize properties

Post by stam » Mon May 13, 2024 8:36 pm

Well your answers point to this being an issue with your specific app/stack/collection of stacks.

No one would want to recreate 21,000 lines of code, so with you there ;)
But errant code does not mean erroneous code; but rather than some unforeseen compound effect that has come in at some point during development.
The point being: when did you first notice this happening? Had you made any changes to any code prior to this? Have you tried rolling back to an earlier version where this did not happen? Bugs with correct code but unforeseen effects can be extremely tricky to pin down (on occasion I've had to just give up and roll back to bug-free versions as I couldn't pin down the issue, which is why I will almost always use git/GitHub).

Assuming this is some weird corruption, have you tried doing a 'save as' to see if perhaps I freshly generated copy of the stack is free of this?

And maybe download a fresh install, if possible on a different machine, to see if this is reproducible... not sure what else to suggest...

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9731
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Can't maintain textSize properties

Post by dunbarx » Mon May 13, 2024 10:40 pm

Stam.

Thanks for taking the time to think about this.

I never write erroneous code, only errant code. But I simply do not deal with changing font properties anywhere in the program. And I know how easy it is to believe that no tiny forgotten snippet can possibly exist to rear its head. It would be the same as if an image popped up. I just don't deal with those sorts of things for any stack I work on seriously. I am a nuts and bolts guy.

That the issue is either inside the project, the current version of LC or, less likely, the machine itself is probably right, and your solutions are likely the best advice.

Watch this space, but I am leaning toward solving the problem without ever understanding it.

Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9731
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Can't maintain textSize properties

Post by dunbarx » Mon May 13, 2024 10:51 pm

Stam,

Since I did admit I only write errant code I went through all of the project looking for the string "textSize". There were a few here and there, all in report handlers, all isolated to those handlers.

Recall that the issue I have is that handfuls of disparate fields on multiple cards suddenly have textSizes that are either several sizes higher or lower than they were the previous day. No rhyme or reason to the mix. Weird.

Craig

SparkOut
Posts: 2857
Joined: Sun Sep 23, 2007 4:58 pm

Re: Can't maintain textSize properties

Post by SparkOut » Tue May 14, 2024 8:10 am

Another couple of (likely useless) thoughts...

You don't have any plugins recently tried that might be having an effect where that has mistaken the target stack?

That responsive layout option, is it a checkbox or set only by code? It could be an inadvertently set checkbox somewhere. Or discounted if only set by code, unless a plugin is doing it.

This didn't coincide with your testing html in answer dialogs recently did it?

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9731
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Can't maintain textSize properties

Post by dunbarx » Tue May 14, 2024 3:14 pm

Sparkout.

I have only one plug-in, which contains several shortcut gadgets for my development life.

Never touched the responsive layout library.

Never did a thing with the html Answer dialog.

Thanks for thinking of me. I will go down with my ship.

Craig

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7257
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Can't maintain textSize properties

Post by jacque » Tue May 14, 2024 5:33 pm

You probably already thought of this, but when it happens have you compared the properties of an affected field to another unaffected one?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Talking LiveCode”