Author Topic: Please Help Test MessageDisplayByValue  (Read 2104 times)

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Please Help Test MessageDisplayByValue
« on: June 28, 2017, 01:51:43 AM »
There has been a report of a problem with colors changing in the MessageDisplayByValue. I have tested in every way I know of and it was also tested by another member, but neither of us were able to reproduce. So I would like to see if others would test it to see if they can reproduce the problem. I will give one method of testing, but also try in other ways to see if you can get this problem to occur.

1) Using version 3.99w, add a MessageDisplayByValue to the form
2) Download the attached text file
3) In Solution Explorer right click the AdvancedHMI project and select Add Existing Item
4) Browse to the downloaded file
5) In Solution Explorer click once on the newly added file to select it
6) In the Properties Window change Copy To Output Directory  to  Copy If Newer
7) On the MainForm, click on the MessageDisplayByValue to select it
8 ) In the Properties Window, set IniFileName to Messages.txt

9) From the Toolbox, add a Timer to the MainForm
10) Set the Interval property to 2000
11) Set the Enabled property to True
12) Below the MainForm in the component tray, double click the timer that was added to the form
13) Add this code:

Code: [Select]
       If MessageDisplayByValue1.Value >= 6 Then
            MessageDisplayByValue1.Value = 0
        Else
            MessageDisplayByValue1.Value += 1
        End If

14) Run the application

You should see it rotate through the messages listed in the Messages.txt file and change colors accordingly. When it returns to the "Default Colors" message, the BackColor should be black and the ForeColor white

Phrog30

  • Guest
Re: Please Help Test MessageDisplayByValue
« Reply #1 on: June 28, 2017, 07:39:31 AM »
I guess you aren't remembering this. You sent me an application with the component configured. If I copied this into my application it will work. However, if create one from scratch it will not. Some suggestions were corrupt file, corrupt os, user error etc. I downloaded the latest file, so that eliminates corrupt file. I tried several other boxes and images, that doesn't rule out os, but that's the best I got on that. That's when I mentioned doing a remote session so you could see for yourself. You didn't seem interested. I tried on my end.

Edit: I also don't use the ini/text, I do it all in the designer.  So your test is apples to oranges.
« Last Edit: June 28, 2017, 09:02:52 AM by Phrog30 »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Please Help Test MessageDisplayByValue
« Reply #2 on: June 28, 2017, 09:22:10 AM »
You sent me an application with the component configured. If I copied this into my application it will work. However, if create one from scratch it will not.
I intentionally did not post a full solution that I configured in order to take anything I do out of the picture and ensure others download from the same set of files you are using.
Edit: I also don't use the ini/text, I do it all in the designer.  So your test is apples to oranges.
I stated "but also try in other ways to see if you can get this problem to occur" which means the INI file is not the only means of testing. I've tested with and without the INI file with the same results.

Steve Etter

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Please Help Test MessageDisplayByValue
« Reply #3 on: April 03, 2018, 08:17:45 AM »
I believe I found at least one of the things causing problems:  Whenever I put a decimal point in the text ("Alarm 3.1" rather than "Alarm 3-1"), I always get a red background and default colored text.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Please Help Test MessageDisplayByValue
« Reply #4 on: April 03, 2018, 09:09:04 AM »
I believe I found at least one of the things causing problems:  Whenever I put a decimal point in the text ("Alarm 3.1" rather than "Alarm 3-1"), I always get a red background and default colored text.
We found and fixed the original cause of this problem, but I think you may be seeing an effect caused by a list separator. The message text and attributes are typically stored as a comma separated list, but depending on your PC's culture setting it may be something other than a comma. In your case it looks like it is a decimal. You can see what the default list separator is by checking the character defined in:

System.Globalization.CultureInfo.CurrentCulture.TextInfo.ListSeparator


Steve Etter

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Please Help Test MessageDisplayByValue
« Reply #5 on: April 03, 2018, 10:07:00 AM »
I don't know.  It appears my list separator is currently set as a comma.

According to Microsoft "ttps://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.currentculture(v=vs.110).aspx" (the letter "h" removed from https to prevent a link):  "Windows allows users to override the standard property values of the CultureInfo object and its associated objects by using Regional and Language Options in Control Panel."

Using that method, under the Formats>Numbers>List Separator, the field shows a comma.

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Please Help Test MessageDisplayByValue
« Reply #6 on: April 03, 2018, 11:35:24 AM »
The attached pictures show the behavior of MessageListByValue (top) and MessageDisplayByValue (bottom) both observing the same address.

Values were changing in this order: 0, 1, 2, 3, 0.
Both BackColor and ForeColor were set the same for each control/value - as can be seen in the MessageListByValue.

MessageListByValue didn't respond to initial value of 0 (MessageNumberToIgnore was set to -1).

MessageDisplayByValue was responding to a degree as Steve suggested.
« Last Edit: April 03, 2018, 12:02:18 PM by Godra »