colinsheppard / time

A NetLogo extension that brings date/time utilities and discrete event scheduling to NetLogo
12 stars 13 forks source link

Compiling against netlogo 6.1 #59

Open robwalton opened 4 years ago

robwalton commented 4 years ago

To address #58 and #57 I've started compiling against netlogo 6.1. I updated

https://github.com/colinsheppard/time/blob/c0ced4cf6250bfdd6144c4e9e9bd453aa6588cb4/Makefile#L20

to prepend -Xlint:deprecation to args and to point at netlogo-6.1.0.jar.

`make' results in two build errors:

src/main/java/time/datatypes/LogoSchedule.java:135: error: tickCounter has private access in World
            tickCounter = context.workspace().world().tickCounter;
                                                     ^
src/main/java/time/datatypes/LogoSchedule.java:179: error: cannot find symbol
                    if(theAgent == null || theAgent.id == -1)continue;

The first at least is consistent with the runtime errors reported in #58

It looks like the NetLogo guys made the tickCounter private when the moved World to Scala: netlogo-core/src/main/agent/World.scala

@colinsheppard Thanks for a great looking extension. If you are still working with NetLogo... Do you see a way around this or do we need to file a NetLogo issue to ask for access to this back again? (And I haven't looked at the second error yet). Cheers