About WidgetSwitcher and GridPanel

Hello!

Look, i have a few GridPanels in my WidgetSwitcher. I need to send in active panel a string several times. When as we have a text - we have a gridpanel with it. When we send another string - the gridpanel rebuild. How i can do this?

i’m not very expirienced with construct and deconstruct widgets, but this is the idea. When information changed - rebuilt the GridPanel immediately.

UPD: yes, it’s not very important: by telling GridPanel i mean different widgets, that include the grid panel.

I, kind of, feel that what you’re asking has a straightforward answer but I’m finding it difficult to wrap my mind around the actual issue at hand.

I need to send in active panel a
string several times.

I get this but none of the rest :expressionless: Any chances you could clarify what you’re after again?

Oh, sorry for my eng.
Maybe this will help? First, we type some info then send it to grid. And every time we type and commit smth we need to rebuild grid once again.

I use event dispatcher and select nodes, but the problem is - the grid does not respond to string changes.

At best - i can make one more widget. BUT I need just rewrite the already existing with new string.

At this moment i have the only option, i think the problem is in widget. Just Event Construct and the build code. At the beginning the question was about construct and deconstruct widget.

UPD. I think it’s just about how to refresh grid with new info. It’s most correct)

Consider the following and do tell if it helps at all:

  • Here is my grid, it’s a widget with a grid:
    317941-
    It has a custom event I can call and send in a string so the grid can reconfigure itself.

  • Here’s my switcher with a bunch of grids:

317942-switcher.jpg

The switcher can update its active (or any other) grid like so:

I use event dispatcher and select nodes

Not sure what that means. You use dispatcher to select widgets, right?

I do not understand what you need to do or what Event Dispatchers have to do with this. You’d use an ED if you wanted the Grid talk to the Switcher, not the other way round.

What is stopping you from sending the data as demonstrated above when committing text?

Are you talking about the way you select what the switcher is showing and which grid is selected?

I use ED to transfer data and use select to choose right widget (by widgetswitcher index). Inside grid i have the string var - it on the screen.
(The string from Input widget goes with ED to the switcher, then inside the new string var is set by ED and travel to the grid. finally)

When i make this monstrous code play - i type the string first time - it’s working, the second - it’s not.

(Yes not very brilliant screenshot)
So the result i want: every time i commit my text - the widget changed

Looks like it should work ok, providing the plugged in references are valid and you’re providing correct indexes for the Select node. Are you? You can always put a print string before setting text to see where you’re sending the data to.

I need to send in active panel a
string several times.

I fail to see how setting a string would affect the grid panel. You surely want to execute an event in the target grid, no? Or at least have the Switcher reorganise it.

When i make this monstrous code play -
i type the string first time - it’s
working, the second - it’s not.

Debug it step by step, check what data goes where.

Got the answer. I just need the Event Construct → Add Custom Event. And simply activate event every time as i need.