Re: How to divide card with/in 3 vertical lines?

2020-10-28 Thread Tore Nilsen via use-livecode
You could of course also multiply the width of the card with 0.25, 0.5 and 0.75 
to get the same results. Personally I prefer multiplication to division, but 
the results will be the same.

Best regards 
Tore Nilsen

> 28. okt. 2020 kl. 21:54 skrev William de Smet via use-livecode 
> :
> 
> Thanks all,
> 
> The use of 1. or (cardWidth/4)*3 did it!
> 
> 
> Greetings,
> 
> William
> 
> 
> 
> 
> Op wo 28 okt. 2020 om 21:28 schreef Brian Milby via use-livecode <
> use-livecode@lists.runrev.com>:
> 
>> Need to either use 1. or for exact (in this case) (cardWidth/4)*3
>> 
>> Sent from my iPhone
>> 
>>> On Oct 28, 2020, at 4:16 PM, William de Smet via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> Hi Scott,
>>> 
>>> Line 3 should be at loc 768,384 but is now at loc 770,384 (stack
>> 1024x768).
>>> This is because 'cardWidth/1.33' is not precise enough?
>>> 
>>> Greetings,
>>> 
>>> William
>>> 
>>> 
>>> 
>>> 
>>> Op wo 28 okt. 2020 om 20:54 schreef scott--- via use-livecode <
>>> use-livecode@lists.runrev.com>:
>>> 
 When you say "almost perfect but not quite” what exactly are you
>> meaning?
 
 —Scott
 
> On Oct 28, 2020, at 11:04 AM, William de Smet via use-livecode <
 use-livecode@lists.runrev.com> wrote:
> 
> Hi there,
> 
> I need 3 vertical lines in my iOS app with equal distance and from top
>> to
> bottom.
> So I use the script below. It is almost perfect but not quite.
> Is there a better way to do this?
> --
> *s*et the loc of grc "line1" to cardWidth/4, cardHeight/2
> set the loc of grc "line2" to cardWidth/2, cardHeight/2
> set the loc of grc "line3" to cardWidth/1.33, cardHeight/2
> 
> set the height of grc "line1" to cardHeight
> set the height of grc "line2" to cardHeight
> set the height of grc "line3" to cardHeight
> --
> 
> greetings,
> 
> William
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
 
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: How to divide card with/in 3 vertical lines?

2020-10-28 Thread J. Landman Gay via use-livecode

On 10/28/20 1:04 PM, William de Smet via use-livecode wrote:

I need 3 vertical lines in my iOS app with equal distance and from top to
bottom.


  put the width of this cd/4 into tHLoc
  put the height of this cd/2 into tVLoc
  set the loc of grc "line1" to tHLoc,tVLoc
  set the loc of grc "line2" to tHLoc * 2,tVLoc
  set the loc of grc "line3" to tHLoc * 3,tVLoc

This works best if the width of the card is evenly divisible by 4. Fractional locations don't 
always work, the engine will just round them to the nearest pixel. I also tried div instead of 
"/" which on my test stack worked a little better.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: How to divide card with/in 3 vertical lines?

2020-10-28 Thread William de Smet via use-livecode
Thanks all,

The use of 1. or (cardWidth/4)*3 did it!


Greetings,

William




Op wo 28 okt. 2020 om 21:28 schreef Brian Milby via use-livecode <
use-livecode@lists.runrev.com>:

> Need to either use 1. or for exact (in this case) (cardWidth/4)*3
>
> Sent from my iPhone
>
> > On Oct 28, 2020, at 4:16 PM, William de Smet via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Hi Scott,
> >
> > Line 3 should be at loc 768,384 but is now at loc 770,384 (stack
> 1024x768).
> > This is because 'cardWidth/1.33' is not precise enough?
> >
> > Greetings,
> >
> > William
> >
> >
> >
> >
> > Op wo 28 okt. 2020 om 20:54 schreef scott--- via use-livecode <
> > use-livecode@lists.runrev.com>:
> >
> >> When you say "almost perfect but not quite” what exactly are you
> meaning?
> >>
> >> —Scott
> >>
> >>> On Oct 28, 2020, at 11:04 AM, William de Smet via use-livecode <
> >> use-livecode@lists.runrev.com> wrote:
> >>>
> >>> Hi there,
> >>>
> >>> I need 3 vertical lines in my iOS app with equal distance and from top
> to
> >>> bottom.
> >>> So I use the script below. It is almost perfect but not quite.
> >>> Is there a better way to do this?
> >>> --
> >>> *s*et the loc of grc "line1" to cardWidth/4, cardHeight/2
> >>> set the loc of grc "line2" to cardWidth/2, cardHeight/2
> >>> set the loc of grc "line3" to cardWidth/1.33, cardHeight/2
> >>>
> >>> set the height of grc "line1" to cardHeight
> >>> set the height of grc "line2" to cardHeight
> >>> set the height of grc "line3" to cardHeight
> >>> --
> >>>
> >>> greetings,
> >>>
> >>> William
> >>> ___
> >>> use-livecode mailing list
> >>> use-livecode@lists.runrev.com
> >>> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >>
> >> ___
> >> use-livecode mailing list
> >> use-livecode@lists.runrev.com
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: How to divide card with/in 3 vertical lines?

2020-10-28 Thread Brian Milby via use-livecode
Need to either use 1. or for exact (in this case) (cardWidth/4)*3

Sent from my iPhone

