Codea 3.0 (184)

@Simeon New editor: Dependencies don’t stay selected when a project is closed and re-opened.

@dave1707 just fixed it in the latest build. Thank you for the report

@Simeon New editor: Dependencies now stay selected in build (174).

@Simeon New editor: Is this supposed to happen. If I long press the space bar, the letters on the keyboard disappear and if I slide my finger I can move the cursor around the screen.

@Simeon Old editor: The eye and magnifying glass keys on the keyboard don’t work.

@dave1707 yes, long pressing the space bar is a shortcut to cursor dragging (that’s built into iOS now so I removed the dedicated buttons for it from the accessory strip)

Damn! I broke the old buttons, thank you for finding that

@Simeon I exported my project to Xcode using the newest beta (174). I saw that the frameworks folder is empty except for a libversion file. Thought, I should point that out, just in case it wasn’t intentional. Sorry for constantly commenting about Xcode.

@Simeon - just loaded 174 and loaded new editor, loaded my recent project and ran - bombed out of Codea. Re-loaded Codea and project then ran again - ran OK this time ???

Tried another project, an asteroid demo that I ha uploaded from an old post, and Codea bombed again. Will post a link once I find the Asteroid demo source again.

Edit: demo was by @drablos code at https://pastebin.com/uTcXchab not sure why it crashes - don’t have the tools to detect.

@Simeon New editor: While in the editor, if you double tap a word, a pop up shows with options to select something. If you select Reference, nothing happens. I’m starting to get used to the new editor, but I find myself still touching the screen in spots for the old editor commands.

@Simeon New editor: Even though a project has an error (qwerty), it still runs, kind of, without a warning. Run the code below.

PS. If the error is farther down or in another tab, you might not realize there’s an error and wonder why you code isn’t working.

function setup()
    print("Hello World!")
end

function draw()
    background(40, 40, 50)
    strokeWidth(5)

    qwerty    

end

@dave1707 highlighting tabs which have errors (and scrolling to the errors) is the last feature I need to get in to reach parity with the old editor. I’ll look at the reference issue too

@Bri_G thank you for the report, will test

@exomut no that’s fine. Thank you for the report. The library folder will be empty until you first build, which triggers a build script to download the required libraries

@Simeon, @dave1707 - hmmm, interesting. New editor, placed qwerty in a long routine, way down so not visible when cursor at top of tab, in a multi tab project. The editor fired up the error - no problem. Ran as you say sorta.

But, you can not see the tab error in the list of tabs - so when you load the project, including the error, then you don’t get the tab error feedback. Worse when you run the project it runs and fires out some spurious errors. When checking the tab where your error is - it is no longer displayed with the slide out error banner to the right. Suggests the code is not checked for errors when the project loads.

@Bri_G yes I’m working on error handling tonight, I’m going to have it highlight the tabs with errors even before you hit the play button. And scroll to errors when you visit those tabs.

I’ve fixed the issue with the legacy code editor keyboard not working. Once the new code editor is up to parity I’m going to switch it over as the default and leave the legacy one as an option for a little while.

@Simeon - thanks for the update, ran into another problem - the search button on the old keyboard stopped working - get no response to tapping it.

Also, I raised a question a while ago, can’t remember the feedback. On occasions I have run a project and it fired up errors - but it still responded to touches on the screen - printing out touch responses, which suggests that the project is still running in the background. Is that the case? When you stop the project and drop back to the editor is the closed down runtime actually closed and the memory clear?

@Simeon - can’t find any details on print() in the reference section looking to find how to print with consecutive lines and without spacing lines.

Other thing, not obvious when you want to search reference section, from new editor. Needs the reference window pulling down - any chance of a prompt near the top?

@Bri_G If I want to print a bunch of text without the blank lines in between them, I put the text in a table then do a print(table.concat(tableName,"
")) at the end of whatever.
It still would be nice if the print statement didn’t add the extra blank line.

@dave1707 - thanks for the info, picked up on that from a search. I always struggle with tables, I start off thinking I know them and always end up in a mess. But - it prompted me to search through some old code and I found out how to do it - manually concatenating a string with a “
” after each entry using the string joining … then just print the string. Worked for me on a 3D model reader. Thanks for the prompt.

Though thinking about it “
” is a new line I think “\r” is carriage return and may get round the problem. Another tangential trial to divert me from my current project.

@dave1707 - it looks like the print() statement includes a new line in the routine. So think I know how to manage this now.

All - does anyone know if you set up an table of vectors, in which the x and y values are calculated by formula, does the table instance store the formula or the value calculated when initially defined?

@Bri_G Not sure if I understand your question. You put vec2(x,y) in a table. Both x and y are calculated values. See this example for half a circle. I also print the values.

function setup()
    tab={}
    for x=-200,200 do
        y=math.sqrt(200^2-x^2)
        table.insert(tab,vec2(x,y))
        print(tab[x+201])
    end
end

function draw()
    background(40, 40, 50)
    fill(255)
    for a,b in pairs(tab) do
        ellipse(b.x+WIDTH/2,b.y+HEIGHT/2,2)
    end
end