Howdy, Stranger!

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

Codea 3.0 (186)

dave1707dave1707 Mod
edited September 15 in Bugs Posts: 7,865

@Simeon When I tap on the TwoLivesLeft icon at the bottom of the project list page, it show the Codea Credits screen, but then it shows the keyboard and the sign in for iTunes and prompts for my iTunes password.

Comments

  • dave1707dave1707 Mod
    edited September 15 Posts: 7,865

    @Simeon Is the print window now ignored for the WIDTH size. If the print window is showing and I text something at 50,200 , it's behind the print window. It used to be offset from the windows edge. Or do we now have to use that new stuff you added for the screen areas.

    PS. Apparently displayMode(STANDARD) isn't the default anymore.

  • dave1707dave1707 Mod
    Posts: 7,865

    @Simeon The batteryLevel and batteryState works great. Please add Wi-Fi signal strength if you can. Can you give us a list of other info that's available and we can give you some feedback as to what's useful or not before you add it.

  • dave1707dave1707 Mod
    Posts: 7,865

    @Simeon Assets list no longer switches to a single column. That's good.

  • dave1707dave1707 Mod
    Posts: 7,865

    @Simeon Does the Bitcode have anything to do with code on the iPad or is that just for exported code.

  • dave1707dave1707 Mod
    Posts: 7,865

    @Simeon readimage directly after saveImage works OK.

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @dave1707 the credits screen does that now to check when you first purchased Codea. This is so that if I make Codea free in the future I can make it unlocked for all existing users. I put the code on the credits screen to test it.

    Yes I changed displayMode(OVERLAY) to the default. Standard doesn't make much sense on iPhone (you can see about 50 pixels across), and I always liked overlay better on iPad too.

    I looked into Wi-Fi signal strength and couldn't find clear details on how to do it or if it's even allowed. It's not something I can add to 3.0 but will keep looking.

    Thank you for testing the other bugs, bitcode is just for exported code and how Codea itself is compiled now.

  • dave1707dave1707 Mod
    Posts: 7,865

    @Simeon Thanks for the explanations. There are several apps that show the Wi-Fi level, but they're constantly popping up ads every time they update the value. So you can't just walk around and watch the signal strength change. If it was in Codea, it would be easy to write something useful.

  • dave1707dave1707 Mod
    Posts: 7,865

    Here's some code to view the battery level. Each time the battery level changes the table is updated with the time and level. The longer the program runs, the more info that's displayed on the screen. You can use this to see how fast the battery level decreases over time. Graphics can probably be used but I'll leave that for someone else or I'll do it later.

    displayMode(FULLSCREEN)
    
    function setup()
        fill(255)
        tab={}
        table.insert(tab,{dt=os.date(),lv=deviceMetrics().batteryLevel})
    end
    
    function draw()
        background(0)    
        if deviceMetrics().batteryLevel~=tab[#tab].lv then
            table.insert(tab,{dt=os.date(),lv=deviceMetrics().batteryLevel})
        end
        for a,b in pairs(tab) do
            text(string.format("%-35s %2.1f%%",b.dt,b.lv*100),WIDTH/2,HEIGHT-a*30)
        end
        text("State - "..deviceMetrics().batteryState,WIDTH-100,HEIGHT-50)
    end
    
  • Posts: 59
    @Simeon I just tried to export my project and archive it in XCode and it looks like the Frameworks still don’t have bitcode support. I tried removing the old Frameworks to allow XCode to download new ones.
  • SimeonSimeon Admin Mod
    Posts: 5,054

    @exomut I'll be rebuilding the frameworks soon too

  • dave1707dave1707 Mod
    Posts: 7,865

    @Simeon You said you made displayMode(OVERLAY) the default. Since any text statements are now displayed from the left edge of the screen they'll show under the print window. I think FULLSCREEN should be the default. If you're not going to print something or use parameters you shouldn't have to set the displayMode to FULLSCREEN to remove the overlay. If anyone wants to print something or show parameters, then they would know that they should set the displayMode to STANDARD or OVERLAY.

  • dave1707dave1707 Mod
    Posts: 7,865

    @Simeon When I'm at the Codea project page, if I tap the top left icon, I can tap Assets and see the full list of assets. If I'm in a project, I usually put a sprite() statement in the code and tap between the () to see the Project Assets folder and some of the other assets. Then I remove the sprite statement since I didn't really need it. Have I been missing something or is there an easy way to see the full list of assets from inside a project.

  • SimeonSimeon Admin Mod
    Posts: 5,054

    You're talking about using the text function? That's an interesting point. What if the coordinate system started at the right edge of the panel? So x = 0 would be where the line of the panel is, but the panel would still be transparent. Something to think about for a future release though, I think the overlay default is necessary for the phone version, it's just too cramped otherwise.

    I'm planning to re-write Assets so that they can be viewed in the project, and you can access them anywhere on your file system (and use other cloud providers, not just Dropbox). At the moment you still need to do the parameter-tapping-thing, but I'm going to make it a sidebar option in the editor like the Reference and Find & Replace windows, then allow drag-and-drop assets into code.

  • dave1707dave1707 Mod
    Posts: 7,865

    @Simeon I'm not sure if I was very clear in that previous post. If the displayMode is OVERLAY or FULLSCREEN, the x value would be relative from the left side of the screen. If the displayMode is STANDARD, the x value would be relative from the right side of the panel. That's how it was and is now, so everything is fine. I just think the default for the displayMode should be FULLSCREEN instead of OVERLAY. So if you're not printing or using parameters, you don't have to do anything for displayMode. If you do want to print or use parameters, then you would set the displayMode to OVERLAY or STANDARD depending on how you want the display to look like for the print or parameters.

    As for the Assets, what you say sounds great.

  • edited September 16 Posts: 1,365
    @Simeon,@dave1707 - on the OVERLAY vs FULLSCREEN debate I prefer to use OVERLAY during development and switch to FULLSCREEN when the project is finished. But I think this discussion is not necessary - when I first started using Codea someone posted asking about editing the template - something I intended doing but never got round to. If it is still viable then you can add what you want to your own template. Perhaps an option for template choice could be added to new project - default or personal template - that way you can set up your own preference. Perhaps someone could write a Codea project to build a personal project template and add it to the new project menu.
  • Posts: 59

    @Simeon Thanks. I can’t wait. I hope I can finally release to the app store :)

    @dave1707 @Bri_G The way I always deal with displayMode in my projects is by putting this at the top of each project:

        DEBUG = hasProject("Debug Key")
        if DEBUG then
            displayMode(OVERLAY)
            -- Other debug code
        else
            displayMode(FULLSCREEN_NO_BUTTONS)
        end
    

    I then have a project named “Debug Key” so when I send the file to another iPad or export to XCode, it won’t find the project and choose fullscreen.

  • Posts: 1,365
    @exomut - neat way in dealing with the issue. Could you have a dependency holding one file with all keys in and read the key from there. Just trying to avoid having empty projects as keys. Or, you could have a security project which sets up system variables which can be tested in your project. If you accidentally reset the variables just run the security project again to re-initialise them.
  • Posts: 59

    @Bri_G It is actually convenient that it is an empty project. If I want to quickly turn off DEBUG mode for all of my projects to let someone try one of my apps, I just have to delete the project. When I am done, I just create the "Debug Key" project again.

    But you could easily make it more complex by putting a list of keys inside and reading them too.

  • dave1707dave1707 Mod
    edited September 16 Posts: 7,865

    @exomut @Bri_G When I start a new project, I delete the majority of code that's already there before I start coding. Years ago I suggested that you could have a startup project in your project list. You put whatever you want in it and every time a new project is created that project format is used. If the startup project doesn't exist then the way a project is created now is used. I guess we all have our own way of doing something. Below is how I always start which is why I think the default displayMode should be FULLSCREEN. I’m not doing any printing or using parameters.

    function setup()
    end
    
    function draw()
        background(0)
    end
    
  • Posts: 1,365

    @exomut - tried your suggestion and works well, thanks.

    @dave1707 - I usually use the default template but always change the displayMode() and delete the remarked help lines, but I tend to have several ‘system variables’ that I set up myself I would like to add. So a template would help. But, a project skeleton project file would serve but it would be susceptible to deletion.

  • dave1707dave1707 Mod
    Posts: 7,865

    @Bri_G @exomut Here's one way to have your own format. Since I have my projects sorted by name, I have the below code in a project called #a . That always shows as my first project. Then instead of tapping Add New Project, I just long press on #a, select Duplicate, give it a project name and tap Create. That creates a new project with the below code. Being able to change the Codea default program would be the best choice.

    displayMode(FULLSCREEN)
    
    function setup()
    end
    
    function draw()
        background(0)
    end
    
  • edited September 16 Posts: 1,365

    @dave1707 - thanks for the suggestion, I like the way you name your template project. Just thought, if you have a number of project templates you could put them in a collection and duplicate the one you need. Only problem is ordering of collections seems a bit random.

  • dave1707dave1707 Mod
    Posts: 7,865

    @Bri_G Do you have your projects sorted by name or by recent. Mine are sorted by name so the #a is always first. I could add more, #b, #c etc, but one is enough for now.

  • edited September 16 Posts: 1,365
    @dave1707 - are collections sorted in the same way as projects? I always sort on most recent for projects so my current projects are at the top. Switch to alphabetic when I look for older projects. Group project versions in collections.
  • @Simeon, i would like to suggest that if the find/replace button is selected then the cursor would automatically move to the text window in which the text to be searched is typed.

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @piinthesky it behaves like that for me on my devices, can you tell me more detail about what happens for you?

  • dave1707dave1707 Mod
    Posts: 7,865

    @Simeon @piinthesky When I tap the find icon (magnifying glass) it opens the search area and places the cursor there. If I double tap on a word and select find from the pop up, it places the highlighted word in the search area with the cursor after it. I’m on the latest beta.

  • Yes, but if the find/replace panel is already open and you press the find icon a second time then the cursor does not relocate to the search box, would be nice if it would.

  • dave1707dave1707 Mod
    Posts: 7,865

    @piinthesky @Simeon Then if the find/replace is already open and there's a word there from the previous find/replace, then tapping the find icon should clear the word that's already there and leave the cursor.

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @piinthesky @dave1707 ah that clears it up, good suggestions

  • dave1707dave1707 Mod
    Posts: 7,865

    @Simeon When the reference is showing and the keyboard is showing, if I swipe down in the reference area, the white keyboard turns dark and looses the top row. If I tap in the editor area, the white keyboard comes back. Is there a reason for switching keyboards.

  • AnatolyAnatoly Mod
    edited September 21 Posts: 872

    Maybe the round corner everywhere? (RED ARROW)

    This update is amazing!!! I’m satisfied))

    Great job done ✅

    Edit: I noticed that when the keyboard is open, the round corners go away, is there any fix for it, based on how apple has the keyboards made?

  • Posts: 742

    @Simeon love the update for the iPhone. A couple of bugs/observations

    1. Screen recording doesn’t work
    2. There is a bug with the cursor position which appears when using assets on my iPhone (SE). Open a new project on iPhone. Type sprite(). Select the asset by tapping the (). Now when you try to select after the resource location string has been autocompleted the cursor jumps back to an earlier position
    3. On iPhone SE starting in the mode with the overlay means it totally dominates the screen - can different defaults be set for different devices? I guess you want to be consistent across everything but it ends up looking poor on a small screen devices.
    4. Any plans to sync between iPhone and iPad on same account? At the moment export as zip, airdrop and open and import in Codea works seamlessly but this isn’t great for source control. To date with only one device for Codea this hasn’t mattered

    Keep up the excellent work

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @West iPhone SE! That was a challenging screen size to fit Codea into

    1. Sorry about this, I had a report on it but didn't get around to fixing. I recommend using the Control Center screen recording feature anyway, it's more reliable and versatile. Added it to the list to fix
    2. Thank you for this report
    3. Agreed, initially the default was STANDARD, where you can't see anything at all. @dave1707 suggested changing it to FULLSCREEN. I think we might need to bring in the sidebar design from Shade where you have the obvious pull-out tongue UI
    4. You can open projects that you store in iCloud from the Files.app. Just tap on them and Codea should open them for editing. That way you can keep things shared. Unfortunately this doesn't appear in Codea's native project browser UI though I'd like to bring external files into there (or move the whole thing onto the UIDocumentBrowserViewController like Shade is)

    @Anatoly interesting comment on the rounded corners. I am not doing any rounding that I recall. Will look into it

    @dave1707 reference has a dark appearance and so uses the dark style keyboard. Really I should update it to have a light appearance when you use the light editor theme and then it could use a consistent light keyboard.

  • Posts: 1,365

    @Simeon - ran into a funny using Air Code when I added a parameter boolean to a list of existing parameters. Initially it didn't seem to show the boolean on the overlay window. An existing boolean was shown above the slider parameters I had set up. Then I used the slider to increase the overlay window visible area and found an 'unkown' boolean there, below the sliders. That is named 'unknown' but should have been 'inter'. Exited Air Code and ran again - and found the 'inter' boolean present. Also the boolean was below the sliders - are parameters added to the list in addition order from the timing on the edits because all the parameters were listed together with the new one at the bottom? Seems like parameter addition may have an issue with Air Code.

    Edit: ignore the order issue - moved the boolean higher and it moved up the parameter chain in the overlay window.

  • dave1707dave1707 Mod
    edited September 23 Posts: 7,865

    @Simeon Is this supposed to happen. Missing the numbers on the top line. Every project that uses the keyboard has the keyboard like this. iPad Air 3rd gen. I tried making changes to the keyboard settings and managed to lose the top line all together. Apparently the top line is for the Predictive setting, but turning that off gets rid of the top line altogether.

    PS. This only happens when the keyboard is opened while a program is running. It’s OK while in the editor.

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @dave1707 that looks correct to me, the top row of keys has numbers (though you need to swipe down on the key to activate them). This is just the standard iOS keyboard

  • dave1707dave1707 Mod
    Posts: 7,865

    @Simeon Ignore my last few posts. I’m just getting confused with the keyboards on different iPads.

  • dave1707dave1707 Mod
    edited September 30 Posts: 7,865

    @Simeon When I go into Settings, Codea, the drop down for Allow Codea to Access doesn’t show Camera, Microphone, or Location. It only shows Siri & Search and Document Storage. So I can’t use the camera, microphone, or locations with Codea. I’m on iOS 12.4.1 and Codea 186. My other iPad has the same versions and that one has all the options. Not sure where the problem is.

    PS. I got locations and microphone to show up by trying to use them, but so far I just get a message that camera is not available or authorized.

    PS. I loaded Codea 187 and I still can’t get the Camera to show up.

    This is the message I get.
    Camera functionality is not available or not authorized on this device.

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @dave1707 I think I've introduced a bug with that, the only way I was able to get it authorised was to open the AR Face example and authorise through there — but if you don't have face AR capability then that won't be possible

    I've put it down to fix for v3.0.1

  • dave1707dave1707 Mod
    Posts: 7,865

    @Simeon The AR Face demo didn’t work, but the AR demo did. It put up a prompt that asked if I wanted to allow the camera. Not sure why I didn’t get the prompt when I tried to use the camera in my projects.

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @dave1707 yeah I have a feeling something changed in iOS 13 that causes the way we used to request permission to silently fail, and the AR APIs, being newer, use a more modern method

Sign In or Register to comment.