Howdy, Stranger!

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

Reading project tabs & data broken?

edited July 2013 in Questions Posts: 1,976

Long story short, I'm working at one last attempt in an auto-updater for Codeler, and I needed to temporarily store raw gist data in a string, because since http.request uses separate functions for successes I can't just return it normally. I tried creating a global variable called RAWGISTTEMP, saving it as the raw gist data, then outside of the http.request functions saying

local rawdata = RAWGISTTEMP
RAWGISTTEMP = nil
return rawdata.

For some reason RAWGISTTEMP was an empty string. I tried it with project data, and the same happened. I tried saving it in a tab, too. For some reason it wasn't deleting the tab when it was done, but I also noticed it saved it correctly. I tried readProjectTab("RAWGISTTEMP") and it was an empty string. I have no idea why, but everything I try to access returns an empty string, even when I can see it's not. Help?

Comments

  • Jmv38Jmv38 Mod
    Posts: 3,295

    My $0.05: i read you save:
    a global variable called RAWGISTTEMP.
    And when you read
    readProjectTab("RAWGISTDATA") and it was an empty string.
    What about using the same name for save and read?

  • edited July 2013 Posts: 1,976

    Oops, I accidentally wrote it as RAWGISTDATA. I meant to say RAWGISTTEMP, the code uses the same. Updated post

  • BriarfoxBriarfox Mod
    edited July 2013 Posts: 1,542

    @SkyTheCoder check The updated AutoGist. I just added an option to add an updater checker to your project.

  • Jmv38Jmv38 Mod
    Posts: 3,295

    @SkyTheCoder maybe you should just share the code so someone can check if there is a simple obvious mistake? That can of things happen often, not being able to see an obvious error because it is too obvious.

Sign In or Register to comment.