1) NavigationCallback does not work
I shortened the example from the documentation regarding NavigationCallback:
Code: Select all
Procedure NavigationCallback(Gadget, Url$)
MessageRequester("WebGadget Callback!", Url$)
ProcedureReturn #True
EndProcedure
If OpenWindow(0, 0, 0, 600, 300, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
WebGadget(0, 10, 10, 580, 280, "http://www.purebasic.com")
SetGadgetAttribute(0, #PB_Web_NavigationCallback, @NavigationCallback())
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
2) GetGadgetItemText(WebGadgetID, #PB_Web_SelectedText) fails
Code: Select all
#menuCopy = 1
If OpenWindow(0, 0, 0, 600, 300, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
WebGadget(0, 10, 10, 580, 280, "http://www.purebasic.com")
AddKeyboardShortcut(0, #PB_Shortcut_Control | #PB_Shortcut_C, #menuCopy)
Repeat
ev = WaitWindowEvent()
If ev = #PB_Event_Menu
If EventMenu() = #menuCopy
Text.s = GetGadgetItemText(0, #PB_Web_SelectedText)
MessageRequester("Debug", "Detected CTRL+C. Text: [" + Text.s + "]")
EndIf
EndIf
Until ev = #PB_Event_CloseWindow
EndIf
3) Inconsistent behaviour on different platforms
On Windows and MacOS, JavaScript is enabled by default. On Linux, it is disabled. The hack from here (http://forums.purebasic.fr/english/view ... 15&t=60875) makes the executable crash on more complex HTML pages. Please, can you enable JS by default on Linux, too?
Can you please fix? Maybe also for the 5.24 LTS version?
Kukulkan