Idea: Visual NXC

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
sidneys1
Posts: 141
Joined: 01 Oct 2010, 14:38
Location: Pennsylvania - The United States of America
Contact:

Re: Idea: Visual NXC

Post by sidneys1 »

muntoo wrote:I really hope you won't really be using that True Random Number Generator. :)
Of course I will! Everyone knows 4 is random. ;) Good job on catching the xkcd reference. Couldn't help but pay tribute to the world's best comic :)
muntoo wrote:Is that MDI temporary? Will we have a tabbed interface, eventually?
Why, would you prefer tabbed? Don't you like Opera, MS Word, and SpiderWEB? Haha ok I will look into switching it over to a tabbed interface.
For now I'll upload this:

Download Visual NXC 0.1.0.4 Alpha

Have a nice day,
~Sidneys1
My Mindstorms website: http://sidneys1.com
sidneys1
Posts: 141
Joined: 01 Oct 2010, 14:38
Location: Pennsylvania - The United States of America
Contact:

Re: Idea: Visual NXC

Post by sidneys1 »

Had to rewrite certain aspects of the Tab Bar, but here it is.
Image

Have a nice day,
~Sidneys1
My Mindstorms website: http://sidneys1.com
sidneys1
Posts: 141
Joined: 01 Oct 2010, 14:38
Location: Pennsylvania - The United States of America
Contact:

Re: Idea: Visual NXC

Post by sidneys1 »

Ok, I don't have a beta for you this time, but I have been really busy with Visual NXC. Here's what I've been up to:
Getting the Enum Editor working (edit: I'm going to be removing those up/down buttons, there's no purpose to them lol. EDIT 2: ok, I guess there is in "assign values linearly" mode...):
ImageImage

But what if you want to make two enum items have the same value? Or what if you don't want their values assigned linearly? Then open up the advanced options:
Image
As soon as you open the advanced options, the enum's hex values show. As you can see, I've chosen to not assign the values linearly, and have made "WeekStart" and "WeekEnd" synonymous with "Sunday" and "Saturday" respectively, a change which shows up in the graph in the bottom-right.


I've also done even more work on the code output, and this is what it generates, automatically, all on its own:
Image
As you can see, the methods don't create any real code yet, and neither do the structs or enums, but it's coming along :D If there are no enums, it doesn't generate enumerations.h and it doesn't #include it, same for the structs. All the "//No code" comments are only generated if there really is no code, and the "//The program's method(s):" is only generated if there actually are methods. Pretty cool, huh? :)


I may have another alpha build for you once I've got the Enums outputting real code. Until then, be patient lol :)

Have a nice day,
~Sidneys1
My Mindstorms website: http://sidneys1.com
muntoo
Posts: 834
Joined: 01 Oct 2010, 02:54
Location: Your Worst Nightmare
Contact:

Re: Idea: Visual NXC

Post by muntoo »

sidneys1 wrote:I may have another alpha build for you once I've got the Enums outputting real code. Until then, be patient lol :)
OR, I can get a Visual C# Compiler with whatever the heck it is that you're using (is Mono/.NET included within MSVC#2010EE?), assuming that your commits aren't "half-done" commits ;).

That enumerations editor looks pretty cool, but I don't believe NXC has enums... I suppose you're going to use an array? Or simply literal constants? (I don't fully grasp the enum editor, unfortunately; yes I'm dumb: :ugeek: ... er... I mean: :? .)

Another suggestion which may probably be a dumb (as in :? , not :ugeek: ) one, but here it is anyways: Using "f(x)" for enums. (So now values can be assigned linearly (as in 2x, not just x), quadratically, etc...)

Sound like a dumb suggestion? :?
:ugeek:
Image

Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE


Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
sidneys1
Posts: 141
Joined: 01 Oct 2010, 14:38
Location: Pennsylvania - The United States of America
Contact:

Re: Idea: Visual NXC

Post by sidneys1 »

muntoo wrote:OR, I can get a Visual C# Compiler with whatever the heck it is that you're using (is Mono/.NET included within MSVC#2010EE?), assuming that your commits aren't "half-done" commits ;).
Yes; MSVCS Express should work. It comes with the compiler (would be pretty useless without it lol) All my code commits compile and run. Certain sections of the code are kinda messy, like the Enum editor window, but for the most part it's pretty clean and organized.
muntoo wrote:That enumerations editor looks pretty cool, but I don't believe NXC has enums... I suppose you're going to use an array? Or simply literal constants? (I don't fully grasp the enum editor, unfortunately; yes I'm dumb: :ugeek: ... er... I mean: :? .)

Another suggestion which may probably be a dumb (as in :? , not :ugeek: ) one, but here it is anyways: Using "f(x)" for enums. (So now values can be assigned linearly (as in 2x, not just x), quadratically, etc...)
To the contrary... NXC has very good support for enums. Because of their nature, I can't assign a "f(x)" style value to an enum.. They must be a constant hexadecimal value. (0x00, 0x01, ..., 0x0E, 0x0F, etc)

Have a nice day,
~Sidneys1
My Mindstorms website: http://sidneys1.com
muntoo
Posts: 834
Joined: 01 Oct 2010, 02:54
Location: Your Worst Nightmare
Contact:

Re: Idea: Visual NXC

Post by muntoo »

sidneys1 wrote:To the contrary... NXC has very good support for enums. Because of their nature, I can't assign a "f(x)" style value to an enum.. They must be a constant hexadecimal value. (0x00, 0x01, ..., 0x0E, 0x0F, etc)
Technically you can (it's really messed up code, though), but I see there's no point since they really are enums. (I wonder when John added support for them? It wasn't in the changelog...)

-----

I can't compile it. (I tried compiling Program.cs with only MSVC#2010EE, but it gives me build errors.)
Image

Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE


Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
sidneys1
Posts: 141
Joined: 01 Oct 2010, 14:38
Location: Pennsylvania - The United States of America
Contact:

Re: Idea: Visual NXC

Post by sidneys1 »

muntoo wrote:I can't compile it. (I tried compiling Program.cs with only MSVC#2010EE, but it gives me build errors.)
Strange.. I need more info, though. What are the errors? PM me in the interest of keeping this thread on-topic.

Have a nice day,
~Sidneys1
My Mindstorms website: http://sidneys1.com
sidneys1
Posts: 141
Joined: 01 Oct 2010, 14:38
Location: Pennsylvania - The United States of America
Contact:

Re: Idea: Visual NXC

Post by sidneys1 »

Making good on the MONO support I've mentioned:
Image

However, there are some errors... Any think they can figure out what's the error in this pic? (Hint: same reason this isn't bold[\b]!)

Anyhow, I'm about to see if I can get it running on Ubuntu. :)

Have a nice day,
~Sidneys1
My Mindstorms website: http://sidneys1.com
jojoguy14
Posts: 155
Joined: 29 Sep 2010, 12:49
Contact:

Re: Idea: Visual NXC

Post by jojoguy14 »

sidneys1 wrote: Anyhow, I'm about to see if I can get it running on Ubuntu. :)

Have a nice day,
~Sidneys1
YAY! Tell me if you need a tester for Ubuntu! I'm here!

jojoguy10
Creator of LEGO-X TechN'XT! (http://lego-x.com http://techn-xt.blogspot.com)
Known as jojoguy10
muntoo
Posts: 834
Joined: 01 Oct 2010, 02:54
Location: Your Worst Nightmare
Contact:

Re: Idea: Visual NXC

Post by muntoo »

jojoguy14 wrote:YAY! Tell me if you need a tester for Ubuntu! I'm here!
Or Sidneys1 can run Ubuntu in VirtualBox, and test at his leisure, unless of course 2GB is too much for him. ;)
Image

Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE


Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests