I am once again working on making tabs. I am using Dynamic components to make the tabs and such. When I switch tabs I set the color for all them to a light gray, then darken the current tab. It works perfectly as designed when I make the tab, then switch to tab 1. However in the case of only two tabs. Switching back to tab2 gave me the error, “component can not be null.” I fixed this earlier due to an error with the while loop. I will attach the affected code along with a PNG of the entirety of the code. I can attach an AIA file if needed.
See if the logic used here is of any use to you:
I don’t think it is. I have all the buttons as the default light gray and the selected 1 to be dark. When reselecting tab2. Something in the while loop goes wrong, and I dont know why. It used to be because it started at 1 but that was not a valid id. I changed it to 2 and that fixed it. Until I duplicated it and put it into the new function. Then it just broke. Exact same code, different outcome.
No, so that code, the store value is storing the url from the previous tab. Then switching which tab is active.
I made up a quick demo using @Kevinkun 's CompCreator (I don't use the DynamicComponents extension) to hopefully demonstrate the logic required
dynTabs.aia (39.2 KB)
You perhaps need to take out some parts of your workflow to test each level of logic before adding more...
Well I found the problem. Firstly, when I do this I don’t have the problem
Then when I use a comment and test it out. It shows this instead of 2,
I don’t know how to fix it because in previous code, this worked. Now i have to use component with the anybutton.click to register a dynamically made button then use the id. I don’t know why the id is coming as ““ but I know where the problem is now. Additionally in this example the id the component variable should give is 2. When I hard code it the error does not show. So its something with the component getting the id. I still don’t understand why this is happening
I figured it out so in this screenshot
you can see the get component is taking the id but I'm giving it the component. SO the fix was first putting in a get id with the component then get the component from the id.
that is why I made the CompCreator extension, no id needed. ![]()
id always drives me crazy.
But when making dynamic buttons and corresponding labels. its easier to do than lists. I HATE LISTS AND DICTIONARIES (when nested)
How can I create a way to delete any dynamic tab? Tab 1 is not dynamic. The tabs are the only thing made dynamically. In my case dynamic components is better (atleast to my knowledge) compared to comp creator. Here is my code and aia linked below.
chromeboxV9_3_6_5.aia (176.3 KB)








