Page 1 of 1

Using code hint help for fullScreenMode in Stack ??

Posted: Wed Feb 20, 2019 12:34 am
by ValiantCuriosity
Hmmm,

This is a little interesting. When I use the code help in the code editor, I begin typing as usual and the box opens up:
fullScreenMode.png
I select it using the arrow down and then tab as was instructed.

So my code looks like this:
FullScreenModeError.png
FullScreenModeError.png (3.55 KiB) Viewed 2969 times
This causes the debugger to throw a little tantrum. "Danger Will Robinson" RED circle with X If I add "this" to the code, the debugger is happy again. Is the error in the help or is it that the help assumes I'm smarter than I am? (probably)

The script looks like this when the debugger is happy:

Code: Select all

on preOpenStack
   set the fullscreenmode of this stack to "showAll"
end preOpenStack
-Rachel

Re: Using code hint help for fullScreenMode in Stack ??

Posted: Wed Feb 20, 2019 8:58 am
by SparkOut
You need to give a proper reference to any object.

"This stack" is a full reference because LiveCode will identify the context.

When you start out a reference by the object type, LiveCode will be expecting you to specify the object name (or id) as well, because otherwise how would it know which object to get/set the property?

So you need to

Code: Select all

set the fullScreenMode of stack "myStack" to "exact fit"
etc. The autocomplete can only predict what keywords you are dealing with in the editor, but it can't imagine what name of the object to provide.

It might be more helpful if the autocomplete suggestion included a set of quotes, indicating that you need to fill in the name.

Re: Using code hint help for fullScreenMode in Stack ??

Posted: Wed Feb 20, 2019 6:14 pm
by jacque
This causes the debugger to throw a little tantrum.
This made me laugh. I never thought of it that way. :)

Re: Using code hint help for fullScreenMode in Stack ??

Posted: Thu Feb 21, 2019 11:44 pm
by ValiantCuriosity
Jacque,

If you programed like I do, you'd be VERY familiar with debugger tantrums. :mrgreen:

Smiles,
-Rachel