Re: Examples of encryption for database access

2018-06-25 Thread Brian Milby via use-livecode
One thing this misses is that the IV is not another private key/password. It 
should be random/different for every use of the key.

https://en.m.wikipedia.org/wiki/Initialization_vector

https://crypto.stackexchange.com/questions/3965/what-is-the-main-difference-between-a-key-an-iv-and-a-nonce

https://security.stackexchange.com/questions/35210/encrypting-using-aes-256-do-i-need-iv

On Jun 25, 2018, 7:34 PM -0400, William Prothero via use-livecode 
, wrote:
> Mark:
> Thanks, that makes it a lot easier. I have been tearing my limited hair out 
> over trying to set Apache environmental variables and deleted a load of files 
> on my server, accidentally.
>
> This I can do.
> Best,
> Bill
>
>
> > On Jun 25, 2018, at 4:04 PM, Mark Wieder via use-livecode 
> >  wrote:
> >
> > On 06/25/2018 02:17 PM, William Prothero via use-livecode wrote:
> > > Mark:
> > > I’ve been exploring, Googling, and my Web Host Manager to figure out 
> > > where to set the environmental variables for the security keys. It might 
> > > be nice if I could set different values for different subdomains on my 
> > > server, but my Web Host Manager program states that it will put a copy of 
> > > the keys in the .htaccess file. Is the .htaccess file for a domain a 
> > > secure place to put the keys?
> >
> > Yes, that's a proper place to initialize server variables, and especially 
> > if you want different values for different subdomains, as you'll have a 
> > separate .htaccess file for each subdomain. In *theory* nobody has access 
> > to the . files except you.
> >
> > The .htaccess line will look something like
> >
> > SetEnv name value
> >
> > --
> > Mark Wieder
> > ahsoftw...@gmail.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
>
>
> ___
> 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: Examples of encryption for database access

2018-06-25 Thread William Prothero via use-livecode
Mark:
Thanks, that makes it a lot easier. I have been tearing my limited hair out 
over trying to set Apache environmental variables and deleted a load of files 
on my server, accidentally.

This I can do.
Best,
Bill


> On Jun 25, 2018, at 4:04 PM, Mark Wieder via use-livecode 
>  wrote:
> 
> On 06/25/2018 02:17 PM, William Prothero via use-livecode wrote:
>> Mark:
>> I’ve been exploring, Googling, and my Web Host Manager to figure out where 
>> to set the environmental variables for the security keys. It might be nice 
>> if I could set different values for different subdomains on my server, but 
>> my Web Host Manager program states that it will put a copy of the keys in 
>> the .htaccess file. Is the .htaccess file for a domain a secure place to put 
>> the keys?
> 
> Yes, that's a proper place to initialize server variables, and especially if 
> you want different values for different subdomains, as you'll have a separate 
> .htaccess file for each subdomain. In *theory* nobody has access to the . 
> files except you.
> 
> The .htaccess line will look something like
> 
> SetEnv name value
> 
> -- 
> Mark Wieder
> ahsoftw...@gmail.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


___
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: Examples of encryption for database access

2018-06-25 Thread Mark Wieder via use-livecode

On 06/25/2018 02:17 PM, William Prothero via use-livecode wrote:

Mark:
I’ve been exploring, Googling, and my Web Host Manager to figure out where to 
set the environmental variables for the security keys. It might be nice if I 
could set different values for different subdomains on my server, but my Web 
Host Manager program states that it will put a copy of the keys in the 
.htaccess file. Is the .htaccess file for a domain a secure place to put the 
keys?


Yes, that's a proper place to initialize server variables, and 
especially if you want different values for different subdomains, as 
you'll have a separate .htaccess file for each subdomain. In *theory* 
nobody has access to the . files except you.


The .htaccess line will look something like

SetEnv name value

--
 Mark Wieder
 ahsoftw...@gmail.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: Browser Widget Layer on mobile

2018-06-25 Thread Dan Friedman via use-livecode
Monte,

