Page 1 of 1

5.0.2 Bug: 'start using stack' fails

Posted: Mon Mar 05, 2012 3:34 am
by pderks
Hello,

I have collated a rather great library (204 handlers, 118 functions, 5410 lines) and put it into the plugins folder within that folder, which LC asks for in its preferences dialog.

If I launch any stack containing 'start using stack "MyLib", LC 5.0.2 asserts: 'stack "MyLib" not found' and stops working.

All earlier versions down to 4.6.1 don't refuse …

Am I the first or perhaps the only victim of this apparition ?

My configuration: Mac Pro • Mac OSX 10.7.3 • LC 5.0.2 (all paid for …)

Regards

Peter

Re: 5.0.2 Bug: 'start using stack' fails

Posted: Mon Mar 05, 2012 10:46 am
by Mark
Hi Peter,

If your stack hasn't been loaded into memory yet, LiveCode won't be able to find it. The first time, you need to use the (relative) path to the stack instead of the filename.

Kind regards,

Mark

Re: 5.0.2 Bug: 'start using stack' fails

Posted: Mon Mar 05, 2012 11:11 am
by pderks
Hi Mark,

I have started some 10 tests, like:
• start using stack "MyLib"
• start using stack (revEnvironmentUserPluginsPath() & "/MyLib")
• start using stack (revEnvironmentUserPluginsPath() & "/MyLib.livecode")
• Development > Plugins > PlugIns settings > MyLib > open plugin • when Revolution starts up
• 'disarming' my plugins and their folder names from my preferred 'exotic' seeming Mac characters
• …
Nothing helped.

I think, there is a bug in LC 5.0.2, unknown in the previous versions.

Kind regards,

Peter

Re: 5.0.2 Bug: 'start using stack' fails

Posted: Mon Mar 05, 2012 11:26 am
by Mark
Hi Peter,

Try this:

Code: Select all

// select your library stack
aswer file "Select the stack..."
if it is not empty then
  start using stack it
  put the result // message box
end if
What happens?

Kind regards,

Mark

Re: 5.0.2 Bug: 'start using stack' fails

Posted: Mon Mar 05, 2012 2:48 pm
by pderks
Hi Mark,

I have put your script into a button with 'mouseUp' handler:

you won't believe it: the message box remains … empty.

Kind regards,

Peter

Re: 5.0.2 Bug: 'start using stack' fails

Posted: Mon Mar 05, 2012 2:58 pm
by Mark
Hi Peter,

If the result is empty, it probable means that the start using command works fine. It is always a good thing to check that all necessary files are actually available. For example:

Code: Select all

put revEnvironmentUserPluginsPath() & "/MyLib.livecode" into myFile
if not (there is a file myFile) then
  beep
  answer error "Can't find file" & cr & myFile
else
  start using stack myFile
  put the result into rslt
  if rslt is not empty then
    beep
    answer error rslt
  end if
end if
See... programming with LiveCode isn't necessary shorter than programming with C++ ;-)

To check that a stack is being used you can execute something like

Code: Select all

if "MyLib" is not among the lines of the stacksInUse then beep
Kind regards,

Mark

Re: 5.0.2 Bug: 'start using stack' fails

Posted: Thu Mar 08, 2012 11:27 pm
by pderks
Hi, Mark,

thank you very much for your answer.

My phrase "you won't believe it: the message box remains … empty." was meant ironical; it lacked the closing: "MyLib is not in use, the handler has failed …"
That was an anticipatory contradiction to your recent statement "If the result is empty, it probable means that the start using command works fine."

In your post you offer a workaround, using even a file check instead of a stack check: "put revEnvironmentUserPluginsPath() & "/MyLib.livecode" into myFile".

That's not in accordance with
• LiveCode's documentation,
• LiveCode's usage in its versions below 5.0.2,
• the user' s just expectation.

Moreover, your workaround is no solution: it ends with a message and means: the users has to start the needed items manually.

I have to insist on my statement "LiveCode 5.0.2 has introduced a new bug".

Kind regards,
Peter

Re: 5.0.2 Bug: 'start using stack' fails

Posted: Thu Mar 08, 2012 11:35 pm
by Mark
Hi Peter,

Rather than solving all your problems, I just showed you how you might try to figure out what is going wrong. I think it is too early to conclude that there is a bug and I encounter no problems when I use the start using command. If I can do it, then you should be able to do it too.

Kind regards,

Mark

Re: 5.0.2 Bug: 'start using stack' fails

Posted: Thu Mar 08, 2012 11:39 pm
by mwieder
Peter-

If "start using" stopped working, the IDE would grind to a halt.
It's working fine for me on all three platforms.
I suggest you try to find the bugs in your library instead.