Templot Club Archive 2007-2020                             

topic: 3534File viewer function in OT/MEC
author remove search highlighting
 
posted: 22 Oct 2019 05:49

from:

Martin Wynne
 
West Of The Severn - United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Hi Graeme,

I forgot to mention that the file-viewer form includes an HtmlView component. In order to edit the form you will need to install the HtmlViewer package in Lazarus. How to do that here:

 topic 3283 - message 24933

Also of course Jim's .box files will open in Templot2 but not in OT/MEC at present for testing the file viewer.

I'm hoping to have a fix for that in the next day or two.

cheers,

Martin.

posted: 22 Oct 2019 09:13

from:

Jim Guthrie
 
United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Graeme,

Heres the .ZIP file of my BOX file folder - 470 files with two sub folders. Martin has locked the other thread so I'm posting it here. :D   It just gets inside the file size restriction. :D

Jim.
Attachment: attach_2929_3534_BOX-FILES.zip     15
Last edited on 22 Oct 2019 09:14 by Jim Guthrie
posted: 26 Oct 2019 07:10

from:

Graeme
 
Bangkok - Thailand

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Thanks, Jim,

I was the TENTH person to download it!!!

Cheers,

graeme

posted: 26 Oct 2019 07:21

from:

Graeme
 
Bangkok - Thailand

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Martin,

I just spotted a note in the code that PNG is deprecated in the viewer. Is this a good time to drop it? No problem if not, but a chance to simplify the code is always a good thing.

Actually I would have expected PNG to be the preferred format. What was the rationale behind the choice?

I also wondered why there was a choice in the first place? Does it affect the user in some way which format these images are shown in?

Cheers,

g

(Yes, I AM still alive. The bicycle with trainer wheels turned out to be more of a one-legged drunk on a unicycle, but progress IS being made :) Not quite ready for Jim's .box files yet, but should be soon.)

posted: 26 Oct 2019 12:14

from:

Jim Guthrie
 
United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Graeme wrote:
I was the TENTH person to download it!!!

That could mean that you have a lot of potential helpers. :D :D :D

Jim.
Last edited on 26 Oct 2019 12:14 by Jim Guthrie
posted: 26 Oct 2019 13:03

from:

Martin Wynne
 
West Of The Severn - United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Graeme wrote:
Martin,

I just spotted a note in the code that PNG is deprecated in the viewer. Is this a good time to drop it? No problem if not, but a chance to simplify the code is always a good thing.

Actually I would have expected PNG to be the preferred format. What was the rationale behind the choice?

I also wondered why there was a choice in the first place? Does it affect the user in some way which format these images are shown in?
Hi Graeme,

You have to bear in mind that it is now 20 years since I released the first public version of Templot.

At that time users' systems were far smaller than nowadays, and the use of system resources had to be kept to a minimum. The first release of Templot was designed to run on a 640x480 screen with 8-bit colour.

All through the code there are options and settings left over from those days. Most of them are commented out, and I deleted many of them entirely from the OT/MEC files.

However I do have to keep in mind that there are some Templot users who keep a battered old Windows system in their model workshops to print out track templates as needed. As far as I know Templot still runs on ancient Windows95 systems, or at least Windows98. But I haven't actually tested it for ages, and I doubt the Lazarus-compiled OT/MEC versions would do so. Anyone? That's one reason for sticking with Delphi5 as the compiler for Templot2, rather than a more up-to-date version of Delphi.

The PNG option in the file viewer stores the screenshots as PNG image files on disk. The alternative BITMAP option stores them in memory as bitmaps for a much faster display. Each one is 676x320 requiring about 900KB of memory each. If Jim looks at a folder of 500 box files, that is over 400MB of memory needed for them as bitmaps. Nowadays that's not much (and I may look at increasing the size of the screenshots), but in the early days it was a significant chunk of the installed system memory.