Ok, good to know I wasn’t losing my mind!   I have put in the bug report.  I 
have to release this app in about a month.  Maybe it will get fixed by then.

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

Thank you!!



> Hi Dan
>
> This sounds like a bug to me. For widgets that are in groups we create an 
> extra container layer view to put them in so they should be clipped to the 
> group rect and also as close as possible respect the layering of objects on 
> the card. It sounds like it’s working correctly for you on mac but not on 
> iOS. Could you open a report with an example stack please?
>
> Cheers
>
> Monte

> On 24 Jun 2018, at 3:49 am, Dan Friedman via use-livecode  lists.runrev.com> 
> wrote:
>
> Brian,
>
> I think that’s true for Native Controls, but I’m seeing different results for 
> the bowser widget.  I find that if I put the bowser widget in a group, it 
> draws within the group’s bounds like other controls.  What I’m experiencing 
> is that on Mobile (at least iOS), it’s acting like a standard native control, 
> not like it does on desktop.
>
> -Dan
>
>> I may not be stating it in the right terms, but native controls are above 
>> everything else in their own layer.
>
>
>>> I am working on a mobile app where I have a bowser widget in a group that 
>>> is scrollable. It scrolls just fine (frankly, smoother that I thought it 
>>> would!). However, there is a problem when the widget gets scrolled past the 
>>> bounds of the group’s rect. On my mac, it’s working correctly, but on a 
>>> real device (and the simulator), the bowser widget is being shown even 
>>> outside the rect of the group – like it’s not in the group.
>>>
>>> Here’s a screen shot of what I’m talking about: 
>>> http://www.clearvisiontech.com/temp/sampleImage.jpg
>>>
>>> Any thoughts or advise are appreciated!
>>>
>>> -Dan
___
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: Examples of encryption for database access

2018-06-25 Thread William Prothero via use-livecode
Mark:
I’ve been exploring, Googling, and my Web Host Manager to figure out where to 
set the environmental variables for the security keys. It might be nice if I 
could set different values for different subdomains on my server, but my Web 
Host Manager program states that it will put a copy of the keys in the 
.htaccess file. Is the .htaccess file for a domain a secure place to put the 
keys?

I’ve put in a support ticket to my web host manager, but I’m not confident they 
know anything about security, so any bit of wisdom from you would be great.

Best,
Bill

> On Jun 25, 2018, at 10:16 AM, William Prothero via use-livecode 
>  wrote:
> 
>> On Jun 25, 2018, at 9:54 AM, Mark Wieder via use-livecode 
>>  wrote:
>> 
>> Bill-
>> 
>> Nicely done. For security though, I wouldn't store the encryption keys in 
>> either the LC stack or (especially) the php script.
>> 
>> In the php script you can set the environment variable on the server and 
>> then access it as
>> 
>> $encryption_key = .$_ENV["ENCRYPTION_KEY"]
>> 
>> Same thing, obviously, for the initialization vector.
>> 
>> On the LC end of things, it depends on whether you're distributing the stack 
>> as a standalone application or whether you have control over the environment 
>> the stack is running in. If you're in control of the environment then you 
>> can do something similar: set environment variables and then pick them up in 
>> the LC script. If you're distributing the stack to others, then I'd probably 
>> obfuscate the keys as much as possible: put them into an array with numeric 
>> keys, encrypt the array, store it in a custom property of some non-related 
>> object... if you need to distribute a stack without password protection I 
>> don't think there's any way to be completely secure, but there are ways to 
>> at least pretend to hide the keys.
>> 
>> 
>> [semi-related isue]
>> 
>> be careful with lines like
>> $post = file_get_contents('php://input');
>> 
>> Your test code should be fine, but if you're interacting with a database 
>> you'll want to scrub the input before acting on it.
>> 
>> -- 
>> Mark Wieder
>> ahsoftw...@gmail.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: What exactly does the status pending in Livecode Quality Control Center mean

