Comments (3)
Also when passing the object it does work
local basalt = require("basalt")
local main = basalt.createFrame()
local container = main:addFrame("container")
local button = container:addButton("removableButton")
:setPosition(2, 2)
:setText("Remove me")
main:addButton()
:setPosition(2, 4)
:setText("Remove the button above")
:onClick(function()
local removed = container:removeChild(button)
if removed then
basalt.debug("Button removed!")
else
basalt.debug("Button not found!")
end
end)
basalt.autoUpdate()
In a related note Flexbox seems to not work at all either way
local basalt = require("basalt")
local main = basalt.createFrame()
local container = main:addFlexbox("container")
local button = container:addButton("removableButton")
:setPosition(2, 2)
:setText("Remove me")
main:addButton()
:setPosition(2, 4)
:setText("Remove the button above")
:onClick(function()
local removed = container:removeChild("removableButton")
if removed then
basalt.debug("Button removed!")
else
basalt.debug("Button not found!")
end
end)
basalt.autoUpdate()
Using the object it doesn't crash but it is unable to find the child
local basalt = require("basalt")
local main = basalt.createFrame()
local container = main:addFlexbox("container")
local button = container:addButton("removableButton")
:setPosition(2, 2)
:setText("Remove me")
main:addButton()
:setPosition(2, 4)
:setText("Remove the button above")
:onClick(function()
local removed = container:removeChild(button)
if removed then
basalt.debug("Button removed!")
else
basalt.debug("Button not found!")
end
end)
basalt.autoUpdate()
from basalt.
Hey, i think it is fixed now. I didn't try the flexbox. Thank you for the report!
from basalt.
Downloaded the source and tried all the examples and they all worked without problems. Thanks!
from basalt.
Related Issues (20)
- bug: Broken basalt.update() HOT 1
- bug: installer errors HOT 3
- bug: basalt overrides custom palettes
- feature: support for Nitrogen Fingers Text
- bug: Textfield newline deletion attempting to index field of nil value HOT 1
- bug: XML labels not automatically resizing
- docs: State what classes each object inherit from, with links to those classes. HOT 1
- bug: "addObject" function doesn't seem to do anything
- Bug: Button OnClick not detecting clicks HOT 4
- feature: Allow to register custom XML parsers
- bug: setActiveFrame does not change the active frame
- bug: Unable to create input fields HOT 2
- bug: Loading image
- bug: atempt to perform arithmetic on a table value HOT 2
- feature: Custom colors HOT 2
- bug: [TITLE]“onEvent”disable HOT 4
- bug: Basalt[2] changing background not working properly
- feature: Override hard-cap on Graph maxEntries
- bug: [basalt.autoUpdate() Expected something before the end of the line Tip: Use () to call with no arguments] HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from basalt.