Closed anonymous1184 closed 10 months ago
The sentinels "get" have long been planned to be removed and updated to use ?
(maybe / unset) instead. This would however force the library to be on the v2.1 alpha releases, would that be fine?
Your call, but one of the most alluring aspects of the library is how easy if to just plug & play; asking users for an alpha will put a dent on the usability.
If you want, I can remove the sentinel and validate the input with IsSet()
/.Has()
/.HasOwnProp()
(depending on what's needed), that way the compatibility increases instead of getting reduced.
The sentinel was designed to reduce my workload of maintaining scripts for v1 and v2 by mimicking v1's property of making everything the empty string. Either of the above suggestions is fine (using self or got) and I'll be happy to merge.
PR: https://github.com/iseahound/ImagePut/pull/31. Tests passed.
Hello!
First of all, terrific job! While I don't use your lib, quite often recommend it to other users (usually the less experienced). It is one of the few one-fits-all that actually works; plus it is very easy to get it working. Thanks for the superb effort.
So... a user raised an issue in the AHK_H2 repo about a recursion problem, the lib has a "sentinel value", that conflicts with an H-only feature:
There are two ways of addressing the issue, renaming the method (say
this.got
):Or explicitly pass the object reference rather than rely on
this
:That in turn will require the method to change:
In any case, the method has a bug. It will always try to grab the
.name
property instead of evaluating thename
variable into a dynamic property.Let me know if you are interested in adding support for the H release to create a PR.