add a new class with code

i wanna add a new class and show it?focus it like codea with code?how to make it?is there a way to read a class with code and not use fileio?

try loadstring

is there any example?

it is not clear what you want to do. Post a concrete example?

@firewolf Not sure what you’re after, but is this close to what you want. Change “Main” to the name of the tab containing the class you want to read.


function setup()
    str=readProjectTab("Main")
    print(str)
end

@dave1707 thanks, this is what i want, and i wanna call and open Codea’s Editor by using code, like Adding a New Project:Main Tab and Adding a New Class Tab, and paste code in tab.

check the documentation: Storage / Project tabs

@Jmv38 thanks, is there a way to call and open Codea’s Editor, show tabs while my app is running?

nope. You can close() codea which brings back to the editor, but the app has stopped running.

if i make a editor or text out code on screen like Codea’s Editor?or Codea’s Editor could be manipulated by lua language?

The Codea editor can’t be manipulated from outside, and if you were going to build your own editor, you definitely wouldn’t use Codea to do it.

So the short answer is no.

@Ignatz You can use saveProjectTab to edit your code…

@SkyTheCoder - that’s not exactly a code editor, though, is it?

@Ignatz It is kinda manipulating the code editor from outside…

He wants to build an editor. That is an incredibly hard job, just ask Simeon.

Codea’s Editor could be manipulated by using code while running?

I don’t believe so

@firewolf You can change your code, nothing else.