LayoutManager [release 1.1]

Discuss and share scripts and script files...
Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: LayoutManager

Post by Filehero »

Hi,
Filehero wrote: 1. Visual flag (current session).....

3. Backup the last unsaved layout (new Session)
here's what I've come with. In my understanding both targets are met. However, it's a functional "prototype" just from the bench, help file outdated, icons work in progress etc.

Ken, I'm very keen to hear what you think. :wink:


Cheers,
Filehero
Attachments
LayoutManager-0.7.5_alpha.zip
(318.66 KiB) Downloaded 213 times

klownboy
Posts: 4141
Joined: 28 Feb 2012 19:27

Re: LayoutManager

Post by klownboy »

Hi Filehero,

I hope you had a nice relaxing weekend as you planned, but maybe not, since you were probably working on Layout Manager. :) Though maybe you consider this kind of programming a bit of fun.

It's looking really nice. The first thing I noticed after copying the new alpha 0.7.5 over the previous version is the new little asterisk was on the "plain" layout maybe because my last layout called "Original" was nothing more than the plain with no address bar. "Plain" also had the golden star. The menu also had a "Last Unsaved: Plain" menu item. I then proceeded to save a layout as "Original", as I said the "plain" with no address bar. For information, after doing that the "Last Unsaved: Plain was still on the menu. I'm not sure yet whether it should be?

I then purposely modified my "Original" layout and closed XY to see the result when I restarted XY. Before I closed XY and restarted it, I did notice that the small asterisk was on my Original layout and Last Unsaved: was now "Original". When I restarted XY the menu was the same, in that the Original had a small asterisk and I had a Last Unsaved: Original menu item as before. Note: when I clicked on my "Original" layout the asterisk went away as it should.

At some point though, do you think that the "Last Unsaved: Layout" item should go away? I think it may just be confusing after awhile if it lingers. Maybe after clicking back on the layout which was labeled unsaved or clicking on a different layout. I clicked on them all and it was still there.

I hope all is well. I'll look a bit more tomorrow....it's getting late,

Take care,
Ken
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: LayoutManager

Post by Filehero »

Hi Ken,

wow, you're really fast, thanks a lot for your quick tests. :appl:
Yes, the weekend was as planned totally relaxing, including only a little work on that script.
klownboy wrote:It's looking really nice. The first thing I noticed after copying the new alpha 0.7.5 over the previous version is the new little asterisk was on the "plain" layout maybe because my last layout called "Original" was nothing more than the plain with no address bar. "Plain" also had the golden star. The menu also had a "Last Unsaved: Plain" menu item.
I have to do a lot more testing on my own, but the intended behaviour is:
On each menu opening I'll take the "golden star-ed" layout and check wether at least one of its 11 saved ini-"properties" states is different from the current XY layout configuration. Names don't matter at all here.
If there is a gap, show the change flag (asterisk) and copy the entire current XY configuration into the "Last Unsaved" slot under the old save name.

By copying the new script version over the old one, you have also replaced the layouts.ini including all old savings like "Original". I also preset "plain" as the last layout to assure a "golden star-ed" layout on XY startup. So in your case, "plain" is indicated as the last picked layout, but since the address bar is hidden, it was marked as changed and additionally put into the "last layout"-slot.
klownboy wrote:I then purposely modified my "Original" layout and closed XY to see the result when I restarted XY. Before I closed XY and restarted it, I did notice that the small asterisk was on my Original layout and Last Unsaved: was now "Original". When I restarted XY the menu was the same, in that the Original had a small asterisk and I had a Last Unsaved: Original menu item as before. Note: when I clicked on my "Original" layout the asterisk went away as it should.
Sounds good. :)
klownboy wrote:For information, after doing that the "Last Unsaved: Plain was still on the menu. I'm not sure yet whether it should be?
klownboy wrote:At some point though, do you think that the "Last Unsaved: Layout" item should go away? I think it may just be confusing after awhile if it lingers. Maybe after clicking back on the layout which was labeled unsaved or clicking on a different layout. I clicked on them all and it was still there.
Yes, currently this is by design. Since I haven't got around to make my mind yet, I simply left the last unsaved slot filled for good. Your suggestions make sense, reset when clicking on a different layout could be the way to go.


Again, thanks for your quick tests and your suggestions. I think we're right on track to beta/release.


Cheers,
Filehero

klownboy
Posts: 4141
Joined: 28 Feb 2012 19:27

Re: LayoutManager

Post by klownboy »

Hey again Filehero,

