[ANN] This Week in LiveCode 240

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] This Week in LiveCode 240

Ralph DiMola via use-livecode
Hi all,

Read about new developments in LiveCode open source and the open source
community in today's edition of the "This Week in LiveCode" newsletter!

        Read issue #240 here: https://bit.ly/30YXAIc

This is a weekly newsletter about LiveCode, focussing on what's been
going on in and around the open source project. New issues will be
released weekly on Mondays. We have a dedicated mailing list that will
deliver each issue directly to your e-mail, so you don't miss any!

If you have anything you'd like mentioned (a project, a discussion
somewhere, an upcoming event) then please get in touch.


--
Panagiotis Merakos <[hidden email]>
LiveCode Software Developer

Everyone Can Create Apps <https://livecode.com>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Textsize of label of copied btn changes

Ralph DiMola via use-livecode
I am copying a button from one card to another. The font size of the label changes from that of the original to a large font and I can’t figure out how to change the textsize of the label. I keep getting an error.

I’m probably missing something, but …..

How do I change the textsize of the font in the label of a button?

Tnx,
Bill

William A. Prothero
https://earthlearningsolutions.org


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Textsize of label of copied btn changes

Ralph DiMola via use-livecode
William Prothero wrote:

 > I am copying a button from one card to another. The font size of the
 > label changes from that of the original to a large font and I can’t
 > figure out how to change the textsize of the label. I keep getting an
 > error.

set the textSize of btn "SoAndSo" to 14

The curious part is that it changed when you pasted it.  If you have a
textSize specified for the card it came from but not the card it was
pasted in, that would govern all controls that do not have their own
testSize property explicitly set.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Textsize of label of copied btn changes

Ralph DiMola via use-livecode
Richard:

After the button is copied to the destination card, I do:

set the textsize of btnRef to the textsize of srcBtnRef
the contents of btnRef is:

btn "doNext2" of card "WhatsTheMystery-2" of stack "/Users/AfilePath/PlateTectonics.livecode"

srcBtnRef is pretty much the same thing with the card that holds the object library.

It has no effect. But then, I’ve been known to screw up these references, but since the copy works, I think it’s ok.

What’s odd, is that it seems to be picking up the fontsize of some of the other fields on the destination card. So, for now, I’ve given up and use a field for a button, which I like better anyway. I’ll look at this again to see if I made a stupid mistake.

Best,
Bill

William A. Prothero
https://earthlearningsolutions.org

> On Oct 13, 2020, at 10:59 AM, Richard Gaskin via use-livecode <[hidden email]> wrote:
>
> William Prothero wrote:
>
> > I am copying a button from one card to another. The font size of the
> > label changes from that of the original to a large font and I can’t
> > figure out how to change the textsize of the label. I keep getting an
> > error.
>
> set the textSize of btn "SoAndSo" to 14
>
> The curious part is that it changed when you pasted it.  If you have a textSize specified for the card it came from but not the card it was pasted in, that would govern all controls that do not have their own testSize property explicitly set.
>
> --
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> ____________________________________________________________________
> [hidden email]                http://www.FourthWorld.com
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Textsize of label of copied btn changes

Ralph DiMola via use-livecode
On 10/13/20 5:54 PM, William Prothero via use-livecode wrote:

> set the textsize of btnRef to the textsize of srcBtnRef

Try
set the textsize of btnRef to the effective textsize of srcBtnRef

--
  Mark Wieder
  [hidden email]

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Textsize of label of copied btn changes

Ralph DiMola via use-livecode
In reply to this post by Ralph DiMola via use-livecode
William Prothero wrote:

 > After the button is copied to the destination card, I do:
 >
 > set the textsize of btnRef to the textsize of srcBtnRef
 > the contents of btnRef is:
 >
 > btn "doNext2" of card "WhatsTheMystery-2" of stack "/Users/AfilePath
 > /PlateTectonics.livecode"
 >
 > srcBtnRef is pretty much the same thing with the card that holds the
 > object library.
 >
 > It has no effect. But then, I’ve been known to screw up these
 > references, but since the copy works, I think it’s ok.
 >
 > What’s odd, is that it seems to be picking up the fontsize of some of
 > the other fields on the destination card. So, for now, I’ve given up
 > and use a field for a button, which I like better anyway. I’ll look at
 > this again to see if I made a stupid mistake.


No need to give up and use an object type you didn't want.

This is an opportunity to analyze so we can find the right solution.

Given that assigning the textFont of the new button to that of the old
one has no effect, I'd wager that if you examined the textFont of the
original you'd find it's not been assigned.

And we see that font settings for various objects look one way on one
card and different on a different card.

This suggests the card the original button is on has a textFont set, and
setting the textFont of the new card to match will give you a matching
appearance for controls.

Or perhaps simpler, if you want all cards in the stack to have the same
default textFont and textSize, you can set those properties in the
stack, clear those for each card, and then you have consistency
throughout the controls in your stack.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Textsize of label of copied btn changes

