Click to See Complete Forum and Search --> : Re: TextEditor
Danial
Jan 21st, 2005, 06:53 PM
Continued from http://www.vbforums.com/showthread.php?p=1894962&posted=1#post1894962
Wouldn't be to hard to write a new text editor. Did this program have special features in it?
Not really,it was a standard Text Editor with midi interface. Yes it wouldnt be too hard to do. I would like to write it in C# but not a lot of people have the Framework installed. What language did you have in mind? I might just put together a simple one which supports auto complete and syntax highlighting. Problem is that I dont have enough time.
Disiance
Jan 21st, 2005, 07:47 PM
Current Work:
SynReas (syntax highlighting and intellisense)
Proposed Ideas:
Support for HTML, ASP, and PHP
?Dynamic Menus - Load from file?
?FTP support?
-------------------------------------------------
My main language is VB pre-.NET
I know a very little C++ (not even VC++), so I can't really do anything except tinker with existing code in a C-type language.
Danial
Jan 21st, 2005, 08:12 PM
My main language is VB pre-.NET
I know a very little C++ (not even VC++), so I can't really do anything except tinker with existing code in a C-type language.
Well C++ is not my cup of tea, though like you i can do the basic. Its either VB6 or C#. I am pretty busy currently but I should have some time in a month or so. I might give it a shot..
Disiance
Jan 21st, 2005, 08:14 PM
no problem.
I'm currently playing around with a method to get a function/variable box to pop up with the right contents for the object (in this case Response in ASP). I'm going to play with it and see if I can get an efficient routine for loading variables/functions and such for an object.
Danial
Jan 21st, 2005, 08:16 PM
no problem.
I'm currently playing around with a method to get a function/variable box to pop up with the right contents for the object (in this case Response in ASP). I'm going to play with it and see if I can get an efficient routine for loading variables/functions and such for an object.
That sounds great :thumb:. We will have to design it such a way so we can load the defination file for "auto complete" for any other language.
Disiance
Jan 21st, 2005, 08:40 PM
Right now I have the import file being handled pretty much like an INF file.
Danial
Jan 21st, 2005, 08:45 PM
Right now I have the import file being handled pretty much like an INF file.
Check this article, i think we should use this as our base code. I would prefer if the interface looked similar to Visual Studio.Net IDE..
http://www.vbaccelerator.com/home/VB/Code/Controls/Tab_Controls/MDI_Tabs/article.asp
Disiance
Jan 21st, 2005, 11:02 PM
I've got the object definitions part of the file import-feature done. A file to be imported is in the format:
------------------------
[ASP]
[OBJECT=Response]
FUNCTION=Flush
FUNCTION=Write
PROPERTY=Buffer
PROPERTY=CacheControl
[OBJECT=Request]
FUNCTION=BinaryRead
PROPERTY=TotalBytes
--------------------------------
First line defines the code that the page/code type. The rest defines the code objects and then specifies their functions and properties.
I'm thinking the file should also contain information on where code sections start (<% and %> for ASP, <? and ?> for PHP, etc) also so that ASP objects arn't displayed in PHP code.
Kasracer
Jan 22nd, 2005, 12:15 AM
I was bored and wrote a simplistic editor in C# about a year ago. It was never completed but if you want any features in it I'd be glad to tell you how to do it (though nothing too complex was ever done)
http://dev.binaryidiot.com/binaryedit.php
Disiance
Jan 22nd, 2005, 12:26 AM
I was bored and wrote a simplistic editor in C# about a year ago. It was never completed but if you want any features in it I'd be glad to tell you how to do it (though nothing too complex was ever done)
http://dev.binaryidiot.com/binaryedit.php
Quite a nice program! Thanks for the code offer too. The thing that stood out to me is the auto-indentation feature.
Kasracer
Jan 22nd, 2005, 01:56 AM
Quite a nice program! Thanks for the code offer too. The thing that stood out to me is the auto-indentation feature.
Thanks!
When I created it, I made a class that inherited the RichTextBox from the framework and the auto indent went as follows:
This goes in the constructor of the class:
#region Constructor
public RichTextBox()
{
InitializeEvents();
}
#endregion
This is the event needed to fire and use auto indent:
#region Events
private void InitializeEvents()
{
this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.this_KeyPress);
}
#endregion
This is the actual code to auto indent:
#region Auto Tab & Tab as Spaces
private string temp = "";
private int PrevLineSpaces = 0, PrevLineTabs = 0;
private bool _TabsAsSpaces = true;
[Category("BIML")]
[DefaultValue(true)]
[Description("Insert all tabs as a set of spaces")]
[Browsable(true)]
public bool TabsAsSpaces
{
get
{
return _TabsAsSpaces;
}
set
{
_TabsAsSpaces = value;
}
}
private int _AmountOfSpacePerTab = 4;
[Category("BIML")]
[DefaultValue(true)]
[Description("Amount of spaces inserted when the Tab key is pressed")]
[Browsable(true)]
public int SpacePerTab
{
get
{
return _AmountOfSpacePerTab;
}
set
{
_AmountOfSpacePerTab = value;
}
}
private bool _AutoTab = true;
[Category("BIML")]
[DefaultValue(true)]
[Description("Finds whitespace on previous line and inserts it on the next line")]
[Browsable(true)]
public bool AutoTab
{
get
{
return _AutoTab;
}
set
{
_AutoTab = value;
}
}
private void this_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if (_TabsAsSpaces)
{
if (e.KeyChar == Convert.ToChar(Keys.Tab))
{
System.Windows.Forms.SendKeys.Send("\b");
for (int i = 0; i < _AmountOfSpacePerTab; ++i)
{
System.Windows.Forms.SendKeys.Send(" ");}
}
}
if (_AutoTab)
{
if (e.KeyChar == Convert.ToChar(Keys.Enter))
{
temp = Convert.ToString(this.Lines.GetValue(this.GetLineFromCharIndex(this.SelectionStart - 1)));
for (int i = 0; i < temp.Length; ++i)
{
if (temp[i] == ' ')
{
PrevLineTabs += 1;
}
else if (temp[i] == ' ')
{
PrevLineSpaces += 1;
}
else
{
break;
}
}
if (PrevLineTabs != 0)
{
for (int i = 0; i < PrevLineTabs; ++i)
{
System.Windows.Forms.SendKeys.Send(" ");
}
}
if (PrevLineSpaces != 0)
{
for (int i = 0; i < PrevLineSpaces; ++i)
{
System.Windows.Forms.SendKeys.Send(" ");
}
}
PrevLineSpaces = 0;
PrevLineTabs = 0;
}
}
}
#endregion
The code above also allows tabs to be inserted as spaces. The nice thing about this code is that it reserves the correct tabs and/or spaces used on the previous line. So if someone has a weird style of Tab Space Space, it'll be used on every following line.
The template system is what I liked best though because anyone can add templates very easily. Just make a folder for the category and name the file appropriately.
If you need anymore help just let me know. I never quite got the handle on syntax highlighting
Kasracer
Jan 22nd, 2005, 02:03 AM
Almost forgot. I did a little write up of my RichTextBox on my site. Nothing special. Again, it was never finished but it may help:
http://dev.binaryidiot.com/tutorials/rtb.php
Something else worth noting is that .Net 1.0 and 1.1 has a bug in which calling Lines.Lenght() in the RichTextBox control erases all undo and redo levels. If you need a reliable way to calculate total and current line, check this out:
Current Line:
public int CurrentLine()
{
return this.GetLineFromCharIndex(this.SelectionStart);
}
Total Lines:
public int TotalLines()
{
return this.GetLineFromCharIndex(Int32.MaxValue);
}
Not sure if that is useful to you or not. Again, this code is as if you're writing inside of a class derived from System.Windows.Forms.RichTextBox
Disiance
Jan 22nd, 2005, 01:10 PM
Thank you very much for the code -- and that it is well written and easily understandable so I can convert it to VB equivelant. Also thank you for pointing out the RTB's feature that gets the current line, will probably come in handy for line numbers.
Disiance
Jan 22nd, 2005, 01:11 PM
Check this article, i think we should use this as our base code. I would prefer if the interface looked similar to Visual Studio.Net IDE..
http://www.vbaccelerator.com/home/VB/Code/Controls/Tab_Controls/MDI_Tabs/article.asp
Looks nice, I'll see if I can get a GUI for the program working today.
Kasracer
Jan 22nd, 2005, 09:00 PM
Thank you very much for the code -- and that it is well written and easily understandable so I can convert it to VB equivelant. Also thank you for pointing out the RTB's feature that gets the current line, will probably come in handy for line numbers.No problem. If you need anything else from my program, just let me know.
I am interested in syntax highlighting if you wouldn't mind sharing that when you work on that part. I just couldn't wrap my head around the color changes.
Disiance
Jan 22nd, 2005, 09:06 PM
I am interested in syntax highlighting if you wouldn't mind sharing that when you work on that part. I just couldn't wrap my head around the color changes.
Not a problem with me. I really don't have a clue on how to do it, but I know you can. I think that part will be Daniel's job.
Danial
Jan 22nd, 2005, 09:13 PM
Not a problem with me. I really don't have a clue on how to do it, but I know you can. I think that part will be Daniel's job.
kasracer, good to see you back in VBF. No ofcourse not, the editor we are planning to write most probably will be open source. I did have a go at Syntax highlighting in VB6, i have to code some where. Though it was very basic and I need to optimise it a lot before it can be used.
Are you interested in the VB6 code or C# Code, dont think I will try it in C# right now since this editor will be VB6. I would have prefered to do it in C# but the Framework is not installed in most windows machine.
Anyhow Good Progress Dr Dis :thumb:.
Disiance
Jan 22nd, 2005, 10:26 PM
Ok, I *believe* I have converted the code correctly from C# to VB, only a few tests will be able to tell. Unfortuneatly there was one part of the code I could not convert. I couldn't convert the "temp = Convert.ToString(this.Lines.GetValue(this.GetLineFromCharIndex(this.SelectionStart - 1)))" line, the RichTextBox does not have the Lines property/collection. I have attempted using the RevInstr function as well as writing my own version of RevInstr to see if I can pick out the current line, but it seems that I can't get it to work. any ideas? (its the commented out portion below).
Dim TabsAsSpaces As Boolean
TabsAsSpaces = True 'Use spaces instead of tabs
Dim AmountOfSpacePerTab As Integer
AmountOfSpacePerTab = 4 'How many spaces to use in place of one tab
Dim AutoTab As Boolean
AutoTab = True 'Automatically indent
Dim temp As String, PrevLineSpaces As Integer, PrevLineTabs As Integer
temp = ""
PrevLineSpaces = 0
PrevLineTabs = 0
If TabsAsSpaces Then
If KeyAscii = 9 Then
txtDocument.Text = Left(txtDocument.Text, Len(txtDocument.Text) - 1)
txtDocument.Text = txtDocument.Text & String(AmountOfSpacePerTab, "|")
End If
If AutoTab Then
If KeyAscii = 13 Then
temp = ""
Dim II As Integer
'temp = Convert.ToString(this.Lines.GetValue(this.GetLineFromCharIndex(this.SelectionStart - 1)))
'For II = Len(txtDocument.Text) To 1 Step -2
' If Not Mid(txtDocument.Text, II - 1, 2) = vbCrLf Then
' temp = temp & Mid(txtDocument.Text, II - 1, 2)
' Else
' Exit For
' End If
'Next II
For II = 1 To Len(temp)
If Mid(temp, II, 1) = vbTab Then
PrevLineTabs = PrevLineTabs + 1
ElseIf Mid(temp, II, 1) = " " Then
PrevLineSpaces = PrevLineSpaces + 1
Else: Exit For
End If
Next II
If Not PrevLineTabs = 0 Then
For II = 1 To PrevLineTabs
txtDocument.Text = txtDocument.Text & vbTab
Next II
End If
If Not PrevLineSpaces = 0 Then
For II = 1 To PrevLineSpaces
'txtDocument.Text = txtDocument.Text & " "
Next II
End If
PrevLineSpaces = 0
PrevLineTabs = 0
End If
End If
End If
Kasracer
Jan 23rd, 2005, 03:18 AM
Change 'this' to 'me' and try again. VB's me = C#'s this.
Other than that I'm not sure. I'm not as good with VB as I am with C#.
Disiance
Jan 23rd, 2005, 08:25 AM
Change 'this' to 'me' and try again. VB's me = C#'s this.
Other than that I'm not sure. I'm not as good with VB as I am with C#.
the "this" in your code referenced the RichTextBox correct?
Danial
Jan 23rd, 2005, 11:42 AM
the "this" in your code referenced the RichTextBox correct?
No, this in C# always referes to the Current Instance of the Parent Object e.g Class/Form.
Say you have
myClass
{
string myString;
public void myFunction
{
this.myOtherfunction(this.myString);
//you could also write myOtherfunction(myString);
}
public void myOtherFunction(string test)
{
}
}
In VB.Net you replace this with me i think.
Danial
Jan 23rd, 2005, 11:45 AM
I think that part will be Daniel's job.
Today i spend some time on Syntax Highlighting. I searched for some code on the net, most were tons and tons of code. So I decided to write something on my own. I put together something simple that works, not sure if it will be able to handle large amount of text efficiently. I am gonna do some test tonight if it works reasonable i will post it here.
Any idea a max limit of a RichTextBox? Just want to get an idea how fast is my function with max amount of text..
Disiance
Jan 23rd, 2005, 02:05 PM
No, this in C# always referes to the Current Instance of the Parent Object e.g Class/Form.
Ahh, ok, I'll see if I can get the scriptlet working.
I don't know what the RTB's maximum length is.
I'm also working on a system (I call it Syntax Reasoning) that detects whether a word is an object, property, function, or language-reserved word. This will be used for the intellisense, and could also be easily integrated with the syntax highlighting.
Disiance
Jan 23rd, 2005, 04:01 PM
Ok, I've gotten the program to extract certain lines.
New problem: When the tab is replaced by spaces, the program doesn't prevent the tab, it just adds the tab and the spaces.. How do I kill the tab?
Kasracer
Jan 23rd, 2005, 06:47 PM
Today i spend some time on Syntax Highlighting. I searched for some code on the net, most were tons and tons of code. So I decided to write something on my own. I put together something simple that works, not sure if it will be able to handle large amount of text efficiently. I am gonna do some test tonight if it works reasonable i will post it here.
Any idea a max limit of a RichTextBox? Just want to get an idea how fast is my function with max amount of text..
Post your function and we'll see if we can optimize it. Just remember, make sure you only check specific lines. Checking the entire page everytime will be very inefficient and slow.
My idea was to scan the current line for changes on key press and, if there was a " on the line, scan the rest of the document until it finds a closing ".
Ok, I've gotten the program to extract certain lines.
New problem: When the tab is replaced by spaces, the program doesn't prevent the tab, it just adds the tab and the spaces.. How do I kill the tab?
I solved that problem by putting in a backspace before inserting the spaces. In VB.Net, I believe it's different and not the \b used in C#. I'm not sure what it is for VB.Net but insert that before inserting spaces and you'll be fine.
Disiance
Jan 23rd, 2005, 10:01 PM
My idea was to scan the current line for changes on key press and, if there was a " on the line, scan the rest of the document until it finds a closing ".
--Excellent idea! Although it won't just check for quotes as it will color things such as "As", "For", "Select Case" in ASP, and then others in PHP. As I stated before I'm working on a system to detect those.
I solved that problem [tabs being entered with spaces] by putting in a backspace before inserting the spaces. In VB.Net, I believe it's different and not the \b used in C#. I'm not sure what it is for VB.Net but insert that before inserting spaces and you'll be fine.
That would work, except that the function is called from VB before the tab is entered. I think I've found a workaround though, a little ugly right now though.
Danial
Jan 24th, 2005, 10:11 AM
Post your function and we'll see if we can optimize it. Just remember, make sure you only check specific lines. Checking the entire page everytime will be very inefficient and slow.
Yes indeed, thats what I concluded too, i wrote various functions but they were too slow going through large document. I even tried modifying the RTF. It works fine for Higlighting as you go, but when you paste large document it becomes un-useable.
So i have switched to coloring only visible lines. Just put together some API to get the visible lines now I will try applying my coloring function and see how it goes. I will keep you posted.
Thanks.
Disiance
Jan 24th, 2005, 01:17 PM
I have written a GetLine function Danial. You could pass the cursor's location on KeyPress, then get the altered line, and then just color that line.
Also I believe I have gotten the AutoIndent feature fully operational. I've also added a feature that triggers when the user presses the [BACKSPACE] key, it will then see if multiple spaces should be erased (due to the convert tabs to spaces) I'm going to put it through a few more tests and then post the code here. I'm sure you guys can optimize it a bit, it is a bit ugly -- which brings up another thing. Is there a way to disable the RTB's update until after a function is over?
Could you please send me the function that gets the RTB's visible lines Danial? I assume it would be very useful for line numbers.
Danial
Jan 24th, 2005, 07:42 PM
I have written a GetLine function Danial. You could pass the cursor's location on KeyPress, then get the altered line, and then just color that line.
Also I believe I have gotten the AutoIndent feature fully operational. I've also added a feature that triggers when the user presses the [BACKSPACE] key, it will then see if multiple spaces should be erased (due to the convert tabs to spaces) I'm going to put it through a few more tests and then post the code here. I'm sure you guys can optimize it a bit, it is a bit ugly -- which brings up another thing. Is there a way to disable the RTB's update until after a function is over?
Could you please send me the function that gets the RTB's visible lines Danial? I assume it would be very useful for line numbers.
Here is my first attempt. Its not 100% complete. Its not accurate yet, I will iron out the bug soon.
Paste some text and test it out.
As for disable RTB's updat, you can do it using LockWindowUpdate API.
Good work
:thumb:
Disiance
Jan 24th, 2005, 07:44 PM
Here is my first attempt. Its not 100% complete. Its not accurate yet, I will iron out the bug soon.
Paste some text and test it out.
As for disable RTB's updat, you can do it using LockWindowUpdate API.
Good work
:thumb:
1) You forgot to upload the thing or link to it :)
2) How do you unlock a window after locking it?
Danial
Jan 24th, 2005, 07:47 PM
1) You forgot to upload the thing or link to it :)
2) How do you unlock a window after locking it?
That was fast :) . I couldnt beat you to it..
To lock the window pass the hwnd of the rtb and to unlock it simply call
LockWindowUpdate False
That will unlock.
I am on Messenger now...
Disiance
Jan 26th, 2005, 08:48 AM
That's right, [passing false to the LockWindowUpdate] I remember now. That's been bothering me for a while now :lol:
I'll download and look at the code you posted a little later today when I've got more time.
Disiance
Jan 27th, 2005, 03:18 PM
I believe I have the auto-indent feature 100% working, if we can ever catch the other on MSN I'll send you the code. If not I'll send you a PM with a link to it.
Disiance
Aug 23rd, 2005, 04:40 PM
ookkkaayyy, it's been a while,, dunno if anyone's still receiving response notifications on this thread anymore...
Reason I never gave updates is because for some reason the subclass method crashed the program on all computers but my own, but I decided to restart the project and have gotten it to work on the rest of the computers. If anyone's still interested than please speak up.
chemicalNova
Aug 26th, 2005, 06:06 AM
Just in case you didn't find an answer, the RichTextBox doesn't have a text limitation. Apparently it can hold any amount of text, as apposed to the 64k limit of the textbox.
chem
Disiance
Aug 26th, 2005, 10:34 AM
Just in case you didn't find an answer, the RichTextBox doesn't have a text limitation. Apparently it can hold any amount of text, as apposed to the 64k limit of the textbox.
chem
:thumb: Thank you very much for that info.
agmorgan
Sep 11th, 2005, 01:00 PM
What would kick the arse off all other text editors would be to have intellisense.
A couple of editors (such as Notepad++) have autocomplete
The trouble is that it doesn't filter based on what you have previously typed.
Well you know what intellisense is.
Just making the project potentially harder for you ;) :afrog:
Disiance
Sep 11th, 2005, 01:34 PM
That was in the concept plan. Colored text and Intellisense together in a system I call SynReas (Syntax Reasoning).
Would you mind being a tester agmorgan?
agmorgan
Sep 12th, 2005, 05:07 PM
Im all for testing Text Editors :)
Let me know when you are ready to test
Disiance
Sep 12th, 2005, 05:21 PM
Okay, the project is attached. Nothing of the SynReas is really in at the moment, that is the next step. The other features (like auto-indent and converting tabs to spaces) are in, but there is no options form yet to change them...those are loaded in the frmMain_Load() sub.
agmorgan
Sep 13th, 2005, 05:50 AM
First thing to notice is that the default font is sans serif.
Make it fixed width like Courier New.
If you resize to small your resize code generates an error
Private Sub Form_Resize()
'Resize the txtDocument editing window to fit the form
txtDocument.Width = frmMain.ScaleWidth - 4
txtDocument.Height = frmMain.ScaleHeight - 4
End Sub
The -4 creates a negative Height and Width
I think I have a resize module somewhere.
I'll try and dig it out.
For some reason the horizontal scroll bar is not working on the text box.
If you hold down a key you cant tell whether it has wordwrapped or if it is a new word.
An insert HTML outline would be good too.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>HTML 4.01 Transitional</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
</HEAD>
<BODY>
</BODY>
</HTML>
ConTEXT (http://www.context.cx/) has a lot of useful features like this.
It might be worth downloading it and picking out the best bits.
One feature that is has is the autocomplete is based on external text files.
This is useful as the user can add/modify/extend it as he wishes.
agmorgan
Sep 13th, 2005, 11:23 AM
Here are 3 resize examples.
2 API and one manual.
The API examples have the advantage that they don't flicker.
All of them need tweaking as I didn't write any of it myself :afrog:
The upload is a 7z inside a zip.
I use 7zip for the greater compression ratios, but VBF doesn't support the extension.
Download ZipGenius http://downloads.zipgenius.it/ if you cant open 7z files.
7-Zip currently offers best compression ratio available http://www.7-zip.org/
Disiance
Sep 13th, 2005, 03:54 PM
Cool, thank you. I'll take a look at the "resizers" later, I just reformatted so I'm involved in reloading my life at the moment.
Do you have any idea why the horizontal scrollbar isn't working? I think I've had this problem before and the fix was sending a message to the RichTextBox telling it to expand it's right margin.
agmorgan
Sep 14th, 2005, 03:56 AM
Thats right
See
http://www.vbforums.com/showthread.php?t=324282
and
http://www.vbforums.com/showpost.php?p=766953&postcount=6
Disiance
Sep 14th, 2005, 11:32 AM
Aha! I had never seen the RightMargin property before, I had used the SendMessage API to set it.
I haven't yet tried out the control resizers yet, I'll hopefully get to that this evening.
Disiance
Sep 16th, 2005, 06:30 PM
arg, I'm very sorry. Haven't gotten around to testing the code yet...school, work, and life in general seem to want a shot at my attention all at once.
agmorgan
Sep 19th, 2005, 08:26 AM
I know what you mean.
It doesn't help that my motherboard has died at home too :(
Perhaps we should have a list in the first/second post identifying what needs doing next, new/proposed features, problems etc
And maybe put a copy of the latest code there too?
It might make the project a bit more structured.
Disiance
Sep 19th, 2005, 08:34 AM
Ouch, that isn't good. I'll update the 2nd post in the thread to hold that information. I may actually get around to testing the code today, but it's more likely to be done tomorow.
Disiance
Sep 19th, 2005, 05:38 PM
Okay, I finally got to look at the code you posted. I think just adding an "On Error Resume Next" to the Form_Resize sub would be fine, unless you think there should be a minimum size.
agmorgan
Sep 30th, 2005, 11:26 AM
Have you seen moeur's RichTextBox Tricks and Tips?
http://www.vbforums.com/showthread.php?t=355994
Well worth a read
I'm not sure how far you have got with the Intellisense but there is an interesting demo in C# here
http://www.codeproject.com/csharp/DIY-Intellisense.asp?df=100&forumid=31360&exp=0&select=971896
agmorgan
Oct 3rd, 2005, 08:45 AM
wiz126 put a small intellisense demo on his server
http://www.scriptsorcodes.com/images/vbforums/VB_Style_Intellisense/
It needs enhancing, for instance I reckon you need to load the keywords from a file so that it is easy to update/add new words/languages
It also needs to use a popup and select with the keyboard instead of the mouse.
But the general idea is there.
Disiance
Oct 3rd, 2005, 09:11 AM
The main problem I forsee with the intellisense is how to load different languages...The common delimiter is ".", but PERL's is "->". There are many other differences between main languages and so the job right now is to create a system that will support a diverse language environment.
agmorgan
Oct 3rd, 2005, 10:45 AM
What you could do is put the delimiter at the top of the language file.
You then put that into a variable that gets looked for in the code.
Or to start with you could just support languages that have a full stop as the delimiter.
agmorgan
Oct 5th, 2005, 06:13 AM
I was thinking about how the insert form object could be trimmed.
Each of the subs is the same apart from the line that looks like ToAdd = "<input type=""textbox"">"This could be made generic and read the info from a setup file (ini / xml ?)
Reading from a setup file means that you can extend the language without recompiling.
Similarly for the HTML object (form/image/hyperlink) I was wondering if it would make the code smaller by creating the forms through code at runtime instead of manually at design time.
Again the values could be read from a setup file making the program more easily extensible.
What do you reckon?
agmorgan
Oct 5th, 2005, 06:30 AM
DarkX_Greece created an interesting simple HTML Editor
http://www.vbforums.com/showpost.php?p=1927132&postcount=17
Does syntax highlighting.
Disiance
Oct 5th, 2005, 08:32 AM
I like the idea of dynamic menus and forms, but I'm not sure how feasible it is. I don't know how difficult it is to subclass a menu and then tell which item is clicked in it.
I'll add this to the list of possibilities.
agmorgan
Oct 27th, 2005, 06:28 PM
Its late and I cant be bothered to reread the entire thread :D
But I was looking at the KDE Advanced Text Editor and Code Folding is useful
http://en.wikipedia.org/wiki/Code_folding
I'm not sure how to go about implementing it though.....:(
Disiance
Oct 27th, 2005, 09:52 PM
That would require a complete rewrite of the input engine, unfortunately.
agmorgan
Nov 23rd, 2005, 10:28 AM
Is this project still continuing?
Can you post the latest code?
Preferably somewhere at the top of the thread.
After I have finished my exams in the next couple of weeks I should have time to contribute if you need any input.
Disiance
Nov 23rd, 2005, 11:32 AM
It is currently in limbo,, there haven't been any major changes - life has been a bit too hectic recently, but it will cool down after Christmas. (Sister gets married Dec. 17th, huge project at work, etc). Any help would be appreciated, especially in brainstorming, don't want to do anything that limits future development and additions to the supported languages.
nebulom
Dec 5th, 2006, 06:46 PM
This is C# code using ICSharpCode.TextEditor.dll and WeifenLuo.WinFormsUI.Docking.dll. This may or may not help the project but I like to contribute if this is C#.
Edit: This code is based on SharpDevelop and the solution is SharpDevelop-based (I guess VS2003 can open this solution file; even 2006VS can open this I guess, but there are some things not properly set because of incompatibility).
nebulom
Dec 5th, 2006, 06:48 PM
DLLs are attached here.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.