Re: Name shadows another variable

2014-06-26 Thread Peter Haworth
Hi Mike, My workaround is to turn off strict compilation mode, compile and turn it back on again but that's fraught with dangerous consequences if I forget to switch it on again. Bottom line is, this shouldn't happen, there should be no need for any workaround. A recent thread talked about "paper

Re: Calculating age

2014-06-26 Thread Mike Bonner
Since you only need straight years, subtract the birth year from the current date then a simple switch statement to adjust for whether the birthdate has been met for the year should work fine. Something like: switch case check to see if the month now < month of the birthdate if so, subtract

Re: Calculating age

2014-06-26 Thread Charles E Buchwald
Check out Sarah Reichelt's Date & Time Library. It makes this easy, as well as several other useful time and date calculations. Cheers, - Charles On 26 Jun 2014, at 9:44 PM, Mark Smith wrote: > Hi, does anyone know how to calculate someones age in years from two dates? > > Currently I am doing

Re: Calculating age

2014-06-26 Thread dunbarx
Hi. There would be a problem with certain date ranges. Think of thie variation of your script: on mouseUp convert "1/14/1951" from date to seconds put it into dateone convert "1/14/1956" from date to seconds put it into datetwo put datetwo - dateone into age -- calculate the

Re: Calculating age

2014-06-26 Thread Vaughn Clement
Hi In a database you use a date of birth and calculate "today" to get the number of days since birth div. by 365 Thank you Vaughn Clement Apps by Vaughn Clement (Support) *http://www.appsbyvaughnclement.com/tools/home-page/ * Skype: vaughn.cl

Calculating age

2014-06-26 Thread Mark Smith
Hi, does anyone know how to calculate someones age in years from two dates? Currently I am doing something kludgy like: convert dateone from date to seconds convert datetwo from date to seconds put datetwo - dateone into age -- calculate the age in seconds -- divide by the number of seconds per y

Re: Name shadows another variable

2014-06-26 Thread Mike Bonner
Not sure i'd know WHERE to do it, guess it depends on the script, but.. could you use "delete variable..." to fix the problem without having to restart lc? Of course this would probably require you to understand the source of the problem. Another thing I wonder about is the variable preservation

Re: Image control in a Background

2014-06-26 Thread Simon
Hi Vaughn, I'm glad to hear you got it working. The following is opinion and you may ignore it. I think you could benefit by going to Jacque's site and reviewing the stacks: http://www.hyperactivesw.com/revscriptconf/scriptingconferences.html There are also the forums: http://forums.livecode.co

Re: Name shadows another variable

2014-06-26 Thread dunbarx
Peter, Can you tell me more about what this error is and does? Craig -Original Message- From: Peter Haworth To: How to use LiveCode Sent: Thu, Jun 26, 2014 5:12 pm Subject: Name shadows another variable The above error has been flagged intermittently and incorrectly when compilin

On my way to the LiveCode meeting

2014-06-26 Thread Mark Schonewille
Hi guys, Just wanted to let you know I'm on my way to the LiveCode meeting in Switzerland. If you want to participate too, just send an e-mail to me to Bjoernke. More info is available at http://www3.economy-x-talk.com/blog/ . I hope to see you there. -- Best regards, Mark Schonewille Econo

Re: Image control in a Background

2014-06-26 Thread Vaughn Clement
Hi Simon This is a real pleasure to say it is working as designed now. Your a real wizard at scripting. Looking at this from start to finish I can say I have learned a lot about the image control, but more over I have a better perspective on how to work to find solutions in scripting. Thanks for y

Re: Image control in a Background

2014-06-26 Thread Simon
Yes, if there is no file "thePath" And I think we've discussed enough why this happens. So to fix it so that it doesn't show an image at all if there is no file "thePath": if there is a file the short id of this card then put (specialFolderPath ("documents") & "/photos/" & the short ID of this c

Re: Image control in a Background

2014-06-26 Thread Vaughn Clement
Hi Simon I used the script in a button a aligned and edited as shown: The image was added from the button to the image control. But all the cards in the stack now have the last added image. This is where I was a few days ago where the script did this same thing? Did I edit it wrong? *on* mouseUp

Re: Image control in a Background

2014-06-26 Thread Vaughn Clement
Hi Simon OK, thanks for the assistance. I will try the script in a button on the card. Thank you Vaughn Clement Apps by Vaughn Clement (Support) *http://www.appsbyvaughnclement.com/tools/home-page/ * Skype: vaughn.clement https://secure.join.

Re: Image control in a Background

2014-06-26 Thread Simon
Hi Vaughn, Nope I don't need to see the stack. Everything is running correctly here. Simon -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680678.html Sent from the Revolution - User mailing list archive at Nabble.com.

Name shadows another variable

2014-06-26 Thread Peter Haworth
The above error has been flagged intermittently and incorrectly when compiling a script with Strict Compilation Mode turned on for as long as I've been using Livecode. In the last couple of days, the error has been flagged every time I compile a script in one particular application. I restart Liv

compatibility between Android SDK and Livecode versions

2014-06-26 Thread Viktoras D.
Hi, is there a Livecode vs. Android SDK versions compatibility matrix available? Which SDK would work with Livecode 6.5 (on Windows 8)? Best wishes! Viktoras ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe,

Re: Image control in a Background

2014-06-26 Thread Vaughn Clement
Hi Simon The original email had a on OpenCard Stack script and a script in the image control to manage the card image.. The button on the buyer's order "Button" is my script test. The black buttons are the main buttons. If you send me an email address I will send you the stack. Thank you Vaugh

Re: Image control in a Background

2014-06-26 Thread Simon
Vaughn Clement wrote > Hi Simon > I aasume that the current stack script is replaced with your card script? errr... you are confusing me, I don't have a card script. I posted a button script. Your original card script was ok. Simon -- View this message in context: http://runtime-revolution.27

Re: Image control in a Background

2014-06-26 Thread Vaughn Clement
Hi Simon I aasume that the current stack script is replaced with your card script? On Thursday, June 26, 2014, Vaughn Clement wrote: > Hi Simon > > Let me try this to test my stack for errors. > > On Thursday, June 26, 2014, Simon > wrote: > >> Yep >> >> on mouseUp >>--/ the image from mob

Re: Image control in a Background

2014-06-26 Thread Vaughn Clement
Hi Simon Let me try this to test my stack for errors. On Thursday, June 26, 2014, Simon wrote: > Yep > > on mouseUp >--/ the image from mobilePickPhoto uses the template image construct >--set it off screen so we don't see ift flash / >--set the loc of the templateImage to -1,-1

Re: Image control in a Background

2014-06-26 Thread Simon
Yep on mouseUp --/ the image from mobilePickPhoto uses the template image construct --set it off screen so we don't see ift flash / --set the loc of the templateImage to -1,-1 set the vis of the templateImage to false --NEWLINE --delete file (specialFolderPath("documents

Re: Image control in a Background

2014-06-26 Thread Vaughn Clement
Hi Simon Is this the email: Hi Vaughn, Aside from a spelling mistake just add parentheses around all the folder paths e.g. put (specialFolderPath("documents") & "/photos/" & the short ID of this card) into thePath and then delete the current filename on mouseUp --/ the image from mobilePickPh

non-Functional Mac PPC installers?

2014-06-26 Thread Richmond
I wonder what the point of stating that the Mac installer of Livecode 6.6.2 will install on a Mac PPC when it won't? I have just tried (again) to install this version on my G5 iMac running Mac OS 10.5.8: http://forums.livecode.com/viewtopic.php?f=6&t=20611 Richmond.

Re: Image control in a Background

2014-06-26 Thread Simon
Hi Vaughn, You did see that I posted everything was working after a few small changes in your original script? I never received an answer that you tested it and it didn't work for you. Simon -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Ba

Re: Image control in a Background

2014-06-26 Thread Vaughn Clement
Hi Simon I really don't understand the image control in a background group yet. I just added a new blank card with the background group and it opened with the last image that was edited on an existing card. I am just not grasping the group and control logic to make it do what I am trying to do? T

Re: Image control in a Background

2014-06-26 Thread Vaughn Clement
Hi Simon I was testing to see what might work to finish adding the image without having to leave the card and return to trigger the openCard script again? I thought a button script "Update Image" button might trigger the update? I used a portion of the open card script thinking it would work. Sin

Re: Image control in a Background

2014-06-26 Thread Simon
Hi Vaughn, Still not clear on what you are doing because it looks like you are just repeating the openCard script from your original posting, so... on mouseUp openCard end mouseUp You should not see anything happen because it just loads the same image in. Unless I read this too quickly. Simon

Re: Error handling (was Re: "nan" v. try-catch for arithmetic)

2014-06-26 Thread Paul Dupuis
On 6/26/2014 12:23 PM, Peter Haworth wrote: > On Thu, Jun 26, 2014 at 8:22 AM, Richard Gaskin > wrote: > >> Is there a simple rule that would allow scripters to understand when >> try-catch is necessary and when the result should be checked instead? >> >> If not, should there be? >> >> Or perhaps

Re: Error handling (was Re: "nan" v. try-catch for arithmetic)

2014-06-26 Thread Peter Haworth
On Thu, Jun 26, 2014 at 8:22 AM, Richard Gaskin wrote: > Is there a simple rule that would allow scripters to understand when > try-catch is necessary and when the result should be checked instead? > > If not, should there be? > > Or perhaps better yet, could error handling be made uniform, maybe

Re: Image control in a Background

2014-06-26 Thread Vaughn Clement
Hi This morning I did some testing to address the image updating in the current card in the image control and did not come up with a solution that worked. I have the On OpenCard script that is working to add the image to the image control, and as before the on OpenCard script cannot update the im

Re: Problem on Win 7 with an app compiled with LC 6.6 on Mac

2014-06-26 Thread Richard Gaskin
jbv wrote: I am using LC 6.6 build 4003... And suddenly today, some of the users of this app in various cities of the country seem to encounter problems on Win 7... The current Stable version is 6.6.2, and the Release Notes for that version include mention of a great many fixes related to disp

Error handling (was Re: "nan" v. try-catch for arithmetic)

2014-06-26 Thread Richard Gaskin
J. Landman Gay wrote: > On 6/24/2014, 1:02 PM, Graham Samuel wrote: >> I get a result, "nan", and the catch doesn't fire. Why not? Maybe >> someone can explain what the engine is doing here - or is it just an >> obscure bug? > > A "catch" only triggers when there is a script error. In this case >

Re: Problem on Win 7 with an app compiled with LC 6.6 on Mac

2014-06-26 Thread Trevor DeVore
On Thursday, June 26, 2014, wrote: > > > So far I don't see what else I could do... Has anybody faced a > similar problem ? Any wise tip about what to do ? > 6.6 added high-res support for desktop. I would check your zoom settings on your Windows 7 install and see if it is the same as your custom

Problem on Win 7 with an app compiled with LC 6.6 on Mac

2014-06-26 Thread jbv
Hi list, I am using LC 6.6 build 4003 on Mac OSX 10.5.5 to compile an app made years ago on LC 4.5.3 and constantly improved over the years, with each new version of the app compiled with a more recent version of LC... And suddenly today, some of the users of this app in various cities of the coun

Re: LiveCode Server: start session problem

2014-06-26 Thread John Craig
Thanks, Simon. Knowing that it worked elsewhere was enough to start me poking around again. Issue was resolved by specifying an alternative sessionSavePath. The original path '/tmp' is writable, etc. (and PHP uses it), but changing it worked for LC. :D On 26/06/2014 12:20, Simon Smith wr

Re: LiveCode Server: start session problem

2014-06-26 Thread Simon Smith
Hi John Might be easier for to email the script to me and I can take a look. What you can try though is: Ensure that start session is at the very top of your script (e.g. line 1 ) and that you also have end session at the very end of the script. If you output anything before calling start sessio

Re: Learning about server

2014-06-26 Thread John Craig
My take#2 at the url validation caused the uppercase problem. I've just updated it to take#3 - uppercase letters are welcome! Problem is I don't use regular expressions that often, so I get rusty - may take another few tweaks yet, but fingers crossed :) On 26/06/2014 12:41, Dave Kilroy wrote

Re: Learning about server

2014-06-26 Thread Dave Kilroy
I think the issue might be uppercase letters - I've just tried this on a mac and an iPad - it is happy with "runrev.com" but borks at "Runrev.com" - "Some are born coders, some achieve coding, and some have coding thrust upon them." - William Shakespeare & Hugh Senior -- View this message

Re: LiveCode Server: start session problem

2014-06-26 Thread John Craig
Hi, Simon. It's encouraging that it's working on your system - hopefully there's just some misconfiguration on my machine. I get the following error when I add the start session line; file "/var/www/vhosts/8up.uk/httpdocs/index.lc" row 16, col 1: Row 16 is the line in question. Column 1 is

Re: Learning about server

2014-06-26 Thread Roger Eller
It's a real device... running 4.1.1, and I've tried a couple different browsers. Sent from my Android tablet On Jun 26, 2014 2:56 AM, "John Craig" wrote: > It copies and pastes OK on my android tablet (4.0.3). If the text is > hilited, then that's what should copy... > Were you on a device or e

Re: LiveCode Server: start session problem

2014-06-26 Thread Simon Smith
Hi John I am running the latest version - linux and windows and sessions are working fine for me. whats happening when you use start session ? Simon On Thu, Jun 26, 2014 at 1:12 PM, John Craig wrote: > I decided to add some session code to my server project, but the following > command cause

Re: LiveCode Server: start session problem

2014-06-26 Thread John Craig
took a punt on 6.7.0 DP4 - same problem . On 26/06/2014 12:12, John Craig wrote: I decided to add some session code to my server project, but the following command causes an error on 6.6.1 on Linux (community and commercial); start session LC 6.6.2 had another problem, which is why I ro

LiveCode Server: start session problem

2014-06-26 Thread John Craig
I decided to add some session code to my server project, but the following command causes an error on 6.6.1 on Linux (community and commercial); start session LC 6.6.2 had another problem, which is why I rolled back to 6.6.1. I've now also tried 6.6.0 and 6.5.2 - 'start session' also bombs th

Re: Learning about server

2014-06-26 Thread John Craig
If it's valid ... it's valid :) I've replaced the url validation with a much looser regex On 26/06/2014 02:16, Scott Morrow wrote: FWIW… Although a “good” url probably shouldn’t have an equal sign… I’ve got one which appears to work in most browsers but gets reported as not valid when using