Author Topic: Programming task (DNA editor)  (Read 13207 times)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Programming task (DNA editor)
« Reply #15 on: June 29, 2014, 03:14:40 PM »
Sometimes SVN bugs out but usually you just need to "Update", and it'll pull in all the relevant changes and merge it with your local copy.  If two people are working on the same file, it can cause conflicts that you have to resolve, and that's a huge PITA, but otherwise it's usually painless.

...

I don't expect you to test Scintilla, and the DNA stuff should already be unit tested, so you might not end up writing any tests at all.  If you find yourself writing non trivial amounts of code that are more than bridge code, you should probably test it.  Regex expressions fall in to this, if that comes up.  Either way I'll do a code review with you once you have something, so you can be sure that I'm happy with what you've done and it makes it in to the final product :D

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Programming task (DNA editor)
« Reply #16 on: June 29, 2014, 06:59:34 PM »
Ooooooooo, it'd be nice to have my code looked at by somebody who actually cares about it. :D

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Programming task (DNA editor)
« Reply #17 on: July 06, 2014, 12:38:59 PM »
It looks like everything is working. Sunweaver compiled fine. I'm going to get started now.

EDIT: Oh, and do you have a specific design pattern that you want the GUI to be created with?
EDIT2: What is the best way to reference Sunweaver?
« Last Edit: July 06, 2014, 02:03:49 PM by Panda »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Programming task (DNA editor)
« Reply #18 on: July 06, 2014, 05:01:36 PM »
To reference it, add a reference to the assembly in bin/release.

Use your best judgement in terms of the look-and-feel of the GUI.  When you have something we can iterate on it, but I don't have a good idea of what just yet, honestly.

Happy coding :D

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Programming task (DNA editor)
« Reply #19 on: July 06, 2014, 05:44:21 PM »
Well, I have it highlighting when there is an unknown token but I'm unsure how I'm going to do the others.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Programming task (DNA editor)
« Reply #20 on: July 06, 2014, 06:41:59 PM »
I don't know much about what Scintilla does and doesn't do.  But basically, for compile messages, I'd wait for the user to pause typing (maybe something like 1 second after the last key stroke), and then spawn a helper thread that uses the parsing in Sunweaver to build the DNA, and then when the thread is down you can do the red squiggly lines for an error.  I'm not sure what that feature is called, though, so I'm not sure what to look for in the Scintilla documentation.  Also you might try posting questions on stack exchange or possibly a Scintilla forum if there is one.  Often times just having someone who knows a library point you in the right direction is hugely helpful.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Programming task (DNA editor)
« Reply #21 on: July 06, 2014, 06:55:24 PM »
Sorry, I didn't make that clear, I've basically done that for everything but the __anon# and other things. Think I have it sorted, though.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Programming task (DNA editor)
« Reply #22 on: July 06, 2014, 08:13:50 PM »
Ah, grand :D

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Programming task (DNA editor)
« Reply #23 on: July 07, 2014, 07:37:54 AM »
Scintilla requires some of its dlls to be in the search path, do you know of any way to get around that otherwise getting it working easily with SVN will be a bugger?

EDIT: I think I've got the basics of Syntax Errors and Sytax Highlighting down, unless you want the different commands separated, but I'm unsure how I'll do that yet, other than doing it all manually.

I'm not going to do the "go to definition" as of yet as that is just going to be a headache and I cannot be bothered with that. XD I'm going to get the other basic features like saving and loading, multiple files open in a tabbed view, getting the error message list to jump to messages, and some basic customisation.
« Last Edit: July 07, 2014, 12:47:08 PM by Panda »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Programming task (DNA editor)
« Reply #24 on: July 07, 2014, 10:44:50 PM »
Are they native DLLs?  That always gets gross.  Still we can probably set up a post build step to copy the native dlls to bin/release along with the finished executable.  If they're managed DLLs, we can just add references to them to the project and I think Visual Studio will handle copying them to the destination directory.

When you have something in a good state, zip up however you've set it up (code and all), and I'll figure out where to put all the bits and bobs.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Programming task (DNA editor)
« Reply #25 on: July 08, 2014, 03:21:40 AM »
Yeah, that's probably for the best, I cannot add 2 of them as references, unfortunately, so I guess they're native. I'm not very good at all of this Windows stuff. XD I currently have it

I have quite a lot of refactoring to do as everything is just going into one class while I'm getting used to it. I mean, it is mvp but I don't like the state it is in.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Programming task (DNA editor)
« Reply #26 on: July 17, 2014, 09:26:37 AM »
Are we going to use any alternate file extension?
EDIT: I'm trying to do a tab control but creating a close button next to each tab seems like it will take a while to do it, so I'm just going to leave it is: with the context menu and shortcut.
« Last Edit: July 17, 2014, 01:59:24 PM by Panda »

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Programming task (DNA editor)
« Reply #27 on: July 17, 2014, 04:03:58 PM »
You should be able to make a tab control and then in the whitespace under the control to make a close button. At least if you are thinking about the kind of tab control that I am thinking about.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Programming task (DNA editor)
« Reply #28 on: July 17, 2014, 06:12:24 PM »
Well, I'm thinking about Notepad++ sort of tabs, if you understand me.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Programming task (DNA editor)
« Reply #29 on: July 17, 2014, 07:31:12 PM »
Oh, I get it. You have to make each tabs contents as a nested object the belongs to the general tab object. The general object will also have a close button. Yea, that is very annoying.