Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recursive tree doesn't work properly #53

Open
shebov3 opened this issue Jun 26, 2024 · 2 comments
Open

recursive tree doesn't work properly #53

shebov3 opened this issue Jun 26, 2024 · 2 comments
Assignees
Labels
investigating Needs more investigation to determine nature

Comments

@shebov3
Copy link

shebov3 commented Jun 26, 2024

not sure if this is actually made so you can make recursive trees but

here's a comparison between both iris and correct output structures
image

here's the code

local controller = require(game.Players.LocalPlayer:WaitForChild("PlayerController"))
local replicatedStorage = game:GetService("ReplicatedStorage")

--[[ Modules ]]
local iris = require(replicatedStorage.Packages.iris)
iris.Init()

local function loop(i, table: table)
  iris.Tree({ `{i}` })
    for index, value in pairs(table) do
      if type(value) == "table" then
	  loop(index, value)
      else
	  iris.Text({ `{index} = {value}` })
      end
    end
  iris.End()
end	

iris:Connect(function()
  local windowSize = iris.State(Vector2.new(300, 200))
  iris.Window({ "Client" }, { size = windowSize })
  loop("PlayerController", controller)
  iris.End()
end)
@JakeyWasTaken
Copy link
Contributor

I think this could be an issue with how iris manages id's, mess around with pushing and popping id's and see if that fixes it

@SirMallard SirMallard added the investigating Needs more investigation to determine nature label Oct 18, 2024
@SirMallard SirMallard self-assigned this Oct 18, 2024
@SirMallard
Copy link
Owner

Which version of Iris are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating Needs more investigation to determine nature
Projects
None yet
Development

No branches or pull requests

3 participants