Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

QA onInit query


Question

Posted

when ever i save a qa it seems to run the oninit twice once on the presave and then again on the save, am i doing something wrong by leaving stuff in the memory which i should be clearing first?

[30.12.2021] [15:28:33] [DEBUG] [QUICKAPP523]: onInit

[30.12.2021] [15:28:33] [DEBUG] [QUICKAPP523]: checking --this was what i was removing on this save

[30.12.2021] [15:28:33] [DEBUG] [QUICKAPP523]: onInit

7 answers to this question

Recommended Posts

  • 0
Posted

what do you mean with presave?

  • 0
  • Inquirer
  • Posted

    to test it if i do a print("something") save and then remove the print comment often i will notice that the print will come up and then it will oninit again and not show it.

    • 0
    Posted

    Is it QA that consists of several files?

    • 0
  • Inquirer
  • Posted

    it does not seem to make a difference if there is just one main file or other files too, i seem to be getting it on both.

    • 0
    Posted
    2 hours ago, Jay Ess said:

    it does not seem to make a difference if there is just one main file or other files too, i seem to be getting it on both.

    Can you post  a minimal QA that has this behaviour? A reason could  be that your QA is failing silently after a restart that causes the second restart...

    • 0
  • Inquirer
  • Posted (edited)

    here is qa i am in the process of building which does this

    Please login or register to see this attachment.

     

     

    [02.01.2022] [13:03:42] [DEBUG] [QUICKAPP478]: Sonos Variable is 192.168.1.212

    [02.01.2022] [13:03:42] [DEBUG] [QUICKAPP478]: Song Name Variable is //nas/music/LeChaim Tish/Lail Shabbos/06 Koh Echsoif.mp3

    [02.01.2022] [13:03:42] [DEBUG] [QUICKAPP478]: Music Type Variable is Motzei

    [02.01.2022] [13:03:42] [DEBUG] [QUICKAPP478]: Music Volume is 10

    [02.01.2022] [13:03:42] [DEBUG] [QUICKAPP478]: onInit

    [02.01.2022] [13:03:42] [DEBUG] [QUICKAPP478]: Song Name Variable is //nas/music/LeChaim Tish/Lail Shabbos/06 Koh Echsoif.mp3

    [02.01.2022] [13:03:42] [DEBUG] [QUICKAPP478]: Music Type Variable is Motzei

    [02.01.2022] [13:03:42] [DEBUG] [QUICKAPP478]: Music Volume is 10

    [02.01.2022] [13:03:42] [DEBUG] [QUICKAPP478]: onInit

    Edited by Jay Ess
    • 0
  • Inquirer
  • Posted

    a new QA does this on save

    [02.01.2022] [13:12:11] [DEBUG] [QUICKAPP460]: onInit

    [02.01.2022] [13:12:12] [DEBUG] [QUICKAPP460]: onInit

     

    the qa has this in it

    function QuickApp:onInit()

        self:debug("onInit")

    end

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...