It's all a bit academic because of course the PNG files must be rendered as bitmaps in order to be shown on the screen. However that is usually done in the separate graphics memory, and the graphics hardware may render only the visible scrolled screenful at any one time. Whether that is actually how the file viewer works in practice I'm not entirely sure* (it uses David Baldwin's HtmlViewer component to display them), but the PNG option is provided so that users can choose whichever option works best on their system.

Whether to remove the PNG option is one of many questions which an active OT/MEC group might want to consider. I tend to adopt the IIABDFI approach (if it ain't broke don't fix it). :)

I'm making good progress with a new file format for transfers to OT/MEC, I should be able to post a scruff release in a day or two. You will then be able to load Jim's .box files into OT/MEC to test the file viewer.

Thanks for popping back, I was beginning to wonder if you had fallen off your bike. :)

*not entirely sure is PR-speak for haven't the faintest idea.

cheers,

Martin.

posted: 27 Oct 2019 12:11

from:

Graeme
 
Bangkok - Thailand

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Thanks for the info Martin.

The main reason I asked if PNG is needed is that PNG is one of the differences between Delphi and Lazarus. Only a name change so far, though, so I will push on with it to see if any other (difficult) differences pop out of the woodwork. I am all for supporting users with older kit. (One of the reasons I like Linux :D.)

Also, I can confirm that the latest Lazarus generates executables that seem to run fine on Win98. I would hesitate to suggest that what I have done even vaguely hints at a thorough shakedown, but it runs, I can get to the file viewer, and what other bits I have tried so far have at least not broken.

The PNG option in the file viewer stores the screenshots as PNG image files on disk. The alternative BITMAP option stores them in memory as bitmaps for a much faster display.

So it it sounds as though the key difference is not in the file format itself but in the handling of the files - i.e. memory-based versus disk-based. Is that the case? or does the rendering itself take significantly different amounts of time/processor/memory too?

Whether to remove the PNG option is one of many questions which an active OT/MEC group might want to consider. I tend to adopt the IIABDFI approach (if it ain't broke don't fix it). :)

Yes indeed! Though I think a view from the whole community would be valuable. I would hate to do a load of work on OT only to find that the result was unacceptable to the user community because of something we had removed!

And interestingly, I saw a funny take on IIABDFI just yesterday - IIABFIUII - If It Aint Broke, Fix It Until It Is!   :D   Well, I liked it. I guess the wearer of the t-shirt was trying to highlight the differences between fixing and improving. I am sure the last 40 years work on Templot have been (mostly) improvement, not redundant fixes of what wasn't broke.  :thumb:

I'm making good progress with a new file format for transfers to OT/MEC, I should be able to post a scruff release in a day or two. You will then be able to load Jim's .box files into OT/MEC to test the file viewer

Great! I am at the point where I need it before I can go much further. I have figured out Lazarus (a bit), reminded myself of Pascal (a bit), and developing on Win98 (a bit) and have been filling the time reading up on point joggles.

Thanks for popping back, I was beginning to wonder if you had fallen off your bike. :)
To be honest, I did - several times. :)  I re-started the work twice, but now sailing along smoothly. Cant wait to get out of first gear!

Cheers,

graeme



posted: 28 Oct 2019 22:56

from:

Martin Dobbins
 
Memphis - Tennessee USA

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Graeme wrote:

<snip>Yes indeed! Though I think a view from the whole community would be valuable. <snip>


Things have changed a lot since this software was written, storage is inexpensive and processors a lot faster.  I doubt very much that  PNG would be required just to reduce storage space (!) but is it going to improve anything to remove it?
Martin

posted: 29 Oct 2019 00:20

from:

Martin Wynne
 
West Of The Severn - United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Martin Dobbins wrote:
Things have changed a lot since this software was written, storage is inexpensive and processors a lot faster.  I doubt very much that  PNG would be required just to reduce storage space (!) but is it going to improve anything to remove it?
Hi Martin, Graeme,

As it happens I have been working on the Templot2 file viewer today. I have added functions to export files in the new MECBOX format for transfer to OT/MEC:

2_281902_510000000.png2_281902_510000000.png

But only for the in-memory bitmaps option. The deprecated PNG option is still working but doesn't include these export functions.

These functions will allow users to make backups in the new format from Templot2 for OT/MEC for large collections of old .box files.

These functions are relevant only for Templot2, so I don't think Graeme will need to make any similar changes to the file viewer in OT/MEC.

cheers,

Martin.

posted: 29 Oct 2019 01:37

from:

Graeme
 
Bangkok - Thailand

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Martin Dobbins wrote:
...  I doubt very much that  PNG would be required just to reduce storage space (!) but is it going to improve anything to remove it?
Hi Martin,

From a user's perspective, no. But if it is deprecated (i.e. due for removal) anyway, it is 400 lines of code I can just delete instead of spending time on when there are so many other things for me to do.

Cheers,

Graeme

Last edited on 29 Oct 2019 01:38 by Graeme
posted: 29 Oct 2019 02:06

from:

Martin Wynne
 
West Of The Severn - United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Graeme wrote:
But if it is deprecated (i.e. due for removal) anyway, it is 400 lines of code I can just delete instead of spending time on when there are so many other things for me to do.
Hi Graeme,

Have you found that it needs spending time on? I was hoping that simply replacing the directory-list controls would get the file viewer working in OT/MEC more or less as-is. Once a file path is available the rest should work as before.

He says without ever having properly tried it. :)

When I found that Lazarus wouldn't compile it, I simply deleted it pro-tem without doing any more with it.

cheers,

Martin.

posted: 29 Oct 2019 03:38

from:

Graeme
 
Bangkok - Thailand

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Martin Wynne wrote:
Have you found that it needs spending time on?
Not yet, but initially I was getting crashes reading in files (I think - I didn't know much about what was going on back then :) ) and so moved on to becoming more familiar with Lazarus/Pascal while I waited for OTBOX files.

On seeing the 'deprecated' notice I just thought it was an opportunity to simplify (my job and the code) a little. :D

He says without ever having properly tried it.
Hahahahaha - you dont NEED to try it - you KNOW this code like the back of your paw. Remember I am 40 years behind you. :D  I will be  s...l...o...w  for a while.

One area I definitely need some help with is TortoiseHg and the Sourceforge web site. :?
Yes, indeed. This is an area I CAN help. Please give me a day or two.

Cheers,

g



posted: 29 Oct 2019 04:35

from:

Martin Wynne
 
West Of The Severn - United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Graeme wrote:
Hahahahaha - you don't NEED to try it - you KNOW this code like the back of your paw.
Hi Graeme,

Don't be too sure. Just because I wrote it years ago doesn't mean I can remember it now. It comes back slowly when I start working on it, but there are large chunks of code which I haven't looked at for years. :?

Many thanks for your offer to help with Sourceforge.

Good news -- in the last 10 minutes I have for the first time exported from T2 a boxful of templates in the new format, imported it successfully in OT, re-exported it from OT, and imported it back in T2. Without as far as I can find any errors in the round trip. It has taken me several days to get this far.

Time for some shut-eye. :)

cheers,

Martin.

posted: 29 Oct 2019 15:31

from:

Graeme
 
Bangkok - Thailand

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Martin Wynne wrote:
I was hoping that simply replacing the directory-list controls would get the file viewer working in OT/MEC more or less as-is. Once a file path is available the rest should work as before.
Hmmm. Yes, well life tends not to be like that, but your comments made me realise that I had originally had similar thoughts, and I had got distracted along the way.

I did at first replace those components with what looked like the Lazarus equivalents, but of course they did not behave quite the same. Different properties, different events, etc. I started to look at how this could be accommodated in the existing code and of course to do that I have to UNDERSTAND the existing code. The only way I could do THAT was with some restructuring to ensure I was doing the right thing and then after that ....

Well, as I said. I got distracted. That was my second iteration, and as well as learning a LOT about that area of the code, I made great progress on the Lazarus learning curve ... SO ... I did not feel too bad about throwing the whole lot in the bin and starting again with a simpler (fewer changes) approach, The truth is, not much needs changing - but without the second attempt I did not know enough to understand WHAT the changes needed to be.

So ... effort 3 is well under way, and It is already ahead of where version 2 go to  I expect to soon (maybe tomorrow) have something worth looking at. . :thumb:

Cheers,

Graeme



posted: 31 Oct 2019 06:37

from:

Graeme
 
Bangkok - Thailand

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Graeme wrote:
So ... effort 3 is well under way, and It is already ahead of where version 2 go to  I expect to soon (maybe tomorrow) have something worth looking at. . :thumb:
Well, I am pleased to have made relatively few changes on this version and have the directory population/file display working OK for both JPEG and PNG options.

However, I seem to be having trouble with the HTML component. When I clicked on an image (or the "Load this File" link) nothing seemed to happen.

When I look at the code, I would not have expected anything to happen! Perhaps something magic is taking place behind the scenes, but there is no obvious reason for anything to take place.

There IS an OnImageClick action in the HTMLviewer control, but it was not connected to anything.

I have now connected that up to a new procedure, and for JPEG it returns an integer which I can pass to fv_reload_file, and that works fine, BUT ... for PNG it returns the name of the temporary JPEG file on disk. Now I COULD parse that string and pull out the file name and look it up in the list of file names and take the index and pass THAT to fv_reload_file ... but that would be an ugly (flaky) way to go I would suggest.

I can't help feeling I have missed something, but how it ever worked before I know not. :shock:
EDIT: This issue now overcome in a moderately acceptable way. (I still think I am missing something though. :roll: )


AND ...  I am struggling with clicking the 'load file' link. I looked in the HTMLViewer events for an OnLinkClick, but here isn't one! I did see one post that claims that the OnHotSpotClick is the thing to use, but it did not trigger for me when I clicked the link.      Edit: This is now the main blocker.

So, close, but no cigar. (Yet!)  :?

Any thoughts?

Cheers,

g


Last edited on 31 Oct 2019 07:39 by Graeme
posted: 31 Oct 2019 07:03

from:

Martin Wynne
 
West Of The Severn - United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Graeme wrote:
I can't help feeling I have missed something, but how it ever worked before I know not. :shock:
Hi Graeme,

The file viewer is working fine in T2. Please try it in T2 to confirm that. :?

I didn't anticipate that you would need to do anything at that level.

I expected that all it would need is an update to all the lines referencing the folder listbox:

  dir_str:=folder_listbox.Directory+'\';   // add trailing slash

to reflect whatever new controls you had found to replace the old ones.

I will have a look at it in Lazarus and temporarily replace the above line with an edit box to enter a path manually.

fv_reload and the other links are linked in help_sheet.pas :


procedure program_link_clicked(new_url:string);

  // procedure called from Htmlview unit on a clicked link
  // this is a click for a program function.

...
...



  if Copy(new_url,1,9)='fv_reload'
     then begin
            n:=StrToInt(StringReplace(Copy(new_url,10,255),'.85a','',[rfReplaceAll, rfIgnoreCase]));  // 255 = to end of string
            fv_reload_file(n);
            EXIT;
          end;


If you can't find something, do a global search through all the units -- lots of stuff is not where you might expect it to be. That's what happens if you spend 40 years bolting stuff onto the same Meccano model. :)

The modified THtmlViewer files supporting the links are in the

 C:\TEMPLOT_MEC\html_viewer_units\

folder, but they shouldn't need any changes.

cheers,

Martin.

posted: 31 Oct 2019 07:57

from:

Graeme
 
Bangkok - Thailand

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Martin Wynne wrote:
The file viewer is working fine in T2. Please try it in T2 to confirm that. :?
Yes, I have tried it and it works fine.

Thanks for looking into this for me. To help your investigation I made these changes:
 disk_drive_combo -> TDirectoryEdit
folder_listbox -> TFileListBox

Cheers,

graeme


EDIT:  AAAAARRRRgGGGGHHhhhhhh! I just looked in the help_sheet and saw all the commented code.
I will push on ...

Last edited on 31 Oct 2019 09:34 by Graeme
posted: 31 Oct 2019 09:40

