Recommendation for Multiple Documents

SyntaxEditor for Windows Forms Forum

Posted 18 years ago by Michael Trier
What is the recommendation for dealing with multiple documents of the Syntax Editor? We want to design a tabbed interface with multiple documents open at any given time and want to persist state in them.


Comments (6)

Posted 18 years ago by Boyd - Sr. Software Developer, Patterson Consulting, LLC
I removed this post because the content was not applicable.

[Modified at 04/18/2006 09:26 AM]
Posted 18 years ago by Michael Trier
Thanks for the reply. Specifically I'm more interested in knowing the best way to handle multiple documents of the Syntax Editor component. My concern is memory and speed. Would an MDI implementation be the best approach, or would it be better to use the UIStudio DocumentWindows stuff and load them in there, or does it not make any difference? I'm sure this issue comes up all the time. I searched the forums but only came up with a response from 2003 and the suggesting was to use MDI, but that they were working on a better solution. I gather at this point something else is worked out.

One other thought was using only one Syntax Editor and swapping out the document object each time the tab changed. Although, I think that could get messy.
Posted 18 years ago by Matthew Smith - Developer, One Plus One Solutions Pty Limited

I'm currently creating an IDE and do the following:

- I load a centrally located Syntax Language (as required or by default, depending on the language)
- I create a centrally located semantic parser for each language
- Each 'tabbed document' contains a syntax editor control. This syntax editor then 'attaches' to the centrally located parser and language - thus sharing a single resource across many instances

It talks about doing this in the help. Hope this helps

[Modified at 04/18/2006 09:08 AM]

Regards, Matt

Posted 18 years ago by Boyd - Sr. Software Developer, Patterson Consulting, LLC
Hi Michael,

Sorry for the stupid response. I was thinking I was in the UIStudio forum and not SyntaxEditor. I removed my original post to avoid any future confusion.

[Modified at 04/18/2006 09:27 AM]
Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
As Matt said, sharing languages is recommended. Also, you can swap a Document in and out of a SyntaxEditor. So you could have a single SyntaxEditor instance and simply retain the Documents that are open and swap them in and out as the tab changes.

With the stuff we're doing for v4.0, Documents will use less memory overall. Also you'll be able to turn off features like lexical parsing, outlining, etc., which will remove all memory used by those features. That will be very useful for situations where a document is swapped out and you don't want it using much memory other than the text part of the document.

Actipro Software Support

Posted 18 years ago by Michael Trier
Awesome, thanks for all the great ideas. I kind of figured it would consist of some approach like this. Sorry I missed it in the help file, I did go through it pretty extensively.
The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.