App Developer 2d panel now (or not) redraws

Any bugs you encounter with Flowcode should be discussed here.
stefan.erni
Valued Contributor
Posts: 758
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Flowcode v10 App Developer 2d panel now (or not) redraws

Post by stefan.erni »

Hi Steve

With the update there is a problem with 2D panel redraw
2d panel now redraws parts of panel to avoid unnecessary flicker of wndHost primitives
I suspect I had never a flicker before....


regards

Stefan

on the proband panel the OnOffIndicator2 and OnOffIndicator3
should always have the same colour. When I make docking - floating this becomes correct again.
Snag_a16f64.png
Snag_a16f64.png (108.79 KiB) Viewed 1546 times

Sometimes both colours are wrong but sometimes all color are right
2023-03-31_11-17-47.jpg
2023-03-31_11-17-47.jpg (104.19 KiB) Viewed 1546 times
OnOff indicator are alway set at same time same way
Snag_aa6ae4.png
Snag_aa6ae4.png (64.05 KiB) Viewed 1546 times

Steve-Matrix
Matrix Staff
Posts: 1253
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: App Developer 2d panel now (or not) redraws

Post by Steve-Matrix »

You could try using a Built-In Function (i.e. API) call to refresh the panel. Calling "::Panel.Position.Set(mycomp, mycomp)", where "mycomp" is any object on the panel will force the whole panel to be redrawn.

Or maybe there needs to be a fix in the OnOffIndicator that is required. I'll ask a colleague.

If you're still having a problem, then if you can isolate the problem to a simple program then that will help me investigate the issue.

stefan.erni
Valued Contributor
Posts: 758
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: App Developer 2d panel now (or not) redraws

Post by stefan.erni »

Hi Steve

What do you mean by a simple programme?
The programme looks very good on the monitor. Many users find the display very nice.
But the programme is so easy and fast writen with FC10.

The OnOffIndicator also work without a Bluetooth device.
Only when starting up, it take 5 seconds longer without a Bluetooth device.

please have a look otherwise i will make an (even) smaller programme

And I trie soon the Built-In Function

regards

Stefan

It's just small
FC10_EMG_Monitor_2023_03_01_V1.fcsx
(178.42 KiB) Downloaded 48 times

Steve-Matrix
Matrix Staff
Posts: 1253
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: App Developer 2d panel now (or not) redraws

Post by Steve-Matrix »

I will have a look, but it is always difficult to debug other users' programs.

By simple, I mean *very* simple. If you can isolate the problem to a single component or component macro then that is easy. So "very simple" means one or two components and a few flowchart icons of code.

In my debugging environment, even a relatively simple project can take 100x longer to load than when running Flowcode normally.

stefan.erni
Valued Contributor
Posts: 758
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: App Developer 2d panel now (or not) redraws

Post by stefan.erni »

Hi Steve

I hope you don't have to debug my program.
The comand you suggested to move the component to the same location (redraw), did not help.
So I thought under the code of the (bad) component is maybe (switch REC or STOP) the wrong time to correct something and copied the comand to an another place under (switch perfect).

If the color is not right and I press the switch perfect , then the color is set corrected again. :)

Please excuse the strange explanation. I keep looking what is going on with the colors

regards

Stefan


No effect...
if I move the component (redraw) directly after set the color
Snag_3d38a36f.png
Snag_3d38a36f.png (73.05 KiB) Viewed 1479 times
Set the color correct !
if I press an another switch to move the component (redraw)
Snag_3d38e867.png
Snag_3d38e867.png (44.02 KiB) Viewed 1479 times
Attachments
FC10_EMG_Monitor_2023_03_01_V1 - with_build_in_function.fcsx
(179.67 KiB) Downloaded 54 times

stefan.erni
Valued Contributor
Posts: 758
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: App Developer 2d panel now (or not) redraws

Post by stefan.erni »

Hi Steve

For my program I found a simple solution.
Every time I change the gauge values (every 200mSec) I do a panel set position of the OnOffIndicator. If they are wrong once, they are corrected again after the redraw.

regards

Stefan

The last 3 comands solve the problem
Snag_12ae0f0.png
Snag_12ae0f0.png (26.05 KiB) Viewed 1460 times

Steve-Matrix
Matrix Staff
Posts: 1253
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: App Developer 2d panel now (or not) redraws

Post by Steve-Matrix »

Thanks, Stefan. I'm glad you have found a workaround. And this may help me discover the source of the problem.

stefan.erni
Valued Contributor
Posts: 758
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: App Developer 2d panel now (or not) redraws

Post by stefan.erni »

Hi Steve
Often the OnOffIndicator was not set corect, but with a "move the poition" it's get the correct state.
For a refresh, set the panelposition of the 3 OnOffIndicator was working in v10.0.4.24 but not in v10.0.4.33
In v10.0.4.33 it's frezz the App. A little strange is that every single command is working and two together also.
But if I use all the three commands together, it's frezz the App. Even though the indicator looks very nice, I will take another one.
I have seen some very nice ones
regards

Stefan
Attachments
Snag_112211f.png
Snag_112211f.png (18.48 KiB) Viewed 1175 times

Steve-Matrix
Matrix Staff
Posts: 1253
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: App Developer 2d panel now (or not) redraws

Post by Steve-Matrix »

Does a small 1ms delay between these 3 commands fix the issue?

stefan.erni
Valued Contributor
Posts: 758
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: App Developer 2d panel now (or not) redraws

Post by stefan.erni »

Hi Steve

a delay unfortunately does not help
I made a program to test the Led and indicator and the crash (frezzing)

There is the same problem with the signal state even if I use the LED component.

If you run the program, all signal in the 2 panels should be dark or red at the same time.
No matter which screen the panel is on
This also works, but sometimes unfortunately not.

You have to be careful when you use option 3.
It will freeze your flowcode completely (maybe).

regards

Stefan
Attachments
Crashtest_indicator1.fcsx
(40.15 KiB) Downloaded 56 times
Snag_a618c0.png
Snag_a618c0.png (377.94 KiB) Viewed 1162 times

Post Reply