from:

Graeme
 
Bangkok - Thailand

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Graeme wrote:
EDIT:  AAAAARRRRgGGGGHHhhhhhh! I just looked in the help_sheet and saw all the commented code.
I will push on ...

Yes, that was indeed the problem. It looks to be working OK now. Thank you for the pointer. It could have taken me a long time to find. :roll:

I will continue testing to make sure I have T2 parity, but I am hopeful (again).

Graeme

posted: 31 Oct 2019 17:52

from:

Graeme
 
Bangkok - Thailand

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Martin Wynne wrote:
That's great. Many thanks for doing that. :)

You are very welcome, and I am sorry it took so long (I may have mentioned my many-dimensional learning curve) and more importantly that getting me up to speed absorbed so much of your time (no excuse for that :(). I will make a positive nett contribution soon, I promise!  :thumb:

... but it would be better to do things properly
I couldn't agree more, and on that note, I think there are a couple of things to do before we put anything on the Sourceforge site.
  1. Testing
    The first is that I would not like to release this into the wild until someone with more experience of Templot than I have has given it a spin. I do not know all the wrinkles of functionality, and I may have done something untoward in making the changes. Obviously you could do such a test, but in view of the amount of your time you have spent on this already it would be good if we could call on a "volunteer".
  2.  OT/MEC "branding"
    On the basis that OT is for open development of Templot, and TMEC is for consenting adults to tinker with in the privacy of their homes, I would like it to be clear that I am working on the former. I noted in one of the earlier posts that there is a rather fetching logo for OpenTemplot. Would you mind if I incorporated that into this version?
  3. Versions
    At first I was hoping to graft my changes on top of the latest T2 version before release, but I have a suspicion that would be a lot of work, and you seem keen to get this 'out there' soon. Maybe it is better put on the To-Do list. What would help, though, is if you could let me have the source of T2 as it was last year when you created the first OT (obviously I would not want (or need) the proprietary components, but the code of yours which calls those components would be useful) and also the code for the latest version, also complete to the same extent. By running comparisons on those I can tell
      - what changes were done / are needed to get from T2 to OT, and
      - what changes have been made to T2 since last year (and hence need to be given the same treatment.
    I really should have done the first of these when I started - that would have avoided me missing some of the changes. (Live and learn. Live and learn)
  4. Version Numbering
    This really does not belong here, but it needs sorting out before we go further, I think.
    In a sudden flash that it became obvious to me (which does not make it right of course) that we ought to keep the version numbers of OT the same as the version of T2 on which it is based. This would make it clear to users what they are using and what they can expect in terms of functionality. This system will work fine as long as OT is a subset of T2 i.e. has no new functions that are not in T2. Considering the contributions you have received so far, I don't think we need to worry unduly about this. Not for some while yet, anyway. I certainly will not be adding new functionality for the foreseeable. :)
  5. mecbox_unit.pas
    I would be happy to add in any changes you would like to send, though I would prefer to have the FV changes bedded in first. It's your choice though.
That's all I can think of and probably enough for now. Time for some sleep!

Cheers,

graeme


posted: 31 Oct 2019 22:33

from:

Martin Wynne
 
West Of The Severn - United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Graeme wrote:
I will make a positive nett contribution soon, I promise!  :thumb:
Hi Graeme,

I think you have done already, certainly more than happened last time. Ideally we could do with A. N. Other joining in so that the open-source activists could be properly called a group or a gang. :)

You posted quite a few things to think about:
Version Numbering:
This really does not belong here, but it needs sorting out before we go further, I think.
In a sudden flash that it became obvious to me (which does not make it right of course) that we ought to keep the version numbers of OT the same as the version of T2 on which it is based.
...
OT/MEC "branding:
On the basis that OT is for open development of Templot, and TMEC is for consenting adults to tinker with in the privacy of their homes, I would like it to be clear that I am working on the former. I noted in one of the earlier posts that there is a rather fetching logo for OpenTemplot. Would you mind if I incorporated that into this version?

Sure. However perhaps we need to think a bit further ahead. I said that once there was some open-source activity, I would give OT equal billing with T2 on the Templot download page, and that at some further stage of close equivalence I would be happy to retire T2 and go ahead only with OT. In which case the obvious branding for OT would be:

 Templot3

To that end, in the MECBOX version I have been working on, I have set the version number to 2.90 as a precursor to such a change. That gives us 2.90 to 2.99 in which to get it up to speed. Thoughts anyone?

I don't think it would be sensible to try to match OT version numbers with those of T2. Apart from likely different rates of progress, there is an important practical consideration -- after loading a template from file, the version_mismatch routine checks to see if the loaded template is from a version pre-dating the current one. If so it is updated with any new settings introduced between then and now.

By this means, users with legacy BOX files dating back to the dawn of time, can load them into the current version of Templot2 and the loaded templates will become compliant with all other current templates.

With MECBOX transfers now possible, that means that users of OT could also be loading templates dating back to earlier versions of T2. If the version numbers of OT and T2 are in the same range that could lead to problems.

I propose therefore that all possible OT version numbers are in advance of all possible T2 version numbers.

In other words, all T2 development must stop on or before version 2.89. We are currently on 2.24 after 8 years of T2.

And no OT version capable of loading MECBOX files from T2, can exist before version 2.90.

It's odd to be discussing this sort of stuff here. For 40 years I've been deciding this sort of thing myself without reference to anyone else. It takes a bit of getting used to, and it is also quite time-consuming to write it all down like this and wait for responses.

That's enough for one post, I will respond to your other points separately, it's time for some food. :)

cheers,

Martin.

posted: 1 Nov 2019 04:47

from:

Graeme
 
Bangkok - Thailand

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Martin Wynne wrote:
I said ...  I would be happy to retire T2 and go ahead only with OT. In which case the obvious branding for OT would be: Templot3

OOh yes - I had not thought as far as merging the two back together. T3 IS certainly the obvious name. However, I feel it is perhaps a little premature to use it just yet. I would suggest OT for now and move to the T3 name once you are completely happy with the move to the open source version. Again, your call of course.

I don't think it would be sensible to try to match OT version numbers with those of T2. Apart from likely different rates of progress, there is an important practical consideration -- after loading a template from file, the version_mismatch routine checks to see if the loaded template is from a version pre-dating the current one. If so it is updated with any new settings introduced between then and now.

By this means, users with legacy BOX files dating back to the dawn of time, can load them into the current version of Templot2 and the loaded templates will become compliant with all other current templates.

With MECBOX transfers now possible, that means that users of OT could also be loading templates dating back to earlier versions of T2. If the version numbers of OT and T2 are in the same range that could lead to problems.

I propose therefore that all possible OT version numbers are in advance of all possible T2 version numbers.

In other words, all T2 development must stop on or before version 2.89. We are currently on 2.24 after 8 years of T2.

And no OT version capable of loading MECBOX files from T2, can exist before version 2.90.

This is really the underlying reason why I suggested having a FILE version number. It represents the file specification changing over time and in truth that really is independent of the software. Not really neccessary when the software versions follow a nice linear progression, but when versions branch out and come together it is a bit more tricky. With a file version, each version of the program knows what file version it can deal with and can caution the user if it is about to update a file to a newer version (and of course refuse to process a file it knows nothing about). This relieves most of the constraints driving the software version numbering. (If I have still not yet made this point convincingly enough, I will drop it, I promise. No more references hereafter  :D )

It's odd to be discussing this sort of stuff here. For 40 years I've been deciding this sort of thing myself without reference to anyone else. It takes a bit of getting used to, and it is also quite time-consuming to write it all down like this and wait for responses.
Not to mention the idiots like me who seemingly want to disagree about everything! Yes, it must take some adjustment. A curse and a blessing? I am sure you are already seeing the curse of it. I hope you are getting a hint at the blessing side too.

Cheers,

graeme





Last edited on 1 Nov 2019 05:16 by Graeme
posted: 4 Nov 2019 02:59

from:

Graeme
 
