THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/12/2012 at 13:47, xxxxxxxx wrote:
I'm having trouble with a programming concept for general button creation and deletion. Not just in C4D. But the concept in general.
Specifically: How can I dynamically make each button an independent object. So that I can create and delete specific buttons. Rather than the last one in the chain.
The internet is full of code on how to create and delete buttons as a chain of buttons using increment and decrement with loops. Even the C4D SDK has an example of this in the AsyncTest example. Which adds and deletes rows.
But what do you do if you need to dynamically create or delete a button in the middle of that chain of buttons instead of that last one?
I've tried various things with arrays. And I'm always getting bad results after I delete one of the buttons, and then try to add new ones. I get doubles and all sorts of other weirdness.
Rather than trying to re-invent the wheel. I'd much rather learn how other people are doing this kind of thing.
Can anyone explain how to do this kind of thing?