Page 4 of 7

Re: Why Script-only stacks?

Posted: Tue Apr 14, 2020 5:04 pm
by richmond62
FourthWorld wrote: Tue Apr 14, 2020 4:53 pm Why do we have three separate threads all discussing the basic mechanics of getting started with SoS?

Should I merge them?
Not such a bad idea. 8)

Re: Finally facing a script-only stack

Posted: Tue Apr 14, 2020 5:06 pm
by bogs
richmond62 wrote: Tue Apr 14, 2020 4:57 pm Funnily enough, my keyboard has only 2 ENTER keys; but as you use the word 'most' you obviously have more.
For a guy whose thing is languages, you certainly come up with some interesting interpretations some times. Even I was able to get that they are talking about the key on the numpad :roll:

Btw foosmaster, you can apply the script just by holding the ctrl. key and hitting the regular enter (not sure if you knew that or not) :wink:

Re: Finally facing a script-only stack

Posted: Tue Apr 14, 2020 5:08 pm
by foosmaster
FourthWorld wrote: Tue Apr 14, 2020 4:52 pm For #2, I'm assuming you're seeing that on Windows, yes?
yes, I am on windows 10, it's dog slow, not feasible to work at all this way - reminds me of the bad days of eclipse some 15 years ago
plus the lack of code complete - and the total confusion of lack of "project/solution' file that contains all relevant stacks really throw me away from the IDE as much as possible

Re: Finally facing a script-only stack

Posted: Tue Apr 14, 2020 5:10 pm
by richmond62
You could, of course, move your development over onto Linux . . .

Re: Stacks scripts only

Posted: Tue Apr 14, 2020 5:12 pm
by foosmaster
no idea, it got there, I deleted it ...
I still get the errors of 'stack already opened'
I have to close and remove from memory before I compile to exe - this gives me 1-3 error messages, otherwise I just kill LC after about 10

Re: Finally facing a script-only stack

Posted: Tue Apr 14, 2020 5:13 pm
by FourthWorld
foosmaster wrote: Tue Apr 14, 2020 5:08 pm
FourthWorld wrote: Tue Apr 14, 2020 4:52 pm For #2, I'm assuming you're seeing that on Windows, yes?
yes, I am on windows 10, it's dog slow, not feasible to work at all this way - reminds me of the bad days of eclipse some 15 years ago
plus the lack of code complete - and the total confusion of lack of "project/solution' file that contains all relevant stacks really throw me away from the IDE as much as possible
The save fix is coming ASAP.

The "project/solution" bit intrigues me: can you describe how it differs from a stack file containing all of the stacks your project uses?

Re: Stacks scripts only

Posted: Tue Apr 14, 2020 5:15 pm
by jacque
My half-baked theory: When LC builds a standalone, it closes the stack, makes a copy, does its work, and reopens the stack. It may be getting confused because the destination for the standalone is on another drive, and after reopening "main" it is opening the copy instead of the original. The copy would have the dialogs and cursors in it, so you're getting duplicate stack errors.

I don't know much about what happens under the hood, but try building the executable on the same drive as the mainstack. Relaunch LC first to be sure nothing is in memory, clean out the extra inclusions, and then do a build.

If that works then there's a reportable bug.

Re: Finally facing a script-only stack

Posted: Tue Apr 14, 2020 5:22 pm
by foosmaster
FourthWorld wrote: Tue Apr 14, 2020 5:13 pm
foosmaster wrote: Tue Apr 14, 2020 5:08 pm
FourthWorld wrote: Tue Apr 14, 2020 4:52 pm For #2, I'm assuming you're seeing that on Windows, yes?
yes, I am on windows 10, it's dog slow, not feasible to work at all this way - reminds me of the bad days of eclipse some 15 years ago
plus the lack of code complete - and the total confusion of lack of "project/solution' file that contains all relevant stacks really throw me away from the IDE as much as possible
The save is coming ASAP.

The "project/solution" bit intrigues me: can you describe how it differs from a stack file containing all of the stacks your project uses?
sure, this is my current state:
stack whist - my main stack that is binary and mostly empty of code (holds images, the GUI and not much more)
stack GuiController - handles events from controls (mouseUp, onOpen) and updating the GUI when an event happens that requires this
stack WsController - holds my web services integration (calling the WS, long polling for events and sending them back to the GuiController)

so .. I have 3 files that are required to build/run my code, whist.livecode, Gui.livecodescript, WSController.livecodescript

in Visual Studio (as an example) I'd have an additional file called whist.sln which holds references to these 3 files.
Eclipse - as another example (if i am not mistaken) has a .project file that does the same

it seems that in LC I have to create these dependency in code - not too bad - except that I get build errors since I put these

Code: Select all

on openStack
   open stack "WsController"
   open stack "GuiController"
   start using "WsController"   
   start using "GuiController"   
end openStack
in my whist.livecode file - I suspect it tries to reopen my already opened stacks and goes crazy, the code resides in drive Z:, building into drive C:, getting this error
a Stack with th same name as the one you are trying to load is already open.
before loading C:/dev/x/whist.livecode, what do you want to do with the stack Z:/dev/x/whist.livecode

Re: Why Script-only stacks?

Posted: Tue Apr 14, 2020 5:23 pm
by foosmaster
you can lock any thread you'd like :)
I am good with that

Re: Finally facing a script-only stack

Posted: Tue Apr 14, 2020 5:31 pm
by richmond62
For a guy whose thing is languages, you certainly come up with some interesting interpretations some times. Even I was able to get that they are talking about the key on the numpad
Just having a dig at the poster's grammar: after 4 hours of online shenanigans with kiddos I normally feel reasonably bitchy. 8)

Re: Stacks scripts only

Posted: Tue Apr 14, 2020 6:22 pm
by bogs
foosmaster wrote: Tue Apr 14, 2020 5:00 pm I can't seem to attach images here, any reason ?
I suppose that would depend on how you are trying to attach them, you are certainly over the 10 post beginning requirement. The easiest way to attach a picture, provided it isn't overly large, is to simply drag it to where you are typing your post. You should see a [+] sign show up, drop the picture, then click 'Place Inline".

Alternately and only slightly more complicated, you can click on "Attachments" below the editor dialog, browse to the picture, and upload it that way.

Just keep in mind, there are size limits using this method, if your pictures are larger than those limits, you can upload them to any free picture hosting site, such as PostImage and the like, get the link to the picture from there, click on the insert image button above the editor, and post the link between the img tags, like this:

Code: Select all

[img]http://myPicture.jpg[/img]

Re: Why Script-only stacks?

Posted: Tue Apr 14, 2020 6:31 pm
by FourthWorld
foosmaster wrote: Tue Apr 14, 2020 5:23 pm you can lock any thread you'd like :)
I am good with that
Thanks, but just as easy to merge them, and it keeps everything in one place with no dead ends - now done.

Re: Why Script-only stacks?

Posted: Wed Apr 15, 2020 5:26 pm
by jacque
I wish there was a way to reload a stack script updated outside LC
Look at the revert command, it just means "reload from disk". I sometimes work on the same stack in two different versions of LC (don't ask, not recommended unless you're very very careful) and when I switch to the other version I type "revert" into the message box and it updates.

Re: Why Script-only stacks?

Posted: Wed Apr 15, 2020 5:27 pm
by Mikey
Ooh. Nifty.
Sounds like a PR to add a synonym, reload...

Re: Why Script-only stacks?

Posted: Wed Apr 15, 2020 5:55 pm
by bogs
That is NEAT! < Tucking that one away in the 'Tips learned from Jacque' file...>