Bug when working with Shell command

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
labrat
Posts: 32
Joined: Mon Dec 29, 2014 6:17 pm

Bug when working with Shell command

Post by labrat » Sat Jan 31, 2015 7:37 pm

Though I am relatively new at LiveCode, I am pretty confident this is a bug. Nevertheless, I am posting here in the beginners forum because I am a beginner and I could be missing something.

I am experimenting with the Shell command to run another application using the command line (on Mac OS X 10.9.5):

Code: Select all

on mouseUp
    answer the shell of "java -Xms256m -Xmx2048m -jar /Users/erb/rapidminer/lib/rapidminer.jar"
end mouseUp
When the button is clicked, the code successfully launches RapidMiner. But ...

After I closed rapidminer and returned to LiveCode, the "answer dialog" (I assume) was displayed in a manner making it impossible to "click OK". It's a little hard to describe. What I saw was a window (looking like a gray "band") stretched across the entire width of my screen bearing no icons, text or buttons. I grabbed the title bar and could move the window, but it appeared to stretch "to infinity and beyond" in each direction. I was unable to launch the message box to "relocate" or "resize" the answer dialog (not that I would know how to do that with the message box). I assume that the answer dialog was "blocking" input until I closed it. I was unable to close what I assume was the answer dialog and had to "force close" LiveCode.

Looks like a bug to me.

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Re: Bug when working with Shell command

Post by SparkOut » Sat Jan 31, 2015 9:24 pm

Not checked, not tested, but it seems more like a syntax error to me. What happens if you

Code: Select all

get shell ("java ..and all the parameters and path that I can't copy on this phone")
answer it
?

labrat
Posts: 32
Joined: Mon Dec 29, 2014 6:17 pm

Re: Bug when working with Shell command

Post by labrat » Sun Feb 01, 2015 12:06 am

Well, I guess my definition of "bug" would include any scenario in which the answer dialog went "bezonkers" regardless of the inelegant coding that caused it.

But, it is hardly a critical bug as it is only likely to be encountered by newbies like me experimenting with unfamiliar commands. :D

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Bug when working with Shell command

Post by jacque » Sun Feb 01, 2015 7:58 pm

I'd call it a bug, but probably a rare one. You've got a blocking command followed by a modal dialog, but when the modal is displayed the app is no longer frontmost. So there's a problem creating the modal in an app that no longer has focus. Go ahead and report it, though it may not get top priority since the workaround is pretty much "don't do that".

You can avoid issues with modals by putting responses into the message box rather than calling up an answer dialog. It's quicker too.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply