Mode template

edited December 2013 in Create & Announce Modes

Is there a mode template somewhere or guidelines on how to create a mode. I would like to create a Scala mode, since there is no official one, I think it would be nice...

Tagged:

Answers

  • edited December 2013 Answer ✓

    I have tried to code in scala before and failed then I tried something simpler if you know how processing .java files looked I simply copied it I do not know about a scala mode but below works for me PS: this was done in eclipse much easier to add libraries

    package test1
    import processing.core._
     class MainApp extends PApplet {
    
        override def setup() {
            size(400,400)
            background(255)
        }
    
        override def draw() {
            rect(0,0,30,30)
        }
    }
    
    object test2{
    
    
     def main(args: Array[String]){ 
       PApplet.main(Array("test1.MainApp"))
    
      }
    }
    
  • There was a Scala for Processing project, using sbt, at some point. Not sure if it is still living.

    About mode template: have you searched the wiki (or the whole site, for what it is worth)?
    It is also always educational to see how other modes are made, you can extract a skeleton out of them. AFAIK, most of them, if not all, are open source.

  • edited March 2014

    So how do you make a mode? I've searched the internet high and low and there is no information. On the wiki there is how to create a library and how to create a tool but no how to create a mode. I really want to create a mode :/

Sign In or Register to comment.