Bookmarks get lost

Have you found a bug or you think that the program does not function as expected? Report it here
User avatar
rdwray
Posts: 567
Joined: Mon Dec 26, 2011 3:06 pm

Bookmarks get lost

Post 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.
Take My yoke upon you and learn from Me, for I am gentle and lowly in heart, and you will find rest for your souls.
“For My yoke [is] easy and My burden is light.”
csterg
Site Admin
Posts: 8627
Joined: Tue Aug 29, 2006 3:09 pm
Location: Corfu, Greece
Contact:

Re: Bookmarks get lost

Post by csterg »

Each 'window' is a separate theWord instance. The last one saves and overwrites the config.ini file.
Costas
User avatar
rdwray
Posts: 567
Joined: Mon Dec 26, 2011 3:06 pm

Re: Bookmarks get lost

Post 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.
Take My yoke upon you and learn from Me, for I am gentle and lowly in heart, and you will find rest for your souls.
“For My yoke [is] easy and My burden is light.”
csterg
Site Admin
Posts: 8627
Joined: Tue Aug 29, 2006 3:09 pm
Location: Corfu, Greece
Contact:

Re: Bookmarks get lost

Post 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)
User avatar
rdwray
Posts: 567
Joined: Mon Dec 26, 2011 3:06 pm

Re: Bookmarks get lost

Post 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.
Take My yoke upon you and learn from Me, for I am gentle and lowly in heart, and you will find rest for your souls.
“For My yoke [is] easy and My burden is light.”
csterg
Site Admin
Posts: 8627
Joined: Tue Aug 29, 2006 3:09 pm
Location: Corfu, Greece
Contact:

Re: Bookmarks get lost

Post 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.
User avatar
rdwray
Posts: 567
Joined: Mon Dec 26, 2011 3:06 pm

Re: Bookmarks get lost

Post 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.
Take My yoke upon you and learn from Me, for I am gentle and lowly in heart, and you will find rest for your souls.
“For My yoke [is] easy and My burden is light.”
csterg
Site Admin
Posts: 8627
Joined: Tue Aug 29, 2006 3:09 pm
Location: Corfu, Greece
Contact:

Re: Bookmarks get lost

Post by csterg »

Well, I suppose i could force a write whenever a bookmark is made. Would that help?
User avatar
rdwray
Posts: 567
Joined: Mon Dec 26, 2011 3:06 pm

Re: Bookmarks get lost

Post 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 :)
Take My yoke upon you and learn from Me, for I am gentle and lowly in heart, and you will find rest for your souls.
“For My yoke [is] easy and My burden is light.”
csterg
Site Admin
Posts: 8627
Joined: Tue Aug 29, 2006 3:09 pm
Location: Corfu, Greece
Contact:

Re: Bookmarks get lost

Post by csterg »

I think i can, let me see.
User avatar
rdwray
Posts: 567
Joined: Mon Dec 26, 2011 3:06 pm

Re: Bookmarks get lost

Post by rdwray »

Thanks Costas, God's blessings...
Take My yoke upon you and learn from Me, for I am gentle and lowly in heart, and you will find rest for your souls.
“For My yoke [is] easy and My burden is light.”
User avatar
rdwray
Posts: 567
Joined: Mon Dec 26, 2011 3:06 pm

Re: Bookmarks get lost

Post 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.
Take My yoke upon you and learn from Me, for I am gentle and lowly in heart, and you will find rest for your souls.
“For My yoke [is] easy and My burden is light.”
csterg
Site Admin
Posts: 8627
Joined: Tue Aug 29, 2006 3:09 pm
Location: Corfu, Greece
Contact:

Re: Bookmarks get lost

Post 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
User avatar
rdwray
Posts: 567
Joined: Mon Dec 26, 2011 3:06 pm

Re: Bookmarks get lost

Post 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.
Take My yoke upon you and learn from Me, for I am gentle and lowly in heart, and you will find rest for your souls.
“For My yoke [is] easy and My burden is light.”
csterg
Site Admin
Posts: 8627
Joined: Tue Aug 29, 2006 3:09 pm
Location: Corfu, Greece
Contact:

Re: Bookmarks get lost

Post by csterg »

This would require a complete re-write in the logic of how multiple instances work. Sorry, this is no trivial
Post Reply