2018-06-25 Thread panagiotis merakos via use-livecode
I have it working with LC Server 9 on an Ubuntu 16.04 64bit but only tested
on localhost. But if I remember correctly there are a couple of people
using tsnet with LC server on an actual server (Ralf maybe??)

Folks if you read this and use tsnet with LC Server could you share some
details about your setup?

Cheers,
Panos
--

On Mon, Jun 25, 2018, 19:32 Matthias Rebbe via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Panos,
>
> thanks for the explanation.
>
> And yes, i was asking about the tsNet/LC server issue. I am in urgent need
> to get it working.
>
> Btw., as it even does not work on your own hosting platform
> On-Rev/Livecode Hosting, did someone at Livecode ever used tsNet with LC
> server successfully?
> And if so, which OS and which LC server was used?
>
> Regards,
>
> Matthias
>
>
> > Am 25.06.2018 um 20:20 schrieb panagiotis merakos via use-livecode <
> use-livecode@lists.runrev.com>:
> >
> > Hi Matthias,
> >
> > Pending status means that the LC team needs to take action in order to
> > confirm (or not confirm) the bug. We usually set this status when a bug
> > requires a bit of setup to test. I assume you ask about the tsnet with LC
> > server issue.
> >
> > Best,
> > Panos
> >
> > On Mon, Jun 25, 2018, 18:32 Matthias Rebbe via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> >
> >> Hi,
> >>
> >> does anyone know what exactly the status  “pending”  in the LQCC does
> mean?
> >>
> >> Regards,
> >> Matthias
> >>
> >>
> >>
> >> ___
> >> 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: What exactly does the status pending in Livecode Quality Control Center mean

2018-06-25 Thread Matthias Rebbe via use-livecode
Hi Panos,

thanks for the explanation.

And yes, i was asking about the tsNet/LC server issue. I am in urgent need to 
get it working.

Btw., as it even does not work on your own hosting platform On-Rev/Livecode 
Hosting, did someone at Livecode ever used tsNet with LC server successfully?
And if so, which OS and which LC server was used?

Regards,

Matthias


> Am 25.06.2018 um 20:20 schrieb panagiotis merakos via use-livecode 
> :
> 
> Hi Matthias,
> 
> Pending status means that the LC team needs to take action in order to
> confirm (or not confirm) the bug. We usually set this status when a bug
> requires a bit of setup to test. I assume you ask about the tsnet with LC
> server issue.
> 
> Best,
> Panos
> 
> On Mon, Jun 25, 2018, 18:32 Matthias Rebbe via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Hi,
>> 
>> does anyone know what exactly the status  “pending”  in the LQCC does mean?
>> 
>> Regards,
>> Matthias
>> 
>> 
>> 
>> ___
>> 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: What exactly does the status pending in Livecode Quality Control Center mean

2018-06-25 Thread panagiotis merakos via use-livecode
Hi Matthias,

Pending status means that the LC team needs to take action in order to
confirm (or not confirm) the bug. We usually set this status when a bug
requires a bit of setup to test. I assume you ask about the tsnet with LC
server issue.

Best,
Panos

On Mon, Jun 25, 2018, 18:32 Matthias Rebbe via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi,
>
> does anyone know what exactly the status  “pending”  in the LQCC does mean?
>
> Regards,
> Matthias
>
>
>
> ___
> 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: Open source iOS and Android

2018-06-25 Thread Linda Miller, DVM via use-livecode
Thank you, BR, for the suggestion!

"Do you know GIT?
A lot of us (developers) have "stuff on GIT" . You do a deep search through 
mailings
Search for "https://github.com/ "
Linda



___
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


What exactly does the status pending in Livecode Quality Control Center mean

2018-06-25 Thread Matthias Rebbe via use-livecode
Hi,

does anyone know what exactly the status  “pending”  in the LQCC does mean?

Regards,
Matthias



___
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: Examples of encryption for database access

2018-06-25 Thread William Prothero via use-livecode
Mark:
Thanks so much! This is just the advice I needed. I was wondering about the 
security of the keys.

I’m setting up a general db library stack. One of the apps will be distributed 
for free to teachers and students. The other apps are mobile and will be used 
either by me alone, or distributed to others, possibly through the app store. 

So, it’s good to get the techniques for securing the db in a variety of 
environments.

Best,
Bill

> On Jun 25, 2018, at 9:54 AM, Mark Wieder via use-livecode 
>  wrote:
> 
> Bill-
> 
> Nicely done. For security though, I wouldn't store the encryption keys in 
> either the LC stack or (especially) the php script.
> 
> In the php script you can set the environment variable on the server and then 
> access it as
> 
> $encryption_key = .$_ENV["ENCRYPTION_KEY"]
> 
> Same thing, obviously, for the initialization vector.
> 
> On the LC end of things, it depends on whether you're distributing the stack 
> as a standalone application or whether you have control over the environment 
> the stack is running in. If you're in control of the environment then you can 
> do something similar: set environment variables and then pick them up in the 
> LC script. If you're distributing the stack to others, then I'd probably 
> obfuscate the keys as much as possible: put them into an array with numeric 
> keys, encrypt the array, store it in a custom property of some non-related 
> object... if you need to distribute a stack without password protection I 
> don't think there's any way to be completely secure, but there are ways to at 
> least pretend to hide the keys.
> 
> 
> [semi-related isue]
> 
> be careful with lines like
> $post = file_get_contents('php://input');
> 
> Your test code should be fine, but if you're interacting with a database 
> you'll want to scrub the input before acting on it.
> 
> -- 
> Mark Wieder
> ahsoftw...@gmail.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


___
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: Examples of encryption for database access

2018-06-25 Thread Mark Wieder via use-livecode

Bill-

Nicely done. For security though, I wouldn't store the encryption keys 
in either the LC stack or (especially) the php script.


In the php script you can set the environment variable on the server and 
then access it as


$encryption_key = .$_ENV["ENCRYPTION_KEY"]

Same thing, obviously, for the initialization vector.

On the LC end of things, it depends on whether you're distributing the 
stack as a standalone application or whether you have control over the 
environment the stack is running in. If you're in control of the 
environment then you can do something similar: set environment variables 
and then pick them up in the LC script. If you're distributing the stack 
to others, then I'd probably obfuscate the keys as much as possible: put 
them into an array with numeric keys, encrypt the array, store it in a 
custom property of some non-related object... if you need to distribute 
a stack without password protection I don't think there's any way to be 
completely secure, but there are ways to at least pretend to hide the keys.



[semi-related isue]

be careful with lines like
$post = file_get_contents('php://input');

Your test code should be fine, but if you're interacting with a database 
you'll want to scrub the input before acting on it.


--
 Mark Wieder
 ahsoftw...@gmail.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: Examples of encryption for database access

2018-06-25 Thread William Prothero via use-livecode
Corrections to the posted code:
I changed the code to encrypt the returned text. I also note that using openSSL 
in php returns base64 data.
Bill

temp, testing iv for encryption
--To test this on your own server, upload the php script where you put cgi's
-- and modify the myURL setting.
//Be sure to change the encryption key and tiv value
on testEncryption
   put 
"http://earthexplorer.earthlearningsolutions.org/scgi-bin/wpEncryptionTest.php; 
into myURL
   put "AES-256-CTR" into tCipher
   put "AFBDDFCFBDBBDDCCFFACGHDEEDCC" into tEncryptionKey   //must be 43 
chars
   put "ABCDEEABCDEEAA%A" into tIV  //must be 16 chars
   put "The php should return this text." into tPostA["theQuery"]
   put "query" into tPostA["type"]
   put ArrayToJSON(tPostA,"string",pPretty) into tJson
   encrypt tJson using tCipher with key tEncryptionKey and iV tIV
   put base64encode(it) into tMyEncryptedData
   post tMyEncryptedData to url myURL
   put it into tRet
   put tRet into fld "status"
   —Note that openSSL in php returns base64 encoded data.
   put base64decode(tRet) into tRetVal
   decrypt tRetVal using tCipher with key tEncryptionKey and iV tIV
   put it into theResult
   put theResult after fld "status"
