Jump to content




How to use Bedrock (Bedrock Documentation)


83 replies to this topic

#21 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 12 October 2014 - 07:04 PM

Looks like the folder should be called "Views", with an "s".

#22 AssossaGPB

  • Members
  • 126 posts
  • LocationFlorida, USA

Posted 12 October 2014 - 07:07 PM

View PostLyqyd, on 12 October 2014 - 07:04 PM, said:

Looks like the folder should be called "Views", with an "s".
Oops, I typed it wrong in the post. The folder is called Views.

#23 Lignum

  • Members
  • 558 posts

Posted 12 October 2014 - 08:14 PM

View PostAssossaGPB, on 12 October 2014 - 06:33 PM, said:

I have my files set up just like yours from the first two spoilers, but it claims I need to call LoadView(). But if I call LoadView("main"), it claims that main.view doesn't exist, which it does.

Here is my file structure:
+ /
|-Bedrock
|-TestFile (the file from the first spoiler)
|+ Views
||-main.view (the file from the second spoiler)

The error is:
No Loaded view. You need to do program:LoadView first
or when I add program:LoadView("main"):
Bedrock:2006: The view: main.view does not exist.

Please help me, I'm so confused
Bedrock doesn't seem to load views when they're in root. I've made a pull request which fixes this here, but it hasn't been merged yet. For now, just move your program's files into a directory that isn't root.

#24 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 12 October 2014 - 09:30 PM

I've been working on a bug fix,it should be released today.

#25 AssossaGPB

  • Members
  • 126 posts
  • LocationFlorida, USA

Posted 13 October 2014 - 01:48 AM

View PostLignum, on 12 October 2014 - 08:14 PM, said:

View PostAssossaGPB, on 12 October 2014 - 06:33 PM, said:

I have my files set up just like yours from the first two spoilers, but it claims I need to call LoadView(). But if I call LoadView("main"), it claims that main.view doesn't exist, which it does.

Here is my file structure:
+ /
|-Bedrock
|-TestFile (the file from the first spoiler)
|+ Views
||-main.view (the file from the second spoiler)

The error is:
No Loaded view. You need to do program:LoadView first
or when I add program:LoadView("main"):
Bedrock:2006: The view: main.view does not exist.

Please help me, I'm so confused
Bedrock doesn't seem to load views when they're in root. I've made a pull request which fixes this here, but it hasn't been merged yet. For now, just move your program's files into a directory that isn't root.
Ah ha, that would make sense, Thanks!

View Postoeed, on 12 October 2014 - 09:30 PM, said:

I've been working on a bug fix,it should be released today.
Ok, cool. Thanks

EDIT (Don't want to double post):
I finished reading the documentation and I am amazed at how useful and easy this is to use. I have a few questions though, like how would I do a multi-line textbox? Also how do I have multiple views showing at the same time like you did in your html browser? Also, when is documentation coming out on scroll bars/lists? I can't wait.

Thanks!

Edited by AssossaGPB, 13 October 2014 - 03:00 AM.


#26 cdel

  • Banned
  • 496 posts
  • LocationMelbourne, Australia

Posted 15 October 2014 - 09:59 AM

is it possible to save the views in a different location besides the root directory?
EDIT: If not, is there a method I could use to "trick" it into thinking its aiming at the Views directory.

Sorry if this belongs in Ask a Pro. :P

Edited by connordelaneyy, 15 October 2014 - 10:05 AM.


#27 Lignum

  • Members
  • 558 posts

Posted 15 October 2014 - 01:11 PM

View Postconnordelaneyy, on 15 October 2014 - 09:59 AM, said:

is it possible to save the views in a different location besides the root directory?
EDIT: If not, is there a method I could use to "trick" it into thinking its aiming at the Views directory.

Sorry if this belongs in Ask a Pro. :P

Bedrock looks for the views in the Views folder located in the working directory of the program. There is a bug that causes Bedrock to not find the Views directory when the working directory is root. Either I'm misunderstanding your question, or you're confusing something.

#28 AssossaGPB

  • Members
  • 126 posts
  • LocationFlorida, USA

Posted 15 October 2014 - 07:33 PM

With the Custom Event Handling, how do I get the parameters from the event? Like if it's modem_message how do I get the message, sender, etc?

#29 Lignum

  • Members
  • 558 posts

Posted 15 October 2014 - 08:00 PM

View PostAssossaGPB, on 15 October 2014 - 07:33 PM, said:

With the Custom Event Handling, how do I get the parameters from the event? Like if it's modem_message how do I get the message, sender, etc?
For example:
program:RegisterEvent("rednet_message", function(self, event, sender, message, protocol) --# You can get the return values as function parameters here.
   print("Received \"" .. message .. "\" from " .. sender)
end)


#30 AssossaGPB

  • Members
  • 126 posts
  • LocationFlorida, USA

Posted 16 October 2014 - 01:13 AM

View PostLignum, on 15 October 2014 - 08:00 PM, said:

View PostAssossaGPB, on 15 October 2014 - 07:33 PM, said:

With the Custom Event Handling, how do I get the parameters from the event? Like if it's modem_message how do I get the message, sender, etc?
For example:
program:RegisterEvent("rednet_message", function(self, event, sender, message, protocol) --# You can get the return values as function parameters here.
   print("Received \"" .. message .. "\" from " .. sender)
end)
Ah, ok thanks!

#31 cdel

  • Banned
  • 496 posts
  • LocationMelbourne, Australia

Posted 16 October 2014 - 01:57 AM

View PostLignum, on 15 October 2014 - 01:11 PM, said:

View Postconnordelaneyy, on 15 October 2014 - 09:59 AM, said:

is it possible to save the views in a different location besides the root directory?
EDIT: If not, is there a method I could use to "trick" it into thinking its aiming at the Views directory.

Sorry if this belongs in Ask a Pro. :P/>

Bedrock looks for the views in the Views folder located in the working directory of the program. There is a bug that causes Bedrock to not find the Views directory when the working directory is root. Either I'm misunderstanding your question, or you're confusing something.

I'm using bedrock for my git clients gui, I don't want the views or any local files to be visible.

#32 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 16 October 2014 - 03:30 AM

View Postconnordelaneyy, on 16 October 2014 - 01:57 AM, said:

I'm using bedrock for my git clients gui, I don't want the views or any local files to be visible.

As I'm getting close to releasing Quest I'm looking in to making a program to squish all the files in to one file which would include all the other files and folders. Either that or I'll update PkgMake.

#33 cdel

  • Banned
  • 496 posts
  • LocationMelbourne, Australia

Posted 16 October 2014 - 06:39 AM

View Postoeed, on 16 October 2014 - 03:30 AM, said:

View Postconnordelaneyy, on 16 October 2014 - 01:57 AM, said:

I'm using bedrock for my git clients gui, I don't want the views or any local files to be visible.

As I'm getting close to releasing Quest I'm looking in to making a program to squish all the files in to one file which would include all the other files and folders. Either that or I'll update PkgMake.

Sorry just im a bit confused about your reply, am I able to just move the Views folder somewhere else rather than the root directory?

#34 Win7yes

  • Members
  • 110 posts

Posted 21 October 2014 - 08:22 PM

View Postconnordelaneyy, on 16 October 2014 - 06:39 AM, said:

View Postoeed, on 16 October 2014 - 03:30 AM, said:

View Postconnordelaneyy, on 16 October 2014 - 01:57 AM, said:

I'm using bedrock for my git clients gui, I don't want the views or any local files to be visible.

As I'm getting close to releasing Quest I'm looking in to making a program to squish all the files in to one file which would include all the other files and folders. Either that or I'll update PkgMake.

Sorry just im a bit confused about your reply, am I able to just move the Views folder somewhere else rather than the root directory?
You will need to make the directory, and move the Views folder AND the program to that directory.

#35 spyman68

  • Members
  • 155 posts

Posted 14 December 2014 - 02:29 PM

I don't understand why it says view : main cannot be loaded. Could someone please help?

#36 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 15 December 2014 - 01:00 AM

It was pointed out that some of the pieces of code were having issues (like the one above). I discovered that for some reason some of the quote marks had changed to 'fancy' quote marks, I've since fix this issue.

#37 spyman68

  • Members
  • 155 posts

Posted 16 December 2014 - 02:11 AM

Could you try to explain the menus a little better? I was confused where I had to paste the code and such.

#38 __Kiwi

  • Members
  • 4 posts

Posted 30 December 2014 - 05:38 PM

I love this framework, but I have a question:
How can I create a "TextArea" ( multiline TextBox)? If I change the height of the TextBox object, then I can't use the enter key for jump a line.

(Sorry for my bad english)

#39 SpencerBeige

  • Members
  • 263 posts

Posted 16 February 2015 - 03:41 AM

could you plz shorten the syntax required to get bedrock?

#40 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 16 February 2015 - 06:59 AM

View Postspyman68, on 16 December 2014 - 02:11 AM, said:

Could you try to explain the menus a little better? I was confused where I had to paste the code and such.
I don't really have time to go in to much detail, but you call the function to show menus when you click a button.

View Post__Kiwi, on 30 December 2014 - 05:38 PM, said:

I love this framework, but I have a question:
How can I create a "TextArea" ( multiline TextBox)? If I change the height of the TextBox object, then I can't use the enter key for jump a line.

(Sorry for my bad english)
Hmmm, yea I'll probably try to add that at some point, if I make Ink 2 I'll definitely have to.

View Postslow-coder, on 16 February 2015 - 03:41 AM, said:

could you plz shorten the syntax required to get bedrock?
These forums aren't powered by circa-1990's texting, so please just write a real sentence for goodness sake, honestly it just makes people think a lot less of you and will be less inclined to do what you ask, as in this situation.

So, no. It's a single line and every bit of it is required.

Edited by oeed, 16 February 2015 - 07:00 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users