Codea 3.7 (369)

@Bri_G

If you go into the Utility tab and tap Edit (upper left of screen) and select Format Code, you’ll see that your missing an end statement for the first function drawTable(). If you add the end statement and then reformat the code again, there will be a double end at the bottom above the function showNumber(). Remove one of them. The code should run OK.

I have to fix the 2 readImage statements because I don’t have those assets.

Looking at the errors that were showing, you would never know that was the problem.

I always do the Format Code because that’s an easy way to find format errors.

@dave1707 - sheeesh, thanks a lot for that. I ran into a problem with analysis on it and ended up adding code in several functions and remming out lines to simplify. Doesn’t help when I can only get small packets of time for coding - leaving incomplete sections.

I still can’t understand why the errors are flagged up on the Main tab not the Utils tab. Also the errors do not reflect the real issue. I tend to format code locally, internally per function, rather than per tab. That’s another tool for my armoury.

Thanks again.

there’s another curious bug i’ve ran into and finally got recorded,

basically you have to select “nothing” somehow by moving the selection cursors, and then any keyboard action will crash

@skar @sim - just sent a report in about a crash whilst trying to cut and paste characters from and into the same tab. Not sure on exact conditions, but I also have found placing the cut cursors difficult recently. I think it may because you have a zoom area above the cursor to aid placing the cursor properly. That can sometimes confuse the issue when placing the left hand cursor.

p.s. remember working on a 10" iPad by touch obscures quite a lot when copying.

Codea version 3.7 (369)

@sim Not sure how to test this change.

If I have 2 editors open and do a run in new window from the left editor, the running code is in the right window. If I do a run in new window from the right editor, the running code is also in the right window. I thought it would show in the left window. So I can’t make any live changes to code run in new window from an editor running code from the right window.

Again, not sure about the last change.

1 Like

The way to do it is to open a project in a new window for editing. Make that window full screen (tap the three dots at the top) then run that project in a new window

This results in three Codea windows — the project browser, the editor, and the viewer. This update allows the editor and viewer to be connected in this configuration where it didn’t before

@sim Apparently I can’t follow directions very well because no matter what I try, I can’t get 3 windows to show. If anyone gets this to work, give me step by step instructions.

Don’t know if this is how the 3 windows are supposed to work, but this is the only way I can get 3 windows.

open Codea.
at the project list screen, tap on the 3 dots at the top of screen.
select Slide Over.
open Codea again.
select a project to run in that window.
select a project to run in the slide over window.
the slide over window can be moved off the screen.
run each project in a new window.
only one project at a time will show its running window.
move the slide over window wherever you need it.
there will be 3 windows open.

You can’t get three windows to show simultaneously. Except by doing the 2 + slide over. But you can get an “editor only” window side by side with a “viewer only” window, which is the situation that was fixed in the last build

@dave1707 - tried your demo description and got it to run as you described. @sim - is there any way to increase the size of the slide over window as the output and editing area is a bit limited.

As it stands I think this could be great for running some kind of interactive debugger, or possibly as a repository of controls for the main project as an alternative to the parameters in the toolbar window.

@dave1707 - first time I ran your demo, got part way through with it and needed to re-read your script. Ended up with the browser in as the main window of the background. Closed it and re-opened the Codea project. After a little play, like the way you can move the slide over window off-screen then back on by dragging, closed the project and shortly after Codea crashed.

@sim - started filling out the crash report but didn’t complete as I started searching through the website to check my actions. Sorry if you got an incomplete report.

1 Like

@sim I’ve been testing using two windows for Codea for the past few days. Awesome work! This will probably make me like twice as productive as I don’t have to constantly restart the project for small changes. Unfortunately, I’ve experienced quite a few crashes and sent them as bug reports. I’ve been using Stage Manager, but most of the time one Codea-window was taking up the entire screen. I’ve experienced most crashes when returning to the home screen or when switching to other apps. Many crashes occurred when one of the Codea instances had the Shader Lab open, though I’m unsure if that was just a coincidence.

@dave1707 Using Stage Manager, I think I had 3 windows of Codea open at the same time. Haven’t tried more than that, though.

@sim @john @dave1707 - I’m still seeing multiple error reports when coding in 369. They generally refer to a common error, like the use of a undeclared variable. But, after correction the first error disappeared leaving two other errors visible. Also in one instance the wrong variable was disclosed as it was properly declared - however it was being multiplied by the undeclared variable. The project, with these error bars visible, still ran OK after the variable error was corrected.

I recorded a video which I’m trying to put on YouTube.

Thank you for sending the bug reports! Looking through your crashes this morning

Thank you for the video, I can see that it’s an issue. I wonder if we can find a simple reproduction case, that would help debug it

@sim I don’t know if this is what you’re after.

Run the below code then return to the editor.
The v1= and the v3= lines should show errors.

Uncomment the v2= line, run the code then return to the editor.
The v1= line still shows an error.

While in the editor, add the line x=1 below the v3= line.
The end line now shows an error.
Run the code then return to the editor. The 2 errors are still there but everything should be OK.

function setup()
    --v2=1
    v1=v2*5
end

function draw()
    v3=v2+6 
end
1 Like

Perfect. Thank you for the sample

@dave1707 @sim - just got up this morning and seen your replies. I’ll try out your demo and see if there is anything I can add.

It looks to me like the issue that generates the error is pursued through the code if there is any duplication of the error. When corrected the first error disappears but the others are retained. Closing the project removes the error bars.

@dave1707 - followed your code and instructions, I just ended up with one error line on the
v1=v2*5 line. It does demonstrate the error issue. I saw multiple errors as I used the flawed variable across several tabs and functions.

function test()
print(“test”)
end

function setup()
print(cnt)
Val = 2
print(table.concat(tab))
test()
print(tab[6])
end

cnt=88
tab={1,2,3,4,5, 6*val}