end testEncryption
   
--php script, on server ---
--Note:  you can run the above script on my server,
--to test the LC script.  




William A. Prothero
http://earthlearningsolutions.org

___
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: Datagrid Behaviors Moved??

2018-06-25 Thread Tom Glod via use-livecode
thats a good tip for me as well..thanks Bob. you are right. looking at
the handlers in there is pretty helpful, there may be a bunch of
undocumented nuggz.

On Mon, Jun 25, 2018 at 11:44 AM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Whoa! Just discovered that when the datagrid library sends
> selectionChanged to a datagrid, it passes 2 parameters: sHilitedIndexes and
> pPreviouslyHilitedIndexes! Well THAT is a useful tidbit of information! I
> go to some effort to save the prior selection in a custom property of each
> datagrid, so I can compare values in the old and new selection! With These
> parameters I don't need to do that anymore!
>
> How many other golden nuggets can be found there?
>
> Bob S
>
>
> > On Jun 25, 2018, at 08:37 , Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Ahah! So the correct syntax would be:
> >
> > edit the script of the behavior of the behavior of group "dgCustomers"
> >
> > Bob S
>
>
> ___
> 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: Datagrid Behaviors Moved??

2018-06-25 Thread Bob Sneidar via use-livecode
Whoa! Just discovered that when the datagrid library sends selectionChanged to 
a datagrid, it passes 2 parameters: sHilitedIndexes and 
pPreviouslyHilitedIndexes! Well THAT is a useful tidbit of information! I go to 
some effort to save the prior selection in a custom property of each datagrid, 
so I can compare values in the old and new selection! With These parameters I 
don't need to do that anymore! 

How many other golden nuggets can be found there? 

Bob S


> On Jun 25, 2018, at 08:37 , Bob Sneidar via use-livecode 
>  wrote:
> 
> Ahah! So the correct syntax would be:
> 
> edit the script of the behavior of the behavior of group "dgCustomers"
> 
> Bob S


___
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: Datagrid Behaviors Moved??

2018-06-25 Thread Bob Sneidar via use-livecode
Ahah! So the correct syntax would be:

edit the script of the behavior of the behavior of group "dgCustomers"

Bob S


> On Jun 25, 2018, at 08:26 , Tom Glod via use-livecode 
>  wrote:
> 
> the scripts got moved over to script only stacks in v9i had the same
> experience just yesterday list the ide stacks and its in therelook
> for the one with the most amount of lines.


___
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: Datagrid Behaviors Moved??

2018-06-25 Thread Tom Glod via use-livecode
the scripts got moved over to script only stacks in v9i had the same
experience just yesterday list the ide stacks and its in therelook
for the one with the most amount of lines.

On Mon, Jun 25, 2018 at 11:23 AM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi all.
>
> I enter in the message box:
>
> edit the script of the behavior of group "dgCustomers"
>
> I get an empty script LC 9 community. Same with other datagrids. Yet the
> datagrid works as expected. Am I missing something??
>
> Bob S
> ___
> 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


Datagrid Behaviors Moved??

2018-06-25 Thread Bob Sneidar via use-livecode
Hi all. 

I enter in the message box:

edit the script of the behavior of group "dgCustomers"

I get an empty script LC 9 community. Same with other datagrids. Yet the 
datagrid works as expected. Am I missing something??

Bob S
___
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: Stripping styling from the clipboard...

2018-06-25 Thread Bob Sneidar via use-livecode
I always run code from the SE through a plain text editor before pasting on 
this list. 

Bob S


