Open more than 1 instance of CT

Home Forums cherrytree Open more than 1 instance of CT

This topic contains 23 replies, has 4 voices, and was last updated by  Yerodin_is Thankful 3 days, 9 hours ago.

Viewing 15 posts - 1 through 15 (of 24 total)
  • Author
    Posts
  • #124602

    Klaas Vaak
    Member

    Is it possible to open more than 1 instance of CT? I have a couple of CT files that I want to have open all the time, but when I open say the 2nd one, the 1st one is closed, which is annoying.

    I am using CT v.0.38.3 on a Win 8.1/64-bit PC.

    #124603

    eureka
    Member

    A useful feature would be tabs to show different CherryTree files in a single CherryTree session. I don’t know if that feature has been requested.

    However as a quick test/hack I copied/cloned C:\Program Files (x86)\CherryTree\ into
    C:\Program Files (x86)\CherryTree2\ .. this in Windows 10.

    I was able to launch and view two CherryTree sessions; cherrytree and cherrytree2.

    But there might be some effects I’m not yet aware of. And I can’t do anything useful like dragging nodes between sessions. It might be a problem for the two sessions to share a common CherryTree file. More testing required so use with care.

    However it is possible that Actiona or AutoHotkey might be scripted to communicate between the two sessions. Or even to quickly toggle between two CherryTree files from a single session (which would be safer in my opinion).

    #124604

    Klaas Vaak
    Member

    Hey Eureka, we meet again ๐Ÿ™‚ Long time no speak.
    Yes, a tabbed interface would be ideal, though I have the feeling that with Giuseppe’s long list of things to do this feature is not a high priority.

    I agree that doing your copy hack might have unforeseen consequences. If you are continuing with testing I am interested to see the results. If you can remember, please let me know.

    #124605

    eureka
    Member

    I have kicked around a few ideas …
    I have a dual boot Windows 10 / Ubuntu 16.04.
    I can hop between both environments for testing.

    Now in both operating systems you can launch a CherryTree session.
    Then to launch a second CherryTree session window you go to File > New Instance.

    If you choose File > Open File the current session is replaced with the opened session (which is not what you want).
    So the approach is to use File > New Instance.

    When you have the second session window (blank) open now go to File > Open and choose your second CherryTree file as your second session.

    In Ubuntu I installed the x-tile utility (in fact developed by Giuspen but running only on Ubuntu – see X TILE link at top of this forum page) and I can now position and size the two CherryTree sessions very conveniently. I started looking for a similar tiling tool in Windows 10 but most tools in Windows come with a price tag.

    This might be one reason to add a dual boot partition to your Win 8 setup.
    If you choose this option create Ubuntu 16.04 liveUSB and just plug into Win 8 using the option โ€œTry Ubuntuโ€ which allows you to test Ubuntu in experimental mode before taking the final step of installing it alongside Windows. Rufus is one native Windows package to create Ubuntu LiveUSB. There are other tools.

    The hot key Ctrl + O allows rapid selection of files. It makes sense to keep all CherryTree files in one folder so that this hotkey feature can be used.

    I have noticed one quirk in testing two sessions. When I have two session windows open and try to inject text into one of the rich text nodes I seem to overwrite the existing text rather than injecting new text. I will have to test this effect further.

    #124606

    bazzvn
    Member

    I’m sorry if I have missed something here, but afaik it has always been possible to open more than one CT file at a time, as long as it doesn’t have the same file name.

    On my Ubuntu-based Linux systems (Linux Mint 18 xfce and KDE Neon) I can open multiple CT files (I only use *.ctd files), each in their own window, simply by double-clicking on their file name in the file explorer. I have had as many as 5 or 6 open at the same time without obvious conflicts.

    For me, the simplest approach to handling multiple CT documents at the same time is to have one CT document which is always opened by default when the launcher is clicked. This CT document then just contains links to all my other *.ctd files. Clicking any of these links simply opens the relevant CT file.

    #124607

    Klaas Vaak
    Member

    I seem to have a “hybrid” situation whereby sometimes I am able to open 2 instances, sometimes 1 instance is replaced by the other, as you describe. The process you describe to get 2 instances (i.e. going via the blank window) is good to know, but it is a workaround, which means it is a bug of sorts so Giuseppe should fix that.

    #124608

    eureka
    Member

    @bazzvn

    ... simply by double-clicking on their file name in the file explorer

    Fair point. I never use this file double-click mode, preferring to launch sessions from CT toolbar so personally I did not try that option.

    Much depends on the user’s workflow. What operations do you perform on 5-6 active sessions? Surely they eat up window space? Do you copy and paste content between sessions? Or are they read-only?

    And in a shared environment where there are multiple users sharing a common CT database (perhaps held in dropbox or other synced server) how does that work? Or is it feasible?

    For my own purpose I’m back to the view to regard CT as a client to a remote or local server/database where each node can be synced with a server.

    • This reply was modified 3 weeks ago by  eureka. Reason: blockquote font too large
    #124610

    Klaas Vaak
    Member

    I don’t know if my reply came to you.

    #124611

    Klaas Vaak
    Member

    I don’t know if Giuseppe’s TO DO list is in order of priority, but the 1st/top item is

    open several cherrytree files (notebooks) at the same time with tabs (all in the same window-single instance)

    #124612

    eureka
    Member

    For me, the simplest approach to handling multiple CT documents at the same time is to have one CT document which is always opened by default when the launcher is clicked. This CT document then just contains links to all my other *.ctd files. Clicking any of these links simply opens the relevant CT file.

    This is a useful and simple tip which can be tweaked further. A clean index page containing links to multiple database files can be set in menubar View …

    Hide Tree
    Hide Toolbar
    Hide Node Name Header

    However I see that the width of any session window cannot be reduced to be less than the width of the menubar.

    File | Edit | Formatting | Tree | Search | View | Bookmarks | Import | Export | Help

    This means that session tiling options are limited unless session windows overlap in a layer stack. In Ubuntu I use x-tile for session tile layout.

    I started writing a python script which scans a folder of CherryTree files to create an index list. I can extend that to create an index list dynamically in a CherryTree index node. Python script will write the list into rich text element in index.ctd.

    #124613

    Klaas Vaak
    Member

    @eureka

    A clean index page containing links to multiple database files can be set in menubar View โ€ฆ

    Hide Tree
    Hide Toolbar
    Hide Node Name Header

    How do set an index page from that?
    BTW: how do you get to show a red-lettered quote in these messages?

    • This reply was modified 3 weeks ago by  Klaas Vaak.
    • This reply was modified 3 weeks ago by  Klaas Vaak.
    #124616

    eureka
    Member

    With this new forum format I use CODE tags instead of B-QUOTE tags (which show too large font size).

    Given that you have a blank page in a newly created index.cdt and trimmings removed, such as Tree, Toolbar, Node Name Header, then Ctrl+L inserts links. Each added link points to a *.ctd file to be opened. But if there are a number of *.ctd files (as I have and growing) then it makes sense to use a script to create a lists of indexes.

    You might add a title “Index of CherryTree files” at top of index page.

    #124617

    Klaas Vaak
    Member

    .ctd files: is that something specific to the Linux version of CT? I only have .ctb files.

    #124618

    eureka
    Member

    When you create a new CherryTree file you go to Save As ..
    and there are four options ..

    SQLite Not Protected (.ctb)
    SQLite Password Protected (.ctx)
    XML, Not Protected (.ctd)
    XML, Password Protected (.ctz)

    My choice is .ctd since I can inspect the file using an XML Editor, whereas in SQLite I need a different viewer. And I can hack the XML .ctd files using python script.

    I have not tested with the other formats.

    #124619

    Klaas Vaak
    Member

    Ah, sorry for a dumb question :-(, that explains it. So far I have gone automatically for SQLite. With XML you are software & hardware independent, nice.
    What XML editor do you use?
    XML is plain text, how do view the result, the “made-up” version of your nodes?
    If I bug you too much, just tell me, no hard feelings ๐Ÿ™‚

Viewing 15 posts - 1 through 15 (of 24 total)

You must be logged in to reply to this topic.