12-30-2024, 11:05 PM
Is someone getting a warn? I think someone is getting a warn. And you did so good for nearly a year.
Allow me to point out that kyonides stated that he was going to prove me wrong after I made the following statement:
(12-29-2024, 10:19 PM)DerVVulfman Wrote: Convert the symbol into a string (which the RMXP SDK uses for example), and you can then 'Evaluate' the string representation into the object that can be tested.
Note that you cannot evaluate symbols into their original objects as the second code block has shown. the 'eval' command only works with strings. And the .respond_to? command is a method within the Object class and will not respond to symbols.
It is very clear from the dialogue above, I was referring to the use of the eval command, a method within the Object class: "Note that you cannot evaluate symbols into their original objects as the second code block has shown. the 'eval' command only works with strings."
But even while he attempted to state that I was wrong, he himself later stated:
(12-30-2024, 04:26 AM)kyonides Wrote: Nobody is supposed to evaluate symbols. They're frozen by nature so you'd need to make calls to an object's metaprogramming methods like instance_variable_get or instance_variable_set to do stuff.
By this very statement, kyonides actually contradicted his opening jab:
(12-29-2024, 11:57 PM)kyonides Wrote: And here I come once again to prove you wrong!
And yet, that was not the case. For in fact, his statement that "Nobody is supposed to evaluate symbols." and that the code he chose to present focused upon an alternative command instead of "eval" was itself confirmation.
I will admit, the site that I garnered the versioning of the command used within kyonides's substitute code was dead wrong. However, my actual statement in that you cannot evaluate symbols, the inability to use the eval command, was correct and substantiated by kyonides despite his apparent attempt at a jibe.
:symbols are nothing more than pointers, not unlike the 'index' of an array or a key to a hash. They are not the data, but a key/index to 'retrieve' the data. As an index points to a value within an array, a :symbol is used to point to an instance variable within a class. I will not condemn the use of :symbol, for I do know its value as a pointer towards necessary data:
The use of index values was a breakthrough in old-style file management in computers which previously relied upon data records having to load 'sequentially' (or one after the other) until the desired record was found And the larger the file, the slower it may take to access certain records. It was later that Random Access and Indexed data records were defined that used index values or keys to point to the necessary records, said records being accessed almost immediately.
The eval command, or the instance_eval command, is a powerful command which can evaluate (or convert) a string containing Ruby code, or a block thereof. It could be used for data calculations if the contents of the string being evaluated was a mathemetical formula. But seeing that the strings in the example were the ruby code for the instance variables (Ex: "@command_window", "@menu_window", etc), the value returned would be the instance values themselves... in laymans terms.
I will say that the use of instance_variable_get has the ability to garner the value of the instance value directed by a supplied :symbol.
So unless one wishes to broaden the definition of 'evaluate' beyond its current scope to mean 'retrieve' or the like:
- Evaluate data from an an array from its index
- Evaluate an object from its list of index variables with its symbol
- Evaluate a color from its R G B A values
- Evaluate....
No, you cannot evaluate :symbols.
The immediate statement claiming I was wrong included sample code that in no way proved me wrong, instead using an alternate method to acquire data rather than utilizing the eval command, and in no way performed an evaluation but straight retrieval. You can use :symbols to point to data like an index or key, but neither they nor their related command perform actual evaluation as the eval command is currently defined.
Currently, I am working on a revision to my Layered Spritesheet tool.
There were issues with the 'Set Preferences' button that did not properly retrieve the Gender and Left/Right hands button values, and had difficulty with eliminating 'white spaces' aka ineffective formatting space characters when parsing data.
Meanwhile, more categories and resource folders are being added: snouts for animal-like characters, more expansive eye folders for use with faceset generating resources, underwear, and more.
And can you skin the interface???
Be afraid
The person who asked me to include such a feature it almost fainted. Not sure I'm gonna get any more requests from him for a while