> On Oct 28, 2020, at 4:16 PM, William de Smet via use-livecode 
>  wrote:
> 
> Hi Scott,
> 
> Line 3 should be at loc 768,384 but is now at loc 770,384 (stack 1024x768).
> This is because 'cardWidth/1.33' is not precise enough?
> 
> Greetings,
> 
> William
> 
> 
> 
> 
> Op wo 28 okt. 2020 om 20:54 schreef scott--- via use-livecode <
> use-livecode@lists.runrev.com>:
> 
>> When you say "almost perfect but not quite” what exactly are you meaning?
>> 
>> —Scott
>> 
>>> On Oct 28, 2020, at 11:04 AM, William de Smet via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> Hi there,
>>> 
>>> I need 3 vertical lines in my iOS app with equal distance and from top to
>>> bottom.
>>> So I use the script below. It is almost perfect but not quite.
>>> Is there a better way to do this?
>>> --
>>> *s*et the loc of grc "line1" to cardWidth/4, cardHeight/2
>>> set the loc of grc "line2" to cardWidth/2, cardHeight/2
>>> set the loc of grc "line3" to cardWidth/1.33, cardHeight/2
>>> 
>>> set the height of grc "line1" to cardHeight
>>> set the height of grc "line2" to cardHeight
>>> set the height of grc "line3" to cardHeight
>>> --
>>> 
>>> greetings,
>>> 
>>> William
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: How to divide card with/in 3 vertical lines?

2020-10-28 Thread Keith Clarke via use-livecode
Are you able to use 'CardWidth*4/3' to get 1.33 recurring?
Best,
Keith

> On 28 Oct 2020, at 20:16, William de Smet via use-livecode 
>  wrote:
> 
> Hi Scott,
> 
> Line 3 should be at loc 768,384 but is now at loc 770,384 (stack 1024x768).
> This is because 'cardWidth/1.33' is not precise enough?
> 
> Greetings,
> 
> William
> 
> 
> 
> 
> Op wo 28 okt. 2020 om 20:54 schreef scott--- via use-livecode <
> use-livecode@lists.runrev.com>:
> 
>> When you say "almost perfect but not quite” what exactly are you meaning?
>> 
>> —Scott
>> 
>>> On Oct 28, 2020, at 11:04 AM, William de Smet via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> Hi there,
>>> 
>>> I need 3 vertical lines in my iOS app with equal distance and from top to
>>> bottom.
>>> So I use the script below. It is almost perfect but not quite.
>>> Is there a better way to do this?
>>> --
>>> *s*et the loc of grc "line1" to cardWidth/4, cardHeight/2
>>> set the loc of grc "line2" to cardWidth/2, cardHeight/2
>>> set the loc of grc "line3" to cardWidth/1.33, cardHeight/2
>>> 
>>> set the height of grc "line1" to cardHeight
>>> set the height of grc "line2" to cardHeight
>>> set the height of grc "line3" to cardHeight
>>> --
>>> 
>>> greetings,
>>> 
>>> William
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: How to divide card with/in 3 vertical lines?

2020-10-28 Thread William de Smet via use-livecode
Hi Scott,

Line 3 should be at loc 768,384 but is now at loc 770,384 (stack 1024x768).
This is because 'cardWidth/1.33' is not precise enough?

Greetings,

William




Op wo 28 okt. 2020 om 20:54 schreef scott--- via use-livecode <
use-livecode@lists.runrev.com>:

> When you say "almost perfect but not quite” what exactly are you meaning?
>
> —Scott
>
> > On Oct 28, 2020, at 11:04 AM, William de Smet via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Hi there,
> >
> > I need 3 vertical lines in my iOS app with equal distance and from top to
> > bottom.
> > So I use the script below. It is almost perfect but not quite.
> > Is there a better way to do this?
> > --
> > *s*et the loc of grc "line1" to cardWidth/4, cardHeight/2
> > set the loc of grc "line2" to cardWidth/2, cardHeight/2
> > set the loc of grc "line3" to cardWidth/1.33, cardHeight/2
> >
> > set the height of grc "line1" to cardHeight
> > set the height of grc "line2" to cardHeight
> > set the height of grc "line3" to cardHeight
> > --
> >
> > greetings,
> >
> > William
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: How to divide card with/in 3 vertical lines?

2020-10-28 Thread scott--- via use-livecode
When you say "almost perfect but not quite” what exactly are you meaning?

—Scott

> On Oct 28, 2020, at 11:04 AM, William de Smet via use-livecode 
>  wrote:
> 
> Hi there,
> 
> I need 3 vertical lines in my iOS app with equal distance and from top to
> bottom.
> So I use the script below. It is almost perfect but not quite.
> Is there a better way to do this?
> --
> *s*et the loc of grc "line1" to cardWidth/4, cardHeight/2
> set the loc of grc "line2" to cardWidth/2, cardHeight/2
> set the loc of grc "line3" to cardWidth/1.33, cardHeight/2
> 
> set the height of grc "line1" to cardHeight
> set the height of grc "line2" to cardHeight
> set the height of grc "line3" to cardHeight
> --
> 
> greetings,
> 
> William
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


How to divide card with/in 3 vertical lines?

2020-10-28 Thread William de Smet via use-livecode
Hi there,

I need 3 vertical lines in my iOS app with equal distance and from top to
bottom.
So I use the script below. It is almost perfect but not quite.
Is there a better way to do this?
--
*s*et the loc of grc "line1" to cardWidth/4, cardHeight/2
set the loc of grc "line2" to cardWidth/2, cardHeight/2
set the loc of grc "line3" to cardWidth/1.33, cardHeight/2

set the height of grc "line1" to cardHeight
set the height of grc "line2" to cardHeight
set the height of grc "line3" to cardHeight
--

greetings,

William
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode