Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Codea 3.4.4 (302) (303)

dave1707dave1707 Mod
edited October 4 in Beta Posts: 9,719

@Simeon The lowered tab name works out OK. I finally downloaded iOS 15.0.1 and the 7 second delay I had with Codea getting to the project list is now down to less than a second. It was less than a second when I put all my projects into a folder, but I didn’t like them there. So I moved them out of the folder and just put up with the 7 second delay. Now it’s back to less than a second so I’ll just leave the projects out of a folder.

Comments

  • SimeonSimeon Admin Mod
    Posts: 5,714

    Thanks @dave1707. Glad the 7 second delay is gone!

    I was worried the status bar in-editor would take up too much vertical space with the software keyboard, but there's no way around the new iPadOS 15 multi-tasking indicator

  • dave1707dave1707 Mod
    Posts: 9,719

    @Simeon Ran into a problem with the editor. Whole sections of code is gone. Well maybe not gone, you just can’t see it. I’m working on a write up as to what I was doing and I’ll post screen shots if it will let me.

  • dave1707dave1707 Mod
    Posts: 9,719

    @Simeon Heres what I was doing.

    I went to the discussion ‘For Loop Problem’. I selected code at the bottom and drug the highlight all the way to the top copying over everything in between so I only had one copy file. I copied that and pasted it into a Codea project.

    I ran the code and the editor highlighted the normal text as an error which it should. I selected the error lines and deleted them. I ran the project again and the next set of normal text was highlighted as errors. I selected them and deleted them. That when the editor started showing the blank lines. I think they were still there, you just couldn’t see them because if I ran the code I didn’t get any errors on the blank lines.

  • dave1707dave1707 Mod
    Posts: 9,719

    @Simeon Here’s something that I’m finding annoying, it’s the undo key. Can the undo key be moved all the way to the left and not allow the autocomplete to overlay it. What’s happening is when I’m doing a lot of undo’s, the autocomplete bar overlays the undo key. I then have to hide the autocomplete and press the undo key. Then the autocomplete comes up again and I have to hide it. Depending on what gets undone, it can be a problem with the autocomplete. Or maybe if the undo key is pressed, don’t show the autocomplete until keying a character.

  • SimeonSimeon Admin Mod
    Posts: 5,714

    @dave1707 I prevent autocomplete from showing after you press undo in the next build, hopefully that will help with the issue

    I tried to reproduce the missing code problem by copying all the posts, pasting them in, and clearing the errors then running the project, but it didn't manifest for me. I might try a few more times.

    I'd love to get this error down to a reproducible form so I can fix it!

  • edited October 4 Posts: 2,493

    @Simeon - noticed an anomaly when I was playing with some assets. I mistakenly , it’s an age thing, put in an asset path for a text file into a sprite and it gave no error. Two sprites were involved - the second one was a genuine image.
    What happpens is that the sprite is displayed twice. Codea obviously just scans it’s list of sprites and uses it twice.

    Code to demonstrate below:

    function setup()
        --
        cW,cH,sW,sH = WIDTH/2,HEIGHT/2,WIDTH,HEIGHT
        pic1 = asset.documents.Galaxies.Galaxy1
        pic2 = asset.documents.Galaxies.galaxy01
    end
    
    function draw()
        -- This sets a dark background color 
        background(40, 40, 50)
        sprite(pic1,cW,cH,sW,sH)
        sprite(pic2,cW,cH,240,240)
    
    end
    

    and


    function setup() -- cW,cH,sW,sH = WIDTH/2,HEIGHT/2,WIDTH,HEIGHT end function draw() -- This sets a dark background color background(40, 40, 50) sprite(asset.documents.Galaxies.Galaxy1,cW,cH,sW,sH) sprite(asset.documents.Galaxies.galaxy01,cW,cH,240,240) end

    Ideally, Codea should check for correct asset type when the selection is made. Also Codea should just display correct asset types in the asset list bar. Also the red error bar doesn’t appear for this.

    My problem arose due to the names being so similar and ones I haven’t used recently. The first file is a csv or txt the second is a png.

    P.s. I’ll supply the files if you can’t find some that demonstrate this.

    Update: in the first code example above , if you put pic1 in for both sprite calls you just get a black screen.

  • dave1707dave1707 Mod
    Posts: 9,719

    @Simeon What it did was copy all the segments starting from the bottom one to the top. That included any regular text that was between the segments. I pasted the whole thing into a project and ran it without removing any of the regular text. The editor would highlight one of the texts as an error and I would select the 3 or 4 lines and delete them. I would run the project again and the editor would highlight the next group as an error. I would select those error lines and delete them.

    So instead of going thru and deleting all the groups of regular text before running the code, I would run the code and delete only one group flagged as an error before running it again. On the second or third group I started getting the blank lines.

    I’ll try copying and running it again to see if it will reproduce.

    Thanks for the undo change in the next release.

  • dave1707dave1707 Mod
    Posts: 9,719

    @Simeon I copied the code again and I was able to reproduce the blank lines. I deleted the project and tried it again and was able to get the blank lines again. So 3 out of 3 times it happened.

    Try this. Instead of highlighting the regular text and deleting it, run the code, highlight the group that has the error, but instead of deleting it, just run the code again. I noticed that sometimes I would highlight then run the code instead of deleting it. So try a mixture, run with highlighted code but not deleted, and then highlight, delete the group, run the code.

  • SimeonSimeon Admin Mod
    Posts: 5,714

    Interesting @dave1707, I tried the same thing (including copying the non-code text, and using the Run button to scroll to it and delete the 3 lines each time before the project would finally run). I will try on a different device now

    @Bri_G good point! There should at least be a run-time error if the asset key is not even a sprite

  • Posts: 1,543

    @Simeon just a compliment on the 303 enhancements—love the undo button fix. I’d just resigned myself to the obstacle, but now rapid-undo on the iPhone is actually possible. And the tooltip change is awesome too. Nite that I haven’t tested them yet, but the very idea of them is great.

  • dave1707dave1707 Mod
    edited October 4 Posts: 9,719

    @Simeon The undo key seems to be working fine. Will see how it goes once I start updating some code and do the undo.

    Still trying to get used to iOS 15.0.1 .

  • dave1707dave1707 Mod
    Posts: 9,719

    @Simeon Tried the copied code on another iPad (iPad Air 4) and I couldn’t get it to mess up. Tried 4 different times and it was fine. The other iPad is currently charging, will try on that one again later and see if I can do it some more. That was an iPad Air 3 in portrait mode.

  • dave1707dave1707 Mod
    Posts: 9,719

    @Simeon Tried the code again on my iPad Air 3 and it happened again. That’s 4 out of 4 times. This time it also crashed so I sent you the crash report.

    Another thing I’m running into is when I try to copy code out of the forum discussion, I highlight the code but when I lift my finger, the drag bars disappear and I can’t drag on anything to select more code. Don’t know if it’s an iOS 15 problem that causing these problems on this iPad.

  • edited October 4 Posts: 2,493
    @dave1707 - selecting the code is a problem I raised before. If you drag down to get the code, usually with the keyboard available, you end up with the bottom selection node just above the keyboard. Lift you finger - you get a flash of the copy paste menu then it's gone. But if you then tap gently in the selection area it re-appears. The best way though is to select from bottom up and then the selection menu appears and is retained until you choose an option.

    Don't know why, when you are making a top down selection, the keyboard is present.
  • dave1707dave1707 Mod
    Posts: 9,719

    @Bri_G If I copy a lot of code, I always go from the bottom, up. But I’m having trouble with those little drag icons. They’re there when I select a range of code, but when I lift my finger, they go away and I’m just left with a highlighted area. I can’t select anything to increase the highlighted area of refine what’s selected.

  • dave1707dave1707 Mod
    Posts: 9,719

    @Simeon Tried to recreate the blank lines problem again, but couldn’t. Not sure what caused it, but I tried several times to pin it down to something specific, but I cant get it to happen.

  • Posts: 2,493

    @dave1707 - ah, just what I experience - but, if you try what I suggested when you are left with a highlighted selection area - gently tap within it and you should see the copy etc menu again. Not a heavy tap !!!

  • dave1707dave1707 Mod
    edited October 4 Posts: 9,719

    @Bri_G I’m not having trouble with the popup menu, it’s the drag icons. I’ll highlight an area, but I want to copy more code farther up the project but I can’t because there’s nothing to tap on and drag the highlighted area up. Are you seeing anything like that.

  • Posts: 2,493

    @dave1707 - only when the keyboard is present and the selection node is in the bottom left corner above the keyboard. I can't seem to select it - massive digits !!!

  • Posts: 2,493

    @Simeon - mentioned this before but I think you may have missed what I meant. When you export a project on the first dialogue box you can see the heading and cancel at the top. Tapping on the middle button (ExportZipped Project) takes you to a second dialogue Project Ready with the Created Project outside and above the dialogue window. If you look at either side there is also two other options in green < Export Project to the left and Done > to the right. The Export Project one encroaches on the Search to filter projects dialogue box. This is in Landscape mode and in Portrait Mode. I have enclosed an image to show this but you need to look carefully to see it.

  • edited October 21 Posts: 2,493

    @Simeon @Dave1707 - I know I’ve mentioned this before but, there seems to be a difference in display with strokeWidth(1) when used with rect() and ellipse(). Try this out with and without noSmooth(). I seem to remember this was an effect with retina screens but - the upper rectangle is just visible and it looks to be less opaque so the background is influencing the colour.


    -- strokewidth() demo function setup() -- sW,sH,cW,cH = WIDTH,HEIGHT,WIDTH/2,HEIGHT/2 end function draw() -- This sets a dark background color background(40, 40, 50) noFill() -- noSmooth() ellipseMode(CENTER) stroke(249, 255, 0) strokeWidth(1) ellipse(cW,cH,700,700) rectMode(CENTER) rect(cW,cH+200,200,100) stroke(255, 0, 50) strokeWidth(2) ellipse(cW,cH,600,600) rectMode(CENTER) rect(cW,cH-200,200,100) end
  • dave1707dave1707 Mod
    Posts: 9,719

    @Bri_G When smooth is in effect, the line is blended with the background so there are no jagged edges. That means that the line doesn’t look as thick or bright. With noSmooth, there is no blending, so the color of the line is it’s full color and width which makes it look thicker and brighter.

  • dave1707dave1707 Mod
    Posts: 9,719

    @Bri_G Here’s an example showing the blending values of a line with smooth and noSmooth. I’m reading the r,g,b values of a cross section across both lines. Even though the color value is 255 for both lines, the left line is blended with the background (0) giving a value of 128 for the outer edges. The right line noSmooth has 255 for each color. So the left line has a light line (128) on each side of the brighter lines (255). If you change the strokeWidth, you see a thicker line, but on the left line, you’ll still have the 128 line on each side. It’s hard to see the 128 part, so the line looks thinner and dimmer. If you take a magnifying glass or loop and look at the left line, you be able to see the 128 parts better.

    viewer.mode=STANDARD
    
    function setup()
        stroke(255)
        strokeWidth(1)
    
        img=image(400,400)   
        setContext(img)
        background(0)
        smooth()
        line(100,0,100,300)   
        noSmooth()
        line(110,0,110,300)
        setContext()
    
        for x=190,230 do
            r,g,b,a=img:rawGet(x,200)
            print(x.." = "..r.." "..g.." "..b)
        end
    end
    
    
    function draw()
        background(0)
        sprite(img,WIDTH/2,HEIGHT/2)
    end
    
  • Posts: 2,493

    @dave1707 - fine, but why is ellipse different .
    ?

  • dave1707dave1707 Mod
    Posts: 9,719

    @Bri_G A strokeWidth(1) for an ellipse creates an edge 6 pixels wide. A strokeWidth(2) creates an edge 8 pixels wide. They both do blending for smooth and noSmooth. I guess they have to do thicker lines to make the ellipse edge look good for the curves for noFill. Probably the same reason why they do blending on both smooth and noSmooth.

  • edited October 30 Posts: 1,543

    @Simeon things seem fine with my iPhone but with my iPad I can no longer send screenshots as beta feedback. I’m using the latest OS. Is this a known issue?

  • dave1707dave1707 Mod
    Posts: 9,719

    @UberGoober What kind of problem are you having when trying to send the screenshots.

  • edited October 30 Posts: 2,493

    @UberGoober - did you save screenshots to the photos folder and then share from there?

  • Posts: 1,543

    I think my Codea instance is somehow disconnected from TestFlight.

    Codea installs and updates from TestFlight, but TestFlight no longer automatically asks if I want to add details to crash reports, and as noted the “share as feedback” button is gone from the share menu on screenshots.

    @dave1707 various problems, I think the first time was when the ‘find’ panel wasn’t finding text that was clearly there, visible to the left of it.

  • Posts: 1,543

    Lost a bunch of code again. Cursor jumps to the top of a page (not sure which one) and tons of stuff is gone.

  • Posts: 2,493

    @Simeon @John - still getting these coloured ‘search buttons’ spread around the tabs in code after a search. Pic attached shows setting up a cH search/replace after a cW search/replace. Look top left for search criteria and bottom left for issue.

  • Posts: 1,543

    Searach/Replace is so buggy that I always close and re-open my project after using it, fwiw.

  • Posts: 2,493

    @Simeon - ignore the crash report text - the file I tried to load as a readImage() was a CSV file.

  • edited November 16 Posts: 2,493
    @Simeon - on the above I have been combining a number of files into one asset folder for a project. This included graphic images as png's, text as CSV all with similar names (I know stupid thing to do) but I came across an oddity. Some of th graphics were present as image01.png and image01@2x.png, ie twice the size of 1024x768. When I addressed the standard resolution I got an image which was twice the size of the screen and centred above the screen leaving a blank border at the bottom. I also included a print statement which cam back with details of the image size - odd. Is this expected behaviour, does Codea by default use the higher graphics res ? and why do I get a print of the image stats?

    I need to play around with this a little more as it could be another feature that I am missin. I'll try to set up a simple example and post it.

    Edit: struggling with getting the demo to show graphics incorrectly, will post when I figure out what issue is. The print(img) does consistently print the image details (see pic) I assume this expected behaviour?
  • dave1707dave1707 Mod
    edited November 16 Posts: 9,719

    @Bri_G The print(img) has been around forever. It gives the regular and retina image sizes. The regular if you want to use whole pixel and raw if you want to use 1/2 pixel.

    PS. The support for 1/2 pixel (raw) was added back in Codea 1.3.5 on March 20 2012.

  • Posts: 2,493
    @dave1707 - thanks for that. I was not aware of that is it documented anywhere?
  • dave1707dave1707 Mod
    Posts: 9,719

    @Bri_G See the addition I made to my above post. I don’t think there’s any info other than what you’ll find if you search on rawGet or rawSet.

  • edited November 16 Posts: 2,493
    #dave1707 - wow that was quick. Did you just search for that on the forum or is it detailed in the version updates?
  • dave1707dave1707 Mod
    Posts: 9,719

    @Bri_G I did a forum search. If you look in the Codea Roadmap at the top of the discussion list, you can find it there for version 1.3.5 .

  • Posts: 1,543

    Just had the code-resetting bug. Lost code again. It’s so bad. Seemed like it might have had something to do with hitting undo. Maybe hitting undo in a tab that was just created?

Sign In or Register to comment.