Message Box test of script-only library stack

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
jim1001
Posts: 143
Joined: Fri Jan 29, 2016 6:25 pm

Message Box test of script-only library stack

Post by jim1001 » Fri Jul 29, 2016 2:39 pm

Reporting this as a possible bug.

I created a simple function to test using script-only stacks and library stacks:

Code: Select all

function addNumbers x,y
   return x+y
end addNumbers
I saved this on its own in a script-only stack called addNumbers.

If I then perform the following test in the LC IDE:

1. Open addNumbers stack
2. Open the message box & ensure this stack is "current", i.e its name shows on top bar of message box
3. Type

Code: Select all

put addNumbers(x,y)
on the message box command line, replacing x & y with numbers to add

I would expect the result to be shown in message box output area. Instead get
error in function handler
If then in message box I type

Code: Select all

start using stack <path to addNumbers.livecode>
I sometimes (not always) get message
A stack with the same name as the one you are trying to open is already open. What do you want to do with the stack…?
(I think this message needs to be clearer or explained as it’s ambiguous when you see it in full).

I then click Cancel to this, or do nothing if no message appears.

Then retype

Code: Select all

put addNumbers(x,y)
on message box command line.

This time I get the expected answer, the sum of x & y. So there is no error in the function handler as the first error message said and although I clicked Cancel to the second message it seems to have made some change of state allowing the expected result to be returned.

Any feedback welcome.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2695
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Message Box test of script-only library stack

Post by mwieder » Sat Jul 30, 2016 1:00 am

What LC version are you using to test this? This was a problem earlier, but it got fixed along the way.
I just tried this in LC 8.1-dp3 and it's working fine.

Do be aware that the message box has its share of quirks, though.

Good point about the ambiguous error message - I've never liked that one. I never know what the right answer is when that pops up.

jim1001
Posts: 143
Joined: Fri Jan 29, 2016 6:25 pm

Re: Message Box test of script-only library stack

Post by jim1001 » Sat Jul 30, 2016 1:12 pm

mwieder wrote:What LC version are you using to test this? This was a problem earlier, but it got fixed along the way.
I just tried this in LC 8.1-dp3 and it's working fine.
mwieder,

Thanks for checking this. I should have put the LC version - I'm using the latest stable, i.e. 8.01. Great that it's been fixed. It might be an idea for me to try any future bug candidates I find in the latest available version as you've done. Thanks also for the warning about the quirky message box - are the quirks listed together in one place or is it just a case of searching for each when you encounter them?

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2695
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Message Box test of script-only library stack

Post by mwieder » Sun Jul 31, 2016 7:14 pm

Ah no, unfortunately the message just is what it is.
Some of the quirks get fixed and some of them we just live with.
If something doesn't work in the message box I sometimes try the code in a button mouseUp handler and see if it's ok there.

jim1001
Posts: 143
Joined: Fri Jan 29, 2016 6:25 pm

Re: Message Box test of script-only library stack

Post by jim1001 » Fri Aug 05, 2016 3:51 pm

Ah no, unfortunately the message just is what it is.
Some of the quirks get fixed and some of them we just live with.
OK - understood.
If something doesn't work in the message box I sometimes try the code in a button mouseUp handler and see if it's ok there.
Thanks for the tip - much appreciated.

Post Reply

Return to “Bug Triage”