It is currently Sun Dec 16, 2018 6:56 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: {Done} (PB v5.44 / v5.45) Webgadget Callback
PostPosted: Mon Aug 14, 2017 12:26 pm 
Online
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1479
Location: Germany
Callback not work
Code:
Procedure NavigationCallback(Gadget, Url$)
  Debug Url$
  If Url$= "http://www.purebasic.com/news.php"
    MessageRequester("", "No news today!")
    ProcedureReturn #False
  Else
    ProcedureReturn #True
  EndIf
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

_________________
My Projects OOP-BaseClass / OOP-BaseClassDispatch / Event-Designer /
PB v3.30 / v5.60 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Last edited by mk-soft on Mon Aug 14, 2017 1:12 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: (PB v5.44 / v5.45) Webgadget Callback
PostPosted: Mon Aug 14, 2017 12:56 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Apr 21, 2005 2:38 pm
Posts: 1571
Location: Germany
As far as I know #PB_Web_NavigationCallback has never been implemented for Linux and MacOS. Take a look into the documentation:
PB documentation wrote:
SetGadgetAttribute(): Set the following attributes (Windows only):

#PB_Web_ScrollX : Set the horizontal scrolling position.
#PB_Web_ScrollY : Set the vertical scrolling position.
#PB_Web_BlockPopups : Block popup windows. #PB_EventType_PopupWindow is fired if this setting is enabled.
#PB_Web_BlockPopupMenu: Block standard the popup menu. #PB_EventType_PopupMenu is fired if this setting is enabled.
#PB_Web_NavigationCallback: Set a callback for monitoring (and disabling) navigation.

In this feature request from 2013 for implementing a navigation callback for Linux and MacOS I also demonstrated workarounds.


Top
 Profile  
Reply with quote  
 Post subject: Re: (PB v5.44 / v5.45) Webgadget Callback
PostPosted: Mon Aug 14, 2017 1:10 pm 
Online
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1479
Location: Germany
Ups, sorry :(

Sometimes I forget this.

_________________
My Projects OOP-BaseClass / OOP-BaseClassDispatch / Event-Designer /
PB v3.30 / v5.60 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: mk-soft and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye