|
linhjob wrote:
Could you please correct the link to download ClassLib file.
The links in the article seem to work just fine. They re-direct to the classlib article where you can download the necessary files. What are the problems you are having?
- Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
The link is working now - Thanks
|
|
|
|
|
Hello
Well, i found some bugs in brainchild, hope you can fix them
1) Problem with URL's, when erassing a url (Backspace) the underline is still there, and gets erased after some moments.
2) Problem with positioning the caret, when selecting a line from the left side, the caret will change it's position to go in the next line.
3) Problems when exiting BCDemo, seems on some cases when i start editing the code, and tries to exit, it will not, so tasmanager comes in handy.
4) Problem with the tabs, when openeing more than one tab, the code for each tab does not change only the first code for the first tab gets shown in all tabs.
5) When double clicking on the code editor, on words, it chooses all the word, disregarding any symbols joined with it.
6) Caret keeps flickering when hightling code from the left side and keep highling code, either going upwards or downwards.
Not critical bugs, but some may affect the effeciency of it, hope i have helped , and keep up the good work Jan
|
|
|
|
|
asdf500 wrote:
1) Problem with URL's, when erassing a url (Backspace) the underline is still there, and gets erased after some moments.
This is not a bug. The parser will determine wether it is a hyperlink or not by the prefix of the hyperlink. For example when you type http://www.codeproject.com and you start deleting characters the parser still thinks it is a hyperlink until you remove any character from the "http:" part of the hyperlink.
asdf500 wrote:
2) Problem with positioning the caret, when selecting a line from the left side, the caret will change it's position to go in the next line.
This is normal behaviour. The caret will position itself at the end of the selection. Since clicking in the selection margin selects to whole line including cr/lf the caret is moved to the start of the next line. You will notice that Visual Studio does it the same way.
asdf500 wrote:
3) Problems when exiting BCDemo, seems on some cases when i start editing the code, and tries to exit, it will not, so tasmanager comes in handy.
This problem is known to me and is a bug in ClassLib, the C++ library which is used to write the BCDemo demonstration program. This is not a problem in brainchild.
asdf500 wrote:
4) Problem with the tabs, when openeing more than one tab, the code for each tab does not change only the first code for the first tab gets shown in all tabs.
I do not understand exactly what you mean here. Do you mean the title of the first tab get's copied on the other tabs?
asdf500 wrote:
5) When double clicking on the code editor, on words, it chooses all the word, disregarding any symbols joined with it.
Selecting a word by means of double clicking it will select the word up until the first white space or delimiter character. This means that double clicking on the wordt pMsg in a text pMsg->wParam will only select the pMsg part. This is normal behaviour.
asdf500 wrote:
6) Caret keeps flickering when hightling code from the left side and keep highling code, either going upwards or downwards.
I'll see what I can do about this.
Bye,
Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
Thanks Jan, for you speedy reply, well, not all bugs, but i did not know another word for them, language problem maybe, anyway, i think you misunderstood some point more specificly number 5, i meant this:
X = y[Index] double clicking on Index, will highlight [] aswell, this is what i meant, about problem number 4, is that when i choose a new tab - Untitled -, then try to open another tab from any existing file, tab names will remain the same and code will not change when changing tabs, thus only 1 code can be viewed.
About problem number 2, i still think it should not reposition itself to the next line, i have not seen VS do that, maybe you use another version than mine, and i come to a point where i see 2 highlighted lines, i don't really think this is normal.
Plus, when i mentioned there is a problem in BCDemo, i did not say it's in brainchild, but there is only 1 place to post such problem, which is the brainchild page.
Hope this clears it up for you, thanks in advance.
|
|
|
|
|
asdf500 wrote:
X = y[Index] double clicking on Index, will highlight [] aswell, this is what i meant
What parser (language) file is used? I cannot reproduce this behaviour over here. Does this also happen when you Ctrl+Click the word? Does the parser file have the square brackets in it's delimiters configuration?
asdf500 wrote:
about problem number 4, is that when i choose a new tab - Untitled -, then try to open another tab from any existing file, tab names will remain the same and code will not change when changing tabs, thus only 1 code can be viewed.
Not exactly sure what this problem is but it is probably related to the problem where BCDemo can't be closed anymore. This has a priority on my TODO list.
asdf500 wrote:
About problem number 2, i still think it should not reposition itself to the next line, i have not seen VS do that, maybe you use another version than mine,
I have seen this behaviour in VC 6, VS .NET 2002 and VS .NET 2003. Not sure about VS 2005 though... Still need to install beta 2.
asdf500 wrote:
and i come to a point where i see 2 highlighted lines, i don't really think this is normal.
When you click inside the selection/line-number margin to select a line and you do not drag the mouse then no, it should not select more than a single line. If however you keep the mousebutton down and you move the mouse up or down inside the margin more lines will be selected.
Bye,
Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
Yeap, that was it Jan, well, thanks much for your effort in hearing my reports , in the end i have only suggestions about brainchild, also, Code Folding/UnFolding is nice to have, intellisense and a browser feature where you can travel through code by function listing, anyway, that was really a very good job you have done in here, please keep up the goof work.
Best Regards
|
|
|
|
|
Some of you were having problems with the error "The application failed to initialize properly (0xc0000142).". This was due to the fact that the dll source code zip file did not contain the default settings files necessary to get brainchild up and running properly using the instructions in the article.
The dll source code zip file has been updated and now contains the correct files.
- Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
I am still getting the error after downloaded and recompiled all the files today. Starting BCDemo from Brainchild_Bin gives the same error.
Any suggestions? Thanks.
-- modified at 15:29 Wednesday 7th December, 2005
Never mind. Somehow the program is looking for a folder under Settings with the same name as user ID, not "Defaults".
|
|
|
|
|
h.lee wrote: Never mind. Somehow the program is looking for a folder under Settings with the same name as user ID, not "Defaults".
Actually the DLL creates the user directory and copies the contents of the Defaults directory in there the first time somebody uses a program using Brainchild, at least this is how it is supposed to work. If you had to create the user directory manually something is wrong.
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
The DLL did create the user directory. However, it did not put anything there and I have to copy the Defaults manually to make it work.
|
|
|
|
|
Hi
I've done you instructions to get it working, but I just get: "The application failed to initialize properly (0xc0000142). Click on OK to terminate the application."
What have I done wrong?
Cheers
|
|
|
|
|
This weekend the article was updated with a new dll source zip which has the default settings files in it. It is possible that you downloaded before this and were unable to follow step 8 from the instructions. If so please download the dll source zip and try again.
- Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
I think they mean the BCDemo.exe in the Brainchild Compipled Binaries download. At least that's where I am getting the error.
|
|
|
|
|
No, it is due to the fact the default settings files were missing from the dll source code zip. This error is common when the registry key is present but the default settings files are not. The binaries in the article work fine as long as the default settings files are present.
Bye,
Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
---------------------------
Brainchild.CPL
---------------------------
Problems reading the brainchild configuration files. Therefore it is not possible to edit the settings.
---------------------------
OK
---------------------------
everytime I click "settings"...
Regards,
unruledboy@hotmail.com
|
|
|
|
|
This has probably to do with the fact that you cannot do step 8 from the procedure described in the article. The dll source zip file does not contain the default settings files. I will update the article as soon as possible.
- Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
I couldn't make the demo run:
Whenever I create the registry key, BCDemo crashes.
Without the key, BCDemo runs fine but is not configurable (of course!).
---------------------------
BCDemo.exe - Application Error
---------------------------
The application failed to initialize properly (0xc0000142). Click on OK to terminate the application.
---------------------------
OK
---------------------------
The setup description is somewhat strange: no zip contains a folder "Defaults" so I couldn't complete step 8 of the installation instruction.
What I could do:
-Get binary installation
-Perform steps 7,9,10,11 (1-6 should be unnecessary for the binary download?!)
How can I proceed?
The Saviour of the World is a Penguin and Linus Torvalds is his Prophet.
|
|
|
|
|
Actually the BCDemo does not crash. It simply does not run because the brainchild.dll does not load properly. Much to my suprise I have seen that the source code zip file (Brainchild_dll.zip) is incomplete. It does not include the default settings files. If you give me you email address (Simply use the EMail link below) I will send you the files ASAP. When you have the files you can setup as follows:
1) Create a directory C:\Brainchild
2) Copy the binaries in this directory
3) Create a directory C:\Brainchild\Settings
4) Create a directory C:\Brainchild\Settings\Defaults
5) Copy the contents of the zip I will Email you into this directory
6) Create the registry key HKEY_CURRENT_MACHINE\Software\BCDLL\CurrentVersion
7) Create a string value called Settings in this key and set it's value to C:\Brainchild\Settings
Ofcourse you can replace the "C:\Brainchild" directory mentioned above with any directory you like.
I will update the article soon to include a complete source zip file. My apologies for the time lost trying to figure this out.
- Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
Can you please send me the compiled OCX version to cmtietgen@hotmail.com?
Thanks,
Chris
|
|
|
|
|
I have submitted an article update which contains an archive with the compiled binaries. Please check back in a couple of days to see if the article has been updated yet.
Enjoy,
Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
What are good algorithms and strategies for maintaining the editing buffer? I've always wanted to know in broad terms how it is done. I'm sure there's a standard solution to the problem.
--
An eye for an eye will only make the world blind.
|
|
|
|
|
Jörgen Sigvardsson wrote:
What are good algorithms and strategies for maintaining the editing buffer? I've always wanted to know in broad terms how it is done. I'm sure there's a standard solution to the problem.
You may want to take a look at the article at Catch22[^] which has a few links about this subject that might interest you.
Brainchild simply uses an array in which each line of text is stored. It also uses it's own memory managment routines where system memory is allocated in larger blocks of memory. All allocations are then made inside those larger blocks. It still has the problem though that the whole file is loaded into memory which is not very efficient.
Enjoy,
Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
Thank you for that link. I always wanted to know how a text editor works, but have been too lazy to read the source code.
--
An eye for an eye will only make the world blind.
|
|
|
|
|
Different editors tackle this in different ways. Prime requirements are to be able to access any line quickly, have an efficient scheme for buffering text and to be handle editing updates efficiently.
Often a linked list is used to access lines of text stored in memory, but this can become very inefficient with large files. In ED (see sig) I use an embedded database I designed from scratch many years ago. An index is used to provide instant access to any line and a disk cache buffers pages of text. The index is also cached on disk. Lines can be any length, spanning as many disk pages as required. I'm reasonably sure this is an original design, and certainly isn't anything I've seen anywhere over the many years I've been working on ED. This design in fact goes back to the days of our DOS product, where it simply was conceivable to fit everything into memory. It has stood the test of time very well indeed.
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|