simple machines forum

Please login or register.

Login with username, password and session length
 

News:

Remember to make your own backup of posts before submitting.

 
 

Author Topic: EXIT: Say goodbye to dirty windows forever!  (Read 6983 times)

Holey Moley

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • twitter.com/m__7761
look out honey, 'cause I'm using technology
Holey Moley says,
« on: March 04, 2015, 07:02:30 PM »

It’s been quiet, too quiet. I’ve been at work on a new release for five months now. I wanted this post to be about a release including a halfway usable version of the new tool I’ve been working on all of that time; or actually, the truth is I wanted that a month or two ago.

But instead what I do have is technically a kind of a milestone. To begin with, here I am announcing a new release, one that even warranted changing the minor version number. The “technical” milestone is this release puts a stop to a longstanding problem of debris collecting on Sword of Moonlight’s tool suite’s “windows”; for example when another window is moved in front of one of Sword of Moonlight’s. Luckily it hadn’t been a bigger deal since Windows Vista because it works differently.

However if for any reason you need to use the Basic or Classic modes, or Windows XP (I have a nettop with XP installed myself) then until now there wasn’t much you could do beyond occasionally grabbing your window and taking it to the bottom of the screen and back to force it to clean up its act. Ha! Yeah, not cool. And while it may not seem like a whole lot, especially if you’ve moved on to newer Windows, nevertheless working correctly across the various supported versions of Windows and their various modes as well is at the very least a necessary step on the road to a Sword of Moonlight “beta”.

Of course I’ve been aware of this for the longest time, but to be honest I had no clue how to begin to approach the problem. It was only after I worked on a couple tools from the ground up — that build on top of the existing tools, existing inside of them so-to-speak — when I noticed only a week or two ago that those new tools were not exhibiting the same debris collecting behaviors. For me, that was a lead, or in fact, a clear course of action. And so it was then just a matter of time, both to do the job and before my urge to take leave of this all consuming, time consuming work got the best of me.

BUT wait, there’s more! Also included in this one time offer — er, release — is a new “mouse” input model for SOM_MAP plus a number of quality features I have been sitting on for months, and also a demonstration of the-big-new-tool that is going to be the centerpiece of the next release. One point of interest I’d like to highlight is the text input boxes, which should now include a full undo/redo feature set, and if you have Windows 8 there is even an automatic spellchecker facility that I enabled only earlier today; which I’m not actually able to try myself because I haven’t access to Windows 8 here at home.

Speaking of today: Today I came across two software bugs as I was preparing this release. I had originally planned to announce a forum attachment based demo instead. But if not for them bugs…

Something I didn't include in the post is there is a fancy new "mnemonic" system that works somewhat differently from the standard Windows way. It works with the Alt key, which shows hidden underlines, or underscores, beneath the letters in the button labels. In the future it will be possible to include them in the other labels as well, but that will require some work. The system doesn't press any buttons, but only moves around the screen. You can either hold Alt or press it separately in sequence.

The new version number is 1.2.0.2. Recall that 0 is not used and odd numbers are reserved for demos. There is a demo in this release, but it is part of the release proper, since I decided separating it out wouldn't be worth the trouble involved.

The demo is only available through the English/Neutral language package. The top-right button in the main menu reads "Demonstration" for this release only, or until the language package is updated again. Recall there is no automatic update system for language packages (yet (there exists a fully detailed plan)) so use the "Dragon Sword" (installer component) tool to update your language packages. The Japanese package has been updated too, as has SOM_MAP.exe in the tool folder, mainly to include the new input model, or more correctly to include the toggle button that is used to disable it (it works to select the tile on the main painting screen by default, double-click to open it up)

The "Demonstration" is even less complete than the [?] button in the title bar suggests. Basically you can see all the screens up to the point of adding or removing items from the script/outlines. One interesting development that I haven't written about in these forums is I decided to restrict the timestamp data type to between 2000 and 3000. Call that "the Sword of Moonlight millennium" if you will. The other alternative was functionally 1970 (the so-called Unix epoch) so what's 30 years--compared to SOM-time--right? Of course if you are behind UTC time you can see the last day of 1999.


One downside to this release is the mouse wheel has been pretty much universally disabled. That is because Windows' built-in "widgets" vary in there support for mouse wheeling, and SOM_MAP's grid areas don't support it either. Also I think because the tree graphs have a bug when it comes to scrolling past items that take up more than one line, and I was successful in coding a drop in solution for the bug, but didn't get to supporting the mouse wheel. Anyway, I get pretty upset when the mouse wheel doesn't work myself, so it probably won't be long before I endeavor to properly support that in a future release (edited: it can be combined with Ctrl to increase the text size in the new script editor, but only for the main text, not the various notational elements. Note, not the same as font size, just temporary for reading purposes)

Right-clicking is also disabled except where necessary. Mainly that means you have to know Ctrl+C and so on, and use the keyboard to do that. That's because the text input boxes with proper undo/redo support on Windows don't natively support the right-click function. It's going to be put back before long in the form of an extension that users can configure for themselves if they want. It will probably have some entries in the default config files too.


There was a minor bug where SOM_MAP would minimize when clicking its title bar, even if it wasn't the active window (it's supposed to minimize if it is) but the two bugs in the blog post are more serious than that. One involved the media selection elements in SOM_MAP's programming area being disabled, because they were confused for the Record button on the tile popup screen (so it would only happen if programming an event above that screen) and the other bug, probably harmless wasn't creating placeholders for all of the items in SOM_MAP, it would stop around 243 on my workstation, but that's just because the file buffer seemed to only go that far for some reason... kind of weird because the other PRM files are even longer and I don't think they were exhibiting problems. The last one would be dangerous, but it basically just changed the value FFFF to FFFE so that the empty slots would be included, so even though it was altering the wrong bytes after 243 items, those bytes would've had to been FFFF to be altered, and valid records wouldn't even have that number in them I think. Still it's important to show all 250 items... even if they are only placeholders.


Oh and you know, What a relief! SOM works in classic/basic mode now. That's been a sinking feeling for me for a while, and it's good to know that if I end up stranded using my XP box for a while sometime in the future I won't have to suffer that awful experience. Consider it one major fish fried :yumm: :aroused:


Hah! Funny, I never knew it but that last emoticon is actually called "aroused". I guess so? It's almost flirting with the "innocent" emoticon in the menu next to it :5innocent2:


EDITED: I've also added a private build of ResEdit to the text folder (http://svn.swordofmoonlight.net/text/) along with a file explaining why it's there. Kind of unfortunate. I hope the situation isn't permanent. I'm going to get the source code up before long too, but the only other updated file is SomEx.csv in the TOOL folder (used by the updater to update to 1.2.0.2) and SOM_MAP.exe (which is in Japanese)

Of course don't forget to update the English/Neutral language package. Again, use SOM.exe (a.k.a. Dragon Sword) to do that. There is an option to access the language setup system for tools in its top-menu.
« Last Edit: March 04, 2015, 09:04:38 PM by Holy Diver »
Formerly "Holy Diver" ("Holy") [Holy will be back as soon as I'm back to full form]

Holey Moley has 2730 posts

Holey Moley

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • twitter.com/m__7761
look out honey, 'cause I'm using technology
Holey Moley says,
« Reply #1 on: March 05, 2015, 10:14:42 AM »

PATCHED the demo's two Open file popups that had a typo preventing them from recognizing the file extensions. Something that creeped in while adding translation support to the type descriptions (and some very minor bugs around the breadcrumb like menus)

PS: I guess supporting all of the placeholders for items would be important if you deleted an item, since that would trigger SOM_MAP's old/super annoying behavior of removing things from the map on load.
Formerly "Holy Diver" ("Holy") [Holy will be back as soon as I'm back to full form]

Holey Moley has 2730 posts

Holey Moley

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • twitter.com/m__7761
look out honey, 'cause I'm using technology
Holey Moley says,
« Reply #2 on: March 06, 2015, 02:07:02 PM »

Source code is up.

The new SOM_MAIN tool in half complete form is mostly in this (http://svn.swordofmoonlight.net/code/SomEx/SOM_MAIN.cpp) file.

That's what 5 months of full time coding looks like I guess, minus side projects and a fair amount of code that is off in other files, like the MO/XML reader/parser.

That isn't all of the tool. Most of the tool code is generic/off in the som_tool.cpp file.
Formerly "Holy Diver" ("Holy") [Holy will be back as soon as I'm back to full form]

Holey Moley has 2730 posts

Holey Moley

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • twitter.com/m__7761
look out honey, 'cause I'm using technology
Holey Moley says,
« Reply #3 on: March 08, 2015, 10:46:04 PM »

Minor patch repairs the sideways ▼ play buttons.

EDITED: And again for a background drawing bug, probably only potentially affecting the demoed tool windows with dividers but I don't know for certain. It would start the background texture at an odd coordinate and in one case (the one in which I noticed it) cause a smear effect when resizing.


PS: This afternoon I added in buttons for opening the project's DATA folders next to the places where those folders' multimedia contents are listed via menus among the various tools. That's how I noticed the play button not appearing to be selected/pressed down. Anyway, it's kind of neat / convenient, but doesn't actually address the problem of communicating what kinds of files are supported. I hesitant to bake that kind of information into the language packages. Adding README files to the DATA folders would be fine if it didn't seem like more work than it's potentially worth at this point. Ideally virtually any kind of file would work. As is I don't even know if the files SOM supposedly supports will always work. The natural place is in the manual/any future HLP files...

If I can't get HLP files working soon, at the least I will digitize the manual as soon as I can get one. For the record, these patches technically add that ability, but the available language package doesn't enable it.
« Last Edit: March 08, 2015, 11:48:30 PM by Holy Diver »
Formerly "Holy Diver" ("Holy") [Holy will be back as soon as I'm back to full form]

Holey Moley has 2730 posts

Holey Moley

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • twitter.com/m__7761
look out honey, 'cause I'm using technology
Holey Moley says,
« Reply #4 on: March 09, 2015, 05:43:18 PM »

Patch to demo repairs automatic ascription of the aspects (properties) with associated widgets built into the item aspects  screen (the one with Copy/Paste buttons)
Formerly "Holy Diver" ("Holy") [Holy will be back as soon as I'm back to full form]

Holey Moley has 2730 posts

Holey Moley

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • twitter.com/m__7761
look out honey, 'cause I'm using technology
Holey Moley says,
« Reply #5 on: March 13, 2015, 06:32:06 PM »

I've become aware of a bug that is probably in this release around minimizing the windows.

I think it probably creeped in when I fixed what was causing SOM_MAP to behave differently when clicking on the title bar (it would minimize when it wasn't supposed to)

The new problem is after minimized a new window isn't brought up to replace the manually minimized window. It's not a big problem, so I don't know if I want to patch at this stage because I've been doing a lot of work since.

I'm sure I would've noticed this behavior if it had been that way all along. What worked to fix it was to replace the CloseWindow API (it actually iconifies the window) with a WM_SYSCOMMAND+SC_MINIMIZE directive. The documentation for CloseWindow says it "minimizes" the window, but for whatever reason it only does half the job under the present conditions (programming for Windows' GUI is generally a bunch of fiddling around until things just work the way you want)


PS: I want to use this moment to say that I think I've decided to modify the system menus, which can be accessed by clicking the Window icon generally, or right-clicking if there isn't one. I want to add a Minimize option, but also I want to add a Save option to the system menu, since I've decided that the script editor I'm working on won't automatically save when you save from one of the big three tools, but also I don't want to put a big honking Save button on its compact mode screen. I think generally people will just save when they close it in response to the "keep changes?" prompt, but also if they need to save just as a precautionary measure, I don't want it to be necessary to switch out of the compact mode screen.


EDITED/BTW: Another function I'm seriously considering for the System menu is a way to set the title in the window frames. I figure that way no one really has to worry about what to place in that space, or how to differentiate between two copies of the same tool being opened. Leave it to the user in other words.
« Last Edit: March 13, 2015, 07:52:17 PM by Holy Diver »
Formerly "Holy Diver" ("Holy") [Holy will be back as soon as I'm back to full form]

Holey Moley has 2730 posts