AmiBlitz / AmiBlitz3

Complete package of AmiBlitz3 including all sources.
https://www.amiblitz.de/
121 stars 9 forks source link

TextGadget will not be cleared with InnerCls if StringGadget is in the same window #56

Closed Nju79 closed 2 years ago

Nju79 commented 2 years ago

System: FS-UAE, Kickstart 3.2.1 & Workbench 3.2.1 and AB3.9.4 (and AB3.9.6Pre1)

After InnerCls the TextGadget is still in the window. If I remove the StringGadget (also don't have in the source code) the InnerCls clearing all of the window content correctly.

honitos commented 2 years ago

@Nju79: can not reproduce this behaviour. InnerCls will erase the whole window, the TextGadget is erased as well.

Nju79 commented 2 years ago

Use the follow code to generate the window. If you click anywhere in the window, InnerCls will fire and the windows looks be clear. But if you click on the place where the button was, the button will appear. Same for the TestGadget

WBStartup
SYNTAX 2

Status.b = -1
DestinationPath$ = ""
PlainPath$ = ""

FindScreen 0
Borders On
StringGadget 0, 60, 99, 0, 1, 20, 120
Borders Off
TextGadget 0, 130, 180, 0, 18, "Start"
Window 0,0,0,300,200,$2|$8|$1000, "GUITest", 0, 0, 0
WLocate 50, 10:Print "This is a test!"
WLocate 10, 90:Print "Path:"
Wline 128, 178, 170, 178, 170, 188, 128, 188, 128, 178, 1
SetString 0, 1, "DH0:"
MouseWait
InnerCls

DefaultInput
DefaultOutput
Use Window 0
Repeat
    a.l = WaitEvent
    If a = 512 
        Free Window EventWindow
        Goto ExitApp
    EndIf
Forever

ExitApp:
End

Step1

Step2

Step3

honitos commented 2 years ago

This is not a bug: just erasing the content of the window, does NOT remove the gadgets from window! To remove the gadgets from the Window you have to delete the gadgets themselves.

This can be done by "Free Gadgetlist 0": Alle Gadgets that are part of gadgetlist 0 will be deleted.