Refresh Screens

Hey, Is it possible to assign URLs to different views in my web app in javascript mode? The only thing is see is that there is one draw() method which displays whatever you want to display in a hardcoded manner. Can the screens be refreshed during the navigation through the application? If yes, please show it through an example.

Thanks

Answers

    • By your description, it seems very web-centric!
    • Although possible, JS Mode isn't your best option!
    • If you know JavaScript, p5*js is ideal: http://p5js.org/
    • Doing so you'll have easier access to browser's DOM.
    • Another option is CoffeeScript mode. But you need to know CoffeeScript.
    • Both JS & CS modes allow ".js" tabs which we can program directly in JavaScript instead of Java.
  • edited March 2015

    Can the screens be refreshed during the navigation through the application?

    • Traditionally, Processing relies on keyboard & mouse for triggered events.
    • When it's called back, we need to check buttons and mouse coordinates to determine the action to take.
  • So, creating different views is not possible is it?

  • edited March 2015
    • Since the default is 1 draw(), 1 mousePressed(), etc. we can see that's very centralized.
    • It's pretty different than assigning an individual trigger callback for each "view" element.
    • Thus we need to find out which "view" triggered some event and take a different course based on it.
Sign In or Register to comment.