[PB6.10B9] Problem #PB_Web_SelectedText and #PB_Web_Edge
Posted: Fri Mar 22, 2024 10:40 am
I want to select and read text in a web gadget using the following code:
If the Webgadget with the "#PB_Web_Edge" flag is used and the selection has been read out, the window is in an infinite loop and no longer responds to any input and can no longer be closed.
Without "#PB_Web_Edge" the window and the Webgadget react normally.
But with "#PB_Web_Edge" and without GetGadgetItemText(0, #PB_Web_SelectedText) no error occurs.
It appears that WaitWindowEvent() is no longer evaluated.
Ingo
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)
Code: Select all
Procedure Event_Browser()
Select EventType()
Case #PB_EventType_PopupMenu
Debug GetGadgetItemText(0, #PB_Web_PageTitle )
Debug GetGadgetItemText(0, #PB_Web_SelectedText )
EndSelect
EndProcedure
If OpenWindow(0, 0, 0, 600, 300, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
WebGadget(0, 10, 10, 580, 280, "https://www.purebasic.com",#PB_Web_Edge)
SetGadgetAttribute(0, #PB_Web_BlockPopupMenu, #True)
BindGadgetEvent(0,@Event_Browser())
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
If the Webgadget with the "#PB_Web_Edge" flag is used and the selection has been read out, the window is in an infinite loop and no longer responds to any input and can no longer be closed.
Without "#PB_Web_Edge" the window and the Webgadget react normally.
But with "#PB_Web_Edge" and without GetGadgetItemText(0, #PB_Web_SelectedText) no error occurs.
It appears that WaitWindowEvent() is no longer evaluated.
Ingo
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)