Re: Julian Days and Eon seconds

2011-03-02 Thread Peter Haworth
Never mind, just realised that SQlite can do all the conversion for me. Pete Haworth http://www.mollysrevenge.com http://www.sonicbids.com/MollysRevenge http://www.myspace.com/mollysrevengeband On Mar 2, 2011, at 5:26 PM, Peter Haworth wrote: > Ah yes, forgot about that! I looked

Re: Julian Days and Eon seconds

2011-03-02 Thread Peter Haworth
Ah yes, forgot about that! I looked in Sarah's date routines and found what I'm looking for BUT - it says the base date is January 1, 4713 BCE and SQLite says the base date is 11/24, 4714 BC, a few months after Sarah;s base date. Maybe I'll just give it a whirl and see what happens. Pete

Re: A curious case (fixed typo)

2011-03-02 Thread Jim Ault
was: case (testValue is among the words IN "pink coral azure maize") should be: case (testValue is among the words "pink coral azure maize") On Mar 2, 2011, at 5:03 PM, Jim Ault wrote: On Mar 2, 2011, at 3:19 PM, Peter Haworth wrote: Switch is definitley very handy but I wish it was

Re: A curious case

2011-03-02 Thread Jim Ault
On Mar 2, 2011, at 3:19 PM, Peter Haworth wrote: Switch is definitley very handy but I wish it was more flexible. As far as I can tell, the case statement can only test for equality, for example: switch myvar case begins with "xyz" ... generates an error as does anything else oth

Re: A curious case

2011-03-02 Thread Peter Haworth
Yes, I know that's possible. But it can't do: switch temp case < 4 break case > 10 break end switch Pete Haworth On Mar 2, 2011, at 4:33 PM, dunb...@aol.com wrote: > No, I think it can resolve any LC statement, no? > > > put 3 into temp > switc

Re: A curious case

2011-03-02 Thread dunbarx
No, I think it can resolve any LC statement, no? put 3 into temp switch case temp < 4 put "lessThan" break case temp = 11 put "never see this" break end switch Craig Newman -Original Message- From: Peter Haworth To: How to use LiveCode Sent: Wed, Mar 2, 2011 6:19 pm Subject: Re:

Re: Julian Days and Eon seconds

2011-03-02 Thread Alex Tweedly
"When it's important, go to Sarah's site." (with apologies to M&S :-) http://www.troz.net/rev/index.irev?category=Library#stacks -- Alex. On 03/03/2011 00:20, Peter Haworth wrote: Why do I keep getting involved in these off-the-wall topics! I have a need to convert dates back and forth b

Julian Days and Eon seconds

2011-03-02 Thread Peter Haworth
Why do I keep getting involved in these off-the-wall topics! I have a need to convert dates back and forth between the formats used by sqlite and human readable formats. LC has me covered for text string dates and dates stored in seconds but SQLIte can also store dates in Julian format, defined

Re: A curious case

2011-03-02 Thread Peter Haworth
Switch is definitley very handy but I wish it was more flexible. As far as I can tell, the case statement can only test for equality, for example: switch myvar case begins with "xyz" ... generates an error as does anything else other than just a straight value on the case line. I know

Re: A curious case

2011-03-02 Thread Bob Sneidar
I think the switch control structure is pretty handy for this. If you put all the conditions that will not require a break at the top, then the program will flow down through your conditions and only execute the code inside your case statements if the conditions are true. Towards the end of the

Re: A curious case

2011-03-02 Thread Peter Brigham MD
On Mar 2, 2011, at 11:26 AM, Richard Gaskin wrote: Andre Garzia wrote: I tend to work on the same way. longer forms makes shorter understanding time. I'd rather write more and understand more than write faster and then one week from now, be completely lost in nested mazes Well said. And

Re: Creating a scrollview with Livecode

2011-03-02 Thread Jim Ault
On Mar 2, 2011, at 1:14 PM, Eric Peyron wrote: Thanks Jim! I just copied the code, cleaned it up a little, tweaked it and it works! The code was offered by Scott Rossi, one of the LC gurus. Perhaps in the future, but I haven't done any work with iOS and mobile devices. Jim Ault Las Veg

Re: Creating a scrollview with Livecode

2011-03-02 Thread Eric Peyron
Thanks Jim! I just copied the code, cleaned it up a little, tweaked it and it works! One of the things I can't seem to grasp right now is why the scrolling is disabled when I change iphoneControlSet sScrollerId, "visible", "true" into iphoneControlSet sScrollerId, "visible", "false" What I wan

ipad 2 graphics much more powerful - LIVECODE impact

2011-03-02 Thread Vikram Singh
Hi Hoping that animations, scrolling and pinch to zoom etc, will now become acceptably smooth... then we are on a level playing field with other toolkits. or does this impact only hardware accelerated graphics (which livecode is not i presume) cheers vikram _

Editing a Cell in a Datagrid

2011-03-02 Thread Ray Horsley
Please disregard. I got it! (One of those embarrassing little oversights) Thanks, Ray ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http

Re: Debug Break Point Problem

2011-03-02 Thread Peter Haworth
Yes, that works! Thank you. Pete Haworth http://www.mollysrevenge.com http://www.sonicbids.com/MollysRevenge http://www.myspace.com/mollysrevengeband On Mar 2, 2011, at 11:55 AM, J. Landman Gay wrote: > On 3/2/11 1:49 PM, Peter Haworth wrote: >> Haven't tried the breakpoint comman

Re: Debug Break Point Problem

2011-03-02 Thread J. Landman Gay
On 3/2/11 1:49 PM, Peter Haworth wrote: Haven't tried the breakpoint command, just setting the little orange (red?) ball. The red ball is still there after I rerun the stack but the breakpoint doesn;t happen. The IDE overrides some of this. Use the word "breakpoint" inserted into the script i

Re: Debug Break Point Problem

2011-03-02 Thread Peter Haworth
Haven't tried the breakpoint command, just setting the little orange (red?) ball. The red ball is still there after I rerun the stack but the breakpoint doesn;t happen. Pete Haworth On Mar 2, 2011, at 11:43 AM, dunb...@aol.com wrote: > I don't know if you mean a "breakpoint" command inserte

Re: Debug Break Point Problem

2011-03-02 Thread dunbarx
It seems so. I had tried it in a button handler, to see if it persisted. It did not in a preOpenStack handler in a stack script. -Original Message- From: Bob Sneidar To: How to use LiveCode Sent: Wed, Mar 2, 2011 2:36 pm Subject: Re: Debug Break Point Problem I recall having this

Re: Debug Break Point Problem

2011-03-02 Thread dunbarx
I don't know if you mean a "breakpoint" command inserted in a script, or a breakpoint set with the little orange ball. But in either case these are remembered between sessions for me. HC did not save the manual breakpoint; of course it saved the command. -Original Message- From: Pe

Re: Debug Break Point Problem

2011-03-02 Thread Bob Sneidar
I recall having this problem before. I don't think breakpoints work in preOpenCard and preOpenStack. But I might be mistaken. Bob On Mar 2, 2011, at 11:20 AM, Peter Haworth wrote: > I set a debug breakpoint in the preOpenCard handler of the only card in a > Main stack, save it, then quit and

Editing a Cell in a Datagrid

2011-03-02 Thread Ray Horsley
Greetings, LiveCode's datagrid seems kind of sticky to me. I'm simply trying to open up any given cell for editing without obligating the user to double-click it. I'm not having any luck with the commands from the tutorials such as EditFieldText, EditValue, EditKey and EditKeyOfIndex. EditFi

Debug Break Point Problem

2011-03-02 Thread Peter Haworth
I set a debug breakpoint in the preOpenCard handler of the only card in a Main stack, save it, then quit and rerun that main stack. The code doesn't break at that point and I'm certain it's being executed. Is there a known problem with break points in these circumstances? Thanks, Pete Hawor