Bangkok - Thailand

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Martin Wynne wrote:
The problem is that T3 will not load .box files from T2, and is unlikely ever to do so. So calling this a BOX FILE VIEWER is potentially confusing
I think it will have to be something like DATA-FILE VIEWER to cover .otbox and .mecbox without mentioning .box .
Hi Martin,

Yes, I was not suggesting that T3 would actually read .box files. Just that imagining what we would put in this place if it did helps to highlight the point.

What I was suggesting was a term which reflects what the files actually represent.  I was trying to go from mentioning '.box' (the file extension) to mentioning 'box' (the concept).  I think I am suffering here a bit from not really knowing why they are currently 'box' files and what a 'box' really is. :roll:

Perhaps TEMPLATE-FILE or LAYOUT-FILE or TRACK-FILE?   (DATA-FILE does not really do it for me as the contents of every file is data to someone.)

p.s. not crashing now when I have a folder containing only .otbox files. But clicking load this file didn't do anything apart from clearing the storage box.
Well somewhat good news. trying it here it is working fine. :?

p.p.s. re the Lazarus controls. I'm going to have a go at recreating the old Delphi controls programmatically. That was my original intention when I couldn't find a match in Lazarus. I left it undone then because it's not a 5-minute task, and "have a go" is just as likely to mean failure as success. :)
I confess I can't see what is in the current implementation that is so compelling that it warrants that effort? . Maybe this is one of those occasions to let go of the past?  Or maybe I just don't understand. :D

I thought this might be an opportunity to simplify the design (once I had the logic working OK) - something along the lines of

3620_032202_310000000.png3620_032202_310000000.png


Does the directory tree give us anything useful that the DirEdit widget does not to justify all that screen real-estate?

Well, just a thought.

Cheers,

graeme
Last edited on 4 Nov 2019 03:05 by Graeme
posted: 4 Nov 2019 03:19

from:

Graeme
 
Bangkok - Thailand

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Martin wrote:
It's now 890 high, which is too much for some laptops. So that means either reducing the visible part of the list, or a complete re-design. Extra width is possible -- it's currently 1020 and nowadays I allow for up to 1200.

Oooh yes - the option buttons do rather take up a lot of space. Also, the technical detail of what format the file is in is getting a lot of attention. I suspect it's not something the user really cares about. They are all just Track-Files (or Template-Files or whatever).

How about this:
  • put ALL files in the list, but the .mecbox files are not shown as images. Instead there is a simple text entry showing the name (and maybe size or whatever) and a link which, on clicking, expands just that one entry to an image if the user chooses to look at it,  AND
  • Add in another check box so the user can show all .mecbox files at once, somilat to the current 'Show All'
Job Done!  :thumb:

Or is it? :roll:

Cheers,

g


posted: 4 Nov 2019 03:23

from:

Martin Wynne
 
West Of The Severn - United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Thanks Graeme.

As I knew would happen, we've got the topics muddled up again.  :(

i posted my viewer mock-up in the other topic:

 topic 3538 - message 28268

Re what is a "BOX"? Have you read this page:

 http://templot.com/companion/origins_intent.php

and maybe:

 http://templot.com/companion/2_yes_i_build_track.php

cheers,

Martin.

posted: 4 Nov 2019 03:39

from:

Graeme
 
Bangkok - Thailand

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Martin Wynne wrote:
As I knew would happen, we've got the topics muddled up again.  :(
No problem - I am on my absolute best behaviour at the moment and trying to be scrupulous about where I post. Normally it is the sort of thing thta causes me grief too. :(

Yes, I have read both of those posts (in fact the whole series) and enjoyed them I must say. As a developer, I find this kind of story fascinating, and It greatly helps (me anyway) to understand the software and the way it is.

Sadly these days my memory is like a whatsit thing with holes in! I remembered the Phase 1 Phase 2 distinction but the 'box' bit had slipped away already. :(

So maybe Layout-File is not so far off? Or a Track-box File? Or TrackPad-File, given that we have a TrackPad already.

Welllllll - something like that.  :D

Cheers,

g


Last edited on 4 Nov 2019 03:41 by Graeme
posted: 4 Nov 2019 04:02

from:

Martin Wynne
 
West Of The Severn - United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Graeme wrote:
So maybe Layout-File is not so far off? Or a Track-box File? Or TrackPad-File, given that we have a TrackPad already.
Hi Graeme,

Thanks for the kind words. All that stuff is still unfinished and waiting for me to progress it, but it is actually a much more daunting task than coding.

Bear in mind that we are not starting with a blank sheet. If that were the case we probably wouldn't even use the name Templot! That started with no more than 2 seconds thought originally as a file name.

We have over 2000 members here and 20-years-worth of long-time users who have been referring to Templot box files for as long as they can remember. "Box files" are common parlance in many a model railway club. We can't change now, the most we can do is evolve slowly.

If we have settled on "Templot3", I wonder if BOX3 files might be better than OTBOX? Anyone (there can't be many -- I suspect almost no-one) who has started saving .otbox files would need only to rename them with the new extension.

cheers,

Martin.

posted: 4 Nov 2019 05:36

from:

Graeme
 
Bangkok - Thailand

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Martin Wynne wrote:
We have over 2000 members here and 20-years-worth of long-time users who have been referring to Templot box files for as long as they can remember. "Box files" are common parlance in many a model railway club. We can't change now, .....
Yes, yes yes! This is my point exactly. You know as well as I do that try as we might we will not change people. Box files will be box files until the end of time.

Nobody would ever say " ooh - I have an otbox file I can let you have". I would guess BOX3, being a bit more pronounceable, stands more of a chance, but even then my suggestion would be to use .box3 as the file extension, but in the user interface stick to box files everywhere. (And BTW I like it as an extension. :))

Quite honestly, if this were my project, after I have sorted the git stuff out I would have me working on a reader for old-style box files. (Well they say never dare a fool!) Then T3 would be able to read anything thrown at it with minimal impact on the users.

Well OK. Maybe not RIGHT after sorting out git :D - we have other things to think about first. PDF, Sketchboard, etc etc - they absolutely have to take priority, but I would put backward compatibility (i.e. a box file reader) on the list of things required before we can say we have moved on from T2.

Tell you what - let me know which files to look in and I promise not to work on it except when I'm asleep. :thumb:

Cheers,

g


Last edited on 4 Nov 2019 07:54 by Graeme
posted: 4 Nov 2019 08:21

from:

Martin Wynne
 
West Of The Severn - United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Hi Graeme,

You pasted an image bitmap directly into the editor.

That won't work except for very small images. It will exceed the http entity size limit.

Instead, click the Upload new image for insertion button just above the text area. The image will be inserted at the current caret position.

cheers,

Martin.

posted: 4 Nov 2019 08:38

from:

Graeme
 
Bangkok - Thailand

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Martin Wynne wrote:
You pasted an image bitmap directly into the editor.
Yes Martin - for the second time. It has very disappointing results - hahahaha

Cheers,

graeme




Templot Club > Forums > TemplotMEC nuts and bolts > File viewer function in OT/MEC
about Templot Club

Templot Companion - User Guide - A-Z Index Templot Explained for beginners Please click: important information for new members and first-time visitors.
indexing link for search engines

back to top of page


Please read this important note about copyright: Unless stated otherwise, all the files submitted to this web site are copyright and the property of the respective contributor. You are welcome to use them for your own personal non-commercial purposes, and in your messages on this web site. If you want to publish any of this material elsewhere or use it commercially, you must first obtain the owner's permission to do so.
The small print: All material submitted to this web site is the responsibility of the respective contributor. By submitting material to this web site you acknowledge that you accept full responsibility for the material submitted. The owner of this web site is not responsible for any content displayed here other than his own contributions. The owner of this web site may edit, modify or remove any content at any time without giving notice or reason. Problems with this web site? Contact webmaster@templot.com.   This web site uses cookies: click for information.  
© 2020  

Powered by UltraBB - © 2009 Data 1 Systems