Code Monkey home page Code Monkey logo

levelspacexwgui's Introduction

Init (just first time after you clone)

Join the chat at https://gitter.im/arthurhjorth/LevelSpaceXWGUI git submodule update --init

Build instructions

Make sure you're on Java 6

make clean
make modules
make

levelspacexwgui's People

Contributors

arthurhjorth avatar qiemem avatar mrerrormessage avatar cbradyatinquire avatar gitter-badger avatar

Watchers

 avatar  avatar  avatar James Cloos avatar  avatar

Forkers

qiemem

levelspacexwgui's Issues

Load LevelSpace System needs rewrite

We need a way to save to ONE file the names of the three files (entities, setup-relationships, go-relationships), so we can just use a file-chooser instead of having it hardcoded.

I'll have that ready for Tuesday.

Agents can't actually run agent-specific code!

To reproduce, make this command:

image

Put it in this relationship:

image

and hit Run. You'll get:

this code can't be run by the observer, only a turtle
error while observer running FD
  called by (command task from: procedure __EVALUATOR)
  called by procedure __EVALUATOR

Making agent arguments work

Basically this already works with procedure/command args, so the code just needs to be copied. It may be as simple as mapping the 'get-task' reporter to the args provided in the interface.

Arguments totally broken

First, command arguments are appearing where agent arguments should be.

Next, whenever you try to save a relationship with command arguments, you get the following exception (amount is the name of the argument).

NetLogo is unable to supply you with more details about this error.  Please report the problem
at https://github.com/NetLogo/NetLogo/issues, or to [email protected], and paste the
contents of this window into your report.

java.util.NoSuchElementException: key not found: amount
 at scala.collection.MapLike$class.default(MapLike.scala:225)
 at scala.collection.immutable.Map$EmptyMap$.default(Map.scala:88)
 at scala.collection.MapLike$class.apply(MapLike.scala:135)
 at scala.collection.immutable.Map$EmptyMap$.apply(Map.scala:88)
 at org.levelspace.LSArgumentSelector$$anonfun$selectedArgumentIndices_$eq$1.apply(LSArgumentSelector.scala:31)
 at scala.collection.Iterator$class.foreach(Iterator.scala:772)
 at scala.collection.immutable.VectorIterator.foreach(Vector.scala:648)
 at org.levelspace.LSArgumentSelector.selectedArgumentIndices_$eq(LSArgumentSelector.scala:27)
 at org.levelspace.RelationshipKind$$anonfun$42.apply(RelationshipWidget.scala:77)
 at org.levelspace.RelationshipKind$$anonfun$42.apply(RelationshipWidget.scala:77)
 at uk.ac.surrey.xw.api.Property$$anonfun$set$1.apply(Property.scala:37)
 at uk.ac.surrey.xw.api.Property$$anonfun$set$1.apply(Property.scala:37)
 at scala.Option.foreach(Option.scala:197)
 at uk.ac.surrey.xw.api.Property.set(Property.scala:37)
 at uk.ac.surrey.xw.api.ExtraWidget$$anonfun$setProperty$1.apply(ExtraWidget.scala:26)
 at uk.ac.surrey.xw.api.ExtraWidget$$anonfun$setProperty$1.apply(ExtraWidget.scala:25)
 at scala.Option.foreach(Option.scala:197)
 at uk.ac.surrey.xw.api.ExtraWidget$class.setProperty(ExtraWidget.scala:25)
 at org.levelspace.Relationship.setProperty(RelationshipWidget.scala:107)
 at uk.ac.surrey.xw.gui.GUI$$anonfun$uk$ac$surrey$xw$gui$GUI$$setProperty$1.apply(GUI.scala:76)
 at uk.ac.surrey.xw.gui.GUI$$anonfun$uk$ac$surrey$xw$gui$GUI$$setProperty$1.apply(GUI.scala:76)
 at scala.Option.foreach(Option.scala:197)
 at uk.ac.surrey.xw.gui.GUI.uk$ac$surrey$xw$gui$GUI$$setProperty(GUI.scala:75)
 at uk.ac.surrey.xw.gui.GUI$$anonfun$notify$2.apply$mcV$sp(GUI.scala:49)
 at uk.ac.surrey.xw.gui.GUI$$anonfun$notify$2.apply(GUI.scala:49)
 at uk.ac.surrey.xw.gui.GUI$$anonfun$notify$2.apply(GUI.scala:49)
 at uk.ac.surrey.xw.api.package$$anon$1.run(package.scala:28)
 at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
 at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
 at java.awt.EventQueue.access$400(EventQueue.java:82)
 at java.awt.EventQueue$2.run(EventQueue.java:676)
 at java.awt.EventQueue$2.run(EventQueue.java:674)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

