Re: Livecode server UNIX version (not Linux).

2020-10-28 Thread Richard Gaskin via use-livecode

Pi Digital wrote:

> Here’s my take (for what it’s worth). Although Unix is used in 71.6%
> (source: w3techs.com) of all known websites as of today and Linux only
> 29.0%, at least we have ‘a’ distro that works on some server.

That struck me as odd, so I took a moment to see how they derived that 
impressive Unix number (thanks for including the source).


It turns out they're lumping Unix and Linux together under "Unix" - when 
you click "Unix" you get this breakdown:


   Subcategories of Unix

   This diagram shows the percentages of websites using various
   subcategories of Unix.

   How to read the diagram:
   Linux is used by 40.5% of all the websites who use Unix

   Websites who use Unix
   Linux   40.5%
   BSD  0.5%
   Darwin less than 0.1%
   HP-UX  less than 0.1%
   Solarisless than 0.1%
   Minix  less than 0.1%
   Unknown59.0%

I'd wager most of the 59% using "Unknown" are also Linux.

That would line up well enough with what we see at the Wikipedia page 
for server OS market share:


  Linux   FreeBSDUnknown  Windows
   W3Cook July 201596.4% 1.7%   0%  1.9%
   W3TechsFeb  201535.9%   0.95%   30.9%   32.3%
   Security Space  Feb 2014   <79.3% N/A   >20.7%

https://en.wikipedia.org/wiki/Usage_share_of_operating_systems#Public_servers_on_the_Internet

While Windows has a strong showing in the enterprise for internal 
servers, public-facing servers are by far a Linux story.


This is not only true for most shared and VPS hosting, but public clouds 
as well, with Google, Amazon, and Apple all using Linux to drive their 
infrastructure, and even though Azure is a Win/Linux mix there's a 
surprising amount of Linux going on there (with Ubuntu being the leading 
choice inside containers).


I bring this up not just because I'm a Linux fanboy (though I am and 
make no apologies; I was even worse when I used to be a Mac fanboy ), 
but just as a long-winded way to help support your main thesis:


Aside from new architectures like Linux ARM (Raspberry Pi), the most 
commonly-used platforms where LiveCode Serer would be used are well 
supported.


So, as you wrote:

> Seriously, if anyone was considering doing this, please..., please,
> reconsider and put your efforts and talent into fixing what we already
> have. It would be far more beneficial to a much greater community
> population.

There may be many useful requests in the bug DB worth considering to 
improve the performance, robustness, and feature set of LC Server.


But Heriberto's up for an adventure, one enhancement that would lower 
RAM use and speed things up a bit is this one:


https://quality.livecode.com/show_bug.cgi?id=14115

Heriberto, if that's interesting to you let me know. I have a workaround 
in place now, and I'll bet there's a way to move that inside the engine 
for a solution that's much simpler than when we discussed it here on 
this list earlier this year.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.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: Livecode server UNIX version (not Linux).

2020-10-28 Thread Richard Gaskin via use-livecode

Heriberto Torrado wrote:

> So, here is my idea: What about to create non official versions of
> Livecode server (for scripting purposes) for other platforms not yet
> supported?
> I think it could be good for RunRev: They won't have to work
> supporting those versions and Livecode language will spread to other
> fields.
>
> What do you guys think? Do you think we'll have enough manpower into
> our community to do that?

Raspberry Pi, w/ Raspbian or other Debian-based Linux (Linux ARM).

Home servers, school labs, IoT, and so much more - all currently lost to 
us by not having a build for that engine.


The last build was an experiment done by a team member no longer with 
the company, for LC v7.1.


If you could update the Server edition to v9.6 we could at least have a 
modern version to work with for faceless applications, and any remaining 
work for the GUI side would likely be relatively small (certainly 
smaller than one person trying to knock it all off by themselves).


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.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: Livecode server UNIX version (not Linux).

