Page 1 of 1

Multiple 'document' windows

Posted: Sat Jul 02, 2011 6:56 pm
by dglass
I tried searching for this, but 'documents' is not a very good search term. :roll:

It seems that a multiple document application is not possible with LC given that a stack can only be loaded/opened once. Is this correct?

To be clear, I'm not talking about a Multiple Document Interface (MDI), the unpleasantness that Microsoft used for Word and other Office applications not so long ago. Rather, just the ability to have more than one of the same type of document window open.

In its simplest form, a text editor which allows multiple text documents to be open at once.

If I make a document editor stack (scrolling field for entry, and some controls for formatting, for example), and then want to open multiple new 'documents' it seems I would be trying to open the document editor stack multiple times.

I get the feeling the IDE dodged this issue by putting the script editor in a tabbed interface, but that doesn't let a user compare two scripts side-by-side as two separate windows would.

Bleh.

That was kind of 'rambly', but hopefully it makes sense, and somebody can provide some insight. :)

Re: Multiple 'document' windows

Posted: Sat Jul 02, 2011 7:08 pm
by Klaus
Well, why not go to the LiveCode prefs -> Script Editor and
select "Scripts open in:" -> "New window", if that helps 8)


Best

Klaus

Re: Multiple 'document' windows

Posted: Sat Jul 02, 2011 7:44 pm
by dglass
Well, it shows that it is possible, which was my literal question, but doesn't give any indication about how to implement it.

Unless the subtext suggestion was to rip open the actual script editor stack of the IDE, which is not something I am enthusiastic about.

Re: Multiple 'document' windows

Posted: Sat Jul 02, 2011 9:23 pm
by FourthWorld
You could make a stack that acts as a sort of template, using the clone command to make a copy for each document.

Re: Multiple 'document' windows

Posted: Sat Jul 02, 2011 9:26 pm
by shaosean
You might want to look at the clone command..

Re: Multiple 'document' windows

Posted: Sat Jul 02, 2011 11:00 pm
by dglass
Thanks!

I'll see what I can accomplish.

Re: Multiple 'document' windows

Posted: Sat Jul 02, 2011 11:23 pm
by Klaus
Yep, that's what the IDE does! Clone a pre-made substack, rename it, set some custom properties, and there you go :D

Re: Multiple 'document' windows

Posted: Sat Jul 02, 2011 11:35 pm
by dglass
Ah, and then with either 'openStacks' or 'substacks', one can get the last increment, so to speak, so that new windows can open with "Document X" as their title, and X will increment appropriately.

Splendid! That should be painlessly workable.

Thanks again!