Y coordinate for a line of text

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

Y coordinate for a line of text

Trevor DeVore via use-livecode
I’m needing to know the coordinate (Y is the tricky one) for a line of text. I’m not do a very good job at calculating it. I think I remember a newish LC command or function that achieved this but I can’t locate it in the dictionary. Am I imagining?

--
Scott Morrow

Elementary Software
(Now with 20% less chalk dust!)
web       https://elementarysoftware.com/
email     [hidden email]
booth    1-800-615-0867

------------------------------------------------------








_______________________________________________
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: Y coordinate for a line of text

Trevor DeVore via use-livecode
Hi.
Assuming you have a field 1 with several lines of text in it, and have set the textHeight of that field, then in a button script somewhere;
on mouseUpanswer the textHeight of fld 1 * lineOffset(yourText,fld 1) + the top of fld 1end mouseUp
Craig

-----Original Message-----
From: scott--- via use-livecode <[hidden email]>
To: How to use LiveCode <[hidden email]>
Cc: [hidden email] <[hidden email]>
Sent: Tue, Nov 12, 2019 1:45 am
Subject: Y coordinate for a line of text

I’m needing to know the coordinate (Y is the tricky one) for a line of text. I’m not do a very good job at calculating it. I think I remember a newish LC command or function that achieved this but I can’t locate it in the dictionary. Am I imagining?

--
Scott Morrow

Elementary Software
(Now with 20% less chalk dust!)
web      https://elementarysoftware.com/
email    [hidden email]
booth    1-800-615-0867

------------------------------------------------------








_______________________________________________
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: Y coordinate for a line of text

Trevor DeVore via use-livecode
How do I format a simple handler so that it is not strung out like a 1960's hippie? Why is there no forum-like area to post scripts? Is this because I am using AOL as a portal to the use list?
Craig


-----Original Message-----
From: dunbarx--- via use-livecode <[hidden email]>
To: use-livecode <[hidden email]>
Cc: dunbarx <[hidden email]>
Sent: Tue, Nov 12, 2019 9:05 am
Subject: Re: Y coordinate for a line of text

Hi.
Assuming you have a field 1 with several lines of text in it, and have set the textHeight of that field, then in a button script somewhere;
on mouseUpanswer the textHeight of fld 1 * lineOffset(yourText,fld 1) + the top of fld 1end mouseUp
Craig

-----Original Message-----
From: scott--- via use-livecode <[hidden email]>
To: How to use LiveCode <[hidden email]>
Cc: [hidden email] <[hidden email]>
Sent: Tue, Nov 12, 2019 1:45 am
Subject: Y coordinate for a line of text

I’m needing to know the coordinate (Y is the tricky one) for a line of text. I’m not do a very good job at calculating it. I think I remember a newish LC command or function that achieved this but I can’t locate it in the dictionary. Am I imagining?

--
Scott Morrow

Elementary Software
(Now with 20% less chalk dust!)
web      https://elementarysoftware.com/
email    [hidden email]
booth    1-800-615-0867

------------------------------------------------------








_______________________________________________
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
|

REST API's, JSON Web Tokens & Hash Algorithms

Trevor DeVore via use-livecode
In reply to this post by Trevor DeVore via use-livecode
Hi,

I’ve seen some great presentations in the last few years from the conferences and Livecode Global sessions using Livecode to access REST API’s from web services, so I’m hoping someone can help me out here.

I need to access a web service (Box.com<http://Box.com>) from my Livecode app using JSON web tokens.
The service  documentation states that they only support RS256, RS384, and RS512 for hashing the signature in the token. Unfortunately, in the 139 options and variations listed by the Livecode CipherNames function I don’t see these.

Have I missed or misunderstood something or am I out of luck for using Livecode for this task?

Thanks,

Tim Bleiler, Ph.D.
Instructional Designer, HSIT
University at Buffalo

_______________________________________________
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: Y coordinate for a line of text

Trevor DeVore via use-livecode
In reply to this post by Trevor DeVore via use-livecode
You may want to look at the Dictionary entry for "measureText"


On 11/12/2019 1:43 AM, scott--- via use-livecode wrote:

> I’m needing to know the coordinate (Y is the tricky one) for a line of text. I’m not do a very good job at calculating it. I think I remember a newish LC command or function that achieved this but I can’t locate it in the dictionary. Am I imagining?
>
> --
> Scott Morrow
>
> Elementary Software
> (Now with 20% less chalk dust!)
> web       https://elementarysoftware.com/
> email     [hidden email]
> booth    1-800-615-0867
>
> ------------------------------------------------------
>
>
>
>
>
>
>
>
> _______________________________________________
> 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: Y coordinate for a line of text

Trevor DeVore via use-livecode
In reply to this post by Trevor DeVore via use-livecode
> I’m needing to know the coordinate (Y is the tricky one) for a line of text...

the selectedLoc
if you need the rectangle use additionally measureText or measureUnicodeText
_______________________________________________
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: REST API's, JSON Web Tokens & Hash Algorithms

Trevor DeVore via use-livecode
In reply to this post by Trevor DeVore via use-livecode
Hey Tim, the ciphernames lists "encryption" algorithms not hashing.

I believe RS256 refers to RSA with SHA 256.

messagedigest is the function you want to look up for hashing algorithms.

On Tue, Nov 12, 2019 at 9:24 AM Bleiler, Timothy via use-livecode <
[hidden email]> wrote:

> Hi,
>
> I’ve seen some great presentations in the last few years from the
> conferences and Livecode Global sessions using Livecode to access REST
> API’s from web services, so I’m hoping someone can help me out here.
>
> I need to access a web service (Box.com<http://Box.com>) from my Livecode
> app using JSON web tokens.
> The service  documentation states that they only support RS256, RS384, and
> RS512 for hashing the signature in the token. Unfortunately, in the 139
> options and variations listed by the Livecode CipherNames function I don’t
> see these.
>
> Have I missed or misunderstood something or am I out of luck for using
> Livecode for this task?
>
> Thanks,
>
> Tim Bleiler, Ph.D.
> Instructional Designer, HSIT
> University at Buffalo
>
> _______________________________________________
> 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
>


--
Tom Glod
Founder & Developer
MakeShyft R.D.A (www.makeshyft.com)
Office:226-706-9339
Mobile:226-706-9793
_______________________________________________
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: Y coordinate for a line of text

Trevor DeVore via use-livecode
In reply to this post by Trevor DeVore via use-livecode
The selectedLoc function may also be helpful.


> On Nov 12, 2019, at 7:27 AM, Paul Dupuis via use-livecode <[hidden email]> wrote:
>
> You may want to look at the Dictionary entry for "measureText"
>
>
> On 11/12/2019 1:43 AM, scott--- via use-livecode wrote:
>> I’m needing to know the coordinate (Y is the tricky one) for a line of text. I’m not do a very good job at calculating it. I think I remember a newish LC command or function that achieved this but I can’t locate it in the dictionary. Am I imagining?
>>
>> --
>> Scott Morrow
>>
>> Elementary Software
>> (Now with 20% less chalk dust!)
>> web       https://elementarysoftware.com/
>> email     [hidden email]
>> booth    1-800-615-0867
>>
>> ------------------------------------------------------
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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

Devin Asay
Director
Office of Digital Humanities
Brigham Young University

_______________________________________________
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: REST API's, JSON Web Tokens & Hash Algorithms

Trevor DeVore via use-livecode
In reply to this post by Trevor DeVore via use-livecode
Thank you Tom!

This is all new to me and I’d missed that distinction. I hope you don’t mind a follow up question.

Is it your understanding that using SHA-256 or SHA3-256 as the “digestType” in the Livecode function would meet the service requirement for RS-256 or is there something else I’m missing?

Tim


On Nov 12, 2019, at 11:27 AM, Tom Glod via use-livecode <[hidden email]<mailto:[hidden email]>> wrote:

Hey Tim, the ciphernames lists "encryption" algorithms not hashing.

I believe RS256 refers to RSA with SHA 256.

messagedigest is the function you want to look up for hashing algorithms.

On Tue, Nov 12, 2019 at 9:24 AM Bleiler, Timothy via use-livecode <
[hidden email]<mailto:[hidden email]>> wrote:

Hi,

I’ve seen some great presentations in the last few years from the
conferences and Livecode Global sessions using Livecode to access REST
API’s from web services, so I’m hoping someone can help me out here.

I need to access a web service (Box.com<http://box.com/><http://Box.com<http://box.com/>>) from my Livecode
app using JSON web tokens.
The service  documentation states that they only support RS256, RS384, and
RS512 for hashing the signature in the token. Unfortunately, in the 139
options and variations listed by the Livecode CipherNames function I don’t
see these.

Have I missed or misunderstood something or am I out of luck for using
Livecode for this task?

Thanks,

Tim Bleiler, Ph.D.
Instructional Designer, HSIT
University at Buffalo

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



--
Tom Glod
Founder & Developer
MakeShyft R.D.A (www.makeshyft.com<http://www.makeshyft.com/>)
Office:226-706-9339
Mobile:226-706-9793
_______________________________________________
use-livecode mailing list
[hidden email]<mailto:[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: REST API's, JSON Web Tokens & Hash Algorithms

Trevor DeVore via use-livecode
Hey Timothy....While I'm no expert on this subject or the schemes used by
box.com I would put money on the idea that livecode has what you need to
make this work.  You can generate RSA keys... you can hash anything you
need..... and you can encrypt and decrypt using RSA private or public
keys......

https://livecode.fandom.com/wiki/Encrypt_using_rsa

What could the box api ask of you that you cannot give it?

Often times for me knowing i have the tools I need to figure it out gets me
over the hump.

message me at tom at makeshyft dot com if you can't figure it out and u
want me to look at the docs for box.com and your code.

Cheers

Tom

On Tue, Nov 12, 2019 at 12:48 PM Bleiler, Timothy via use-livecode <
[hidden email]> wrote:

> Thank you Tom!
>
> This is all new to me and I’d missed that distinction. I hope you don’t
> mind a follow up question.
>
> Is it your understanding that using SHA-256 or SHA3-256 as the
> “digestType” in the Livecode function would meet the service requirement
> for RS-256 or is there something else I’m missing?
>
> Tim
>
>
> On Nov 12, 2019, at 11:27 AM, Tom Glod via use-livecode <
> [hidden email]<mailto:[hidden email]>>
> wrote:
>
> Hey Tim, the ciphernames lists "encryption" algorithms not hashing.
>
> I believe RS256 refers to RSA with SHA 256.
>
> messagedigest is the function you want to look up for hashing algorithms.
>
> On Tue, Nov 12, 2019 at 9:24 AM Bleiler, Timothy via use-livecode <
> [hidden email]<mailto:[hidden email]>>
> wrote:
>
> Hi,
>
> I’ve seen some great presentations in the last few years from the
> conferences and Livecode Global sessions using Livecode to access REST
> API’s from web services, so I’m hoping someone can help me out here.
>
> I need to access a web service (Box.com<http://box.com/><http://Box.com<
> http://box.com/>>) from my Livecode
> app using JSON web tokens.
> The service  documentation states that they only support RS256, RS384, and
> RS512 for hashing the signature in the token. Unfortunately, in the 139
> options and variations listed by the Livecode CipherNames function I don’t
> see these.
>
> Have I missed or misunderstood something or am I out of luck for using
> Livecode for this task?
>
> Thanks,
>
> Tim Bleiler, Ph.D.
> Instructional Designer, HSIT
> University at Buffalo
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]<mailto:[hidden email]>
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
>
> --
> Tom Glod
> Founder & Developer
> MakeShyft R.D.A (www.makeshyft.com<http://www.makeshyft.com/>)
> Office:226-706-9339
> Mobile:226-706-9793
> _______________________________________________
> use-livecode mailing list
> [hidden email]<mailto:[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
>


--
Tom Glod
Founder & Developer
MakeShyft R.D.A (www.makeshyft.com)
Office:226-706-9339
Mobile:226-706-9793
_______________________________________________
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: REST API's, JSON Web Tokens & Hash Algorithms

Trevor DeVore via use-livecode
In reply to this post by Trevor DeVore via use-livecode
On 11/12/19 6:23 AM, Bleiler, Timothy via use-livecode wrote:
> Hi,
>
> I’ve seen some great presentations in the last few years from the conferences and Livecode Global sessions using Livecode to access REST API’s from web services, so I’m hoping someone can help me out here.
>
> I need to access a web service (Box.com<http://Box.com>) from my Livecode app using JSON web tokens.
> The service  documentation states that they only support RS256, RS384, and RS512 for hashing the signature in the token. Unfortunately, in the 139 options and variations listed by the Livecode CipherNames function I don’t see these.
>
> Have I missed or misunderstood something or am I out of luck for using Livecode for this task?

Box integration has been on my back burner for a while now, so I'll be
very much interested in what you come up with here.

Are you referring to the authorization step for the Box api?
If so, this might help... this should be a one-time thing, so I would
just do this once at the command line by hand and then grab the existing
key with LiveCode.

ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub

That will give you both the private and public keys to pass to the Box api.

--
  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: REST API's, JSON Web Tokens & Hash Algorithms

Trevor DeVore via use-livecode
On 11/12/19 2:06 PM, Mark Wieder via use-livecode wrote:

> That will give you both the private and public keys to pass to the Box api.

Urk. Misspoke that sentence. Obviously you don't want to send the
private key.

--
  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: Y coordinate for a line of text

Trevor DeVore via use-livecode
In reply to this post by Trevor DeVore via use-livecode
Thank you Craig and Paul. Your answers were what I was hoping for. Devin, it turned out that selectedLoc() was the easiest to implement. How did I not know about that function!
Thanks!

Scott Morrow

Elementary Software
(Now with 20% less chalk dust!)
web       https://elementarysoftware.com/
email     [hidden email]
booth    1-800-615-0867
------------------------------------------------------



> On Nov 12, 2019, at 8:46 AM, Devin Asay via use-livecode <[hidden email]> wrote:
>
> The selectedLoc function may also be helpful.
>
>
>> On Nov 12, 2019, at 7:27 AM, Paul Dupuis via use-livecode <[hidden email]> wrote:
>>
>> You may want to look at the Dictionary entry for "measureText"
>>
>>
>> On 11/12/2019 1:43 AM, scott--- via use-livecode wrote:
>>> I’m needing to know the coordinate (Y is the tricky one) for a line of text. I’m not do a very good job at calculating it. I think I remember a newish LC command or function that achieved this but I can’t locate it in the dictionary. Am I imagining?
>>>
>>> --
>>> Scott Morrow
>>>
>>> Elementary Software
>>> (Now with 20% less chalk dust!)
>>> web       https://elementarysoftware.com/
>>> email     [hidden email]
>>> booth    1-800-615-0867
>>>
>>> ------------------------------------------------------
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>
> Devin Asay
> Director
> Office of Digital Humanities
> Brigham Young University
>
> _______________________________________________
> 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: REST API's, JSON Web Tokens & Hash Algorithms

Trevor DeVore via use-livecode
In reply to this post by Trevor DeVore via use-livecode
Thanks Mark,

I have the Box account set up correctly and I can test things using the command line SDK provided by Box.
Now I have to figure out the authorization process and how to construct the token in Livecode.
I haven’t done anything like this before so it’s a slow process. I appreciate your help.

Tim


> On Nov 12, 2019, at 5:06 PM, Mark Wieder via use-livecode <[hidden email]> wrote:
>
> On 11/12/19 6:23 AM, Bleiler, Timothy via use-livecode wrote:
>> Hi,
>> I’ve seen some great presentations in the last few years from the conferences and Livecode Global sessions using Livecode to access REST API’s from web services, so I’m hoping someone can help me out here.
>> I need to access a web service (Box.com<http://Box.com>) from my Livecode app using JSON web tokens.
>> The service  documentation states that they only support RS256, RS384, and RS512 for hashing the signature in the token. Unfortunately, in the 139 options and variations listed by the Livecode CipherNames function I don’t see these.
>> Have I missed or misunderstood something or am I out of luck for using Livecode for this task?
>
> Box integration has been on my back burner for a while now, so I'll be very much interested in what you come up with here.
>
> Are you referring to the authorization step for the Box api?
> If so, this might help... this should be a one-time thing, so I would just do this once at the command line by hand and then grab the existing key with LiveCode.
>
> ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
> openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
>
> That will give you both the private and public keys to pass to the Box api.
>
> --
> 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

_______________________________________________
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: Y coordinate for a line of text

Trevor DeVore via use-livecode
In reply to this post by Trevor DeVore via use-livecode
The selectedLoc will give the loc in window coordinates, not the "local" Y coordinate within the field of interest, which is what I thought you wanted. I cannot imagine what value that would have, since it depends on where the stack window is currently placed.
Craig


-----Original Message-----
From: scott--- via use-livecode <[hidden email]>
To: How to use LiveCode <[hidden email]>
Cc: [hidden email] <[hidden email]>
Sent: Tue, Nov 12, 2019 10:12 pm
Subject: Re: Y coordinate for a line of text

Thank you Craig and Paul. Your answers were what I was hoping for. Devin, it turned out that selectedLoc() was the easiest to implement. How did I not know about that function!
Thanks!

Scott Morrow

Elementary Software
(Now with 20% less chalk dust!)
web      https://elementarysoftware.com/
email    [hidden email]
booth    1-800-615-0867
------------------------------------------------------



> On Nov 12, 2019, at 8:46 AM, Devin Asay via use-livecode <[hidden email]> wrote:
>
> The selectedLoc function may also be helpful.
>
>
>> On Nov 12, 2019, at 7:27 AM, Paul Dupuis via use-livecode <[hidden email]> wrote:
>>
>> You may want to look at the Dictionary entry for "measureText"
>>
>>
>> On 11/12/2019 1:43 AM, scott--- via use-livecode wrote:
>>> I’m needing to know the coordinate (Y is the tricky one) for a line of text. I’m not do a very good job at calculating it. I think I remember a newish LC command or function that achieved this but I can’t locate it in the dictionary. Am I imagining?
>>>
>>> --
>>> Scott Morrow
>>>
>>> Elementary Software
>>> (Now with 20% less chalk dust!)
>>> web      https://elementarysoftware.com/
>>> email    [hidden email]
>>> booth    1-800-615-0867
>>>
>>> ------------------------------------------------------
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>
> Devin Asay
> Director
> Office of Digital Humanities
> Brigham Young University
>
> _______________________________________________
> 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: Y coordinate for a line of text

Trevor DeVore via use-livecode
On 11/13/19 8:11 AM, dunbarx--- via use-livecode wrote:
> The selectedLoc will give the loc in window coordinates, not the "local" Y coordinate within the field of interest, which is what I thought you wanted. I cannot imagine what value that would have, since it depends on where the stack window is currently placed.

localLoc()

--
  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: Y coordinate for a line of text

Trevor DeVore via use-livecode
Mark,
Yep, that will do the translation. But I am no longer sure what the OP originally wanted.
OP?
Craig


-----Original Message-----
From: Mark Wieder via use-livecode <[hidden email]>
To: dunbarx--- via use-livecode <[hidden email]>
Cc: Mark Wieder <[hidden email]>
Sent: Wed, Nov 13, 2019 11:20 am
Subject: Re: Y coordinate for a line of text

On 11/13/19 8:11 AM, dunbarx--- via use-livecode wrote:
> The selectedLoc will give the loc in window coordinates, not the "local" Y coordinate within the field of interest, which is what I thought you wanted. I cannot imagine what value that would have, since it depends on where the stack window is currently placed.

localLoc()

--
  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
_______________________________________________
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: Y coordinate for a line of text

Trevor DeVore via use-livecode
In reply to this post by Trevor DeVore via use-livecode
On 11/13/19 10:11 AM, dunbarx--- via use-livecode wrote:
> The selectedLoc will give the loc in window coordinates, not the "local" Y coordinate within the field of interest, which is what I thought you wanted. I cannot imagine what value that would have, since it depends on where the stack window is currently placed.
> Craig

SelectedLoc uses local (card) coordinates, not screen coordinates. It
does not give coordinates relative to the field itself though, as you
said. It doesn't matter where the stack is placed on screen since the
coordinates are based on the topleft of the card.

I've used it for aligning other controls, like a semi-transparent field
to simulate "dragging" a line of text.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.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: Y coordinate for a line of text

Trevor DeVore via use-livecode
In reply to this post by Trevor DeVore via use-livecode
I misStated this completely. The point being that no property of the field itself should be a factor at all, not its loc or rect, for example. Only the Y value of the selectedLine is pertinent.
Glad you have what you need, but I still do not see the value of the selectedLoc. This depends on the loc of the field, and otherwise has no relationship to the field itself, that is, the Y coordinate within that field.
Craig


-----Original Message-----
From: Mark Wieder via use-livecode <[hidden email]>
To: dunbarx--- via use-livecode <[hidden email]>
Cc: Mark Wieder <[hidden email]>
Sent: Wed, Nov 13, 2019 11:20 am
Subject: Re: Y coordinate for a line of text

On 11/13/19 8:11 AM, dunbarx--- via use-livecode wrote:
> The selectedLoc will give the loc in window coordinates, not the "local" Y coordinate within the field of interest, which is what I thought you wanted. I cannot imagine what value that would have, since it depends on where the stack window is currently placed.

localLoc()

--
  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
_______________________________________________
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