> On Jun 24, 2018, at 07:04 , Richmond Mathewson via use-livecode 
>  wrote:
> 
>> 
>> Richmond. why does your code paste that way?
>> 
>> 
> 
> I don't know: looks terrible!
> 
> Over "here" on ThunderBird e-mail client on MacOS 10.7.5 that code
> was pasted DIRECTLY from the LiveCode scriptEditor . . .
> 
> Richmond.


___
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: Stripping styling from the clipboard...

2018-06-25 Thread Bob Sneidar via use-livecode
Or it's being trapped/interceped somewhere earlier. Have you tried fresh launch 
(no libraries running) and a new stack? 

Bob S


> On Jun 23, 2018, at 13:07 , Paul Dupuis via use-livecode 
>  wrote:
> 
> If I just have a pasteKey handler with a beep (or anything else) as the
> sole instruction, the same result, the breakpoint is never triggered.
> The pasteKey message appears broken under both Windows and OSX (tested
> under 10.9.5) in LC9.0.0? Can anyone confirm this bug?


___
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


[ANN] This Week in LiveCode 134

2018-06-25 Thread panagiotis merakos 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 #134 here: https://goo.gl/gHVa6q

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 you 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 
LiveCode Software Developer

Everyone Can Create Apps 
___
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: Stripping styling from the clipboard...

2018-06-25 Thread Tom Glod via use-livecode
I see...good to know. thanks J

On Sun, Jun 24, 2018 at 10:39 AM, J. Landman Gay via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Using an intermediate text editor also works, and would take care of any
> UTF8 conversion too if that's causing issues. But since you're in LC
> already it might be more convenient to have a handler in a backscript or a
> plugin that would do it.
>
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> On June 24, 2018 9:07:59 AM Richmond Mathewson via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> Well that is a pain in the bum!
>>
>> I suppose I should go through an intermediate stage using a
>> plain-vanilla text editor.
>>
>> Richmond.
>>
>> On 24/6/2018 8:19 am, J. Landman Gay via use-livecode wrote:
>>
>>> It happens when a colorized handler is copied directly from the script
>>> editor and pasted into a list response. The list only understands
>>> plain text, and styled text confuses it. I'm not sure if it happens on
>>> all platforms but we've seen it before in other posts.
>>>
>>> Brian's plaintext handler would come in handy here.
>>>
>>> --
>>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>>> HyperActive Software | http://www.hyperactivesw.com
>>> On June 23, 2018 9:25:34 PM Tom Glod via use-livecode
>>>  wrote:
>>>
>>> sorry Paul...my bad.

 Richmond. why does your code paste that way

>>>
>>>
>>>
>>>
>>> ___
>>> 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: Examples of encryption for database access

2018-06-25 Thread William Prothero via use-livecode
Folks:
Woke up this morning and realized I need to clarify a couple of points on my 
post.
1. For a test, you can use the LC script I included, exactly as given, which 
will access the included php test script on my server. 
2. The php script just returns the decrypted text that you put in the 
tPostA[“theQuery”] array element. For real world use, you would want to, in the 
php, encrypt the return text.
3. As far as I can tell, I need to have the encryption key and iV stored on 
both the LC app (to encrypt the text that is being sent) and the php script, to 
decrypt it.
4. I left out the part where the php encrypts the return value and the LC 
decrypts it. I’ll add it in if anybody wants it.

Best,
Bill

