I am far too bold

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

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

Re: I am far too bold

Post by jacque » Thu Feb 08, 2024 9:01 pm

When you said a script worked but not the inspector, what was the command you used?

Text styles have a hierarchy similar to messages. You probably know that, but for others:

The style of the mainstack
The style of a substack(s) if any
The style of a field
The style of the text, or a selection of the text, in the field

From the bottom up (I think that's your preferred perspective) each one overrides the one above it. Your original post:
All of a sudden if I try, in the inspector, to set the textStyle of a field that is already bold to, say, plain, the box blinks at me for half a second and then reverts to bold.
The inspector sets the style of the entire field, not the characters within it. If the text characters were bold, then changing the field style won't change its appearance because the character style overrides the field style.

To set the style of the text itself from the inspector, go to the contents pane, select part or all of the text, and use the main IDE menu to set a style. That will override the field style.

I don't think preferences have anything to do with it. More likely one of your message box commands changed it. If you script something like "set the textstyle of line 1 of fld 1 to bold" then you are dealing with character styles, not field styles.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

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

Re: I am far too bold

Post by dunbarx » Thu Feb 08, 2024 9:58 pm

Jacque.

What Jacque said.

The command I used was "set the textStyle of fld 1 to bold".

But none of that, unless I am missing something, speaks to the fact that the "bold" button blinks at me, and then reverts. Trashing the prefs was the only thing that fixed it. And as we both know, the prefs file knows nothing about style properties of certain objects.

But I can see something in that clicking that button may collide with a higher setting, and it balked. I have not played around with the hierarchy of properties to see if I can slip in there somehow. :wink:

Craig

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

Re: I am far too bold

Post by jacque » Fri Feb 09, 2024 6:56 pm

Try this: In the contents pane of the PI select all the text and choose Plain from the IDE menu. That will remove all character level styling. Now the font property pane, which is field level styling, should act as you expect. Or if the field is editable you can select the text directly there instead.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

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

Re: I am far too bold

Post by dunbarx » Fri Feb 09, 2024 7:07 pm

Jacque.

I have no problem with this sort of thing.

Try this. Find a way to set up an environment that, when you try to toggle the textStyle of a field by clicking on the "Bold" button in the font property pane, the button hilites for half a second, and then reverts, all on its own, to no hilite. The actual textStyle of the field does not change.

Craig

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: I am far too bold

Post by Klaus » Fri Feb 09, 2024 7:20 pm

Hi Craig,

when I do this the BOLD button does NOT revert back!
You're cursed, I'm tellin' ya! :-D


Best

Klaus

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

Re: I am far too bold

Post by dunbarx » Fri Feb 09, 2024 9:43 pm

Klaus.

I am famous for it. 8)

Craig

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

Re: I am far too bold

Post by dunbarx » Fri Feb 09, 2024 9:46 pm

Klaus.

I am sorry I did not find how resolving my issue set the textStyle of every field on every card of every stack and subStack in the project to "Bold". I assume it was a childish and petulant jab at me for wanting order in my life.

But it could be a useful tool.

Craig

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

Re: I am far too bold

Post by SparkOut » Fri Feb 09, 2024 10:53 pm

Have I missed something?

The Property Inspector button for "bold" does not toggle the bold state on/off to != the current bold state of tte selected text? Instead it always sets the bold state of the selected text to true?

OK there might be some complicated interpretations according to possible mixed state of the selection, but sure sounds like a reportable bug to me.

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

Re: I am far too bold

Post by jacque » Sat Feb 10, 2024 2:42 am

It still sounds to me like the mainstack was set to bold. That's the only thing I know of that would change all other fields everywhere.

Craig, if you want to send me the stack I can look. Most helpful would be the version before it got "fixed".

Edit: Sounds a little like this : https://quality.livecode.com/show_bug.cgi but that bug is very old. If you're still using LC 8 it might apply though.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

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

Re: I am far too bold

Post by dunbarx » Sat Feb 10, 2024 5:49 pm

Hmmm.

@Jacque.
It still sounds to me like the mainstack was set to bold.
And all the subStacks as well? Anyway, I simply wanted to change the style of a single field to bold. Everything was normal. I opened the inspector for that field and clicked the bold button. It blinked. The field was unchanged. I clicked again...

@Sparkout.
but sure sounds like a reportable bug to me
This was a gremlin.

Craig

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

Re: I am far too bold

Post by jacque » Sat Feb 10, 2024 6:09 pm

dunbarx wrote:
Sat Feb 10, 2024 5:49 pm
And all the subStacks as well?
Yes. If you set the mainstack text styles and not anything else in the hierarchy, substacks will inherit the text styling from the mainstack. I do this when I want to change the font or font size for everything in a stack file. I can then change individual styles in fields where necessary which will override the global settings. I forgot to include groups in the hierarchy, you can for instance set a group's styling which will only apply to the fields in that group.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

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

Re: I am far too bold

Post by dunbarx » Sat Feb 10, 2024 7:09 pm

Jacque.

OK, did not think that subStacks were that gullible, and rereading, I see you mentioned that early on. I assert I did not work inside the stack inspector, but do not expect anyone to believe me.

And the blinking, that went away with new prefs? Recall that the other textStyle buttons all worked, just not the bold.

Gremlins, or at least one.

Craig

Post Reply

Return to “Talking LiveCode”