What is the mode of the "Code Editor" stack?

LiveCode Builder is a language for extending LiveCode's capabilities, creating new object types as Widgets, and libraries that access lower-level APIs in OSes, applications, and DLLs.

Moderators: LCMark, LCfraser

gg12
Posts: 6
Joined: Mon May 02, 2022 1:49 am

What is the mode of the "Code Editor" stack?

Post by gg12 » Fri Jul 22, 2022 3:14 pm

Hi,
I'm trying to find the mode property of internal livecode app stacks.
What mode would "Code Editor" be in? (And others, if you know it.)
I want to do some actions to stacks that have that specific mode.

The mode is an integer between 0 and 14.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: What is the mode of the "Code Editor" stack?

Post by richmond62 » Fri Jul 22, 2022 3:33 pm

The mode is an integer between 0 and 14.
No, it is not: it is an integer between 0 and 13.

To find out the mode of a stack is extremely easy:
-
SShot 2022-07-22 at 17.33.15.png
SShot 2022-07-22 at 17.33.15.png (38.87 KiB) Viewed 5771 times
-
However, after a longish search I cannot find a stack called Code Editor anywhere.

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: What is the mode of the "Code Editor" stack?

Post by Klaus » Fri Jul 22, 2022 4:32 pm

The mode of stack "revNewScriptEditor X" = 1
Where X stands for the number of open script editor windows.
richmond62 wrote:
Fri Jul 22, 2022 3:33 pm
However, after a longish search I cannot find a stack called Code Editor anywhere.
Really? :shock:
Oh, come on, code = script, and that's more than ovious!

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: What is the mode of the "Code Editor" stack?

Post by richmond62 » Fri Jul 22, 2022 4:45 pm

Well, it wasn't "ovious" to me. 8)
-
egg.jpg
Ovious
egg.jpg (18.27 KiB) Viewed 5748 times
-
And IFF gg12 (with a posting total of 3) has been digging around inside the IDE they would know
that the stack you suppose they refer to was called revNewScriptEditor.
-
SShot 2022-07-22 at 18.43.34.png
SShot 2022-07-22 at 18.43.34.png (15.68 KiB) Viewed 5750 times
-
SShot 2022-07-22 at 18.44.55.png

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: What is the mode of the "Code Editor" stack?

Post by Klaus » Fri Jul 22, 2022 5:05 pm

What the EGG? :D

Hint:
I I do not know the name of a stack, I usually use the message box, enter this string,
hit ENTER and move the cursor over the stack in question.

Code: Select all

wait 2 secs;put the name of the mousestack
So I see -> revNewScriptEditor 1
I opened a script editor window first, of course!
And its mode is now 1, since it is open.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: What is the mode of the "Code Editor" stack?

Post by richmond62 » Fri Jul 22, 2022 5:07 pm

The original OP has to be aware that modes are not fixed things, but,
as you stated, Klaus, change according to circumstance.

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: What is the mode of the "Code Editor" stack?

Post by stam » Fri Jul 22, 2022 6:56 pm

Live and learn... Stack 'modes' had passed me by somehow - looking this up in the dictionary was very enlightening!
As far as i can tell, this seems to be a read-only property?

Nevertheless, looking for certain stacks with certain modes (eg mode 0) will greatly simplify some of the tasks i'm coding... very timely!

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: What is the mode of the "Code Editor" stack?

Post by richmond62 » Fri Jul 22, 2022 7:41 pm

Oh, I am such a screaming genius the first time I learnt about modes in LiveCode was this afternoon when I read the start of this thread. :lol:

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7229
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: What is the mode of the "Code Editor" stack?

Post by jacque » Sat Jul 23, 2022 6:02 pm

Klaus wrote:
Fri Jul 22, 2022 5:05 pm
I I do not know the name of a stack, I usually use the message box, enter this string,
hit ENTER and move the cursor over the stack in question.

Code: Select all

wait 2 secs;put the name of the mousestack
I'm too impatient to wait 2 seconds. :) I enter the same thing in the message box but don't hit the return key. Then I move the mouse over the stack, and then hit return.

I do the same thing using the mouseControl which let's me keep pointing at different controls to see their properties.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

gg12
Posts: 6
Joined: Mon May 02, 2022 1:49 am

Re: What is the mode of the "Code Editor" stack?

Post by gg12 » Fri Jul 29, 2022 12:43 pm

Thanks for your answers :lol:
In my version of Livecode it said 0 to 14 in the dictionary, even if I thought it was 0 to 13 :oops:
It was nice seeing you discuss, great day

gg

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: What is the mode of the "Code Editor" stack?

Post by richmond62 » Fri Jul 29, 2022 3:09 pm

In my version of Livecode it said 0 to 14 in the dictionary
Yes, I apologise, you are quite right:
-
SShot 2022-07-29 at 17.07.16.png
-
What is ODD though, is that the Dictionary does NOT describe what mode 14 is:
-
SShot 2022-07-29 at 17.07.37.png

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: What is the mode of the "Code Editor" stack?

Post by richmond62 » Fri Jul 29, 2022 3:12 pm

So, err, I thought I would be clever and try this:
-
SShot 2022-07-29 at 17.10.59.png
-
Which did no good at all, so, just to check I tried this:
-
SShot 2022-07-29 at 17.10.48.png
-
Which was not very helpful either.

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: What is the mode of the "Code Editor" stack?

Post by Klaus » Fri Jul 29, 2022 3:18 pm

Well, take a look at the screenshot of the dictionary you posted!
This property is read-only and cannot be set.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: What is the mode of the "Code Editor" stack?

Post by richmond62 » Fri Jul 29, 2022 3:21 pm

You are actually expecting someone to read everything in this day-and-age? Come on! 8)

AND, more importantly, why does the Dictionary say '14' and then indicate to people who
read slightly more that the truth is '13'?

Also, as Granddad said, "You can always ask." So, I did. :)

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9823
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: What is the mode of the "Code Editor" stack?

Post by FourthWorld » Fri Jul 29, 2022 4:19 pm

stam wrote:
Fri Jul 22, 2022 6:56 pm
Live and learn... Stack 'modes' had passed me by somehow - looking this up in the dictionary was very enlightening!
As far as i can tell, this seems to be a read-only property?

Nevertheless, looking for certain stacks with certain modes (eg mode 0) will greatly simplify some of the tasks i'm coding... very timely!
The mode property specifically is indeed read-only, but it is under the control of the scripter though the style property, and various commands that determine mode including ask, answer, sheet, palette, modeless, and others.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “LiveCode Builder”