Page 1 of 2
App Developer 2d panel now (or not) redraws
Posted: Fri Mar 31, 2023 11:18 am
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 (108.79 KiB) Viewed 4744 times
Sometimes both colours are wrong but sometimes all color are right

- 2023-03-31_11-17-47.jpg (104.19 KiB) Viewed 4744 times
OnOff indicator are alway set at same time same way

- Snag_aa6ae4.png (64.05 KiB) Viewed 4744 times
Re: App Developer 2d panel now (or not) redraws
Posted: Fri Mar 31, 2023 12:52 pm
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.
Re: App Developer 2d panel now (or not) redraws
Posted: Fri Mar 31, 2023 1:20 pm
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
Re: App Developer 2d panel now (or not) redraws
Posted: Fri Mar 31, 2023 1:44 pm
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.
Re: App Developer 2d panel now (or not) redraws
Posted: Tue Apr 11, 2023 12:58 pm
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 (73.05 KiB) Viewed 4677 times
Set the color correct !
if I press an another switch to move the component (redraw)

- Snag_3d38e867.png (44.02 KiB) Viewed 4677 times
Re: App Developer 2d panel now (or not) redraws
Posted: Wed Apr 12, 2023 1:15 pm
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 (26.05 KiB) Viewed 4658 times
Re: App Developer 2d panel now (or not) redraws
Posted: Mon Apr 17, 2023 9:23 am
by Steve-Matrix
Thanks, Stefan. I'm glad you have found a workaround. And this may help me discover the source of the problem.
Re: App Developer 2d panel now (or not) redraws
Posted: Thu Aug 17, 2023 5:50 pm
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
Re: App Developer 2d panel now (or not) redraws
Posted: Fri Aug 18, 2023 9:14 am
by Steve-Matrix
Does a small 1ms delay between these 3 commands fix the issue?
Re: App Developer 2d panel now (or not) redraws
Posted: Fri Aug 18, 2023 9:24 am
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