This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
TheJebForge's profile picture

MultiShell program exit?

Started by TheJebForge, 13 January 2015 - 06:21 PM
TheJebForge #1
Posted 13 January 2015 - 07:21 PM
I'm working on custom multishell (just editing needed lines) and I want to add the X button…
I forgot… How to terminate tab?
InDieTasten #2
Posted 13 January 2015 - 07:33 PM
I'm working on custom multishell (just editing needed lines) and I want to add the X button…
I forgot… How to terminate tab?
Not sure what you mean, but I guess Ctrl + T for one sec would do the job?
TheJebForge #3
Posted 13 January 2015 - 07:38 PM
I mean how to terminate the tab without using the buttons. Do that with code.
Quintuple Agent #4
Posted 13 January 2015 - 07:41 PM
I have never really gotten around to using multishell, but I think you could use shell.exit()
MKlegoman357 #5
Posted 13 January 2015 - 07:46 PM
Just don't resume the coroutines anymore.
TheJebForge #6
Posted 13 January 2015 - 07:48 PM
Ohh! I can just copy the piece of terminate thing! But anyway, multishell does so! Thanks)
TheJebForge #7
Posted 14 January 2015 - 07:40 PM
How can I kill the coroutine. And the state must be dead. Pleasee heelp
MKlegoman357 #8
Posted 14 January 2015 - 07:46 PM
Short answer - you can't. Long answer - the function the coroutine is running must stop by itself, by either ending or erroring. If you are dealing with a ComputerCraft coroutine system (the main event system, like multishell and parallel API) you can just not resume the coroutine anymore. You could tell us what exactly you are trying to achieve so we could give you a better answer.
Edited on 14 January 2015 - 06:46 PM
Lyqyd #9
Posted 14 January 2015 - 07:48 PM
Threads merged. If you control the coroutine manager, you don't need to make the status be dead. Just remove it from the group of coroutines that you resume. If there aren't any other references to it, it will be garbage collected shortly thereafter.

Or you could try tricking it into calling error.
TheJebForge #10
Posted 14 January 2015 - 09:10 PM
I'm making the custom multishell script… And… to make a task manager I must have the stopProgress() function. But stop… I have an idea! I'll tell if that idea will work!
TheJebForge #11
Posted 15 January 2015 - 04:26 PM
Please help… I'm editing the multishell api and how to delete process and passing towards the cullProcess(n)

Ohh never mind ! I have found the error!