[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nested _next for same object class, confusion


Le 30/05/2024 à 20:15, Brian G a écrit :
I have a question, how to implement nested key value for a class with a _next function where the key is not equal to the enum.index value.

I include a simple script to demonstrate the issue. Which happened to me by accident.

After the nested _next, the key is of course equal to the value of the last nested cycle of the inner most next.

Here a script(extremely simplified) that shows the issue I am having. Maybe I am not seeing the simple answer.


'Enum.Index' is a Variant, so you can put whatever you want in it. In your case, you must put both the index and the key.

Another solution is making the 'Key' property compute the key from the current index, and not store it in a global variable.

Regards,

--
Benoît Minisini.


Follow-Ups:
Re: nested _next for same object class, confusionBrian G <brian@xxxxxxxxxxxxxxxx>
References:
nested _next for same object class, confusionBrian G <brian@xxxxxxxxxxxxxxxx>