Page 1 of 1

[4.7b1] Webgadget noted difference in PB 4.7b1

Posted: Thu Aug 02, 2012 9:05 pm
by jesperbrannmark
If I run this code in PB 4.7b1 respective 4.61 and rightclick in the webgadget I see a major difference.
In 4.7b1 there is a popup. The popup has reload (and back if you have something to go back to).
Can this menu maybe have more things in it - like print?

Code: Select all

If OpenWindow(0, 0, 0, 600, 300, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    WebGadget(0, 10, 10, 580, 280, "http://www.mybrowserinfo.com/")
    ; Note: if you want to use a local file, change last parameter to "file://" + path + filename
    Repeat
    Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf

Re: [4.7b1] Webgadget noted difference in PB 4.7b1

Posted: Sun Aug 05, 2012 5:50 pm
by wilbert
It's possible to create a UIDelegate for it.
https://developer.apple.com/library/mac ... rence.html
The selector that would need to be implemented is webView:contextMenuItemsForElement:defaultMenuItems: .
Don't know if it would be worth the trouble. I don't think many people would use it. But of course it's up to Fred.

Re: [4.7b1] Webgadget noted difference in PB 4.7b1

Posted: Sun Aug 05, 2012 7:30 pm
by Polo
jesperbrannmark wrote:If I run this code in PB 4.7b1 respective 4.61 and rightclick in the webgadget I see a major difference.
In 4.7b1 there is a popup. The popup has reload (and back if you have something to go back to).
Can this menu maybe have more things in it - like print?

Code: Select all

If OpenWindow(0, 0, 0, 600, 300, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    WebGadget(0, 10, 10, 580, 280, "http://www.mybrowserinfo.com/")
    ; Note: if you want to use a local file, change last parameter to "file://" + path + filename
    Repeat
    Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf
Actually not only on the WebGadget, in gadgets like StringGadget too, and it's a big improvement as there was no copy/paste support on Carbon for instance.