[Gambas-user] How to soft depend on gambas3-gb-qt4-webkit

Geoffrey De Belie computergeoffrey at ...3367...
Thu Dec 17 09:57:48 CET 2015


That works, thank you.

---- On wo, 16 dec 2015 23:58:09 +0100 Benoît Minisini <gambas at ...1...>wrote ---- 

 > Le 16/12/2015 19:02, Geoffrey De Belie a écrit :
 > > Hi,
 > >
 > >
 > >
 > > I make use of the gambas3-gb-qt4-webkit component for showing Help
 > > pages (HTML).
 > >
 > >
 > >
 > > However, I would like to soft depend on this component. Pseudo-code:
 > >
 > >
 > >
 > > If componentIsInstalled("gambas3-gb-qt4-webkit") Then
 > >
 > > 'use it
 > >
 > > Else
 > >
 > > 'open the HTML pages in the default browser using xdg-open
 > >
 > > EndIf
 > >
 > >
 > >
 > > The reason I want to do this, is that I still would like to provide
 > > the GTK interface next to the Qt interface (using gb.gui).
 > >
 > > gambas3-gb-qt4-webkit depends on qt4, and if you depend on qt4 you
 > > can't have gb.gui for easy interface switching.
 > >
 > >
 > >
 > > A solution would be welcome.
 > >
 > >
 > >
 > > Kind regards,
 > >
 > > Geoffrey De Belie
 > >
 > 
 > Don't check the component in your project, and the first time you need 
 > it, load it dynamically with Component.Load(). If the method fails, note 
 > in a variable that you will have to use Desktop.Open().
 > 
 > Regards,
 > 
 > -- 
 > Benoît Minisini
 >





More information about the User mailing list