New Forms Get Duplicated #PB_Window_SystemMenu Flag

Post bugs related to the IDE here
User avatar
spikey
Enthusiast
Enthusiast
Posts: 769
Joined: Wed Sep 22, 2010 1:17 pm
Location: United Kingdom

New Forms Get Duplicated #PB_Window_SystemMenu Flag

Post by spikey »

When creating a new form the window will have '#PB_Window_SystemMenu' set as a duplicate flag in the new 'Custom Flag' property. On switching to the code view the flag is specified twice in the OpenWindow instruction.

This 'Custom flag' is also erroneously added on reopening an existing form design duplicating it there too.

Code: Select all

Procedure OpenWindow_1(x = 0, y = 0, width = 600, height = 400)
  ;                                                               ↓                        ↓                                       
  Window_1 = OpenWindow(#PB_Any, x, y, width, height, "", #PB_Window_SystemMenu | #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget)
EndProcedure
User avatar
mk-soft
Always Here
Always Here
Posts: 6244
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: New Forms Get Duplicated #PB_Window_SystemMenu Flag

Post by mk-soft »

Confirmed ...
The problem is that when switching from code to form, the standard flags are copied to custom flags and thus added.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
mk-soft
Always Here
Always Here
Posts: 6244
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: New Forms Get Duplicated #PB_Window_SystemMenu Flag

Post by mk-soft »

After looking at the code, the area had to be reworked.
The form CustomFlags were placed in the wrong list and it was not checked whether it was a PB constant.
As a result, the custom flags ended up on all open forms. Changes to the custom flags in code mode were also not recognised.
In this test I also noticed an error in the ProcedureBrowser, which sporadically led to a crash.

When I'm done, I'll put a current pull request in GitHub
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Post Reply