Page 1 of 1

Bug when working with Shell command

Posted: Sat Jan 31, 2015 7:37 pm
by labrat
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.

Re: Bug when working with Shell command

Posted: Sat Jan 31, 2015 9:24 pm
by SparkOut
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
?

Re: Bug when working with Shell command

Posted: Sun Feb 01, 2015 12:06 am
by labrat
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

Re: Bug when working with Shell command

Posted: Sun Feb 01, 2015 7:58 pm
by jacque
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.