Ralph DiMola via use-livecode
In reply to this post by Ralph DiMola via use-livecode
Richard:
I found that when I created a button, the textsize property had not been set, even though the IDE showed it to be 13. I then went to the IDE to click the size up to `4, then back down to 13 and then, when I did:
put the texsize of btn “mybutton”, it showed the textsize correctly.

It’s just one of those frustrating mysteries one encounters. The copied btn textsize was probably picking up the textsize from the fields that I had already imported.

I’d have to call it a bug, I guess??

Best,
Bill

William A. Prothero
https://earthlearningsolutions.org

> On Oct 13, 2020, at 10:59 AM, Richard Gaskin via use-livecode <[hidden email]> wrote:
>
> William Prothero wrote:
>
> > I am copying a button from one card to another. The font size of the
> > label changes from that of the original to a large font and I can’t
> > figure out how to change the textsize of the label. I keep getting an
> > error.
>
> set the textSize of btn "SoAndSo" to 14
>
> The curious part is that it changed when you pasted it.  If you have a textSize specified for the card it came from but not the card it was pasted in, that would govern all controls that do not have their own testSize property explicitly set.
>
> --
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> ____________________________________________________________________
> [hidden email]                http://www.FourthWorld.com
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Textsize of label of copied btn changes

Ralph DiMola via use-livecode
If the text properties in the property inspector are italic, they are
inheriting from another control with a lower layer, or inheriting from the
IDE itself. If the property is not italic, it's been set specifically on
the control.

Regardless, there will always be a number in the text size.
--
Jacqueline Landman Gay | [hidden email]
HyperActive Software | http://www.hyperactivesw.com
On October 18, 2020 5:15:48 PM William Prothero via use-livecode
<[hidden email]> wrote:

> Richard:
> I found that when I created a button, the textsize property had not been
> set, even though the IDE showed it to be 13. I then went to the IDE to
> click the size up to `4, then back down to 13 and then, when I did:
> put the texsize of btn “mybutton”, it showed the textsize correctly.
>
> It’s just one of those frustrating mysteries one encounters. The copied btn
> textsize was probably picking up the textsize from the fields that I had
> already imported.
>
> I’d have to call it a bug, I guess??
>
> Best,
> Bill
>
> William A. Prothero
> https://earthlearningsolutions.org
>
>> On Oct 13, 2020, at 10:59 AM, Richard Gaskin via use-livecode
>> <[hidden email]> wrote:
>>
>> William Prothero wrote:
>>
>> > I am copying a button from one card to another. The font size of the
>> > label changes from that of the original to a large font and I can’t
>> > figure out how to change the textsize of the label. I keep getting an
>> > error.
>>
>> set the textSize of btn "SoAndSo" to 14
>>
>> The curious part is that it changed when you pasted it.  If you have a
>> textSize specified for the card it came from but not the card it was pasted
>> in, that would govern all controls that do not have their own testSize
>> property explicitly set.
>>
>> --
>> Richard Gaskin
>> Fourth World Systems
>> Software Design and Development for the Desktop, Mobile, and the Web
>> ____________________________________________________________________
>> [hidden email]                http://www.FourthWorld.com
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Textsize of label of copied btn changes

Ralph DiMola via use-livecode
In reply to this post by Ralph DiMola via use-livecode
Check the card properties.

All evidence reported to date is fully explained by the textFfont being
set on the source card.

--
  Richard Gaskin
  Fourth World Systems


William Prothero wrote:

> Richard:
> I found that when I created a button, the textsize property had not been set, even though the IDE showed it to be 13. I then went to the IDE to click the size up to `4, then back down to 13 and then, when I did:
> put the texsize of btn “mybutton”, it showed the textsize correctly.
>
> It’s just one of those frustrating mysteries one encounters. The copied btn textsize was probably picking up the textsize from the fields that I had already imported.
>
> I’d have to call it a bug, I guess??
>
> Best,
> Bill
>
> William A. Prothero
> https://earthlearningsolutions.org
>
>> On Oct 13, 2020, at 10:59 AM, Richard Gaskin via use-livecode <use-livecode at lists.runrev.com> wrote:
>>
>> William Prothero wrote:
>>
>> > I am copying a button from one card to another. The font size of the
>> > label changes from that of the original to a large font and I can’t
>> > figure out how to change the textsize of the label. I keep getting an
>> > error.
>>
>> set the textSize of btn "SoAndSo" to 14
>>
>> The curious part is that it changed when you pasted it.  If you have a textSize specified for the card it came from but not the card it was pasted in, that would govern all controls that do not have their own testSize property explicitly set.
>>
>> --
>> Richard Gaskin
>> Fourth World Systems
>> Software Design and Development for the Desktop, Mobile, and the Web
>> ____________________________________________________________________
>> Ambassador at FourthWorld.com                http://www.FourthWorld.com


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Textsize of label of copied btn changes

Ralph DiMola via use-livecode
Richard,
Yes, I realize that. However, when I first created the button, on the source card, I expected that the text size and font would be what was displayed in the ide. However, none were actually set. Confusing for one who trusts that the ide displays the actual properties of the object.

Best,
Bill

William Prothero
http://es.earthednet.org

> On Oct 18, 2020, at 9:26 PM, Richard Gaskin via use-livecode <[hidden email]> wrote:
>
> Check the card properties.
>
> All evidence reported to date is fully explained by the textFfont being set on the source card.
>
> --
> Richard Gaskin
> Fourth World Systems
>
>
> William Prothero wrote:
>> Richard:
>> I found that when I created a button, the textsize property had not been set, even though the IDE showed it to be 13. I then went to the IDE to click the size up to `4, then back down to 13 and then, when I did:
>> put the texsize of btn “mybutton”, it showed the textsize correctly.
>> It’s just one of those frustrating mysteries one encounters. The copied btn textsize was probably picking up the textsize from the fields that I had already imported.
>> I’d have to call it a bug, I guess??
>> Best,
>> Bill
>> William A. Prothero
>> https://earthlearningsolutions.org
>>>> On Oct 13, 2020, at 10:59 AM, Richard Gaskin via use-livecode <use-livecode at lists.runrev.com> wrote:
>>> William Prothero wrote:
>>> > I am copying a button from one card to another. The font size of the
>>> > label changes from that of the original to a large font and I can’t
>>> > figure out how to change the textsize of the label. I keep getting an
>>> > error.
>>> set the textSize of btn "SoAndSo" to 14
>>> The curious part is that it changed when you pasted it.  If you have a textSize specified for the card it came from but not the card it was pasted in, that would govern all controls that do not have their own testSize property explicitly set.
>>> --
>>> Richard Gaskin
>>> Fourth World Systems
>>> Software Design and Development for the Desktop, Mobile, and the Web
>>> ____________________________________________________________________
>>> Ambassador at FourthWorld.com                http://www.FourthWorld.com
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Textsize of label of copied btn changes

Ralph DiMola via use-livecode
ELS Prothero wrote:

 > Yes, I realize that. However, when I first created the button, on the
 > source card, I expected that the text size and font would be what was
 > displayed in the ide. However, none were actually set. Confusing for
 > one who trusts that the ide displays the actual properties of the
 > object.

Was the text showing the textFont size in the IDE's Inspector italic?

http://lists.runrev.com/pipermail/use-livecode/2020-October/262040.html

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Textsize of label of copied btn changes

Ralph DiMola via use-livecode
Richard,
Yes, if my memory doesn’t fail me, it was in italic. Hmmm, I guess I was supposed to know that meant it wasn’t set and the value shown was a default?

Best,
Bill

William Prothero
http://es.earthednet.org

> On Oct 18, 2020, at 11:38 PM, Richard Gaskin via use-livecode <[hidden email]> wrote:
>
> ELS Prothero wrote:
>
> > Yes, I realize that. However, when I first created the button, on the
> > source card, I expected that the text size and font would be what was
> > displayed in the ide. However, none were actually set. Confusing for
> > one who trusts that the ide displays the actual properties of the
> > object.
>
> Was the text showing the textFont size in the IDE's Inspector italic?
>
> http://lists.runrev.com/pipermail/use-livecode/2020-October/262040.html
>
> --
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> ____________________________________________________________________
> [hidden email]                http://www.FourthWorld.com
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Textsize of label of copied btn changes

Ralph DiMola via use-livecode
One of those gotchas that you learn once and never forget. It's really handy when you want to change the look and feel of an entire stack, or each card in a stack. It REALLY is handy when creating cross platform apps and you want to use one font for both Windows and Mac without having to change the font and size for every object.

Yes, Italic (and also a shade of gray) indicates it is inheriting the particular setting from somewhere else. Setting the property to empty (not default as might seem intuitive) is how you revert to inheritance.

Bob S


> On Oct 19, 2020, at 09:17 , ELS Prothero via use-livecode <[hidden email]> wrote:
>
> Richard,
> Yes, if my memory doesn’t fail me, it was in italic. Hmmm, I guess I was supposed to know that meant it wasn’t set and the value shown was a default?
>
> Best,
> Bill
>
> William Prothero
> http://es.earthednet.org

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Textsize of label of copied btn changes

Ralph DiMola via use-livecode
In reply to this post by Ralph DiMola via use-livecode
ELS Prothero wrote:

 > Yes, if my memory doesn’t fail me, it was in italic. Hmmm, I guess I
 > was supposed to know that meant it wasn’t set and the value shown was
 > a default?

Yes, more or less, though to be precise it's not so much default per se
as inherited.

As Jacque noted yesterday, values italized in the Inspector are
inherited, where the control being inspected has not had that value set.

Many visual properties are inherited, including textFont and textSize,
in a scheme more or less conforming to the inheritance path of messages.

In your case it seems the textSize value is inherited from the card.

If you want a consistent font and size for all cards in a stack, clear
any such card properties and set them in the stack.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode