This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
oeed's profile picture

Bedrock - The Complete GUI Framework

Started by oeed, 20 July 2014 - 01:08 AM
oeed #1
Posted 20 July 2014 - 03:08 AM
What is Bedrock?

Bedrock is an extremely advanced and powerful framework for developing beautiful, easy to use ComputerCraft programs. Not only does it make for a more pleasant experience for the user, by coding programs with Bedrock removes the need for you, the developer, to wrangle with low level aspects of programs. With Bedrock file sizes are also significantly lower than previously due to huge amounts of code, that would have previously made your program huge bigger, being in one central API. A single line of code is all that is needed to download and install Bedrock, and if Bedrock was already installed by another program it will use that version, saving precious disk space.

Bedrock is designed to be similar to existing interface frameworks such as Apple’s Cocoa, the framework used to develop the majority of iOS and OS X. I’m sure that it will also be similar to others such as .NET and possible Java, but I’m not very familiar with them. If you’ve used these in the past, Bedrock should be pretty easy to pickup, if you haven’t, don’t worry. It may take some time to work it out, but once you do you’ll be able to create better programs in record time.

It's hard to explain just what Bedrock is really. Take a look at the tutorial (link at the bottom of the post) for a more detailed description and example code.

What objects does it support?
  • Buttons
  • CollectionViews (think the icon view in OneOS's Files)
  • ImageViews
  • Labels
  • ListViews
  • Menus
  • ProgressBars (including multiple values and colours, think the storage usage bar in About OneOS)
  • ScrollBars (these are automatically handled by ScrollViews though)
  • ScrollViews
  • Separator (just single line)
  • TextBox
  • Windows
Bedrock also makes it very easy to make your own objects. For example, in OneOS the thing that draws programs is actually just a custom object.

What are the benefits of Bedrock?

Bedrock is designed to be very quick and easy to use, yet very powerful. It only takes a matter of minutes to learn how to use it and will save you hours in the long run.
One of Bedrock's main goals is to reduce the amount of code you need to write. I've personally found that programs I use Bedrock are normally a third the number of lines, and that doesn't include having to write the APIs in the first place.

What are some programs made with Bedrock?
If you made a program with Bedrock let me know, I’ll add you to the list!

- OneOS - OneOS and most of it’s programs were entirely coded using Bedrock. Anything that OneOS does you can do with ease.
- Your next program?

Installation/Download

If you want to just take a look at the code you should use the GitHub repo. https://github.com/oeed/Bedrock

Installation is very easy, simply add this line to the top of your file and it will automatically download and load the API.

local bedrockPath='/' if OneOS then OneOS.LoadAPI('/System/API/Bedrock.lua', false)elseif fs.exists(bedrockPath..'/Bedrock')then os.loadAPI(bedrockPath..'/Bedrock')else if http then print('Downloading Bedrock...')local h=http.get('http://pastebin.com/raw.php?i=0MgKNqpN')if h then local f=fs.open(bedrockPath..'/Bedrock','w')f.write(h.readAll())f.close()h.close()os.loadAPI(bedrockPath..'/Bedrock')else error('Failed to download Bedrock. Is your internet working?') end else error('This program needs to download Bedrock to work. Please enable HTTP.') end end if Bedrock then Bedrock.BasePath = bedrockPath Bedrock.ProgramPath = shell.getRunningProgram() end

How to use it.

Bedrock is quite different to most other APIs/frameworks. I've made a very sizeable tutorial which I highly recommend you read. At this stage the tutorial is the only documentation.
Edited on 29 November 2014 - 09:29 AM
Geforce Fan #2
Posted 20 July 2014 - 03:59 AM
Huh. Looks cool. I'll look into this later… this could save me a LOT of trouble in Sapphari(and pretty much do everything for me…)
Although it seems it's not all in one file. This could bring problems if using an online version.
Edited on 20 July 2014 - 02:01 AM
oeed #3
Posted 20 July 2014 - 04:12 AM
Huh. Looks cool. I'll look into this later… this could save me a LOT of trouble in Sapphari(and pretty much do everything for me…)
Although it seems it's not all in one file. This could bring problems if using an online version.
It's one single file, it puts the APIs as strings so it functions as if they are separate though.
It's all in this file.
LDShadowLord #4
Posted 20 July 2014 - 04:28 AM
Hmmm, I may adopt this. It will save me the hassle of trying to shoe-horn a GUI system into Colligo.
Win7yes #5
Posted 20 July 2014 - 11:35 AM
How do you make the program stop running?
oeed #6
Posted 20 July 2014 - 12:56 PM
How do you make the program stop running?
Use program:Quit()
At the moment it doesn't clear the screen or anything though (IIRC).
logsys #7
Posted 20 July 2014 - 03:16 PM
Very powerful and useful! Everyone's programs should use it
Win7yes #8
Posted 20 July 2014 - 08:25 PM
How do you make the program stop running?
Use program:Quit()
At the moment it doesn't clear the screen or anything though (IIRC).
Edit: Nevermind, I had an useless if statement in the middle of the code wich broke everything.
Edited on 20 July 2014 - 06:29 PM
oeed #9
Posted 20 July 2014 - 10:56 PM
How do you make the program stop running?
Use program:Quit()
At the moment it doesn't clear the screen or anything though (IIRC).
Edit: Nevermind, I had an useless if statement in the middle of the code wich broke everything.
What was it? I might be able to add an error telling you how to fix it.
sjkeegs #10
Posted 21 July 2014 - 02:39 AM
Does this have any dependency on any version of ComputerCraft. I'm still using 1.58.
Win7yes #11
Posted 21 July 2014 - 03:05 AM
How do you make the program stop running?
Use program:Quit()
At the moment it doesn't clear the screen or anything though (IIRC).
Edit: Nevermind, I had an useless if statement in the middle of the code wich broke everything.
What was it? I might be able to add an error telling you how to fix it.
I made an Alert Box be displayed when a button is clicked, and before adding the code to close the program by pressing the button of the box, I left some code that
was supposed to close the Alert Box, And that wrecked up everything making the program only close the Alert Box, but not the program itself. It was something like this

if program:Window then
or something like that.
By the way, Is there any way to "switch" views?
oeed #12
Posted 21 July 2014 - 03:44 AM
Does this have any dependency on any version of ComputerCraft. I'm still using 1.58.
Bedrock should work on all versions of CC that support colour. Let me know if you find an issue.

I made an Alert Box be displayed when a button is clicked, and before adding the code to close the program by pressing the button of the box, I left some code that
was supposed to close the Alert Box, And that wrecked up everything making the program only close the Alert Box, but not the program itself. It was something like this

if program:Window then
or something like that.
By the way, Is there any way to "switch" views?
First, in future please make help posts on the tutorial post. It just keeps things more tidy.

I don't completely get what you're saying, but Alert Boxes should close themselves when you click a button (let me know if they're not).

If you want an alert box to close your program you should (haven't tested) be able to do something like this:

program:GetObject('HelloButton').OnClick = function(self, event, side, x, y)
program:DisplayAlertWindow('Quit?', 'Are you sure you want to quit?', {'Quit', 'Cancel'}, function(value)
if value == 'Quit' then
program:Quit()
end
end)
end

Yes, there is. I forgot to mention that in the tutorial.

Simply do this:

program:LoadView('viewname') --without the .view
Win7yes #13
Posted 21 July 2014 - 03:46 AM
No but I mean I left some things that made the program:Quit() fail to close and it just closed the Alert box. And Sorry :P/> I will make help posts in the tutorial
topic in the future
oeed #14
Posted 21 July 2014 - 04:02 AM
No but I mean I left some things that made the program:Quit() fail to close and it just closed the Alert box. And Sorry :P/> I will make help posts in the tutorial
topic in the future

Oh I see, can you give some example code? (post in the tut. topic)
daawsomest #15
Posted 23 July 2014 - 12:11 AM
Hello,

This framework looks awesome and will be very helpful for my current projects, but I can't get it working. I have tried multiple times on different CC computers with no luck. The error I get is "No loaded view. You need to do program:LoadView first". I have created a main view and was under the assumption that it would be loaded automatically.

Screenshots:
Spoiler





oeed #16
Posted 23 July 2014 - 11:05 PM
Hello,

This framework looks awesome and will be very helpful for my current projects, but I can't get it working. I have tried multiple times on different CC computers with no luck. The error I get is "No loaded view. You need to do program:LoadView first". I have created a main view and was under the assumption that it would be loaded automatically.

Screenshots:
Spoiler





Sorry for the late reply, I didn't get a notification for some reason.

That is strange, there's nothing that seems to be incorrect.

Looking at Bedrock's code I'm pretty sure that the only way this could've happened is it think the file doesn't exist.
For now, try doing this at the top of the program:Run function.

program:LoadView('main')
Let me know if it works/has an error.

If possible could you upload a zip file of the computer so I can see whats wrong?
Win7yes #17
Posted 23 July 2014 - 11:52 PM
It happend to me too when I started making my OneOS Log Displayer (By the way I need help to make it work on OneOS. And the scroll textbox thing). It said that I needed to load it first with program:LoadView and I added program:LoadView("main") to the code and it worked. Didn't report it because I thought it wasn't like a big thing.
oeed #18
Posted 24 July 2014 - 01:28 AM
It happend to me too when I started making my OneOS Log Displayer (By the way I need help to make it work on OneOS. And the scroll textbox thing). It said that I needed to load it first with program:LoadView and I added program:LoadView("main") to the code and it worked. Didn't report it because I thought it wasn't like a big thing.
Hmm ok, could you, at some point, send the files to me. I'd like to get that fixed. I'm rather busy at the moment, but I'll try to help if I can.
Win7yes #19
Posted 24 July 2014 - 02:22 AM
Is it ok if I put the files in a ZIP and upload the ZIP somewhere? (Somewhere like Google Drive. Or to be more specific, Google Drive)
Edited on 24 July 2014 - 12:39 AM
oeed #20
Posted 24 July 2014 - 05:14 AM
Is it ok if I put the files in a ZIP and upload the ZIP somewhere? (Somewhere like Google Drive. Or to be more specific, Google Drive)
Yea sure, I'd just like to see if I can figure out what the issue is.
hbomb79 #21
Posted 24 July 2014 - 05:31 AM
This looks like it would be very helpful, Good job, You ever fail to produce amazing work.. If only I had the knowledge to use it :)/>
Win7yes #22
Posted 24 July 2014 - 07:42 AM
Is it ok if I put the files in a ZIP and upload the ZIP somewhere? (Somewhere like Google Drive. Or to be more specific, Google Drive)
Yea sure, I'd just like to see if I can figure out what the issue is.
Ok. Check your messages, I will send you a link to the ZIP file (Probably)
InputUsername #23
Posted 27 July 2014 - 10:57 PM
First of all, this is great! Not sure if I'll be using it though… Might play around with it for a while.

Anyway, I have a question about how it works. To make the program run, you supply a function to program:Run()
Spoiler
program:Run(function()
--do stuff now
end)
so I was wondering if this function is run only once or every time the program loops? Looking at the source I suppose it only runs the code you supply once, is that true?
oeed #24
Posted 28 July 2014 - 01:50 AM
First of all, this is great! Not sure if I'll be using it though… Might play around with it for a while.

Anyway, I have a question about how it works. To make the program run, you supply a function to program:Run()
Spoiler
program:Run(function()
--do stuff now
end)
so I was wondering if this function is run only once or every time the program loops? Looking at the source I suppose it only runs the code you supply once, is that true?
Yes it only runs once. You can handle events yourself though.
Win7yes #25
Posted 10 August 2014 - 08:16 PM
Oeed if I make a program with different "Pages" and I want to go back to the main one, how do I… Well, make the things from the main page work again?
Example: I have main.view and asdf.view, I made a button in main.view that has the function to take me to asdf.view and then in asdf.view I made a button that takes me back to main.view, but then the buttons and stuffs from main.view work. How do I make them work again without having to code over and over the things?
Also this: Is it fine if I use Bedrock on a public program?
oeed #26
Posted 10 August 2014 - 10:50 PM
Oeed if I make a program with different "Pages" and I want to go back to the main one, how do I… Well, make the things from the main page work again?
Example: I have main.view and asdf.view, I made a button in main.view that has the function to take me to asdf.view and then in asdf.view I made a button that takes me back to main.view, but then the buttons and stuffs from main.view work. How do I make them work again without having to code over and over the things?
Also this: Is it fine if I use Bedrock on a public program?

You can add the function OnViewLoad, using it like this:

bedrock.OnViewLoad = function(name)
    --name is the name of the view, e.g. main
    -- bind your buttons here, etc
end

And yes, you're most welcome to use it on a public program.
Win7yes #27
Posted 10 August 2014 - 11:29 PM
So if I do

bedrock.OnViewLoad = function("main")
  program:GetObject("Button1").OnClick = function(self, event, x, y
	--I'm missing the "side" argument right?
	-- Whatever the button does
  end
	--Moar Buttonz Stuff
end
It would Re-configurate the buttons?
Is that what I need to do?

PS: The indentation (Or whatever you write it like, I don't remember now) is bad because I can't press "TAB" on the "Input your code here" window to create the tags.
Edit: I think I fixed it. (The indentation)
Edited on 10 August 2014 - 10:08 PM
oeed #28
Posted 11 August 2014 - 01:29 AM
So if I do

bedrock.OnViewLoad = function("main")
  program:GetObject("Button1").OnClick = function(self, event, x, y
	--I'm missing the "side" argument right?
	-- Whatever the button does
  end
	--Moar Buttonz Stuff
end
It would Re-configurate the buttons?
Is that what I need to do?

PS: The indentation (Or whatever you write it like, I don't remember now) is bad because I can't press "TAB" on the "Input your code here" window to create the tags.
Edit: I think I fixed it. (The indentation)
Pretty much, that looks like it should work.
InputUsername #29
Posted 12 August 2014 - 05:19 PM
So if I do

bedrock.OnViewLoad = function("main")
  program:GetObject("Button1").OnClick = function(self, event, x, y
	--I'm missing the "side" argument right?
	-- Whatever the button does
  end
	--Moar Buttonz Stuff
end
It would Re-configurate the buttons?
Is that what I need to do?

PS: The indentation (Or whatever you write it like, I don't remember now) is bad because I can't press "TAB" on the "Input your code here" window to create the tags.
Edit: I think I fixed it. (The indentation)

I think you mean:

bedrock.OnViewLoad = function(loadedView)
    if (loadedView == "main") then
        --init button
    end
end
oeed #30
Posted 12 August 2014 - 11:03 PM
So if I do

bedrock.OnViewLoad = function("main")
  program:GetObject("Button1").OnClick = function(self, event, x, y
	--I'm missing the "side" argument right?
	-- Whatever the button does
  end
	--Moar Buttonz Stuff
end
It would Re-configurate the buttons?
Is that what I need to do?

PS: The indentation (Or whatever you write it like, I don't remember now) is bad because I can't press "TAB" on the "Input your code here" window to create the tags.
Edit: I think I fixed it. (The indentation)

I think you mean:

bedrock.OnViewLoad = function(loadedView)
	if (loadedView == "main") then
		--init button
	end
end

Indeed, don't know why I wrote that.
Win7yes #31
Posted 13 August 2014 - 03:12 AM
So if I do

bedrock.OnViewLoad = function("main")
  program:GetObject("Button1").OnClick = function(self, event, x, y
	--I'm missing the "side" argument right?
	-- Whatever the button does
  end
	--Moar Buttonz Stuff
end
It would Re-configurate the buttons?
Is that what I need to do?

PS: The indentation (Or whatever you write it like, I don't remember now) is bad because I can't press "TAB" on the "Input your code here" window to create the tags.
Edit: I think I fixed it. (The indentation)

I think you mean:

bedrock.OnViewLoad = function(loadedView)
	if (loadedView == "main") then
		--init button
	end
end

bedrock.OnViewLoad = function(loadedView)
	if loadedView == "main" then
		--init button
	end
end
Lua doesn't do ()s around if statements.
KingofGamesYami #32
Posted 13 August 2014 - 03:21 AM
-snip
Lua doesn't do ()s around if statements.
It doesn't require them, but it will accept them. Sort of like semicolons ( ; )
Edited on 13 August 2014 - 01:21 AM
Win7yes #33
Posted 25 August 2014 - 10:47 PM
Well I just tried that and it doesn't even set the buttons up.
Sorry for the delay. Stuff happend and I wasn't able to code.
tenshae #34
Posted 27 August 2014 - 03:19 AM
Hm. Is this something that's OneOS exclusive or is it something like KDE and Gnome where you can include it in your OS as long as you credit?
KeeganDeathman #35
Posted 14 September 2014 - 07:33 PM
Ill be adding this to an interface for my company on my server.
Dont ask.
oeed #36
Posted 14 September 2014 - 10:53 PM
Hm. Is this something that's OneOS exclusive or is it something like KDE and Gnome where you can include it in your OS as long as you credit?

Sorry for the late reply, I haven't been getting notifications for this topic for some reason.

You can use it in whatever you want, OneOS just happens to be built with it.
itzstarstruck #37
Posted 29 September 2014 - 07:11 AM
Can you release a pastebin installer? I can't install OneOS so I can try this :(/>
oeed #38
Posted 29 September 2014 - 07:41 AM
Can you release a pastebin installer? I can't install OneOS so I can try this :(/>
Well, the line of code in the first post is sort of the installer. This is for making programs really, it's not a standalone program.

I might upload a ZIP of OneOS though, people seem to be having issues.
itzstarstruck #39
Posted 29 September 2014 - 07:55 AM
Can you release a pastebin installer? I can't install OneOS so I can try this :(/>
Well, the line of code in the first post is sort of the installer. This is for making programs really, it's not a standalone program.

I might upload a ZIP of OneOS though, people seem to be having issues.

I got OneOS working.
I used the actual Minecraft Mod, not CCEmu.
(and I'm using CC on FTB Monster)
_removed #40
Posted 20 February 2015 - 09:24 PM
I was looking for a textbox api and found it on the github repo.

(Note to self: Stay away from Bedrock; too hard to understand)
SquidDev #41
Posted 20 February 2015 - 10:02 PM
I was looking for a textbox api and found it on the github repo.

(Note to self: Stay away from Bedrock; too hard to understand)

This really, really isn't helpful. I've been part of the CC forums for almost a year now, and it feels like much longer. It is the friendliest programming communities I've ever participated in, and I love every moment of it. Maybe I'm just taking this the wrong way but this sort of comment just isn't helpful for anyone. Sometimes there are threads that end up being "I'm right, you're wrong" arguments and I know I'm as guilty of that as anyone sometimes. I stumbled upon this thread (which please, no one necro) which involved some people who's work I really admire (ElvishJerricco, theoriginalbit, etc…) bashing each other up something-or-other.

I guess what I am trying to say is if you have something to say that is negative, please say it in a more constructive way than "it is too hard to understand": What did you struggle with? How can oeed make this better? IMO Bedrock is the GUI framework to use. Compared with WinForms or Java's Swing, Bedrock is much easier. The only way it could get any simpler would be using HTML/XAML instead.

Sorry for the bit of a rant, but sometimes I just get ugghr at people. Sorry.
Edited on 20 February 2015 - 09:11 PM
oeed #42
Posted 20 February 2015 - 10:39 PM
I was looking for a textbox api and found it on the github repo.

(Note to self: Stay away from Bedrock; too hard to understand)

Well, you're not really allowed to just take parts of Bedrock and make it suit your situation, as the license stays.
cdel #43
Posted 22 February 2015 - 02:54 AM
Wasn't sure if I should chuck this in ask a pro or not, but if it not suitable here im sure an admin/mod could move it. I am having the problem where I am not able to click the "Okay" response on the first alert.

Image:


startup file (OneOS Program):

-- Xeon Jailbreak
OneOS.ToolBarColour = colours.green
OneOS.ToolBarTextColour = colours.white
local version = "v1.3.41"
local bedrockPath='/' if OneOS then OneOS.LoadAPI('/System/API/Bedrock.lua', false)elseif fs.exists(bedrockPath..'/Bedrock')then os.loadAPI(bedrockPath..'/Bedrock')else if http then print('Downloading Bedrock...')local h=http.get('http://pastebin.com/raw.php?i=0MgKNqpN')if h then local f=fs.open(bedrockPath..'/Bedrock','w')f.write(h.readAll())f.close()h.close()os.loadAPI(bedrockPath..'/Bedrock')else error('Failed to download Bedrock. Is your internet working?') end else error('This program needs to download Bedrock to work. Please enable HTTP.') end end if Bedrock then Bedrock.BasePath = bedrockPath Bedrock.ProgramPath = shell.getRunningProgram() end
local program = Bedrock:Initialise()
program:Run(function()
  if version ~= OneOS.Version then
	program:DisplayAlertWindow("Incompatible Version", "Xeon can't Jailbreak this version of OneOS.", { "Okay" }, function(value)
	  if value == "Okay" then
		OneOS.Close()
	  end
	end)
  end
  if not _G.Xeon then
	program:DisplayAlertWindow("Install Jailbreak", "Jailbreak OneOS "..OneOS.Version.."?", { "Yes", "No" }, function(value)
	   if value == "Yes" then
	
	  end	  
	end)
  end
end)
Edited on 22 February 2015 - 01:54 AM
oeed #44
Posted 22 February 2015 - 03:09 AM
Wasn't sure if I should chuck this in ask a pro or not, but if it not suitable here im sure an admin/mod could move it. I am having the problem where I am not able to click the "Okay" response on the first alert.

Image:


startup file (OneOS Program):

-- Xeon Jailbreak
OneOS.ToolBarColour = colours.green
OneOS.ToolBarTextColour = colours.white
local version = "v1.3.41"
local bedrockPath='/' if OneOS then OneOS.LoadAPI('/System/API/Bedrock.lua', false)elseif fs.exists(bedrockPath..'/Bedrock')then os.loadAPI(bedrockPath..'/Bedrock')else if http then print('Downloading Bedrock...')local h=http.get('http://pastebin.com/raw.php?i=0MgKNqpN')if h then local f=fs.open(bedrockPath..'/Bedrock','w')f.write(h.readAll())f.close()h.close()os.loadAPI(bedrockPath..'/Bedrock')else error('Failed to download Bedrock. Is your internet working?') end else error('This program needs to download Bedrock to work. Please enable HTTP.') end end if Bedrock then Bedrock.BasePath = bedrockPath Bedrock.ProgramPath = shell.getRunningProgram() end
local program = Bedrock:Initialise()
program:Run(function()
  if version ~= OneOS.Version then
	program:DisplayAlertWindow("Incompatible Version", "Xeon can't Jailbreak this version of OneOS.", { "Okay" }, function(value)
	  if value == "Okay" then
		OneOS.Close()
	  end
	end)
  end
  if not _G.Xeon then
	program:DisplayAlertWindow("Install Jailbreak", "Jailbreak OneOS "..OneOS.Version.."?", { "Yes", "No" }, function(value)
	   if value == "Yes" then
	
	  end	  
	end)
  end
end)

Here's fine, it means I actually notice it.

One thing, you can actually set the OneOS top bar colour in your Bedrock main.view view. Just set ToolBarColour, so for example:


{
	Children = {
		{
			X = 1,
			Y = 1,
			.... etc
			}
		},
	},
	ToolBarColour = 'green',
	ToolBarTextColour = 'white'
}

Although in version 2 it automatically detects the colour, so you won't need it.

Anyway. Your issue is because you are showing two windows at once. I'll probably try and make a fix for it, as it is technically a Bedrock bug. Essentially you've got dodgy logic in there. You say that it doesn't support that version, but then you still continue the program and try to show the window to start the process.

So just change:

  end
  if not _G.Xeon then  

To:

elseif not _G.Xeon then

Then it should work.



I look forward to seeing how it turns out!
Edited on 22 February 2015 - 02:09 AM
cdel #45
Posted 22 February 2015 - 03:19 AM
thankyou :)/>
Viking #46
Posted 24 February 2015 - 12:41 PM
I have few suggestions what Bedrock should support without creating custom objects or a custom Bedrock source.

1. Fragments
- These are very useful for creating dynamic and more complex UIs. ( think Android SDK )

2. Integration with other apps ( It's more like a OneOS function. I don't know. )
- You could use/reach OneOS app APIs in your programs as an image editor ( Sketch ) or share something via an other app( think Google+, Facebook etc… )
cdel #47
Posted 21 March 2015 - 05:52 AM
If I were to use in something such as an os, would I just put the line of code you provided in something such as a startup file?
oeed #48
Posted 21 March 2015 - 05:58 AM
Pretty much, you'd just make it like any other program.
cdel #49
Posted 21 March 2015 - 05:59 AM
okay, thanks for clearing that up. :)/>
_removed #50
Posted 15 April 2015 - 05:00 PM
Brings me right back to home, so much designed like CSS.

-snip

This really, really isn't helpful. I've been part of the CC forums for almost a year now, and it feels like much longer. It is the friendliest programming communities I've ever participated in, and I love every moment of it. Maybe I'm just taking this the wrong way but this sort of comment just isn't helpful for anyone. Sometimes there are threads that end up being "I'm right, you're wrong" arguments and I know I'm as guilty of that as anyone sometimes. I stumbled upon this thread (which please, no one necro) which involved some people who's work I really admire (ElvishJerricco, theoriginalbit, etc…) bashing each other up something-or-other.

I guess what I am trying to say is if you have something to say that is negative, please say it in a more constructive way than "it is too hard to understand": What did you struggle with? How can oeed make this better? IMO Bedrock is the GUI framework to use. Compared with WinForms or Java's Swing, Bedrock is much easier. The only way it could get any simpler would be using HTML/XAML instead.

Sorry for the bit of a rant, but sometimes I just get ugghr at people. Sorry.
Yeah, I was having a bad day due to having the compiler throw millions of errors at me when we tried to make our own textbox api. Eventually, we did it, but I was stupid to post that. I'm sorry about that.

Besides, this is great! I tried to understand the source code and it looks complicated. Nevertheless, it is a outstanding program/API and should deserver more praise.
Creator #51
Posted 15 April 2015 - 08:52 PM
What is that colours transparent you use. Is it like that it tells the rendering engine to skip the pixel?
Lignum #52
Posted 15 April 2015 - 09:09 PM
What is that colours transparent you use. Is it like that it tells the rendering engine to skip the pixel?

When rendering a transparent pixel, Bedrock will use the pixel that is currently at that location. If there is no pixel there in the buffer, it renders a black pixel.
oeed #53
Posted 15 April 2015 - 11:13 PM
Brings me right back to home, so much designed like CSS.
Well, I can see what you mean in some aspects by setting properties. But other than that it's virtually completely different. But if you like it that's all that matter I guess.

What is that colours transparent you use. Is it like that it tells the rendering engine to skip the pixel?

When rendering a transparent pixel, Bedrock will use the pixel that is currently at that location. If there is no pixel there in the buffer, it renders a black pixel.
Hit the nail on the head there, that's exactly how it works. Basically you use it when you want to see underneath something.
MAPE #54
Posted 04 May 2015 - 09:46 PM
WOW

This framework is super cool. Easy to use and I can develop my programs faster than ever. The best part of this is how I can use this with my own "Object types".

Good job! I hope you will continue the developing.
PixelFox #55
Posted 11 October 2015 - 02:43 PM
On the server I'm on, this API is banned because it lags everything out, If you could somehow make it less laggy, that'd be amazing!
TheOddByte #56
Posted 11 October 2015 - 02:58 PM
On the server I'm on, this API is banned because it lags everything out, If you could somehow make it less laggy, that'd be amazing!
First time I've seen an API banned from servers, but my guess is that oeed is currently busy with other stuff like Silica, so the probability of him continuing to work on this right now feels pretty low.
oeed #57
Posted 11 October 2015 - 11:42 PM
On the server I'm on, this API is banned because it lags everything out, If you could somehow make it less laggy, that'd be amazing!
First time I've seen an API banned from servers, but my guess is that oeed is currently busy with other stuff like Silica, so the probability of him continuing to work on this right now feels pretty low.

Yeah, to be honest I'm not surprised. I used OneOS for the first time in ages and I was shocked at how slow it was. I don't even know how it got so slow.

Needless to say though, as Silica can animate resizing circle and recolouring a circle with different easing functions smoothly, this won't be a problem with Silica ;)/>
PixelFox #58
Posted 13 October 2015 - 12:50 AM
On the server I'm on, this API is banned because it lags everything out, If you could somehow make it less laggy, that'd be amazing!
First time I've seen an API banned from servers, but my guess is that oeed is currently busy with other stuff like Silica, so the probability of him continuing to work on this right now feels pretty low.

Yeah, to be honest I'm not surprised. I used OneOS for the first time in ages and I was shocked at how slow it was. I don't even know how it got so slow.

Needless to say though, as Silica can animate resizing circle and recolouring a circle with different easing functions smoothly, this won't be a problem with Silica ;)/>
Honestly, I don't think CC 2.0 is even CC.
Luca_S #59
Posted 27 April 2016 - 06:29 AM
Is there a function to "unfocus" all objects(Especially text fields) or to unfocus a specific object
WolfDood #60
Posted 28 October 2016 - 08:09 PM
Umm It doesn't seem to work for me, this is what it comes up with…
Downloading Bedrock…
No loaded view. You need to do program:LoadView
first.
this was before…

local bedrockPath='/' if OneOS then OneOS.LoadAPI('/System/API/Bedrock.lua', false)elseif fs.exists(bedrockPath..'/Bedrock')then os.loadAPI(bedrockPath..'/Bedrock')else if http then print('Downloading Bedrock...')local h=http.get('http://pastebin.com/raw.php?i=0MgKNqpN')if h then local f=fs.open(bedrockPath..'/Bedrock','w')f.write(h.readAll())f.close()h.close()os.loadAPI(bedrockPath..'/Bedrock')else error('Failed to download Bedrock. Is your internet working?') end else error('This program needs to download Bedrock to work. Please enable HTTP.') end end if Bedrock then Bedrock.BasePath = bedrockPath Bedrock.ProgramPath = shell.getRunningProgram() end


local program = Bedrock:Initialise()

program:Run(function()
end)
Now I added this:

local bedrockPath='/' if OneOS then OneOS.LoadAPI('/System/API/Bedrock.lua', false)elseif fs.exists(bedrockPath..'/Bedrock')then os.loadAPI(bedrockPath..'/Bedrock')else if http then print('Downloading Bedrock...')local h=http.get('http://pastebin.com/raw.php?i=0MgKNqpN')if h then local f=fs.open(bedrockPath..'/Bedrock','w')f.write(h.readAll())f.close()h.close()os.loadAPI(bedrockPath..'/Bedrock')else error('Failed to download Bedrock. Is your internet working?') end else error('This program needs to download Bedrock to work. Please enable HTTP.') end end if Bedrock then Bedrock.BasePath = bedrockPath Bedrock.ProgramPath = shell.getRunningProgram() end

local program = Bedrock:Initialise()

program:LoadView("main")
program:Run(function()
end)
then it says:

Bedrock:2725: The view: main.view does not exist.
But now there is a program called Bedrock what do I do?
Androthia #61
Posted 02 November 2016 - 10:55 PM
I am getting

Bedrock:2377: attempt to call nil

What does this mean and how can I fix this?