Resources and "closing" method…

Home Forums General Programming Resources and "closing" method…

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #587
    LilCthulhu
    Participant
      • Topics: 9
      • Replies: 67
      • Total: 76

      Any idea on how to access resources in LUA ? I would like to include some files with my device panel… Or how can I access the current dir of the pannel ? Can we includes fonts in the resources ?

      Finally, any chance we can call some code before saving the state OR closing the ctrlr ? there’s some variables that I would prefer to "release" from memory before saving state…

      #4173
      atom
      Keymaster
        • Topics: 159
        • Replies: 2945
        • Total: 3104
        • ★★★★★

        You can’t really access resources as raw files in LUA yet, just as images but i’ll add that it’s a good idea. The panel path (if it’s opened from a file) is a property of the panel "panelFilePath" you can access that, create a File object from that path and get the base directory.

        You can’t release variables from memory in LUA, it’s not that kind of language all memory stuff is done internally by lua, if you want to release some data just set it to "nil" lua’s garbage collector will deal with the rest. I can however add a method that will be triggered before a save occures that’s not a problem.

        #4174
        LilCthulhu
        Participant
          • Topics: 9
          • Replies: 67
          • Total: 76

          Re: releasing variables from memory, well that’s what I meant <img decoding=” title=”Wink” /> I understood there was a garbage collector… The thing is I have a listbox with a lot of items in it and some tables related to that listbox… upon closing, I want to empty that, it’s useless and it slows down on startup… Right now, I’ve been able to manage how that could occur… EXCEPT when this part of the screen is still displayed <img decoding=” title=”Wink” /> Looking fwd to those 2 things <img decoding=” title=”Wink” /> Mainly the "before" save method !

          #4175
          atom
          Keymaster
            • Topics: 159
            • Replies: 2945
            • Total: 3104
            • ★★★★★

            Post those requests in the "Feature Requests" section otherwise i just might forget about them.

            #4176
            LilCthulhu
            Participant
              • Topics: 9
              • Replies: 67
              • Total: 76

              Done, as is the listbox issue, thanks for everything !!!

            Viewing 5 posts - 1 through 5 (of 5 total)
            • The forum ‘Programming’ is closed to new topics and replies.
            There is currently 0 users and 56 guests online
            No users are currently active
            Forum Statistics
            Threads: 2,495, Posts: 17,374, Members: 77,605
            Most users ever online was 12 on January 22, 2019 3:47 pm
            Ctrlr