November 16, 2017, 2:51pm
I have the following working code in my derived class Derived:
The member “m_pStyle” is in the base class Base.
I’d like to NOT have the above code in the derived class, but only in the base class.
I’d like to NOT have all derived classes have to touch all members.
How do I do that?
You could replace SLATE_BEGIN_ARGS with its contents, then change the arguments struct to derive from the base classes arguments like so
struct FArguments : public SMyBaseClassWidget::FArguments
typedef FArguments SMyDerivedWidget::FArguments;
This is pretty messy though and you would have to manually update it if the SLATE_BEGIN_ARGS macro changes
Acually this has further issues, as the return type of ‘Me’ would be the base classes arguments you would not be able to use SNew
November 16, 2017, 10:14pm
Thank you. I don’t understand all of your answer but it seems you know enough to not want to do it.
I’ll switch to
use set(ter) methods
go around the construct method and just construct when I am ready