Re: Enhancements for getting number/monetary formats

2011-03-02 Thread Peter Haworth
Good point Bob! Here they are: http://quality.runrev.com/qacenter/show_bug.cgi?id=9422 http://quality.runrev.com/qacenter/show_bug.cgi?id=3392 Pete Haworth http://www.mollysrevenge.com http://www.sonicbids.com/MollysRevenge http://www.myspace.com/mollysrevengeband On Mar 2, 2011,

Re: Enhancements for getting number/monetary formats

2011-03-02 Thread Bob Sneidar
Peter, if you put a link to the QC if you have it handy I will vote for it too. Otherwise I would have to actually go look for it myself, and I am too dam lazy. ;-) Bob On Mar 2, 2011, at 9:57 AM, Peter Haworth wrote: > There are a couple of enhancement requests at the QC regarding this. >

Enhancements for getting number/monetary formats

2011-03-02 Thread Peter Haworth
There are a couple of enhancement requests at the QC regarding this. #3392 dates back to 2006 and is a request to be able get the OS number and monetary format information. #9422 was entered by me yesterday and requests a method of formatting numbers and monetary values per the OS settings,

locale Problem Solved!

2011-03-02 Thread Peter Haworth
I just got a response to the bug report I posted on the QC yesterday, as follows. Hi Peter, Thanks for the report. The 'locale' command uses the value of the LANG environment variable to determine what locale should be used to return its results. It would appear that the OS is *not* setting thi

Re: Following up on shell(locale) problem

2011-03-02 Thread Peter Haworth
That's what happens with me too. This is getting stranger! I've posted this as a bug in the QC. I'm not 100% it's a Livecode problem since the same thing occurs using Applescript but someone at RunRev may be able to enlighten me on what's going on. Pete Haworth http://www.mollysrevenge

Re: A curious case

2011-03-02 Thread Andre Garzia
> > 2. If a function is longer than can be viewed in one screen, it may be a > good candidate for breaking it up into smaller functions. > > Never, ever look into the process_request command inside RevHTTP. it has so many pages that I've considered adding an index... (and yes, there is really n

Re: Script to format a currency value

2011-03-02 Thread Peter Haworth
Yes, I was just thinking about that yesterday, plus sometimes negatives are shown in red. I'm leaning towards leaving it to the application that calls the formatting routine to deal with those options, mainly because the OS user preferences don't include a way to specify either the parentheses

Re: A curious case

2011-03-02 Thread Bob Sneidar
Well that explains why it was compiling for a while and then stopped! I must have deleted that empty line. Bob On Mar 1, 2011, at 7:04 PM, J. Landman Gay wrote: > You can either rewrite the section using the long form, or put a carriage > return after the last line of the embedded "end if".

Re: Live LiveCode Code event invitation

2011-03-02 Thread Mark Schonewille
Hi Björnke. I am still considering to do a presentation and I'll contact you off-list about it. For next week, I won't be able to do it and we will definitely need two people who want to do a presentation! -- Kind regards, Mark Schonewille Economy-x-Talk Http://economy-x-talk.com Share the cli

Re: use-livecode Digest, Vol 90, Issue 3

