Howdy, Stranger!

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

dependencies sticky?

i have a little test example that uses CodeaUnit as a dependency. however when i open the dependencies window and uncheck the dependency, the program still works. is that expected? what if i actually wanted to drop one?



  • Posts: 791
    @RonJeffries I get the feeling that dependencies are only updated under the hood when first added or when codea is launched. ICYMI here is another dependency related issue:
  • edited May 2020 Posts: 1,917
    @Simeon - would your proposed changes to Dependencies resolve this?
  • Posts: 806

    I have found the dependency to be there even after I closed the file, opened another, closed it, closed Codea, and restarted.

  • dave1707dave1707 Mod
    Posts: 8,739

    @RonJeffries I don’t have any dependency code that I’ve written and use, but all of my Craft code uses Cameras as a dependency. If I uncheck Cameras and run the code, I get an error saying that I need Cameras. I don’t have to exit the code to get the dependency error message. So I’m not sure why you don’t get an error when you uncheck your dependency. Are you executing any of the code that’s dependent on it. I don’t think you get an error until you try to execute the dependency code.

  • dave1707dave1707 Mod
    edited May 2020 Posts: 8,739

    @RonJeffries I created some code to be used as a dependency. If I uncheck the project as a dependency and run the code, I get an error. If I recheck the code it runs OK. I also altered the code so it didn’t try to execute the dependency code until I touched the screen. No errors until I touched the screen to execute the dependency code.

  • Posts: 806

    weird. i'll play further. it's CodeaUnit that's doing it.

  • Posts: 806

    ok, i checked that there were no dependencies. closed file, closed codea, rebooted ipad, started codea. main clears _ var. ran program. codeaunit button still there. pushed it and got failure in trying to use _. note the button was still shown w/o the dependency. something isn't getting cleared.

  • SimeonSimeon Admin Mod
    Posts: 5,434

    @RonJeffries you can check from your code what's in the dependencies by doing this:

    function setup()
        local xml = readText(asset.Info)

    This is an XML file containing the project metadata. One of those entries will be for "Dependencies" containing an array of strings referring to other projects

    It looks like there is a bug where adding/removing dependencies is not saving correctly unless you long-press the "Play" button in the upper right corner and choose "Save & Run". I've noted this down to be fixed

  • Posts: 806

    Super, thanks!

Sign In or Register to comment.