• MorphOS Developer
    geit
    Posts: 1031 from 2004/9/23
    Quote:

    pegasos-sigi2 wrote:

    You can't even try progs like pagestream, or OWB without the icon and the rest of there directorys. That's result in crash or a simple
    non function .



    Well, in reallity applications should not crash when files are missing. Proper error checking is needed for *any* function you expect a result other than true or false. And even then it may be required to check the result as you may need to call some companion function to release, free or unlock stuff.

    Checking for some images, data or other resources at program start can be done, but it is alot of work. On the plus side you can provide detailed information on the error before the user even does something.

    However. It does not replace checking the result when the prior files are used. Images can be broken, memory situation can let loading fail or some other part out of your control can go wrong. e.g. what if the datatype is missing, old, incomplete? You cannot deal with all this.

    All you can do is call mui to create some image button and hope for the best. If you get a NULL Object dump an error and shut down your application releasing all resources already obtained.

    It is rule #1 for creating a stable application. Check everything and do it on first implementation and not afterwards. Development goes much easier, when all parts you already use are secured. It may sound like a waste of time, but the opposite is the case. You are saving your time, the time of beta testers and you software gets more stable out of the box.

    Just think about the report stuff above. With a simple error message the "bug report" would be less confusing, more informative. Just think about how long you needed to process the report, trying yourself, asking for a better debug.log and so on.

    Instead of "it does simply not work" you would have gotten a text like "Where do i get the missing files?" OR the tester would have noticed his mistake and got the missing stuff without bothering you at all. -> less time wasted.

    BTW: Yesterday, after you told me about it, I tried it myself and made the same mistake. I unpacked the archive, clicked the app and got alot of missing images in an semi working window. No hit here, but that could be differ from system to system depending what memory trash the missing checks cause to be processed. Then, after noticing there is just a binary, I took some archive from aminet and "fixed it".

    Like ASiegel said it saves time to provide a complete archive. You can just add some rule to the makefile or use a dos script. What ever you like. Again this is a little work, but you only need to do it once. Afterwards you run the script/makefile and it compiles and creates a ready to release archive without any work at all. You donĀ“t even need to think about missing stuff, as if it is in there once, it will be there always.
  • »23.10.16 - 19:30
    Profile