2020-10-28 Thread Pi Digital via use-livecode
It’s a great idea. How do you propose it be handled? Assuming this is a build 
based on the current system it will likely have to be compiled in Linux as the 
obvious choice. Do we have anyone with the appropriate skills in coding C to 
look into the various server platforms to be compiled for? Someone with enough 
time and resources, knowledge and energy? 

If so, why aren’t those people helpful enough to fix what we already have? 

[Get’s off soap box (for the time being)]  ;) 

Here’s my take (for what it’s worth). Although Unix is used in 71.6% (source: 
w3techs.com) of all known websites as of today and Linux only 29.0%, at least 
we have ‘a’ distro that works on some server. Like you, I’m currently using a 
CentOS web server with LC happily. But the clincher has to be that currently 
FreeBSD has no support for Dell,HP or IBM servers. The only advantages to 
having FreeBSD is a teeny bit better security, tiny performance improvement and 
have it in a fully fledged OS instead of just a kernel. Is it worth anyone’s 
time and effort building for those ‘advantages’?

Seriously, if anyone was considering doing this, please..., please, reconsider 
and put your efforts and talent into fixing what we already have. It would be 
far more beneficial to a much greater community population. 

All the very best. 

Sean Cole
Pi Digital


> On 28 Oct 2020, at 19:53, Heriberto Torrado via use-livecode 
>  wrote:
> 
> So, here is my idea: What about to create non official versions of Livecode 
> server (for scripting purposes) for other platforms not yet supported?
> I think it could be good for RunRev: They won't have to work supporting those 
> versions and Livecode language will spread to other fields.
> 
> What do you guys think? Do you think we'll have enough manpower into our 
> community to do that?
> 
> Best,
> Hery
___
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: Is the DateFormat read only?

2020-10-28 Thread Tore Nilsen via use-livecode
You can convert any given date to dateItems. Then you can use dateItems to 
present the date in any format you like. A date converted to dateItems will 
give you the following list of items: 

the year
the month number
the day of the month
the hour in 24-hour time
the minute
the second
the numeric day of the week where Sunday is day 1, Monday is day 2, and so forth
All according to the Dictionary.

To be sure that any valid date format is recognized as a date when you read in 
the date you will like to convert, it is best to ask for the system date or set 
the useSystemDate to true, as this will make all valid date formats convert to 
dateItems.

Best regards
Tore Nilsen
> 28. okt. 2020 kl. 22:58 skrev Graham Samuel via use-livecode 
> :
> 
> A quick test seems to show that the DateFormat can’t be changed by a ‘set’ 
> command.
> 
> How then can I force a date to be in a given format? I’m really thinking of 
> the difference between US and European dates, i.e
> 
> d/m/y versus m/d/y
> 
> Obviously for some types of use, an LC program should be able to force the 
> format for consistency’s sake, regardless of where in the world it’s being 
> run.
> 
> Can it be done?
> 
> Graham
> ___
> 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: Is the DateFormat read only?

2020-10-28 Thread John Balgenorth via use-livecode
You can  always use a shell command for things like
Dates and Calendars etc.  Google it and you will get
plenty of info.

JB

> On Oct 28, 2020, at 2:59 PM, Graham Samuel via use-livecode 
>  wrote:
> 
> A quick test seems to show that the DateFormat can’t be changed by a ‘set’ 
> command.
> 
> How then can I force a date to be in a given format? I’m really thinking of 
> the difference between US and European dates, i.e
> 
> d/m/y versus m/d/y
> 
> Obviously for some types of use, an LC program should be able to force the 
> format for consistency’s sake, regardless of where in the world it’s being 
> run.
> 
> Can it be done?
> 
> Graham
> ___
> 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


Is the DateFormat read only?

2020-10-28 Thread Graham Samuel via use-livecode
A quick test seems to show that the DateFormat can’t be changed by a ‘set’ 
command.

How then can I force a date to be in a given format? I’m really thinking of the 
difference between US and European dates, i.e

d/m/y versus m/d/y

Obviously for some types of use, an LC program should be able to force the 
format for consistency’s sake, regardless of where in the world it’s being run.

Can it be done?

Graham
___
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 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


Re: Livecode server UNIX version (not Linux).

2020-10-28 Thread Heriberto Torrado via use-livecode

Thanks Andre,

I realized that BSD kernels are not the same as MacOS kernels.
As you say: MacOS has a hybrid kernel based on XNU and some parts of BSD.

I'm only interested in running the Livecode server version and not the IDE.
So, I think that compiling could be the best solution.

I have been coding with Livecode for several years almost every week.
So my mind is very "Livecodized".
In fact, when I have to change to PHP, JS, Python or Golang, I feel very 
unproductive. Everything takes much more time than doing it with Livecode.


I would like not only to run Livecode server on BSD, but also on 
different hardware platforms.
I think on the IOT field Livecode script could have a good opportunity 
to be a killer language.


In the past, I tried to compile Livecode server for this devices, but I 
got several errors: 
https://www.friendlyarm.com/index.php?route=product/product=69_id=279


So, here is my idea: What about to create non official versions of 
Livecode server (for scripting purposes) for other platforms not yet 
supported?
I think it could be good for RunRev: They won't have to work supporting 
those versions and Livecode language will spread to other fields.


What do you guys think? Do you think we'll have enough manpower into our 
community to do that?


Best,
Hery



On 10/28/20 11:24 AM, Andre Garzia via use-livecode wrote:

On Mon, 19 Oct 2020 at 21:31, Paul McClernan via use-livecode <
use-livecode@lists.runrev.com> wrote:


OS X, Windows 95 through Windows 10, Raspberry Pi and "several variations
of Unix (I think is just means Linux)".

I'm thinking about tinkering with a FreeBSD server and LiveCode server,
but I didn't see a "UNIX" version, so I suppose that I have to compile

it.

Have any of you installed LiveCode server on FreeBSD (or Solaris)?


As others mentioned, this is dated information. However, last I checked
macOS (or rather the "Darwin" layer of macOS) is POSIX compliant and built
from BSD UNIX 4.4 & bits of FreeBSD. So, I would not be all that surprised
if a LiveCode for macOS GUI-less/CLI executable could run on some other
BSD.



That is not really how this works.

macOS is built on top of old NEXTSTEP and it is POSIX compliant but
that doesn't mean that LC from mac can work on BSD. MacOS uses the XNU
kernel, its executable file format and shared library file format are
unique and not related at all to anything that a BSD can run.

FreeBSD can run Linux binaries though as can be seen in the FreeBSD
Handbook:

https://www.freebsd.org/doc/handbook/linuxemu.html

This is done through emulation and I can't vouch for the performance or
correctness of it but, in theory you can install the necessary components
and libraries and then be able to run the Linux version of LC in FreeBSD.

Another option is trying to build from source. To be effective, this would
require knowledge of the FreeBSD ports and packages system besides knowing
enough of LC source and C++ to patch anything needed. I bet they'd love
such a contribution if you have the chops to do it.




___
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


Re: New to Get a Copy of Scaled Down Version of an Image

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

Try changing this line:

  put tImageData["image"] into image "currentpuzzle"

to this:

  set the imageData of image "currentpuzzle" to tImageData["image"]

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On October 28, 2020 6:06:39 AM Sannyasin Brahmanathaswami via use-livecode 
 wrote:



Take for example

[command] resizeToWidth tImage, 400

on resizeToWidth pImage,pSize
  local tOrigImgWidth, tOrigImgHeight, tRatio, tNewWidth, tNewHeight
  set the itemdel to "x"
  put item 1 of sCurrentGraphicRect into tOrigImgWidth
  put item 2 of sCurrentGraphicRect into tOrigImgHeight

  if tOrigImgWidth is 0 then exit resizeToWidth

  put pSize/tOrigImgWidth into tRatio
  put (tOrigImgHeight * tRatio) into tNewHeight
  put (tOrigImgWidth * tRatio) into  tNewWidth

  set the rect of  pImage to 0,0,tNewWidth,tNewHeight

end resizeToWidth

How do I get a copy, with the image scaled down, which is visible on screen?

[coded]
 if (the width of tImage > the heigth of tImage )  then
 # portrait
 resizeToWidth tImage, 400
  else
 # landscape
 resizeToHeigth tImage, 400
  end if

  # now we set the img to the img "currentpuzzle"
  set the name of the last image to "currentpuzzle"

  # and copy the data, at 400px wide
  put the rect of the last image into tImageData["rect"]
  put the imageData of the last image into tImageData["image"]

  put tImageData["image"] into image "currentpuzzle"


  BUT the full scaled copy of the image "currentpuzzle" comes into view. I 
  wanted to get a scaled down version?


How do we implement this, from the dictionary


The imageData, unlike the contents of the image 
container, is based on the picture as it's presented on the 
screen, not stored in the image object. 
This means that if you resize an image, the content of the 
image does not change, but its imageData does. If you create an 
image and then reduce its size, its imageData reflects the 
scaled-down, displayed image, not the original full-scale 
image. If you create a second image and set its 
imageData property to the imageData of the original 
image, resizing the first image back to the 
original dimensions displays the original image at full 
resolution, but resizing the second image does not, because 
setting its imageData transferred only the scaled-down version of the original.



BR
___
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: Livecode server UNIX version (not Linux).

2020-10-28 Thread Andre Garzia via use-livecode
On Mon, 19 Oct 2020 at 21:31, Paul McClernan via use-livecode <
use-livecode@lists.runrev.com> wrote:

> >
> > OS X, Windows 95 through Windows 10, Raspberry Pi and "several variations
> > of Unix (I think is just means Linux)".
> >
> > I'm thinking about tinkering with a FreeBSD server and LiveCode server,
> > but I didn't see a "UNIX" version, so I suppose that I have to compile
> it.
> > Have any of you installed LiveCode server on FreeBSD (or Solaris)?
> >
>
> As others mentioned, this is dated information. However, last I checked
> macOS (or rather the "Darwin" layer of macOS) is POSIX compliant and built
> from BSD UNIX 4.4 & bits of FreeBSD. So, I would not be all that surprised
> if a LiveCode for macOS GUI-less/CLI executable could run on some other
> BSD.
>
>
That is not really how this works.

macOS is built on top of old NEXTSTEP and it is POSIX compliant but
that doesn't mean that LC from mac can work on BSD. MacOS uses the XNU
kernel, its executable file format and shared library file format are
unique and not related at all to anything that a BSD can run.

FreeBSD can run Linux binaries though as can be seen in the FreeBSD
Handbook:

https://www.freebsd.org/doc/handbook/linuxemu.html

This is done through emulation and I can't vouch for the performance or
correctness of it but, in theory you can install the necessary components
and libraries and then be able to run the Linux version of LC in FreeBSD.

Another option is trying to build from source. To be effective, this would
require knowledge of the FreeBSD ports and packages system besides knowing
enough of LC source and C++ to patch anything needed. I bet they'd love
such a contribution if you have the chops to do it.


-- 
https://www.andregarzia.com 
Want to support me? Buy me a coffee at https://ko-fi.com/andregarzia
___
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: New to Get a Copy of Scaled Down Version of an Image

2020-10-28 Thread Richmond via use-livecode

https://www.dropbox.com/s/gdrsa4git7l6war/imager.livecode.zip?dl=0

Richmond

On 28.10.20 13:34, Richmond wrote:
Remember that you have to lock an image to stop it popping back to its 
original size.


Or, alternatively, you could change the order of your code.

Also, you have misspelt 'height' in "resizeToHeigth".

