Posted 15 August 2014 - 04:58 AM
I am having several issues attempting to leverage oeed's bedrock api to create guis for my programs. However I am running into a consistent errors of either "could not load view" or "view does not exist." If someone could tell me what I am doing wrong within this infuriating program… it would be very appreciated!
Thanks!
RlonRyan
Code
Main Program
-- Obtain view(s)
if (not fs.exists("Views/main.view")) then
shell.run("pastebin get F8WKXGGe Views/main.view")
end
local program = Bedrock:Initialise()
program:LoadView("Views/main.view")
program:Run(function()
program:GetObject("HelloLabel").Text = "Hello! I'm a Label!"
program:GetObject("HelloLabel").BackgroundColour = colours.lightBlue
end)
Main View
{
Children={
{
X=2,
Y=2,
Name="HelloLabel",
Type="Label",
Text="Hello! I\'m a Label!"
},
{
X=2,
Y=4,
Name="HelloButton",
Type="Button",
Text="Hello! I\'m a Button!"
}
},
BackgroundColour="white"
}
Thanks!
RlonRyan
Edited on 15 August 2014 - 04:52 AM