Dinamically create objects

Hello,
I am trying to achieve a kind of ‘dinamic objects creation’ in the following sense.
I am working on a project in mathematics, but I am not an experienced developer. Let’s say that I have various tables in my DB which store data of the same kind.
For instance, I can have various sets, and on each set I have defined a few operations which belong to the particular set:

  • set A, operations +, -
  • Set B, opeartions * , ! , #
  • Set C + , * , !!
    (notice that a set may have tens of operation defined upon itself, and that the fact that two operation have the same name on two different set does not mean they are the same thing: thus, I have all of my sets defined in a table SETS, and every row of SETS is linked to a table OPERATIONS).

Now, I would need to create an interface that, when working on a set, automatically fills a grid of buttons which have the name of the operation as text property (and this I was able to do, with a for loop on the iterable returned by app_tables.table_name,search() ), and such that all buttons automatically trigger the same function carry_out_operation(‘operation_name’) in the form, which then handles the operation properly.
If I had access to the Button Class, then I could create a derived instance of it where the click method is a priori bounded to carry_out_operation, but it that class cannot be accessed. Help please?

What do you mean by this?

If I understood you correctly, I think you could just make a custom component with the click event of the button internal to that component.

Hello, I am sorry for the typo. It was but it SEEMS that that class cannot be accessed directly.
I’ll try to explain, I would need to create a class of buttons whose default click event is not ‘pass’, but a call to the method ‘carry_out_operation()’, so that when I dinamically create the buttons, they by default have a carry_out_operation linked to their click event, and I need not to go and set it manually: the user will want to create his own custom operation without having to access the code

What do you mean by

Will the user be determining the code itself that’s run?