Editing code inside your project

I did a forum search about editing code inside your project and I found some code that does. But it it’s just a parameter .text

function setup()
    print("Hello World!")
    parameter.text("editCode",
readProjectTab("Main"))

end

function draw()
    background(40, 40, 100)
    strokeWidth()

    saveProjectTab("Main", editCode)
    mainTab = readProjectTab("Main")
end


function draw()

rect(100,100,100,100)
    text(editCode,WIDTH/2,HEIGHT/2)
end

Does anyone know how to make it so you can edit your code inside your project?

You can edit and save code, but as I remember, you have to restart to get the new code to run.

@Ignatz yeah I know wen you edit the code you have restart it for the new code to work. I just wanna know if anyone knows how to edit the code inside your project

It’s right there above

code=readProjectTab("Main")
--edit the code, then
saveProjectTab("Main", code)

@Ignatz

Hmmm. Progress. Idk what’s wrong


code=readProjectTab("Main")
--edit the code, then
saveProjectTab("Main", code)
function draw()

    end

function touched(touch)
    --Show keyboard when the screen is touched
    showKeyboard()
end

function draw()
    background(40,40,50)
    fill(255)
    textMode(CORNER)
    buffer = keyboardBuffer()
    
    _,bufferHeight = textSize(buffer)
    
    if buffer then
        text( buffer/text(code,WIDTH/2,HEIGHT/2), 10, HEIGHT - 30 - bufferHeight )
    end
end