Page 1 of 2

Bookmarks get lost

Posted: Mon Apr 13, 2015 11:53 am
by rdwray
Open a window and set a bookmark.
Open a second window and that bookmark is not there.
If the second window is closed after the first then the bookmark is lost.

Doesn't make since unless the config file is only being loaded for the first window and not the second.

Re: Bookmarks get lost

Posted: Mon Apr 13, 2015 5:00 pm
by csterg
Each 'window' is a separate theWord instance. The last one saves and overwrites the config.ini file.
Costas

Re: Bookmarks get lost

Posted: Mon Apr 13, 2015 6:10 pm
by rdwray
That should not be. This goes along with saving window sizes on exit without user intervention. If a user saves a bookmark then opens another instance, it should reload the config file and the second instance does not. If a window size is changed, the user should have to tell the windows to save the change or it is ignored.

.ini files are designed to hold data that can be changed at any point. If a bookmark is added/changed then it should be written. If a user changes a window, then they should have the option of saving that change on closing the window.

Re: Bookmarks get lost

Posted: Fri Apr 17, 2015 4:38 pm
by csterg
I see your point. Unfortunately theWord does not work like this. Data that are stored in the config.ini (such as bookmarks) are only saved when theWord exits (and is some other cases, like when saving a module layout)

Re: Bookmarks get lost

Posted: Fri Apr 17, 2015 4:51 pm
by rdwray
I do a little coding and I understand the basics and know that when some presses a hot key a piece of code is activated. Why can't that piece of code have an additional IniWrite? The IniWrite is already there, it just needs to be accessed.

Re: Bookmarks get lost

Posted: Fri Apr 17, 2015 10:52 pm
by csterg
This happens for performance reasons. It is common for an operation to perform 10-20-30 IniWrites. If these were performed on the disk, the performance would be horrible. At this moment they are done in memory, and theWord writes these to disk on exit.

If the config.ini is 1MB for example, and an operation performed 10-20 writes, you can imagine what the result would be.

Re: Bookmarks get lost

Posted: Sun Apr 26, 2015 11:35 am
by rdwray
You only write when the user requests it - if a bookmark is set, then the write is done, if a new window is created, a write is done. There is no need for continues reads and writes and would not affect performance. I sit and watch the busy cursor many times when saving data.

I just found another problem with it in that windows went into hibernate and would not come back out until the computer was restarted, consequently the bookmark was lost. Currently the only way to save a bookmark is to create it, close TW and reopen it.

Re: Bookmarks get lost

Posted: Sun Apr 26, 2015 8:52 pm
by csterg
Well, I suppose i could force a write whenever a bookmark is made. Would that help?

Re: Bookmarks get lost

Posted: Sun Apr 26, 2015 9:06 pm
by rdwray
That would be a great help to those of us who are old and forgetful.

And in pushing my luck, could you also write the View > Layout when it is created rather than when TW is closed? Can there possibly be a need to save the view on each exit? Please :)

Re: Bookmarks get lost

Posted: Wed Apr 29, 2015 9:07 am
by csterg
I think i can, let me see.

Re: Bookmarks get lost

Posted: Wed Apr 29, 2015 1:16 pm
by rdwray
Thanks Costas, God's blessings...

Re: Bookmarks get lost

Posted: Sat Oct 31, 2015 1:35 pm
by rdwray
Another issue with bookmarks is that they are being loaded with the application and if more than one instance is open, the bookmark in the last instance closed is the one saved.

If would be much better if the bookmarks were saved and read at the user's command.

Re: Bookmarks get lost

Posted: Fri Nov 06, 2015 10:20 am
by csterg
This is an 'issue' with almost every setting.
Bookmarks are saved in the config.ini file, which is only saved when theWord exits (and a few other times, like when editing Module Sets).
Costas

Re: Bookmarks get lost

Posted: Sat Feb 06, 2016 2:24 pm
by rdwray
Sure wish you would fix this problem. I just had two instances open and:
1. I pressed Ctrl + 2 on the instance I wanted the bookmark and did not press "Ok" because it was overwriting another bookmark.
2. Closed the other instance.
3. Pressed "Ok" to save the bookmark.
4. Closed the instance.
5. Reopened TW.

Not only was the bookmark lost but it opened the instance I closed first.

Re: Bookmarks get lost

Posted: Sat Apr 02, 2016 5:34 pm
by csterg
This would require a complete re-write in the logic of how multiple instances work. Sorry, this is no trivial