> On Jun 24, 2018, at 5:17 PM, William Prothero via use-livecode 
>  wrote:
> 
> Folks:
> In case you are interested, or if you have any feedback, here is the code I 
> use to test AES encryption for sending posts to interact with a mysql 
> database.
> 
> This work is inspired by the excellent dbLib product of Andre Garza, that got 
> me to look into encryption a lot deeper than I had to date.
> 
> Perhaps Andre would like to chime in here, as I am a complete novice in this 
> area. What got me started was purchasing his dbLib software and getting 
> warning messages that there was no “iv” vector specified. From internet 
> searching I got that the encryption is vulnerable to a “Dictionary” attack. 
> An “iv” vector is analogous to a “salt”, which make the encryption much more 
> difficult to crack. I’m using php version 5.6.36
> 
> This should make transfers to a from a remote database pretty secure. It is 
> different from password security, where only the encrypted password needs to 
> be compared with the encrypted db value. Here (I think) both the server and 
> the client need to have the key and iv values.
> 
> Here is the code that I used to test the encryption. If I am wrong about any 
> of this, please let me know. An example like this would have saved me a bunch 
> of time, so I hope it will be useful to somebody else on the list.
> 
> Testing iv for encryption
> --To test this on your own server, upload the php script where you put cgi's
> -- and modify the myURL setting
> on testEncryption
>   put 
> "http://earthexplorer.earthlearningsolutions.org/scgi-bin/wpEncryptionTest.php;
>  into myURL
>   put "AES-256-CTR" into tCipher
>   put "AFBDDFCFBDBBDDCCFFACGHDEEDCC" into tEncryptionKey
>   put "ABCDEEABCDEEAA%A" into tIV
>   put "The php should return this text." into tPostA["theQuery"]
>   put "query" into tPostA["type"]
>   put ArrayToJSON(tPostA,"string",pPretty) into tJson
>   encrypt tJson using tCipher with key tEncryptionKey and iV tIV
>   put base64encode(it) into tMyEncryptedData
>   post tMyEncryptedData to url myURL
>   put it into tRet
>   put tRet into fld "status"
>   put cr&"num chars: "&(the number of chars in tRet) after fld "status"
>   put cr(tRet) after fld "status"
> end testEncryption
> 
> --php script, on server ---
> --Note:  you can run the above script on my server,
> --to test the LC script.  
>  //file: wpEncryptionTest.php
> //external function
> function debug($msg) {
> $debug = false;
> if ($debug) {
> error_log("[DB LIB] $msg");
> echo "$msg.\n";
>   }
>   }
> //php code
>   $encryption_key = "AFBDDFCFBDBBDDCCFFACGHDEEDCC";   
>   $cipher = "AES-256-CTR"; // do not change cipher unless you know what 
> you're doing
>   $post = file_get_contents('php://input');
>   $iv = 'ABCDEEABCDEEAA%A';
>   $ivlen = 16;
>   /* set for debugging. To encrypt, set to TRUE */
>   $post = openssl_decrypt($post, $cipher, $encryption_key, $options=0, 
> $iv);
>   $req = json_decode($post,true);
>   if (!$req) {
>   debug("error on decrypt");
>   debug(openssl_error_string());
>   }
>   $theOut = $req["theQuery"];
>   $tRet = base64_encode("Decrypted query: $theOut.\n");
>   echo $tRet; 
> ?>
> 
> 
> ___
> 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: Tessellated hexagonal grid?

2018-06-25 Thread Rick Harrison via use-livecode
Hi David,

The old “Traveller” space game used to use hexes a lot.
Now that computers are so powerful you can do almost
anything.

Here’s an example using hexes.  Try zooming in and out.
Play around with the eye candy settings etc. It’s quite
impressive!

https://travellermap.com/?options=25591=45.2578125 


Cheers,

Rick

> On Jun 25, 2018, at 5:46 AM, David V Glasgow via use-livecode 
>  wrote:
> 
> Quite a few old school (and a few newer) games use a tessellated hexagonal 
> grid.  Remember Railway Rivals, anyone?
> 
> I just started to play around with the idea of a grid using Livecode 
> polygons.  Specifically, a map that can grow organically by sprouting  hexes 
> at the edges.  I was surprised and disappointed to see how tricky it looks to 
> be to do 'on the fly’ i.e. creating and then aligning hexes.
> 
> 
> Has anyone else played around with this?  Any advice?  It seems to me that 
> the line of least resistance is to have a huge grid of ready tessellated 
> invisible hexes which can be shown as required.
> 
> 
> Best Wishes,
> David Glasgow
> 
> 
> ___
> 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: Tessellated hexagonal grid?

2018-06-25 Thread Richmond via use-livecode

I have fooled around with hexagons as well, and they have to be, either;

1. Hexagonal SVG widgets,

or

2, Hexagons embedded in transparent squares as PGN images - with the

inevitable consequence that if you start using INTERSECT you must be 
very careful


to set a transparency "trap" a bit like this:

*if intersect(img "firstHEX",img "secondHEX",5) then*


Richmond.


On 25.06.2018 12:46, David V Glasgow via use-livecode wrote:

Quite a few old school (and a few newer) games use a tessellated hexagonal 
grid.  Remember Railway Rivals, anyone?

I just started to play around with the idea of a grid using Livecode polygons.  
Specifically, a map that can grow organically by sprouting  hexes at the edges. 
 I was surprised and disappointed to see how tricky it looks to be to do 'on 
the fly’ i.e. creating and then aligning hexes.


Has anyone else played around with this?  Any advice?  It seems to me that the 
line of least resistance is to have a huge grid of ready tessellated invisible 
hexes which can be shown as required.


Best Wishes,
David Glasgow


___
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

Tessellated hexagonal grid?

2018-06-25 Thread David V Glasgow via use-livecode
Quite a few old school (and a few newer) games use a tessellated hexagonal 
grid.  Remember Railway Rivals, anyone?

I just started to play around with the idea of a grid using Livecode polygons.  
Specifically, a map that can grow organically by sprouting  hexes at the edges. 
 I was surprised and disappointed to see how tricky it looks to be to do 'on 
the fly’ i.e. creating and then aligning hexes.


Has anyone else played around with this?  Any advice?  It seems to me that the 
line of least resistance is to have a huge grid of ready tessellated invisible 
hexes which can be shown as required.


Best Wishes,
David Glasgow


___
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: Align baselines of 2 fields

2018-06-25 Thread Niggemann, Bernd via use-livecode
I rethought the alignment of baselines of 2 fields and did not like my previous 
solution to just move the fields

Here is a solution that uses the margins to do the alignment. The two fields 
should accommodate for the expected textSizes and should be horizontally 
aligned.
There are occasional differences in alignment usually 1 pixel off due to how 
fonts report their metrics. One could correct this but the only way to do it 
that I found was to use a snapshot and then adjust accordingly. Anyone 
interested in that feel free to mail me.


Kind regards 
Bernd


---
on mouseUp
   local tField1, tField2
   put the long id of field "field1" into tField1
   put the long id of field "field2" into tField2
   alignFieldBaselines tField1, tField2
end mouseUp

on alignFieldBaselines pField1, pField2
   local tDescent1, tDescent2, tRefVLoc
   local tFormatRect1, tFormatRect2, tDiff1, tDiff2
   local tDefaultMargin
   
   put 8 into tDefaultMargin
   
   lock screen
   -- make sure the margins are what is expected
   set the margins of pField1 to tDefaultMargin
   set the margins of pField2 to tDefaultMargin
   
   -- define a reference vertical position for field 1, both fields use it
   put the bottom of pField1 - (the height of pField1 div 4) into tRefVLoc
   
   -- get rect of text
   put the formattedRect of char 1 of pField1 into tFormatRect1
   put the formattedRect of char 1 of pField2 into tFormatRect2
   -- find baseline of text
   put item 4 of measureText(char 1 of pField1, pField1, "bounds") + 1 into 
tDescent1
   put item 4 of measureText(char 1 of pField2, pField2, "bounds") + 1 into 
tDescent2
   
   -- calculate offset 
   put tRefVLoc - (item 4 of tFormatRect1 - tDescent1) into tDiff1
   put tRefVLoc - (item 4 of tFormatRect2 - tDescent2) into tDiff2
   
   -- adjust topMargins to align text
   set the topMargin of pField1 to tDefaultMargin + tDiff1
   set the topMargin of pField2 to tDefaultMargin + tDiff2
   
   unlock screen
end alignFieldBaselines
---
___
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