Also, while you have defined "resizeToWidth", you don't appear to have
defined "resizeToHeight" in the code you have posted.

The whole procedure looks a bit wonky: so I shall "go away" and try my 
own version.


Best, Richmond.

On 28.10.20 12:28, Sannyasin Brahmanathaswami via use-livecode wrote:

Take for example

[command] resizeToWidth tImage, 400

on resizeToWidth pImage,pSize
    local tOrigImgWidth, tOrigImgHeight, tRatio, tNewWidth, tNewHeight
    set the itemdel to "x"
    put item 1 of sCurrentGraphicRect into tOrigImgWidth
    put item 2 of sCurrentGraphicRect into tOrigImgHeight

    if tOrigImgWidth is 0 then exit resizeToWidth

    put pSize/tOrigImgWidth into tRatio
    put (tOrigImgHeight * tRatio) into tNewHeight
    put (tOrigImgWidth * tRatio) into  tNewWidth

    set the rect of  pImage to 0,0,tNewWidth,tNewHeight

end resizeToWidth

How do I get a copy, with the image scaled down, which is visible on 
screen?


[coded]
   if (the width of tImage > the heigth of tImage )  then
   # portrait
   resizeToWidth tImage, 400
    else
   # landscape
   resizeToHeigth tImage, 400
    end if

    # now we set the img to the img "currentpuzzle"
    set the name of the last image to "currentpuzzle"

    # and copy the data, at 400px wide
    put the rect of the last image into tImageData["rect"]
    put the imageData of the last image into tImageData["image"]

    put tImageData["image"] into image "currentpuzzle"


    BUT the full scaled copy of the image "currentpuzzle" comes into 
view. I wanted to get a scaled down version?



Svasti Astu – Be Well
Brahmanathaswami

Get SivaSiva.app – It free!
https://www.himalayanacademy.com/view/sivasiva


___
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: New to Get a Copy of Scaled Down Version of an Image

2020-10-28 Thread Richmond via use-livecode
Remember that you have to lock an image to stop it popping back to its 
original size.


Or, alternatively, you could change the order of your code.

Also, you have misspelt 'height' in "resizeToHeigth".

Also, while you have defined "resizeToWidth", you don't appear to have
defined "resizeToHeight" in the code you have posted.

The whole procedure looks a bit wonky: so I shall "go away" and try my 
own version.


Best, Richmond.

On 28.10.20 12:28, Sannyasin Brahmanathaswami via use-livecode wrote:

Take for example

[command] resizeToWidth tImage, 400

on resizeToWidth pImage,pSize
local tOrigImgWidth, tOrigImgHeight, tRatio, tNewWidth, tNewHeight
set the itemdel to "x"
put item 1 of sCurrentGraphicRect into tOrigImgWidth
put item 2 of sCurrentGraphicRect into tOrigImgHeight

if tOrigImgWidth is 0 then exit resizeToWidth

put pSize/tOrigImgWidth into tRatio
put (tOrigImgHeight * tRatio) into tNewHeight
put (tOrigImgWidth * tRatio) into  tNewWidth

set the rect of  pImage to 0,0,tNewWidth,tNewHeight

end resizeToWidth

How do I get a copy, with the image scaled down, which is visible on screen?

[coded]
   if (the width of tImage > the heigth of tImage )  then
   # portrait
   resizeToWidth tImage, 400
else
   # landscape
   resizeToHeigth tImage, 400
end if

# now we set the img to the img "currentpuzzle"
set the name of the last image to "currentpuzzle"

# and copy the data, at 400px wide
put the rect of the last image into tImageData["rect"]
put the imageData of the last image into tImageData["image"]

put tImageData["image"] into image "currentpuzzle"


BUT the full scaled copy of the image "currentpuzzle" comes into view. I 
wanted to get a scaled down version?


Svasti Astu – Be Well
Brahmanathaswami

Get SivaSiva.app – It free!
https://www.himalayanacademy.com/view/sivasiva


___
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


New to Get a Copy of Scaled Down Version of an Image

2020-10-28 Thread Sannyasin Brahmanathaswami via use-livecode
Take for example

[command] resizeToWidth tImage, 400

on resizeToWidth pImage,pSize
   local tOrigImgWidth, tOrigImgHeight, tRatio, tNewWidth, tNewHeight
   set the itemdel to "x"
   put item 1 of sCurrentGraphicRect into tOrigImgWidth
   put item 2 of sCurrentGraphicRect into tOrigImgHeight

   if tOrigImgWidth is 0 then exit resizeToWidth

   put pSize/tOrigImgWidth into tRatio
   put (tOrigImgHeight * tRatio) into tNewHeight
   put (tOrigImgWidth * tRatio) into  tNewWidth

   set the rect of  pImage to 0,0,tNewWidth,tNewHeight

end resizeToWidth

How do I get a copy, with the image scaled down, which is visible on screen?

[coded]
  if (the width of tImage > the heigth of tImage )  then
  # portrait
  resizeToWidth tImage, 400
   else
  # landscape
  resizeToHeigth tImage, 400
   end if

   # now we set the img to the img "currentpuzzle"
   set the name of the last image to "currentpuzzle"

   # and copy the data, at 400px wide
   put the rect of the last image into tImageData["rect"]
   put the imageData of the last image into tImageData["image"]

   put tImageData["image"] into image "currentpuzzle"


   BUT the full scaled copy of the image "currentpuzzle" comes into view. I 
wanted to get a scaled down version?

How do we implement this, from the dictionary


The imageData, unlike the contents of the image 
container, is based on the picture as it's presented on the 
screen, not stored in the image object. This 
means that if you resize an image, the content of the 
image does not change, but its imageData does. If you create an 
image and then reduce its size, its imageData reflects the 
scaled-down, displayed image, not the original full-scale 
image. If you create a second image and set its 
imageData property to the imageData of the original 
image, resizing the first image back to the original 
dimensions displays the original image at full resolution, but 
resizing the second image does not, because setting its imageData 
transferred only the scaled-down version of the original.


BR
___
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


New to Get a Copy of Scaled Down Version of an Image

2020-10-28 Thread Sannyasin Brahmanathaswami via use-livecode
Take for example

[command] resizeToWidth tImage, 400

on resizeToWidth pImage,pSize
   local tOrigImgWidth, tOrigImgHeight, tRatio, tNewWidth, tNewHeight
   set the itemdel to "x"
   put item 1 of sCurrentGraphicRect into tOrigImgWidth
   put item 2 of sCurrentGraphicRect into tOrigImgHeight

   if tOrigImgWidth is 0 then exit resizeToWidth

   put pSize/tOrigImgWidth into tRatio
   put (tOrigImgHeight * tRatio) into tNewHeight
   put (tOrigImgWidth * tRatio) into  tNewWidth

   set the rect of  pImage to 0,0,tNewWidth,tNewHeight

end resizeToWidth

How do I get a copy, with the image scaled down, which is visible on screen?

[coded]
  if (the width of tImage > the heigth of tImage )  then
  # portrait
  resizeToWidth tImage, 400
   else
  # landscape
  resizeToHeigth tImage, 400
   end if

   # now we set the img to the img "currentpuzzle"
   set the name of the last image to "currentpuzzle"

   # and copy the data, at 400px wide
   put the rect of the last image into tImageData["rect"]
   put the imageData of the last image into tImageData["image"]

   put tImageData["image"] into image "currentpuzzle"


   BUT the full scaled copy of the image "currentpuzzle" comes into view. I 
wanted to get a scaled down version?


Svasti Astu – Be Well
Brahmanathaswami

Get SivaSiva.app – It free!
https://www.himalayanacademy.com/view/sivasiva


___
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