Last night I was using a laptop. Today I'm on my desktop where I'm more at home. This time after installing the new alpha 0.7.5, I removed the address bar and used the "Last Unsaved: Plain" menu item to save the layout as "Original" instead of using the normal "Save layout as" menu item. I thought it odd that after doing that the menu stayed with the "Plain" layout (i.e., "Plain" still had the golden star) instead of going to "Original" layout having the golden star, but I suppose what it's doing is saving the layout, but not changing it in this case. When I clicked on "Original", it then had the golden star - as expected nothing changed as far as the actual layout. That isn't the case if I use the "Save layout as" menu item. When I used the "Save layout as" menu item, the layout changes to the layout you save it as, and that layout will have the golden star without having to click on it.

In playing around, I saved an 11th layout and when I went to delete it it didn't show up in the "Delete layout" menu. Even though a number 11 is on the menu and and has a golden star. Is there a incorrect limitation somewhere that allows 11 menu items, but the delete menu box only allows showing 10. For information, the "load layout" menu does show all 11 layouts show up as well. By the way, I saved the 10th 11th layouts as "Ken" and "Ken2". I believe the "Ken" layout showed properly everywhere, but for some reason "Ken2" showed as "2" on the main layout menu and the "Delete layout" menu, whereas on the "Rename layout" and "Load layout", it shows up as [Ken2] in brackets just fine. I thought that was odd.

That "Last Unsaved: layout" should be discussed further as well. I'm not sure it's of much value to keep after the user proceeds along and does anything less. It simply becomes confusing and clutters the menu.

If I see anything else later I'll try to pass it on. Have a great night.

Ken
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: LayoutManager

Post by Filehero »

Hola Ken,

it has really becoming a very nice dialog. :)
klownboy wrote:I thought it odd that after doing that the menu stayed with the "Plain" layout (i.e., "Plain" still had the golden star) instead of going to "Original" layout having the golden star, but I suppose what it's doing is saving the layout, but not changing it in this case. When I clicked on "Original", it then had the golden star - as expected nothing changed as far as the actual layout. That isn't the case if I use the "Save layout as" menu item. When I used the "Save layout as" menu item, the layout changes to the layout you save it as, and that layout will have the golden star without having to click on it.
You're right, that behaviour is what I call a diametrical inconsistency. :mrgreen:
Once I setup the SaveAs routine I had MS Word in mind where I can take any open document and copy/rename it by using SaveAs - and still have the document opened right in front of me. This "Last Unsaved: layout" thing was rather supposed to be something like a security backup, an offer that does not interfere with your current "work" (meaning changing the picked layout = "open document").
I prefer the more intuitive "SaveAs" way. If this "Last Unsaved"-thing actually should survive (see below) I will make it behave the same.

klownboy wrote:In playing around, I saved an 11th layout and when I went to delete it it didn't show up in the "Delete layout" menu. Even though a number 11 is on the menu and and has a golden star. Is there a incorrect limitation somewhere that allows 11 menu items, but the delete menu box only allows showing 10. For information, the "load layout" menu does show all 11 layouts show up as well.
Good one. I haven't put any restrictions here, will have to investigate further.
klownboy wrote:By the way, I saved the 10th 11th layouts as "Ken" and "Ken2". I believe the "Ken" layout showed properly everywhere, but for some reason "Ken2" showed as "2" on the main layout menu and the "Delete layout" menu, whereas on the "Rename layout" and "Load layout", it shows up as [Ken2] in brackets just fine. I thought that was odd.
Thanks a lot for this finding and the detailed description for reproduction. This is gives a perfect example, why human testers are so essential (though I still wonder, why I haven't notice that :oops: ). This is clearly buggy behaviour I'll have to fix.

To very good findings, chapeau! :appl:
Btw, you haven't been professional software tester in a former life by chance? :wink:

klownboy wrote:That "Last Unsaved: layout" should be discussed further as well. I'm not sure it's of much value to keep after the user proceeds along and does anything less. It simply becomes confusing and clutters the menu.
I'm completely with you - and I would never use it anyway. Better drop it entirely?
klownboy wrote:If I see anything else later I'll try to pass it on.
Thanks - but take your time, no need for a hurry.

Have a good night, too.


Cheers,
Filehero

klownboy
Posts: 4141
Joined: 28 Feb 2012 19:27

Re: LayoutManager

Post by klownboy »

Hey Filehero,

Would there be a reason why a new layout saved may end up as number 1 on one computer, but on another computer/situation the new menu was number 9? It's not that important; I was just curious. Does it matter how it was saved, using the "Last Unsaved: layout name" vs. Save layout as" menu item...like I said, no biggie, just wondering.
Btw, you haven't been professional software tester in a former life by chance?
:biggrin: No, it's probably just the engineer in me - still there even though I'm retired.

Concerning, "Last Unsaved: layout",
I'm completely with you - and I would never use it anyway. Better drop it entirely?
I hate to say it because I know you probably put a fair amount of work implementing it, but I'm starting to wonder how useful it will be especailly since you implemented the small asterisk change indicating to the user the layout has changed....so the user can save it if they want to, or maybe more importantly if they need to.

My girl friend is giving me the look...better run. I'm suppose to be planning a Easter weekend trip - at least helping. Catch you later!

Ken
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: LayoutManager

Post by Filehero »

Hi Ken,
klownboy wrote:Would there be a reason why a new layout saved may end up as number 1 on one computer, but on another computer/situation the new menu was number 9?
Yes, if you did a fresh install on the 2nd machine, the "Dynamic Menu Mode" could be the one to blame here. If it's OFF the new Layouts appear at the end of the list. If it's ON, the menu layouts gets sorted like the charts. By default, all inbuild layouts are zeroed, so just one "hit" is enough to make it number one (just like in the real charts these days).
klownboy wrote:No, it's probably just the engineer in me - still there even though I'm retired.
Old habits are hard to change. :wink: There's a reason while my CEO insists our developers should think like software engineers!
klownboy wrote:I hate to say it because I know you probably put a fair amount of work implementing it, but I'm starting to wonder how useful it will be especailly since you implemented the small asterisk change indicating to the user the layout has changed....so the user can save it if they want to, or maybe more importantly if they need to.
Since I was doubting the practical impact too, I've made this function ini-tweakable from the beginning. :lol: The next version will default to OFF.
klownboy wrote:My girl friend is giving me the look...better run. I'm suppose to be planning a Easter weekend trip - at least helping. Catch you later!
We'll be away the entire upcoming week, but have to "survive" the holidays first. :whistle:

Enjoy your trip!


Cheers,
Filehero

klownboy
Posts: 4141
Joined: 28 Feb 2012 19:27

Re: LayoutManager

Post by klownboy »

Hey Filehero,

I hope all is well.
Yes, if you did a fresh install on the 2nd machine, the "Dynamic Menu Mode" could be the one to blame here. If it's OFF the new Layouts appear at the end of the list. If it's ON, the menu layouts gets sorted like the charts. By default, all inbuild layouts are zeroed, so just one "hit" is enough to make it number one (just like in the real charts these days).
Thanks, after you mentioned that I realized that I should have picked up on it since I had played with that function last week.
Since I was doubting the practical impact too, I've made this function ini-tweakable from the beginning. The next version will default to OFF.
I edited the layouts.ini file for kicks to set the "remindLastLayoutOnStartup=0" in lieu of "1" and I picked up on a strange behavior. :eh: The small asterisks seems to be always on the layout you have choosen (i.e., the layout with the golden star) without having deviated or changed a layout attribute. The small asterisk function seems to work fine when the layouts.ini file is on the current default of: "remindLastLayoutOnStartup=1". It exhibits that behavior whether "Dynamic menu mode" is on or off. For your info, I also tried changing the "showFavoritesOnly=1" in lieu of "0" since I had the ini file open and the same behavior was noted.

Thanks. Catch you later,
Ken
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: LayoutManager

Post by Filehero »

Hi Ken,

I'm really fine - only one day left. :)
How about you? Have you been a helpful trip-planner consultant?

klownboy wrote:I edited the layouts.ini file for kicks to set the "remindLastLayoutOnStartup=0" in lieu of "1" and I picked up on a strange behavior. :eh: The small asterisks seems to be always on the layout you have choosen (i.e., the layout with the golden star) without having deviated or changed a layout attribute.
You must have been a pro SW-tester ......I correct myself: I've already made this function almost completely ini-tweakable from the beginning. :wink:
Status: fixed (trade-off: one more ini tweak, but the default settings should be spot on).

As for the missing entries in the delete-dialog: confirmed, it's a bug in my code, but rather a nasty one (*, see attached image 0.75_Menu_Delete.gif).

The "Ken vs. Ken 2" problem I cannot reproduce over here, see following screen shots.
0.75_Menu.gif
0.75_Menu.gif (9.52 KiB) Viewed 237415 times
0.75_Menu_Load.gif
0.75_Menu_Load.gif (15.32 KiB) Viewed 237415 times
0.75_Menu_Delete.gif
0.75_Menu_Delete.gif (18.96 KiB) Viewed 237415 times

Cheers,
Filehero

klownboy
Posts: 4141
Joined: 28 Feb 2012 19:27

Re: LayoutManager

Post by klownboy »

Hey Filehero,

I wan't able to duplicate exactly the same behavior I discussed previousy, but this is what I got after making 3 new layouts; Ken, Ken2 and Ken3. I deleted the layouts in the Delete Layouts menu and when I returned to the main layout manager menu, this is what I saw:
delete_layout.JPG
delete_layout.JPG (23.45 KiB) Viewed 237401 times
For your info, to delete the layouts as I described above, I checked off all 3 check boxes for Ken, Ken2 and Ken3 in the "Delete Layout" menu.

After seeing the above, I proceeded to delete layout "2" and "3" in the "Delete Layout" menu. Note: They showed up in the Delete Layouts menu as "2" and "3" also with no "Ken" before it. It's as if the "Ken" and the number are being handled separately maybe. I'm quite sure I had no space between the Ken and the numbers though. The "Ken" by itself (i.e., with no number in the layout name) apparently was deleted properly because it wasn't on the Main menu or the "Delete layout" menu. After deleting layout "2" and "3" in the "Delete Layout menu they were truely gone from both the Main menu and the Delete Layout menu
It's a little strange, isn't it.? :?
Time for dinner (here anyway).

Take care,
Ken
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: LayoutManager

Post by Filehero »

Hi Ken,

just a quickie: Thanks for your update on this bug.
klownboy wrote:It's a little strange, isn't it.?
From the users pov, yes. When you see the code, no. :mrgreen: (*)
The fixes may can take some days.

Have a nice trip and holidays!


Cheers,
Filehero

*: For some of the text/string manipulations I use what is called regular expressions. It's an extremely powerful technique but awkward at the same time. Especially, the text-search patterns can become somewhat confusing really quick. Some weak moments when typing and some nasty bugs are in.

klownboy
Posts: 4141
Joined: 28 Feb 2012 19:27

Re: LayoutManager

Post by klownboy »

Hi Filehero,

We're not leaving for the North Carolina coast until Saturday from (from VA). It should be quite different from the Maine coast. I moved to Virginia in 2010 to be closer to my oldest daughter and granddaughters. I'll have my laptop or my girlfriends MAC...yikes! :roll: I hope you have a great weekend.

Take care,
Ken
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: LayoutManager

Post by Filehero »

Hi Ken,
klownboy wrote: I hope you have a great weekend.
Yeah, (sarcastic) fantastic weather over here. :twisted: Good thing, I can care for some of the bugs.

After doing some tests I've just read your statement
klownboy wrote:In playing around, I saved an 11th layout and when I went to delete it it didn't show up in the "Delete layout" menu. Even though a number 11 is on the menu and and has a golden star.
and taken a look at my screen shots again.

At least, I had fooled myself when confirming your error ("Where is 'Ken 3'?"). :oops:

Designed behaviour for "Delete Layouts":
The "Delete Layout" popup should list all saved layouts but the one currently active/g-stared. From your description I infer it was the same situation. Number 11 was g-stared and, consequently, not shown in the list of available layouts for deletion. Can you confirm that is always only the g-stared layout that is missing?


Thanks,
Filehero

klownboy
Posts: 4141
Joined: 28 Feb 2012 19:27

Re: LayoutManager

Post by klownboy »

Hi Filehero from Wilmington, NC,
The "Delete Layout" popup should list all saved layouts but the one currently active/g-stared. From your description I infer it was the same situation. Number 11 was g-stared and, consequently, not shown in the list of available layouts for deletion. Can you confirm that is always only the g-stared layout that is missing?
Confirmed, I made layouts, Ken, Ken2, and Ken3. They show up in the main Layout menu, as layouts, 10, 11,and 12, but only 10, "Ken", and 11, "Ken2" show up on the Delete Layouts menu. I made sure Ken3 layout was the active layout. When I made "Ken2" active, again all 3 new menus were on the main menu as before, but this time, it was "Ken2" that did not show up in the Delete Layouts menu. I hope that helps and is as you expected. Happy computing!

Take care and enjoy the weekend,
Ken
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: LayoutManager

Post by Filehero »

Hi Ken (soon from Blackwood Forest, Germany :) ),
klownboy wrote: I hope that helps and is as you expected.
yesss, that's the expected behaviour. Thanks for re-check and report. :)

The last days, I realized the code has reached a level of complexity that makes it rather hard to assure overall functional integrity after each change just by manual testing. So, I decided to try wether automated testing (Unit Testing) is doable with XYs scripting. Of course, it will take some time to lay that out and cover the core functionalities.

But before I'd like to put on another minor update which (hopefully) fixes the "Ken, Ken2, Ken3"-bug and introduces a new experimental property backupMode (for saving the "Last Unsaved" layout) which defaults to OFF. The help is still not updated yet.

Happy enjoying the NC coast!


Cheers,
Filehero
Attachments
LayoutManager-0.7.7_alpha.zip
(318.93 KiB) Downloaded 194 times

Post Reply