Bug caused by microstation 8i series 3 update's

We are a company that uses Microstation software to deploy our own solution “DKmètre“ that we have developed with the C and MDL languages.

Our solution is compatible with the series 1 and 2 of the Microstation 8i version. However, updating Microstation to have the series 3 causes a bug in our application.

All texts which are displayed using the mdlTreeCell_setDisplayText fontion do not appear correctly, the last characters of words are replaced by ellipsis.

You will find attached a screen capture of our application, the words that are circled in red represent the bug.

 

Has someone have this kind of bugs?

 

Thank you for your help

Parents
  • If I was you, I would follow Jon's advice about attributes. The thing is that knowing the offending attribute may give a valuable hint about the origin of this problem.

    Since you have access to sources, you can easily eliminate TREEATTR_... one by one recompiling each time until the problem hopefully disappears (or severes).

    Another thing to try is to remove the active *.upf file while uStn is not running (i.e. file with saved user preferences, usually buried in a weird place (like on XP it is \Documents and Settings\username\Local Settings\Application Data\Bentley\Microstation\8.11\whatever\...) and retesting. It may be uStn misinterpreting the saved configuration.

    Cheers,

    /Chris Z.

  • Hello Chris

    Thank you for your reply                                                                                                                                                            

    I'm going to test the 2 solutions that you suggest.                                                                                                        

    Concerning the second solution, do I have to remove all the files with the upf’s extension? 

  • cdiTech ...

    So you just showed me how you fill values in the columns, but not how you create them.  What is the definition of your columns in the .rsc files ? There might be changes in the standard behaviour between SS2 and SS3, but that is not a bug, this is what attributes are for. You can exactly define the behaviour in your ressource (or the dynamic creation functions). If you don't use them, then you might experience changes. No one guaranties that the standard  behaviour keeps the same over different versions. There might be new insights, that make a abbreviation more common, than showing the full text.

    As Chris and Jon have more experience with pure MicroStation dialogs than me, it would be a good idea to show an excerpt of your resource for this tree and his columns.

    Michael



  •  

    Hello,

    This is an excerpt of my resource file, the script below is responsible for creating columns:


    DItem_ContainerRsc CONTAINERID_ModeleVues =

        {

        NOCMD, LCMD, NOHELP, MHELP, NOHOOK, NOARG, 0,

        DILISTID_ModeleVues

        };

     

    DialogItemListRsc DILISTID_ModeleVues =

        {

        {

    {{0,10*YC,0,0}, Tree, TREEID_ModeleVues_Fiche, ON, 0, "", ""},

    {{0,10*YC,0,0},   Sash, SASHID_ExplorateurHorizontal, ON,  0, "", ""},

    {{0,10*YC,0,0}, ListBox, LISTBOXID_ModeleVues_Liste, ON, 0, "", ""},

     

        }

        }; 

    /*Creating columns*/ 

    DItem_TreeRsc TREEID_ModeleVues_Fiche =

        {

        NOHELP, MHELP,

        HOOKITEMID_ModeleVues_Fiche, NOARG,

        TREEATTR_DYNAMICSCROLL | TREEATTR_LINESDIM | TREEATTR_LINESDOTTED | TREEATTR_EDITABLE |

        TREEATTR_NOSHOWROOT | TREEATTR_DOUBLECLICKEXPANDS | TREEATTR_FOCUSOUTLOOK | TREEATTR_HORIZSCROLLBAR |

        TREEATTR_RESIZABLECOLUMNS ,

        10, 0, "",

          {

       {0, 30*XC, 255, ALIGN_LEFT, " "},

       {0, 25*XC, 255, ALIGN_LEFT, ""},

       {0, 8*XC, 255, ALIGN_RIGHT, ""},

       {0, 1, 1, ALIGN_LEFT, ""},

          }

        };

  • OK, there is your difference: ALIGN_LEFT vs. ALIGN_RIGHT for the 2nd and 3rd column, and I don't see a TREEATTR_NOELLIPSES in the combination of the attributes.

    Nonetheless, I see that it is not well documented (TREEATTR_NOELLIPSES is even not in the documentation, header file only), and without even testing anything here, that the combination of those attribs might easily lead to confusion, even because you have to define one attrib for the whole tree, not for each column, where different styles might be usefull with each of them.

    Unfortunately I currently don't have an app to make some tests (use mfc dialogs, which have their own cons), but I expect Jon or Chris to easily provide additional information.

    Said so, I still expect this to be a change in standard behaviour, while it is even undocumented.



  • I tried to add the TREEATTR_NOELLIPSES attribute, but I got a compilation error "undeclared variable". So, what is the header file name which contains this attribute definition?

    Also, what do you mean by "while it is even undocumented.", is it the MS V8i SQERIES 3 ?

    Thank  you

  • If you got an compiler error, than there is a good chance that this attrib was introduced in SS3. It is only in dlogbox.h and there is no documentation about a different behaviour, nor is this attribute described in the MDLProgrammerGuide or readmeSDK. As I have only the SS3 SDK installed I cannot say if it is available in previous versions, but I think it isn't.



  • But, even if I include the dlogbox.h file, the compilation error always occurs. I opened the dlogbox.h file in order to look for the definition of TREEATTR_NOELLIPSES attribute, but it does not exist in this file.

  • HELLO Jon

    So, considering these new details and exchanges, do you have other suggestions for solving the problem.

    Thank you

  • So either use the SS3 sdk, or include the define

    #define TREEATTR_NOELLIPSES 0x80000000 // Columns will not show ellipses when truncated

    in one of your own header files, if you need to support even older versions. (must be removed when switchign to SS3 later). In my tests, I could run all apps compiled with the SS3 sdk with each V8i. This should work, as long as you do not use the newly introduced functions, and link dynamically against the Bentley dll's (in the end the compiler is always the same MicroSoft one)

    Michael



    Answer Verified By: cdiTech 

  • Hello Michael

    I added the definition that you gave in your last reply, and it seems that it solved the problem :).

    I’d like to know how I can use the SS3 SDK, because in one hand, I will need to use some of the functions whose definition belongs to this SDK and in the other hand I find that using the SDK is cleaner.

    Thank you

Reply Children
No Data