You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Be aware that component class inheritance will not work correctly unless using the render macro. If you want to get rid of the warning temporarily and work around the inheritance problem do this in your base component class:
classLegacyBaseClassdefself.inherited(base)base.includeHyperstack::Component::Baseenddefself.allow_deprecated_render_definition?trueend
...
end
In Legacy Hyperloop the Hyperloop Component base class defined the inherited method as shown above. But in Hyperstack we don't want to force use of a base class prefering module includes instead. However some features, notably the ability to reference the component's insert_element method by using the class name followed by parenthesis (i.e. Foo::Bar()) depends on knowing when the component class is defined.
Since every runnable component must have a render callback, we use the callback definition as a hook to add the class method definition.
Activity
catmando commentedon Nov 15, 2018
The fix for this relies on the render macro calling
Tags.included(self)which registers the class name in the parent.So we need to deprecate all use of
def render.closes #60
catmando commentedon Nov 15, 2018
This is closed pending release.
Be aware that component class inheritance will not work correctly unless using the
rendermacro. If you want to get rid of the warning temporarily and work around the inheritance problem do this in your base component class:In Legacy Hyperloop the Hyperloop Component base class defined the inherited method as shown above. But in Hyperstack we don't want to force use of a base class prefering module includes instead. However some features, notably the ability to reference the component's
insert_elementmethod by using the class name followed by parenthesis (i.e.Foo::Bar()) depends on knowing when the component class is defined.Since every runnable component must have a
rendercallback, we use the callback definition as a hook to add the class method definition.barriehadfield commentedon Nov 16, 2018
@catmando all of the docs and examples use
render doalreadycloses hyperstack-org#60
hyper-model: close the second half of the get_model constant gate (hy…
Merge branch 'fix/issue-60-get-model-gate-spec' into 'edge'