I'm trying to play with your framework. Based on this section in wiki, I can create a custom inkComponent as a widget. When I want to add it in the tree using Reparent, the following error is shown in compilation logs:
[NO_MATCHING_OVERLOAD]
group.Reparent(other);
^^^^^^^^^^^^^^
arguments passed to Reparent do not match any of the overloads:
1st argument: expected wref\<inkCompoundWidget>, given ref\<MyOtherComponent>
Here parts of the code:
public class MyOtherComponent extends inkComponent {
// ...
}
public class MyComponent extends inkComponent {
// ...
protected cb func OnCreate() -> ref<inkWidget> {
let root = new inkCanvas();
root.SetName(this.GetClassName());
root.SetAnchor(inkEAnchor.Fill);
let other = new MyOtherComponent();
other.Reparent(root);
let group = new inkVerticalPanel();
group.SetName(n"group");
group.SetAnchor(inkEAnchor.BottomCenter);
group.SetAnchorPoint(new Vector2(0.5, 1.0));
group.SetMargin(new inkMargin(8.0, 0.0, 8.0, 48.0));
group.Reparent(other); // <--- compilation error
return root;
}
}
According to the log, Reparent doesn't accept an inkComponent-like instance. Can I declare and how can I do so using inkComponent and reparent it among other widgets? Should I use the "old" inkCustomController approach I saw in your code and others?
Hi,
I'm trying to play with your framework. Based on this section in wiki, I can create a custom
inkComponent
as a widget. When I want to add it in the tree usingReparent
, the following error is shown in compilation logs:Here parts of the code:
According to the log,
Reparent
doesn't accept aninkComponent
-like instance. Can I declare and how can I do so usinginkComponent
and reparent it among other widgets? Should I use the "old"inkCustomController
approach I saw in your code and others?Any guidance would be much appreciated :)