6 Replies Latest reply: Feb 16, 2012 8:31 AM by mvlare RSS

    Visual attribute QMS$ITEM_FONT for highlighting required items doesnt exist

    Jan Willem Vermeer
      Hello,

      our Forms application (version 10.2.0.4) is used by many users. Only one of them suddenly gets the error message
      "Visual attribute QMS$ITEM_FONT for highlighting required items does not exist"
      followed by
      "FRM-41402: ongeldig type visueel attribuut doorgegeven voor Set_<object>_Property"
      whenever he opens a form.

      The second error message is logical, because QMS$ITEM_FONT seems not to exist so the set item property command will fail.

      We know for 100% sure that the visual attribute QMS$ITEM_FONT is present in the Forms. There are no compilation errors, no errors on logfiles on the server.

      I hope anyone recognizes this error and knows where to look for a solution.

      Best regards, Jan Willem
        • 1. Re: Visual attribute QMS$ITEM_FONT for highlighting required items doesnt exist
          Mark Striekwold
          Did the user do something to his user preferences? The user preference can be set from the menu. Check if the user has different settings in the table qms_user_options. I assume the same Forms are working fine for the rest of the users.

          I also assume the user uses the same url as the other users, so he won't be getting different settings.

          Regards,

          Mark
          • 2. Re: Visual attribute QMS$ITEM_FONT for highlighting required items doesnt exist
            Jan Willem Vermeer
            Hi Mark,

            Indeed the user has changed his preferences!

            He had checked field "Highlight required items" in region "User interface". Normally that is unchecked.

            I can now reproduce this error for every user - immediately after checking this field, the error occurs when starting up any form.

            Many thanks for this help !!

            Kind regards, Jan Willem
            • 3. Re: Visual attribute QMS$ITEM_FONT for highlighting required items doesnt exist
              mvlare
              Jan Willem, Mark,

              I have exactly the same error ( Forms [32 Bit] Version 10.1.2.0.2 , Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit).

              To uncheck the field "Highligh required items" is a workaround and not a solution to avoid that error message. Because if the user just puts it on again with the combination of having QMS$ITEM_FONT back again he will get that error again.
              If the user would select QMS$WHITE_ON_DARKRED it works fine, only not with QMS$ITEM_FONT. Dont understand why because that visual attibute is there.

              Did you find a solution for it?

              Kind regards, Marcel
              • 4. Re: Visual attribute QMS$ITEM_FONT for highlighting required items doesnt exist
                Mark Striekwold
                Marcel,

                I had the problem when running the Forms applicaiton on Linux. When I installed the Developer Suite on Linux and opened the color palette, I discoverd that the color palette of Linux is much smaller than the color palette I knew from Microsoft Windows. Also the color (app.ui.requiredFiledVABGColor) defined in the hsd65reg.dat(registry.dat) file did not work on Linux. I had to change the color to a different color and everything worked fine.

                Don't know if you are on Windows or Linux, I hope this answer will help.

                Regards,

                Mark
                • 5. Re: Visual attribute QMS$ITEM_FONT for highlighting required items doesnt exist
                  mvlare
                  Hi Mark,

                  Thanks for the tip.

                  The appserver\environment is on windows. I am still looking into it. Will give an update if i find more (ok if i change visual attribute type from common to prompt it works, but dont know, think that is not the way... )

                  Regards, Marcel
                  • 6. Re: Visual attribute QMS$ITEM_FONT for highlighting required items doesnt exist
                    mvlare
                    Hi Mark,

                    Something seems wrong in headstart qmslib65 \ version forms.


                    I changed QMS$BLOCK.init_mandatory_item, because it seemed that it sets prompt_visual_attribute of QMS$ITEM_FONT. That gives the error because the object is of type common and not prompt.

                    I changed:
                    if ( qms$user_prefs.required_automatic_font )
                    to:
                    if ( qms$user_prefs.required_automatic_font or qms$user_prefs.get_va_required_item = 'QMS$ITEM_FONT' )

                    apparantly qms$user_prefs.required_automatic_font is false,
                    it should be true, but is not, although object 'QMS$ITEM_FONT' has foregound_color and background_color automatic (this is checked in qms$user_prefs.required_automatic_font).

                    Changed QMS$BLOCK.init_mandatory_item:

                    procedure init_mandatory_item
                    is
                    begin
                    if (block_insert_allowed) or (block_query_allowed)
                    then
                    if (item_insert_allowed or item_update_allowed)
                    and get_item_property(l_cur_item_id, required) = 'TRUE'
                    then
                    if qms$user_prefs.highlight_mand_items_enabled
                    then
                    qms$errors.show_debug_info('Item '||l_cur_item||': set required prompt VA');
                    if ( qms$user_prefs.required_automatic_font or qms$user_prefs.get_va_required_item = 'QMS$ITEM_FONT' )
                    /* mvlare visual_attribute icm QMS$ITEM_FONT
                         prompt_visual_attribute icm QMS$PROMPT_FONT */     
                    then
                    set_item_property(l_cur_item_id
                    ,visual_attribute
                    ,qms$user_prefs.get_va_required_item
                    );
                    else
                    set_item_property(l_cur_item_id
                    ,prompt_visual_attribute
                    ,qms$user_prefs.get_va_required_item
                    );
                    end if;
                    if not form_success
                    then
                    qms$errors.internal_error
                    (
                    'Visual attribute '||qms$user_prefs.get_va_required_item||' for highlighting required items does not exist.'
                    ,'I'
                    ,false);
                    end if;
                    end if;
                    end if;
                    end if;
                    exception
                    when form_trigger_failure then raise;
                    when others then qms$errors.unhandled_exception('qms$block.init_mandatory_item');
                    end init_mandatory_item;