Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    setAllowRelativeDates causes Width Warning

    Hi there.

    Here is a simple test case:

    This code does NOT cause any warnings:
    Code:
    VLayout layout = new VLayout();
    
    DynamicForm form = new DynamicForm();
    
    final DateRangeItem rangeItem = new DateRangeItem();  
    rangeItem.setShowTitle(false);  
    // rangeItem.setAllowRelativeDates(true);  /* Commented out */
    
    form.setItems(rangeItem);
    
    layout.addMember(form);
    This code does cause the warning:
    Code:
    VLayout layout = new VLayout();
    
    DynamicForm form = new DynamicForm();
    
    final DateRangeItem rangeItem = new DateRangeItem();  
    rangeItem.setShowTitle(false);  
    rangeItem.setAllowRelativeDates(true);  /* This line causes the warning */
    
    form.setItems(rangeItem);
    
    layout.addMember(form);
    The warning I get several times during rendering / drawing is:

    [ERROR] [XIT] - 16:19:47.980:WARN:DynamicForm:isc_RelativeDateItem_0_editor:ignoring bad or negative width: -4 [enable 'sizing' log for stack trace]

    I tried reviewing the stack trace in the Console but I cannot figure out why this would occur. There are no other components (aside from the fact that this Layout is inside a tabset) and so should not cause a sizing warning.

    Thoughts?

    Thanks.

    #2
    I have further discovered that this can be avoided (the warning) if the TitleOrientation is anything but LEFT (default).

    This is because when a relative date is selected from the drop down, the actual date is printed on the right side. If the TitleOrientation is RIGHT or TOP, it (for some reason) figures there is enough width.

    I prefer to have the default TitleOrientation (LEFT) and not get this warning. I tried playing with the width settings on the DateRangeItem itself but did not work. Just thought I would post an update.

    Thanks!

    Comment


      #3
      I also got this warning using a nearly identical set of code. I will try the workaround to see if it works. Thanks.

      Comment


        #4
        I have not been able to figure out how to work this workaround into our code. We seem to be getting this same warning when we open a date selection from a filtereditor and I don't know how to edit the TitleOrientation for this.

        For now we will ignore the warnings, but hopefully someone can take a look at this.

        Comment


          #5
          Hi - yes these should be safe to ignore.
          We're investigating their cause but this should have no user-visible impact at all.

          Comment

          Working...
          X