Scripted GUI Testing & launching engine from command line?

2015-02-24 Thread Peter W A Wood
I always thought that LiveCode would make it easy to write scripted tests of GUI applications as it is based on messages. In fact, I’m a little surprised that there doesn’t seem to be much use of scripted testing either by RunRev or the community. I started to experiment with a very simple test,

Re: [RANT] Really annoying posts

2015-02-24 Thread Antti Ilola
I'm not fluent in English or even in Scottish, because I'm Finnish (two n's). Still I think, I understood enough what Richmond told about contemporary youth and I definitely agree. I found that they discuss with phones and if it is not in Google its even exists. Richmond, when it's time to change o

Re: Printing just one card to PDF [was Re: The owner of a selected control - a mystery]

2015-02-24 Thread Graham Samuel
Wow! It worked! I did not get an extra page, and so I got what I wanted. At first sight, I couldn't see the functional difference between my code and yours., then I realised that you set the printMargins BEFORE your ‘open printing’ statement, and I’d set them afterwards. I suppose to the engin

Re: Printing just one card to PDF [was Re: The owner of a selected control - a mystery]

2015-02-24 Thread Graham Samuel
Ha - I didn’t pay sufficient attention. In the LC Dictionary for ‘open printing’ it says: > Important! Any printing options, such as setting print spacing and margins, > must be set before the open printing statement. Any options which are set > after it will be ignored. So, mea maxima culp

Re: [Rant] Really annoying posts

2015-02-24 Thread Francis Nugent Dixon
Hi from Beautiful Brittany, I’ve been programming for more than 40 years, and I will certainly not give you a list of the programming languages that I have used. I have used all sorts of mechanisms to help me program quickly and efficiently. My latest system is to write my scripts using comments “

Re: Printing just one card to PDF [was Re: The owner of a selected control - a mystery]

2015-02-24 Thread Dr. Hawkins
On Tue, Feb 24, 2015 at 3:06 AM, Graham Samuel wrote: > > OK, I’m trying to follow your code. As I understand it, you have a card > whose name is in “otCd”. You print the whole card by setting its rectangle. > However you don’t print it to a conceptual bit of paper the same size as > the card, d

Re: [Rant] Really annoying posts

2015-02-24 Thread Erik Beugelaar
But what really is annoying me is the fact you can NOT browse with your cursors keys in the LiveCode Dictionary or am I the only one? Erik Beugelaar On 24/02/15 14:08, "Francis Nugent Dixon" wrote: >Hi from Beautiful Brittany, > >I¹ve been programming for more than 40 years, and I will >c

Re: The owner of a selected control - a mystery

2015-02-24 Thread Bob Sneidar
Maybe I don’t understand the problem, but I would rather have the control of silently overwriting a file or alerting the user instead and giving them options. If they fix this “bug” that would present a problem for me. Bob S On Feb 23, 2015, at 19:32 , Graham Samuel mailto:livf...@mac.com>> w

Re: [Rant] Really annoying posts

2015-02-24 Thread Bob Sneidar
I use this for more complex tasks. I think the reason for this is that there are different modes of thought when developing software. One mode is deciding what you want your app to look and feel like to the end user. Another is determining the steps necessary to accomplish the task in the enviro

Re: The owner of a selected control - a mystery

2015-02-24 Thread Richard Gaskin
The issue here is that this is a built-in feature of not only the OS X PutFile dialog, but also the ones in Windows and Linux, and it used to work in LC as it does in any other program, prompting us right in the dialog when we're about to save something that will overwrite an existing file. I

Re: [Rant] Really annoying posts

2015-02-24 Thread Bob Sneidar
I’ll tell you something else that might be annoying to anyone developing in Windows. I can’t seem to clone anything in the script editor when in Windows. In OS X I can option-dragDrop text and it will make a copy of it instead of move it. Bob S On Feb 24, 2015, at 06:51 , Erik Beugelaar mail

Re: Open application when file double clicked

2015-02-24 Thread Peter Haworth
Still trying to figure this out. There's a user note in the dictionary that says $1 does not contain the path to the double clicked file on OSX. Is that true? On Mon Feb 23 2015 at 1:00:02 PM Peter Haworth wrote: > Thanks Paul. > > The problem is, the file types involved are SQLite databases a

Re: The owner of a selected control - a mystery

2015-02-24 Thread J. Landman Gay
On 2/24/2015 9:31 AM, Bob Sneidar wrote: Maybe I don’t understand the problem, but I would rather have the control of silently overwriting a file or alerting the user instead and giving them options. If they fix this “bug” that would present a problem for me. It only applies to the "ask file" d

Re: Open application when file double clicked

2015-02-24 Thread Richard Gaskin
Peter Haworth wrote: > There's a user note in the dictionary that says $1 does not contain > the path to the double clicked file on OSX. Is that true? I believe so. OS X may be a certified Unix, but the Finder is off in a world of its own. :) On Linux and Windows that still works, and on bot

Re: The owner of a selected control - a mystery

2015-02-24 Thread Bob Sneidar
Ah! That makes more sense. Still, I have been checking beforehand and alerting the user anyway, which gives me a little more control over the process. I guess it’s a question of which side you butter your toast on. Bob S On Feb 24, 2015, at 10:49 , J. Landman Gay mailto:jac...@hyperactivesw.c

Re: Open application when file double clicked

2015-02-24 Thread Peter Haworth
Thanks Richard. The code I'm using came from a note in the dictionary with a note that it came from Trevor Devore originally but it's dated 2009 so maybe Apple events have changed since then. I tried the double click with the application not running and with it running but did not seem to hot the

Re: Open application when file double clicked

2015-02-24 Thread Richard Gaskin
Which event, odoc or oapp? If only the former, what happens when you include the latter? -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.co

Re: The owner of a selected control - a mystery

2015-02-24 Thread Peter Haworth
Doesn't matter which side you butter the toast, it will always fall on the floor butter side down, except if you are trying to demonstrate that fact, in which case it will fall butter side up. On Tue Feb 24 2015 at 11:02:27 AM Bob Sneidar wrote: > Ah! That makes more sense. Still, I have been ch

Re: Open application when file double clicked

2015-02-24 Thread Peter Haworth
I'm looking for odoc right now but I just inserted some answer statements right at the top of my appleevent handler and it's not being triggered. Unless answer statements don't work within an applevent handler for some weird reason. On Tue Feb 24 2015 at 11:05:46 AM Richard Gaskin wrote: > Which

Re: Open application when file double clicked

2015-02-24 Thread Richard Gaskin
Peter Haworth wrote: I'm looking for odoc right now but I just inserted some answer statements right at the top of my appleevent handler and it's not being triggered. Unless answer statements don't work within an applevent handler for some weird reason. Try putting your appleEvent handler in a

Re: The owner of a selected control - a mystery

2015-02-24 Thread Graham Samuel
Studies may have shown that there is a correlation with the value of the flooring - the most expensive Persian carpet will be more likely to get butter on it than deal floorboards. Somewhere in cyberspace there is a link to the relevant research... I could probably find it. Graham Sent from my

Re: Open application when file double clicked

2015-02-24 Thread Peter Haworth
I added a button to my application and put the appleevent handler in its script. Added a startup handler to the first card of my main stack to insert the button script into front. Built the standalone. Double clicked a file associated with the application while the application was not running.

Re: Open application when file double clicked

2015-02-24 Thread J. Landman Gay
On 2/24/2015 1:23 PM, Richard Gaskin wrote: Peter Haworth wrote: I'm looking for odoc right now but I just inserted some answer statements right at the top of my appleevent handler and it's not being triggered. Unless answer statements don't work within an applevent handler for some weird reason

Re: The owner of a selected control - a mystery

2015-02-24 Thread J. Landman Gay
In addition, if there is a furred animal nearby, the trajectory will veer toward the animal and land butter side down on its back. Researchers speculate this rule also applies to feathered animals, but those tend to move out of range so quickly that tests have been inconclusive. On 2/24/2015

Re: Open application when file double clicked

2015-02-24 Thread Richard Gaskin
Peter Haworth wrote: I added a button to my application and put the appleevent handler in its script. Added a startup handler to the first card of my main stack to insert the button script into front. Built the standalone. Double clicked a file associated with the application while the applica

Re: Open application when file double clicked

2015-02-24 Thread J. Landman Gay
On 2/24/2015 1:53 PM, Richard Gaskin wrote: How do you handle your documents on Mac without aevt/odoc? Why is this bug one that's only being filed now? Do all of you who make document-centric apps put your ae handlers in frontScripts? No one else has seen this but Peter and me? Well, in my c

Re: Open application when file double clicked

2015-02-24 Thread Peter Haworth
Thank you Richard and Jacque. Here's the current status. At Jacque's suggestion I moved the appleevent handler to my main stack script and removed the code that inserted it as a front script. The result of that was the same as with the appleevent handler in a front script, meaning if the app is

Re: The owner of a selected control - a mystery

2015-02-24 Thread Peter M. Brigham
On Feb 24, 2015, at 2:06 PM, Peter Haworth wrote: > Doesn't matter which side you butter the toast, it will always fall on the > floor butter side down, except if you are trying to demonstrate that fact, > in which case it will fall butter side up. Probability in the real world: anytime you have

Re: Open application when file double clicked

2015-02-24 Thread Scott Rossi
Same here. I was able to dig up an app I built back in 2009/10 which worked fine back then, and now when double-clicking a saved doc in the Finder, I can launch the app, but the document doesn¹t open (which seems to be one step behind Pete¹s experiments). I think one reason in answer to Richard'

Re: Open application when file double clicked

2015-02-24 Thread Richard Gaskin
J. Landman Gay wrote: On 2/24/2015 1:53 PM, Richard Gaskin wrote: How do you handle your documents on Mac without aevt/odoc? Why is this bug one that's only being filed now? Do all of you who make document-centric apps put your ae handlers in frontScripts? No one else has seen this but Peter

Re: Open application when file double clicked

2015-02-24 Thread J. Landman Gay
On 2/24/2015 2:40 PM, Scott Rossi wrote: Same here. I was able to dig up an app I built back in 2009/10 which worked fine back then Yeah. I was just digging around in old apps trying to find the one I remembered and they were all dated 2009 or earlier. Maybe the last time we were using appl

Re: Open application when file double clicked

2015-02-24 Thread Richard Gaskin
Peter Haworth wrote: Thank you Richard and Jacque. Here's the current status. At Jacque's suggestion I moved the appleevent handler to my main stack script and removed the code that inserted it as a front script. The result of that was the same as with the appleevent handler in a front script,

Re: Open application when file double clicked

2015-02-24 Thread J. Landman Gay
On 2/24/2015 2:56 PM, Richard Gaskin wrote: J. Landman Gay wrote: On 2/24/2015 1:53 PM, Richard Gaskin wrote: How do you handle your documents on Mac without aevt/odoc? Why is this bug one that's only being filed now? Do all of you who make document-centric apps put your ae handlers in front

Re: Open application when file double clicked

2015-02-24 Thread Richard Gaskin
Wierdness abounds: I made a standalone with this card script: on startup insert script of btn "fs" into front end startup This script in a button "fs": on appleEvent put the params &cr & the executionContexts &cr&cr after fld 1 pass appleEvent end appleEvent And that same script in

Re: Open application when file double clicked

2015-02-24 Thread Peter Haworth
Hi Richard, It started off life in card 1 of my main script. Did that because the dictionary entry for appleEvent says it's sent to "the current card". If I can't get this to work when the app isn't running, I may just forget about it. It's good that it works if the app is already open but my ap

Re: Open application when file double clicked

2015-02-24 Thread Peter Haworth
Pretty interesting. I don;t think I launched the app by double clicking it when I had my debug code in there for "oapp", was always launching it by double clicking a file associated with it. I have to step out for a while but will try this scenario here when I get back. Even if I do see the oapp

Re: Open application when file double clicked

2015-02-24 Thread J. Landman Gay
On 2/24/2015 3:15 PM, Peter Haworth wrote: I also noticed that I can't drag/drop a file onto the app's window but I think that's probably something to do with its plist entry. The plist needs the entry, but also you need an appleEvent to catch the drop. -- Jacqueline Landman Gay |

Re: Open application when file double clicked

2015-02-24 Thread Richard Gaskin
Peter Haworth wrote: > I also noticed that I can't drag/drop a file onto the app's window > but I think that's probably something to do with its plist entry. For that you'll need to define the receiving area as a drobbable space. There are a couple ways to do that depending on what you want to

Re: [Rant] Really annoying posts

2015-02-24 Thread Alejandro Tejada
Hi Bob, Bob Sneidar-2 wrote > [snip] > Livecode at least in theory allows us to hop > around these modes of thought like stones > in a stream, but the reality of the human > psyche doesn’t lend itself to this very well. > So the time tested method of software development, > the planning, the

Re: Open application when file double clicked

2015-02-24 Thread Peter Haworth
Thanks Jacque and Richard for the drag/drop thoughts. Sounds like these are alternative ways to do the same thing? On Tue Feb 24 2015 at 1:53:34 PM Richard Gaskin wrote: > Peter Haworth wrote: > > I also noticed that I can't drag/drop a file onto the app's window > > but I think that's probab

Re: Open application when file double clicked

2015-02-24 Thread Richard Gaskin
Peter Haworth wrote: Thanks Jacque and Richard for the drag/drop thoughts. Sounds like these are alternative ways to do the same thing? The plist in the app bundle governs what can be dropped on the app icon. For anything within LiveCode windows, LiveCode's drag and drop messages handle tha

Re: Open application when file double clicked

2015-02-24 Thread Peter Haworth
Just tried opening the application by double clicking it and still no oapp event. The more I think about this, the more I"m thinking that there's something in my startup/preopnCard handlers that is getting in the way of the apple event. That would explain why double clicking on a file AFTER the a

Re: Open application when file double clicked

2015-02-24 Thread Richard Gaskin
Even weirder: Offlist Bernd kindly sent an example of a stack similar to what's described below, but it works flawlessly. The only significant difference I could find was that his uses a custom document type, while I had use txt. So I went back to my test app, changed the document type from

Re: Open application when file double clicked

2015-02-24 Thread Peter Haworth
Yeah, I got that stack and it works for me too. I actually removed the file association since that's how my app is built but it still worked. As mentioned previously, I'm thinking that perhaps the problem is in the code in my startup/preOpenCard handlers somehow stepping on the appleEvent message

Re: The owner of a selected control - a mystery

2015-02-24 Thread Bob Sneidar
So THAT is why I have gone 3 days without one single Savage Blood drop in World of Warcraft! Thanks for that. Bob S > On Feb 24, 2015, at 12:29 , Peter M. Brigham wrote: > > On Feb 24, 2015, at 2:06 PM, Peter Haworth wrote: > >> Doesn't matter which side you butter the toast, it will always

Re: Open application when file double clicked

2015-02-24 Thread Bob Sneidar
Okay, 1 beer really can’t stop me from looking stuff up. Please see: http://superuser.com/questions/20822/where-does-mac-os-x-store-file-association-information Looks like you need a terminal command to do this. When in doubt, SHELL IT! Your mileage may vary. Bob S On Feb 24, 2015, at 15:58 ,

Re: Open application when file double clicked

2015-02-24 Thread J. Landman Gay
Richard's way is better. I wasn't thinking. On February 24, 2015 5:18:23 PM CST, Richard Gaskin wrote: > Peter Haworth wrote: >> Thanks Jacque and Richard for the drag/drop thoughts. Sounds like >these >> are alternative ways to do the same thing? > >The plist in the app bundle governs what

Moving to the Cloud. LiveCodeServer on Linux CentoOS vs Ubuntu 11

2015-02-24 Thread Brahmanathaswami
We are moving to the cloud (Digital Ocean) in a month or two. I'll be spinning up a new server instance. Looking for comments/insights on using LiveCode server on LInux, best performance etc. We will be running RevIgniter for a main site and XOOPS and other smaller PHP CMS (Dokuwiki, Flyspra

Re: Moving to the Cloud. LiveCodeServer on Linux CentoOS vs Ubuntu 11

2015-02-24 Thread Richard Gaskin
Brahmanathaswami write: > Looking for comments/insights on using LiveCode server on LInux, best > performance etc. > > We will be running RevIgniter for a main site and XOOPS and other > smaller PHP CMS (Dokuwiki, Flyspray) on the new "box" > > I'm told that LC 7 server breaks on Ubuntu and someo