Parent Widget Class not ticking

Hi! I am having a problem with Widget inheritances.

I created a base widget class called “UI_BNT_WID”

this class has a print string node on the event tick.

image

Then I have a child class widget called “UI_BTN_START”, so Parent class is
“UI_BNT_WID”

image

also has a print on the ticker.

image

My problem is when I create and add UI_BTN_START, I can
see the START print on runtime but the print of parent class
UI_BNT_WID is not appearing so UI_BNT_WID is not ticking even
it is parent class.

parent class tick frequency is on default AUTO setting

image

Thanks!

This is not the most elegant thing but its a workaround:

I create a fake ticker event in parent class and then
I connect that event in the childs class ticker like this:

Parent Class:

image

Child Class:

image

improved method? :rofl:

Is the child widget added the viewport or to a container whose widget is in the viewport? As in: widgets that are not showing do not tick…

UI_BNT_WID is not appearing so UI_BNT_WID is not ticking even
it is parent class.

Perhaps I misunderstand something, is this what you’re after:

This would run whatever is in the parent’s Tick.


Other than that, the setup should work.

Hi @Everynone !

I have a main WID that I add to screen…this main wid contains the child wid (BTN_START), child class of BTN_WID.

Can you explain how to add PARENT: TICK in childs class ticker?

this part:

Thanks!

image

This works for all derived calls, ofc. You oftentimes want to evoke the parent’s functionality in addition to the child’s implementations.

1 Like

Thanks man! That is the perfect solution.
I’m glad to see you still around helping :smiling_face_with_three_hearts:

Cheers!
Dany

2 Likes