Re: Can change vtbl record at runtime ?

2021-02-03 Thread Виталий Фадеев via Digitalmars-d-learn
On Wednesday, 3 February 2021 at 10:20:44 UTC, evilrat wrote: On Wednesday, 3 February 2021 at 08:26:05 UTC, Max Haughton wrote: On Wednesday, 3 February 2021 at 05:30:37 UTC, Виталий Фадеев wrote: Possible to change the vtbl record at runtime ? Has functional for update vtbl records ? Do you

Re: Can change vtbl record at runtime ?

2021-02-03 Thread Виталий Фадеев via Digitalmars-d-learn
On Wednesday, 3 February 2021 at 08:26:05 UTC, Max Haughton wrote: On Wednesday, 3 February 2021 at 05:30:37 UTC, Виталий Фадеев wrote: Do you mean "Can I set onSuccess" at runtime? Yes.

Re: Can change vtbl record at runtime ?

2021-02-03 Thread frame via Digitalmars-d-learn
On Wednesday, 3 February 2021 at 05:30:37 UTC, Виталий Фадеев wrote: Reason: Reuse component, bind custom callback without creating new class. Concept example: class SaveFilePopup { void onSuccess() { /* default operations */ } } auto saveFile = new SaveFilePopup

Re: Can change vtbl record at runtime ?

2021-02-03 Thread evilrat via Digitalmars-d-learn
On Wednesday, 3 February 2021 at 08:26:05 UTC, Max Haughton wrote: On Wednesday, 3 February 2021 at 05:30:37 UTC, Виталий Фадеев wrote: Possible to change the vtbl record at runtime ? Has functional for update vtbl records ? Do you mean "Can I set onSuccess" at runtime? The virtual tables are

Re: Can change vtbl record at runtime ?

2021-02-03 Thread Max Haughton via Digitalmars-d-learn
On Wednesday, 3 February 2021 at 05:30:37 UTC, Виталий Фадеев wrote: Reason: Reuse component, bind custom callback without creating new class. Concept example: class SaveFilePopup { void onSuccess() { /* default operations */ } } auto saveFile = new SaveFilePopup

Can change vtbl record at runtime ?

2021-02-02 Thread Виталий Фадеев via Digitalmars-d-learn
Reason: Reuse component, bind custom callback without creating new class. Concept example: class SaveFilePopup { void onSuccess() { /* default operations */ } } auto saveFile = new SaveFilePopup(); saveFile.onSuccess = { /* New operations */ } Delegate: m