• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Alert from inside function

Scheduled Pinned Locked Moved Development
6 Posts 2 Posters 2.8k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    strawberry 3.141 Project Sponsor Module Developer @Luukth
    last edited by May 8, 2017, 6:28 PM

    @Luukth thats an issue of accessing the right scope, you can fix that by using an arrow function

    setInterval(() => {
      updateOV();
      this.sendNotification("SHOW_ALERT", {title: "OV", message: "Bustijden ge-update.", timer: "1000"});
    }, 10000);
    

    Please create a github issue if you need help, so I can keep track

    L 1 Reply Last reply May 9, 2017, 7:48 AM Reply Quote 1
    • L Offline
      Luukth @strawberry 3.141
      last edited by May 9, 2017, 7:48 AM

      @strawberry-3.141 Thanks that did the trick.

      S 1 Reply Last reply May 9, 2017, 9:20 AM Reply Quote 0
      • S Offline
        strawberry 3.141 Project Sponsor Module Developer @Luukth
        last edited by May 9, 2017, 9:20 AM

        @Luukth I suggest to outsource the data query from the render function

        Please create a github issue if you need help, so I can keep track

        L 1 Reply Last reply May 9, 2017, 9:35 AM Reply Quote 0
        • L Offline
          Luukth @strawberry 3.141
          last edited by May 9, 2017, 9:35 AM

          @strawberry-3.141 said in Alert from inside function:

          I suggest to outsource the data query from the render function

          Can you maybe link me to a documentation. I can’t really find a good way to learn how to make al of those functions.

          S 1 Reply Last reply May 9, 2017, 11:05 AM Reply Quote 0
          • S Offline
            strawberry 3.141 Project Sponsor Module Developer @Luukth
            last edited by May 9, 2017, 11:05 AM

            @Luukth https://github.com/MichMich/MagicMirror/tree/master/modules
            or you also can checkout some modules

            Please create a github issue if you need help, so I can keep track

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              6/6
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy