Hide or lock a tab

Is there any way to hide or lock a project tab ?
I am trying to let a user add new classes in the Codea enviroment based on a frame but prevent them from messing with the general logic in the setup() and draw()

Re Peter

@macflyerdk - nope, the best you can do is maybe get them to set your project up separately, then create a new project and set a reference to your project. Then they can use it but not edit it.

NB if you do this, be aware that the user will have access to everything except code in your Main tab. That is excluded from referencing.

Locking a tab? No. But not messing with other classes? Yes. Here is how i do it:
Instead of:

-- tab1
myclass =class()
....
-- tab2
myclass =class()
....
-- main
myObject = myclass()

i do

-- tab1
Local myclass =class()
Mydata.tab1 = myClass
....
-- tab2
Local myclass =class()
Mydata.tab2 = myClass
....
-- main
If mycondition then myclass = Mydata.tab1 else myclass = Mydata.tab2 end
myObject = myclass()

Make sure you define everything as local in each tab. If you do that it is equivalent to ‘locking’ the tab, because nothing come out of it. Very useful in general.

Thanks, I will look ino the last suggestion.
Another option is to put my code on a server and then download it at run time.
However I may want to make a general app and submit to the app store and I fear that it will be rejected if there is a posibility to run code remotely.
…Came to think again, maybe just save the code locally and read it in.

In the same context. How can I load a txt file from My Dropbox folder. Images no problem but txt (code) ?

Re Peter

On the subject of tabs, my project has now been split into tabs as it’s getting long and tabs make it easier to follow but is there an easy way to paste your code from all the tabs?

Like when posting code here, or do you have to go from tab to tab copy/pasting?

@Tyson, long press on your project and you’ll get an option to copy it.

@Tyson - long press on the icon of your project, not the code itself

When pasting back into Codea, press and hold on the new project button until you get"paste into new project". That will restore all the tabs.

Thanks a lot

@Macflyerdk You could always store your protected data in the documents folder and loadstring it at runtime to keep it away from the user.