2011-03-02 Thread J. Landman Gay
On 3/2/11 2:21 AM, Joseba Aguayo wrote: Hello Jacqueline: How can I build a modern stack that run OK in windows 7. When I create a standalone application, the application don`t save datas that I change in fields. I see. Executables on any OS can't save data to themselves. You need to use the

Re: Following up on shell(locale) problem

2011-03-02 Thread Warren Samples
On Wed, 2011-03-02 at 10:37 -0600, Warren Samples wrote: > On Tue, 2011-03-01 at 18:10 -0800, Peter Haworth wrote: > > That's definitely an option if I don't find a solution to getting the > > locale info from within LiveCode. Unfortunately, I know nothing about > > python. I've been sent some

Re: Following up on shell(locale) problem

2011-03-02 Thread Warren Samples
On Tue, 2011-03-01 at 18:10 -0800, Peter Haworth wrote: > That's definitely an option if I don't find a solution to getting the locale > info from within LiveCode. Unfortunately, I know nothing about python. I've > been sent some pretty cool LC scripts to do this formatting in response to my >

Re: Live LiveCode Code event invitation

2011-03-02 Thread Andrew Kluthe
Yeah, id be happy to do it towards the end of march. Perhaps the Live LiveCode event on the 26th? -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/using-mySQL-on-a-web-based-server-tp3328963p3331808.html Sent from the Revolution - User mailing list archive at Nabbl

Re: A curious case

2011-03-02 Thread J. Landman Gay
On 3/2/11 9:40 AM, Nonsanity wrote: Others have answered this pretty well, but I thought I'd add some examples for clarity - With future readers in mind. The examples are excellent. I think you should add a user note to the "if" page in the docs. That way the info won't get lost. -- Jacque

Re: A curious case

2011-03-02 Thread Richard Gaskin
Andre Garzia wrote: I tend to work on the same way. longer forms makes shorter understanding time. I'd rather write more and understand more than write faster and then one week from now, be completely lost in nested mazes Well said. And sometimes lengthy deeply-nested IFs are good candidates

Re: A curious case

2011-03-02 Thread Andre Garzia
2011/3/2 Björnke von Gierke > I always thought that the dozens of ways to use if-then-else constructs in > LC are too much options. I always use each on it's own line, because > otherwise it's just so hard to read and decipher. Even for super simple > cases: > > if the visible of me then > exit

Re: A curious case

2011-03-02 Thread Björnke von Gierke
I always thought that the dozens of ways to use if-then-else constructs in LC are too much options. I always use each on it's own line, because otherwise it's just so hard to read and decipher. Even for super simple cases: if the visible of me then exit repeat end if On 2 Mar 2011, at 16:40,

Re: A curious case

2011-03-02 Thread Nonsanity
Others have answered this pretty well, but I thought I'd add some examples for clarity - With future readers in mind. The following won't work: if x = 1 then doSomething else if x = 2 then if y = 3 then doSomethingElse else if x = 2 then -- little lost else doThirdThing end if This

Re: Live LiveCode Code event invitation

2011-03-02 Thread Björnke von Gierke
Cool! Anyone else? maybe someone for this week? Contact me directly if you're interested! Björnke On 2 Mar 2011, at 08:28, Andrew Kluthe wrote: > Hmmm. Perhaps towards the end of the month, I could do a two parter for > livecode.tv. An intro to revIgniter and a talk on building web services wi

Re: standalone builder

2011-03-02 Thread Francis Nugent Dixon
Hi from Beautiful Britanny, Edward wrote : How can I refer to the relative paths in both Mac and Windows? Note that I use a "Revolution" folder for all concerned with LiveCode. All my sub-folders and files of all my stacks are in there somewhere. put the platform into GVHoldPlatform if

Re: use-livecode Digest, Vol 90, Issue 3

2011-03-02 Thread Joseba Aguayo
Hello Jacqueline: How can I build a modern stack that run OK in windows 7. When I create a standalone application, the application don`t save datas that I change in fields. Un saludo. Joseba Aguayo Fernández (jagu...@telur.es) On Mar 2, 2011, at 1:21 AM, use-livecode-requ...@lists.runrev.com

Re: Script to format a currency value

2011-03-02 Thread Keith Clarke
Peter, I seem to recall that in accountancy, negative values can be shown in parentheses rather than using the minus sign, so (£1,234.56) = -£1,234.56. Just another variable! ;-) On 2 Mar 2011, at 01:33, Peter Haworth wrote: > Hi Alex, > To be honest, I'm not sure if there's a real life case

Zooming with a pinch motion

2011-03-02 Thread eps11
Hi all, I have created a stack allowing the user to zoom an image, and it was actually easy with the "How do I implement a multi-touch pinch motion?" lesson. Now, I need my images to have a min size of 320*480 when zoomed in, and a max size when zoomed out. Does someone know how I could implem