NetLogo 5.2.0
main: org.nlogo.lite.InterfaceComponent
thread: AWT-EventQueue-0
Java HotSpot(TM) 64-Bit Server VM 1.6.0_65 (Apple Inc.; 1.6.0_65-b14-462-11M4609)
operating system: Mac OS X 10.9.5 (x86_64 processor)
Scala version 2.9.2
JOGL: (3D View not initialized)
OpenGL Graphics: (3D View not initialized)
model: /Users/bryan/Development/NetLogo/lsxwgui/Wolf Sheep Predation.nlogo

08:52:23.267 JobRemovedEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) JobThread
08:52:23.267 InterfaceGlobalEvent (org.nlogo.window.SliderWidget) AWT-EventQueue-0
08:52:23.267 InterfaceGlobalEvent (org.nlogo.window.SliderWidget) AWT-EventQueue-0
08:52:23.267 InterfaceGlobalEvent (org.nlogo.window.SliderWidget) AWT-EventQueue-0
08:52:23.267 InterfaceGlobalEvent (org.nlogo.window.SliderWidget) AWT-EventQueue-0
08:52:23.266 InterfaceGlobalEvent (org.nlogo.window.SliderWidget) AWT-EventQueue-0
08:52:23.266 InterfaceGlobalEvent (org.nlogo.window.SliderWidget) AWT-EventQueue-0
08:52:23.266 InterfaceGlobalEvent (org.nlogo.widget.SwitchWidget) AWT-EventQueue-0
08:52:23.266 InterfaceGlobalEvent (org.nlogo.window.SliderWidget) AWT-EventQueue-0
08:52:23.266 InterfaceGlobalEvent (org.nlogo.widget.SwitchWidget) AWT-EventQueue-0

bug: In one use-path, SETUP not working in model 0

steps to reproduce:

  1. load the nlogo file
    1a) DO NOT RUN ANY SETUP BLOCKS BEFORE STEP 2
  2. Load New Model, with another model
  3. create SETUP blocks to run setup in each model.
  4. run them. Setup will be run only in the New model that was opened in step 2

interestingly, if you create a setup block before doing Load New Model, it WILL run setup in model 0. Moreover, the bug will NOT appear after this.

But if you don't run any setup blocks before loading a Model 1, then after loading, both 0:setup and 1:setup will actually run 1:setup

Name of LevelSpace system shouldn't be "Model"

In the UI, Save and Load of LevelSpace system uses the term "Model" (same term as used for NetLogo models, in button above).

I'd suggest using the term "LevelSpace System" (as a System of [NetLogo] Models)

But, wanted to get feedback/thoughts rather than just making this change.

Making literal arguments work

Both agent and command args need to be checked for literals. If they are literals (or probably more specifically: if they do not exist in the table:keys of entiies (called 'tasks') then they should be treated as literals and just run-result'ed.

Error in Loading LevelSpace System

Not sure what this means, but here's the runtime error on loading
I (a) made a LevelSpace system,
(b) recognized a bug in one of the netlogo models.
(c) saved my LevelSpace system
(d) edited the NetLogo model
(e) returned to LevelSpace and tried to reload the system

Extension exception: No value for 70 in table.
error while observer running TABLE:GET
called by procedure ENTITY-FROM-ID
called by (command task from: procedure LOAD)
called by (command task from: procedure LOAD)
called by procedure LOAD
called by procedure __EVALUATOR

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.