Sunday, September 22, 2024

Latest ideas for the 'blog manager' program

The more I use this program, the more ideas I have for improving it. As I have written before, it's a shame that I'm the only person using the program (although if anyone else wants to use it for their own blogs, then I'm open to distributing it), but some of the ideas expressed have migrated to the OP's "ERP" program, such as displaying the contents of a popup menu on a status bar. This morning I decided to create a new 'blog manager program' tag (or as Blogger calls them, 'label') in order to find more easily entries about this program and not about the blogs themselves.

Sometimes Blogger doesn't send me automatic mail with the contents of my latest blog - this seems to be a random event and fortunately is not frequent. In the cases where there isn't an automatic mail, I copy the blog text into a letter and send it to myself, so that I can export the contents to an HTML file. In one of the more recent blogs of this nature, I noticed that there was text aligned with a picture as appears here1; normally in the exported file, the picture appears first then the text appears below it. I wondered what was causing the text to align with the picture and found the magic HTML spell

<A style="MARGIN-BOTTOM: 1em; FLOAT: left; CLEAR: left; MARGIN-RIGHT: 1em"

I read that "The float property specifies whether an element should float to the left, right, or not at all" (although this doesn't define what 'floating' is). So there you go. I saw how I can identify where this style command should be added to the HTML text, so I added it to the code that imports the HTML code into my program. To my mild surprise, it worked first time, so I don't have to bother doing this manually.

Another improvement, which actually is a chain of improvements, is concerned with internal links2. The previous blogs were mainly writing about reading in new blogs and creating the links automatically, but I'm also concerned with adding manually links to old blogs. Here my process wasn't very streamlined: I would read an entry and see that there was an internal blog referenced, so I would open up the source of the entry, see which blog was being referenced and add the necessary <sup> links. Then I would open up the 'internals' form and add the referenced link. My first improvement was to add to the 'show source' dialog five speedbuttons: these are numbered 1-5, and pressing one of them will add code like <sup>1</sup> to the source at the correct place. That's 12 characters that don't have to be typed (especially as my fingers will often type 'sus' instead of 'sup').

But I still had to add the number of the blog being referenced, so now pressing a speedbutton not only adds the HTML code but also brings up the 'define internals' dialog, automatically adding the reference number to the correct place. After I add the number of the blog being referenced, the 'define internals' dialog closes, but at the moment it is also closing the 'show source' dialog and the added tags are not being saved. I don't understand why this is happening, but I'm sure I'll figure out a solution. I would prefer a proper solution (that displays understanding of the problem) but I may just add an ad hoc solution.

[Edit] I quickly found the problem. The 'show source' dialog was defined as a standard dialog box instead of being an MDI child dialog. Once I changed the 'formstyle' property, added the missing border icons and an OnClose handler, this form worked as it should.

Internal links
[1] 1823
[2] 1808



This day in history:

Blog #
Date
TitleTags
28322/09/2010
Prague log #2Holiday, Prague
117122/09/2018
A framework for the successful implementation of enhancementsDBA

No comments: