Hi Terry,
In SLiM 4.0 the createLogFile() method is now on the Community class, so
you want to do:
community.createLogFile(...);
More broadly, the old SLiMSim class of SLiM 3.7.1 and earlier was split
into two new classes in SLiM 4, Species and Community. As discussed in
the release notes for SLiM 4, the new SLiMgui provided in SLiM 4 knows
how to autofix most of the resulting breaks in backward compatibility.
If you run your model under the new SLiMgui, it will say:
SLiMgui has found an issue with your script that it knows how to fix:
The `createLogFile()` method has been moved to the Community class.
Would you like SLiMgui to automatically fix it, and then recycle?
And if you click Yes, it will fix your code for you. Keep running your
model until SLiMgui no longer finds any problems. It is recommended
that all users migrating from SLiM 3 to SLiM 4 run their model through
SLiMgui to benefit from these automatic fixes. (There are some less
common cases where SLiMgui does not know how to autofix a break in
backward compatibility, however, so you may still need to make some
manual changes to your code; most users will not need to, though.)
I hope this helps; happy modeling!
Cheers,
-B.
Benjamin C. Haller
Messer Lab
Cornell University
Zuxi Cui wrote on 8/30/22 11:58 AM: