[DiscordArchive] hmm, but in your examples there the classname is nowhere as string, would that matter?
[DiscordArchive] hmm, but in your examples there the classname is nowhere as string, would that matter?
Archived author: Foe • Posted: 2022-05-16T17:42:00.724000+00:00
Original source
If you store the class name in a global table called classes, sure, but in your example you iterate over the classes table already
Archived author: Foe • Posted: 2022-05-16T17:42:23.350000+00:00
Original source
like, how is your A and B classes defined? since thats not part of the script
Archived author: Grandold • Posted: 2022-05-16T17:45:38.659000+00:00
Original source
the class definitions aren't really an issue anymore, figured that part out but still just wondering that variable variable thing... but that your example would work as it is?
Archived author: Foe • Posted: 2022-05-16T17:46:08.121000+00:00
Original source
Yeah if A and B are available as objects in the global namespace, it would work as is
Archived author: Grandold • Posted: 2022-05-16T17:46:11.671000+00:00
Original source
assuming both A and B classes are defined in same file and got the get method
Archived author: Foe • Posted: 2022-05-16T17:46:17.607000+00:00
Original source
yep
Archived author: Grandold • Posted: 2022-05-16T17:46:29.416000+00:00
Original source
okay, so k and v in the for are automatically in global scope?
Archived author: Foe • Posted: 2022-05-16T17:46:38.184000+00:00
Original source
if they are in the same file (local namespace) you could just do v():get()
Archived author: Grandold • Posted: 2022-05-16T17:47:08.938000+00:00
Original source
okay I rly gotta test that again, I think that would have been first thing I tried
Archived author: Foe • Posted: 2022-05-16T17:47:14.103000+00:00
Original source