Re: [Iup-users] Problem with '==' comparing IUP handles
Brought to you by:
scuri
|
From: Francisco Sant'a. <fra...@gm...> - 2025-07-31 01:45:22
|
Em qua., 30 de jul. de 2025, 09:02, Antonio Scuri <ant...@gm...>
escreveu:
>
> You can workaround it, by switching the order, print(srv == txt) should
> work in this case, but it will not compare two Iup Handles.
>
Thanks, I'm now holding an empty table on each object (h.id = {}) to serve
as a comparable unique identifier.
It works, but I still need some tweaks to identify 'h' as an IUP object to
be sure that I can index it correctly.
I wonder if there's any robust way for this check (e.g., iup.ishandle(h)).
Maybe some getmetatable test?
Thanks!
|