LCD-Smartie / LCDSmartie

The New Official LCD Smartie Repository (LCD Smartie Lazarus port)
GNU General Public License v2.0
32 stars 5 forks source link

Revert variable resolver/restore $dll($dll)) functionality #10

Closed elektroencefalografista closed 1 year ago

elektroencefalografista commented 1 year ago

In version 5.5.3.6 the variable resolver was updated. While I understand reasoning behind the change, and the new $Store and $Fetch functions will be handy, the change broke compatibility with vanilla LCD Smartie configs. Many users switching to this fork (like me) have configs built over years, heavily utilizing the $dll(dll)) functionality. These configs would need to be rewritten from scratch using the $Store/$Fetch method, which can get anywhere from inelegant to unfeasible in cases with many nested $dll()s

As per title, would you consider restoring nested $dll()s or just reverting to the old resolver?

stokie-ant commented 1 year ago

I see the problem. I did that to work around a nested variable shortcoming without causing a stack overflow but I'm sure there's a better way. I only realised after giving the code another read you can actually nest dll's but I do see where I've broken that. Give me a few days and I'll have the original behaviour back

elektroencefalografista commented 1 year ago

No worries! Thank you for all the work on this ancient software, you're single-handedly keeping LCDSmartie alive.

stokie-ant commented 1 year ago

You're welcome. It was a shame to see it not getting the updates it deserves and please, your feedback is most welcome. If something is not right or if I've done something wrong then just let me know. Anyhow, I've restored the original behaviour but also started to get things so all variables/functions can be nested but some things will need more rewriting than others. Smarties code is not very consistent, probably the result of many devs chipping in but with no set rules on how things should be written. Can you test this one out to make sure its working as it should? LCDSmartie_exe.zip

elektroencefalografista commented 1 year ago

Yep, this works perfectly with legacy LCDSmartie config. Great work!