[4.7b1] Webgadget noted difference in PB 4.7b1

Mac OSX specific forum
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

[4.7b1] Webgadget noted difference in PB 4.7b1

Post 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
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3944
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

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

Post 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.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

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

Post 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.
Post Reply