Primary Level Educational version

All flavors welcome.
Forum rules
Be kind.
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Primary Level Educational version

Post by OpenXTalkPaul »

Setting the defaultStack is needed when you are using commands that act on behalf of the IDE user from scripts in one 'regular' stack editing into another stack. However, a stack in 'palette' mode behaves differently than a stack that is 'topLevel'. A palette mode stack doesn't become the topStack.

There's also other ways to the same sort of things, like using the 'long IDs' to refer to script objects in your copying/importing/etc. scripts.
User avatar
richmond62
Posts: 2767
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Primary Level Educational version

Post by richmond62 »

What is MORE important is that EVERY button on all the palettes need to check for the presence of a stack, as Sunny Jim may be such a 'prawn' that he hasn't, initially, made a stack; and, if Sunny Jim hasn't made a stack flash up something that says something like this:

"You Thumping Great Prawn! You need to make a stack first."

Or, even something that is a bit kinder. 8-)

My "slight problem" is that with a test stack called "Nonsense":

Code: Select all

on mouseUp
   palette "Nonsense"
   put the short name of the topStack into STAKK
   if STAKK is empty then
      put "Utter Cack!"
   else
      put STAKK
   end if
   wait 5 seconds
   topLevel "Nonsense"
end mouseUp
If there is NO topStack it does NOT return 'Utter Cack' to the messageBox: which is NOT good.
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2767
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Primary Level Educational version

Post by richmond62 »

Wow: serious distraction! https://www.superchess.nl/indexengels.htm
-
sChess.jpg
sChess.jpg (88.83 KiB) Viewed 1259 times
https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Primary Level Educational version

Post by OpenXTalkPaul »

richmond62 wrote: Thu Jan 18, 2024 10:19 am If there is NO topStack it does NOT return 'Utter Cack' to the messageBox: which is NOT good.
AFAIK, there is always a topStack, if no other stacks are open then topStack is the revMenuBar stack.

You can get a list of open stacks using 'the stacks' (filenames) or the openStacks (short names), there is also 'the mainStacks' which will list EVERY stack file including all the IDE stacks...
OR you could use the IDE's ideUserMainStacks() that won't include IDE stacks in the list, or revLoadedStacks() which would include any substacks too, and there's also ideMainStacks() which returns mainstacks in memory and takes into account the "Show IDE Stacks" preference.
User avatar
tperry2x
Posts: 1534
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Primary Level Educational version

Post by tperry2x »

loads of ways of doing the same thing :D
FourthWorld
Posts: 280
Joined: Sat Sep 11, 2021 4:37 pm
Contact:

Re: Primary Level Educational version

Post by FourthWorld »

Paul's got it. The topStack is the top-most stack of the lowest mode number. The engine always needs at least one stack open to remain running, so there is always a topStack.
User avatar
tperry2x
Posts: 1534
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Primary Level Educational version

Post by tperry2x »

richmond62 wrote: Thu Jan 18, 2024 10:19 am If there is NO topStack...
I know this has been discussed already, and what Paul said is 100% right. I just wanted to add:
I was poking around in revIDELibrary and found this nugget:

Code: Select all

/*
Opens an IDE stack as a palette. In the future this should be changed so that
palettes can decide what mode they ought to be opened in, i.e. this logic should
be removed from the IDE library and be specific to the stack rather than the 
palette name.

pPaletteName (String):The readable name of the palette to be opened
example: revIDEOpenPalette "inspector"
*/
So, I was wondering (if that even works, or if it's just something left in as a 'to-do'), if you were to use

Code: Select all

revIDEOpenPalette "newTools"
Will that do what you want with your tools palette, leaving the other stacks selectable?
You'll have to have a play.
User avatar
richmond62
Posts: 2767
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Primary Level Educational version

Post by richmond62 »

All the subStacks of the newTools stack already open as palettes, as does newTools itself: that was NOT the problem: the problem was that IF there was no stack open the image import routine bunged it into a palette.

This has already been sorted out.

Thanks.
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2767
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Primary Level Educational version

Post by richmond62 »

Tangentially . . . this

https://blogs.kcl.ac.uk/proged/joc/

is quite a good model for anyone wanting to get a 'thing' for Primary children going.
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2767
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Primary Level Educational version

Post by richmond62 »

Much improved image import facility with all sorts of "twiddles":
-
Screenshot 2024-01-24 at 18.08.03.png
Screenshot 2024-01-24 at 18.08.03.png (483.58 KiB) Viewed 970 times
Attachments
newTools.livecode.zip
(389.98 KiB) Downloaded 81 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2767
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Primary Level Educational version

Post by richmond62 »

Still quite a number of "hiccups" to iron out though.

I am wondering about (like HyperCard) implementing autosave.

I have had far, far too many 9 and 10 year olds in tears because their work went "down the tubes."
https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Primary Level Educational version

Post by OpenXTalkPaul »

richmond62 wrote: Wed Jan 24, 2024 4:22 pm Still quite a number of "hiccups" to iron out though.

I am wondering about (like HyperCard) implementing autosave.

I have had far, far too many 9 and 10 year olds in tears because their work went "down the tubes."
I have an add-on for autosave I picked up somewhere ( from livecodeshare site I think). I'll upload it later so you can take a look at how they set that up. Like everything else I'm sure there's different ways to approach the problem. I've lost work like that but personally I'm more likely to overwrite good scripts with untested bad scripts due to my habit of hitting cmd-S saving often. I sometimes will make a back up (renamed.bak or.old) before I start a scripting session on an existing script, that way I can look back and compare to try to see where changes broke something (Git can do this sort of stuff). I would want an auto-save that makes back up copies when it saves.
User avatar
richmond62
Posts: 2767
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Primary Level Educational version

Post by richmond62 »

At the moment the main problems with my interface are these:

1. A new stack is ALWAYS called 'My Stack', which, apart from the way it makes my guts churn thinking about Windows 95 and 'My Computer', is ludicrous as the thing should be used to produce several stacks that will not interfere with eachother.

2. There is a similar problem with BUTTONS and IMAGES.

#1 & #2 can be easily rectified: it is just very tedious.

3. There needs to be a type of AUTOSAVE implemented: possibly with multiple saves with time-stamps, where all but the last save would be deleted when the IDE is exited.

Should be glad of comments re #3.
https://richmondmathewson.owlstown.net/
User avatar
overclockedmind
Posts: 300
Joined: Sat Apr 30, 2022 9:05 pm
Location: Midwest US
Contact:

Re: Primary Level Educational version

Post by overclockedmind »

I find it great to see this. HyperCard was my intro to programming... but if I find the time for it...

I'll be using OXT *and* learning C, C++ probably. I'm tired of not just flat-out being able to say in some language, "DO THIS."

Of course, I also understand I'll be looking at... well a code editor. lol

Can a studious person actually learn C with sufficient willpower and Internet access?
MBA (Early 2015, 8GB/512G SSD, Monterey 12.7.2)
System76 serv12 (64GB RAM, 2TB SSD, 2TB HD, Win 10 Pro x64)
Power Mac 3,1 Project - Needs TLC will get it soon
Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests