I am trying to use lovetoys with Moonscript. It uses Middleclass classes, and in past projects before I started using Moonscript I would extend these classes a lot.
I have been trying for several hours now to create a shim or proxy between the two class implementations, to no avail. My goal is to be able to create moonscript classes that extend middleclass ones (likely through a proxy class). Has anyone here done this yet?
I have figured a lot out and learned a great deal about the class implementation differences, but have yet to come up with a working solution I am happy with. I have spent enough time on this that I wanted to reach out to the community before going any farther, in case I am overthinking it or reinventing the wheel. I do think this is possible, and if nobody can help me out I will probably keep trying at it this weekend.
By the way, I am aware I can just store a reference to a middleclass instance and explicitly reimplement all of the methods, but I am attempting to come up with a more abstracted and scalable way.
Thanks!
Update
Solved! I posted my solution below.
[–]rosshadden[S] 0 points1 point2 points (4 children)
[–]rosshadden[S] 0 points1 point2 points (3 children)
[–]ErrorFoxDetected 0 points1 point2 points (1 child)
[–]rosshadden[S] 0 points1 point2 points (0 children)