Howdy, Stranger!

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

Codea 3.3 (262)

dave1707dave1707 Mod
edited March 24 in Beta Posts: 9,079

Skinny error message fixed.

Codea didn’t crash when pasting.

Autocomplete using documents was fast.

Code doesn’t scroll down when run with an error.

Didn’t have external keyboard so I couldn’t test autocomplete with arrow keys.

Comments

  • dave1707dave1707 Mod
    Posts: 9,079

    @Simeon Using the below code.

    If I try to place the cursor inside of qwertyuiop, it either goes to the beginning or end of qwertyuiop.

    If I try to place the cursor inside 10000000, it either goes to the beginning of 10000000 or the end of 20000000.

    If I try to place the cursor to the left of ) on the top text line, the cursor moves all the way down to the next text line.

    On the old editor, the cursor was placed where I touched the screen.

    function setup()
    
    end
    
    function draw()
        text("qwertyuiop",10000000,20000000)
    
    
    
    
    
    
    
        text("asdfghjkl",xPosition,yPosition)
    end
    
  • Posts: 56

    @dave1707, I have run into this on other apps e.g. Google Browser, as a workaround I press and hold the space bar and drag moving the cursor exactly where I want it.

  • dave1707dave1707 Mod
    Posts: 9,079

    @krdavis Dragging the cursor is what I have to do now. But on my other iPad that doesn’t have the latest update, the cursor is placed exactly where I touch the screen.

  • SimeonSimeon Admin Mod
    Posts: 5,580

    @dave1707 @krdavis I've put it on the list to see if I can improve the behaviour

  • dave1707dave1707 Mod
    edited March 16 Posts: 9,079

    @Simeon version (261) Tried the new cursor placement. Noticed that the cursor is 1 or 2 lines above where I touch. That’s perfectly fine with me because it allows me to slide the cursor exactly where I want it without my finger getting in the way.

    PS. If I tap the screen, the cursor goes where I tapped. If I long press, the cursor is above where I press and then I can drag it to where I want.

    I find that perfect for what I do.

  • dave1707dave1707 Mod
    edited March 16 Posts: 9,079

    @Simeon One thing I’m still having trouble with is pasting something in a line of code after I copied something. If I select something and tap copy from the popup, I should get a popup that allows me to paste when I place the cursor.

    PS. I can paste if its a new line, but not within a line of code.

  • Posts: 609

    @Simeon i have same problem as @dave1707 when trying to paste in some copied text.

    I also observe that the onscreen keyboard pops up even though i use an external keyboard-very annoying!

  • SimeonSimeon Admin Mod
    Posts: 5,580

    @dave1707 On tap the cursor should go exactly where you tap now (instead of start / end of word). When you drag the cursor, appearing above your finger for placement is intentional

    I do see the paste issue (although this was happening for me in 260 and earlier too). When you tap again at the cursor location we should show a menu, but we are not. I'll fix

  • SimeonSimeon Admin Mod
    Posts: 5,580

    @piinthesky that is odd, I am not seeing the software keyboard when using an external keyboard

  • Posts: 609

    @Simeon, hmmm, rechecked the external keyboard issue. Now it is behaving correctly-weird! So probably a false alarm.

  • edited March 17 Posts: 2,099

    @Simeon - problem with inserting new code. When I place the cursor and start typing new code seems ok but press return and the code below moves up and is appended to the right of the code I typed. Also looks like new blank line added and a new end statement which throws up an error. Note - the edit I was making was to insert a new for - end loop.

  • SimeonSimeon Admin Mod
    Posts: 5,580

    @Bri_G I can't reproduce this, do you have an example or code I can type that makes this happen?

  • SimeonSimeon Admin Mod
    Posts: 5,580

    @dave1707 @piinthesky re. the paste issue. To get the menu you have to tap again at the cursor location

    So if you place the cursor somewhere, tap on it quickly (not long press) to get the paste menu to show

    Another thing you can do is tap anywhere on the screen with three fingers and you will see a menu along the top which has undo/redo/cut/copy/paste

  • dave1707dave1707 Mod
    Posts: 9,079

    @Simeon I tried tapping again at the cursor position. It either does nothing or as I speed up the double tap, I’ll get a popup of “Select Select All” or “Cut Copy Re-Indent Reference Find” with the whole word selected and highlighted. The three finger tap does nothing for me. If I try three finger tap multiple times, it still does nothing.

  • SimeonSimeon Admin Mod
    edited March 17 Posts: 5,580

    @dave1707 that is strange. When I tap at the cursor position I get the menu — I notice that if I tap for slightly too long the cursor gets "picked up" and dropped, and then no menu appears

    Edit: Added video, click to see
    https://imgur.com/z2EejU6

  • dave1707dave1707 Mod
    edited March 17 Posts: 9,079

    @Simeon Is there a keyboard setting that I might not have set.

    PS. I have everything turned on except Shortcut “.” in Settings.

    PS1. I can easily tap to get the “Cut Copy ...” popup, but I have a hard time getting the “Select Select All” popup. I noticed the your Select Select All popup had Paste on it but mine doesn’t. The only time I get Paste in a popup is if I do a fast double tap. It then selects and highlights the whole word.

  • dave1707dave1707 Mod
    Posts: 9,079

    @Simeon I was able to finally get the “Select, Select All, Paste” popup. It took about 10 minutes of trying to double tap the screen at varying speeds. Apparently there’s a small window in which the second tap is recognized for that popup.

  • Posts: 2,099

    @Simeon - couldn’t duplicate that issue. Will keep trying and if able will post code.

    Other issue in loops - negative increment. When the range involves a +ve +1 increment you don’t have to specify it but if the increment is negative you do.


    function setup() -- for lp = 10,1 do print("-"..lp) end for lp = 10,1,-1 do print("~"..lp) end end

    Is this a Lua issue?

  • dave1707dave1707 Mod
    edited March 17 Posts: 9,079

    @Simeon I had 2 things happen and I think one was what @Bri_G mentioned or something just as wired.

    1.) I had the cursor image lock itself in the middle of the screen. I couldn’t move the image, but I was able to move its position and type from where I tapped. No matter what I did I couldn’t get the cursor image to move until I closed the project.

    2.) You might have to play with this awhile, but create a blank project with just the setup function. Within setup, press return to create a bunch of blank lines. Tap on one of the middle lines and just start typing random characters with spaces here and there. Create enough text to wrap lines. Works best in portrait mode.

    Tap it’s line number and delete the text. Tap the line number of some of the blank lines and some lines will have a blue highlight area and some lines won’t.

    Place the cursor at the end of one of the highlighted area and start keying random text again. Depending on if the problem happens, the cursor will move to different lines and the text will start showing there.

    I had some text disappear, some text start showing in the middle of the line, etc.

    You might have to play around a bit to get it to happen.

    I wasn’t able to recreate the cursor lock again.

    PS. Just keep deleting and trying different lines. Codea crashed on my last try.

  • Posts: 114

    I don’t like how the new autocomplete suggestions overlay the common use buttons and I have to X out to see them again. I prefer the old arrangement when autocomplete was on top of the buttons

  • SimeonSimeon Admin Mod
    Posts: 5,580

    @Bri_G yes that relates to how Lua works

    @dave1707 thank you for the detailed steps, I'll try to reproduce

    @skar I moved them into that area because they used to overlap your code as you typed it — so my workaround for that was to automatically scroll a little higher than necessary above the keyboard as you typed. But that created a problem where tapping to select text just above the keyboard would jump the scrolling up too high.

    In the end I figured having to tap the "X" isn't too bad, but if I can think of something better I'll try it

  • edited March 19 Posts: 2,099

    @dave1707 - your last post last point is very similar to my experience. I was trying to add a loop in the Final Frontier post in a function called distance. The loop was to detect the key of the closest planet to the touch function. It was a nested loop and I spent ages trying to sort the table to get the key of the lowest distance. I did this multiple times deleting the new loop each time (complicated because when I used a decrimenting loop it didn’t operate properly due to the requirement of adding the increment -1 value in the loop - as mentioned above). After several attempts the loop seemed to partially disappear and the following line moved up to the right of the previous line. Felt like each time I deleted the loop some control characters were added/deleted resulting in the text shift.

  • edited March 19 Posts: 2,099

    @Simeon - pity about the negative increment issue, seems more intuitive to operate a +1 or -1 increment by default if not specified. Why just the automatic +1 option ? Suppose we have to live with that if it’s down to Lua itself.

    On the pasting of text into a new tab - try selecting a function, say setup and copy and paste it into a new tab. Note selecting a function by dragging either gives you highlighted text to the end of that function or the end of the first line of the next function - the separating line doesn’t seem to be selectable. Now paste into the new tab. The cursor ends up between the n and d of the final line ‘end’.

    This suggest to me that the Codea code moves the cursor after pasting - to the wrong position. Not an issue except when you try to place your cursor at the end of a tab code the cursor jumps up a line. Selecting the end of the code to add a new function is difficult.

    Edit: forgot to mention latest edits improved cursor placement at the bottom of a tab but the en|d effect is still present.

  • SimeonSimeon Admin Mod
    Posts: 5,580

    @Bri_G oh good catch! I've fixed that issue for the next beta build. It's down to the "Format on Paste" option. Turning that off in the "Editor Configuration" from the main screen fixes it, but the next build has it fixed regardless of the "Format on Paste" setting

  • @Simeon Glad you’ve got that one! It’s been bugging me, but I hadn’t gotten around to reporting it. Is this the right place to do that?

    I am having issues using command + arrows or ctrl + arrows to move the cursor in a line.

    After I place the cursor with a tap, command-➡️ does nothing, command-⬅️ puts the cursor at the beginning of the line as it should.

    When I move the cursor with the arrow keys, I get the inverse behavior: command-⬅️ does nothing, command-➡️ puts the cursor at the end of the line as it should.

    Once the cursor has been moved to the beginning or end of the line via a command key combo, both command-➡️ and command-⬅️ work as expected. If the cursor is moved there with the keyboard or by touch, it has this incorrect behavior again.

  • Command-Arrow navigation works normally in the release version

  • SimeonSimeon Admin Mod
    Posts: 5,580

    Thanks @AlbertEinlime that does seem like incorrect behaviour. Thanks for documenting the specific instances where it's incorrect, it'll make it much easier to debug

  • dave1707dave1707 Mod
    edited March 20 Posts: 9,079

    @Simeon The Voxel Editor example needs some work. Putting out a warning. I can’t get it to save or load anything.

  • edited March 22 Posts: 2,099

    @Simeon - I placed a large csv file into the documents text and whilst trying to edit the text Codea crashed. Tried several times - could be related to the data pasted in originally.

  • dave1707dave1707 Mod
    Posts: 9,079

    @Simeon I hope you came up with a change for the autocomplete. It’s very annoying having to constantly press the X to hide the line as you try to enter code. It’s like it takes twice as long and would be faster if the autocomplete wasn’t there. Maybe reverse it. Tap something to bring up the autocomplete line.

  • SimeonSimeon Admin Mod
    Posts: 5,580
    @dave1707 which of the top row of keys do you usually need when autocomplete is shown fhat you need to press the X to access?
  • dave1707dave1707 Mod
    Posts: 9,079

    @Simeon It’s usually a letter with () or < > or other top row keys. I also ran into a lot of problems when I was trying to undo some code with the undo key. It’s usually just a mixture of what I’m keying. I guess my problem is I don’t use spaces in between letters and things from the top row. It’s hard to pin down specific things, but it seems like I’m constantly pressing the X key a lot.

  • dave1707dave1707 Mod
    Posts: 9,079

    @Simeon Here's something similar to what I might run into. Key the below line of code.

        if a[e]>b[c] or a*b[c]<a*b+5 then
    
  • SimeonSimeon Admin Mod
    Posts: 5,580

    @dave1707 yeah putting spaces definitely lessens the issue, though I notice it when typing the subscript a[e]

    I'll keep thinking about what we can do

  • Posts: 114

    In IDEs I’ve used, autocomplete will pop out at the entry point of the cursor.

  • dave1707dave1707 Mod
    Posts: 9,079

    @Simeon Maybe instead of the autocomplete bar showing automatically, you can show a button above the run key of the keyboard. Then if I want autocomplete, I tap the button and then if I tap a word or re-tap the button, it hides the autocomplete bar.. There are probably more times I don’t want the autocomplete than the times I do.

  • Posts: 972

    i don't use it often but i do find it useful, esp since i like long names. i've not tried the new scheme but the old works fine for me.

  • SimeonSimeon Admin Mod
    Posts: 5,580

    @RonJeffries do you put spaces between your operators? This is probably the biggest factor in @dave1707's example. The spaces automatically clear the autocomplete bar, making it easier to get to the extended keyboard keys

    The main instance where it doesn't is for subscript access ([...]) where you need to clear the autocomplete bar to hit the [] key

  • Posts: 972

    depends. usually i do around = + -, space after commas often, .. almost never, * / rarely.

  • Posts: 972

    i mostly type on magic kbd, touch autocomplete if useful, so i'm an outlier.

Sign In or Register to comment.