[Chameleon] Widget Dependency

Bart van den Eijnden BEN at Syncera-ITSolutions.NL
Mon Jun 27 03:19:41 EDT 2005


Abe,

did you set the minimum maturity level of your application properly in the index.phtml?

$oApp->mnMinimumMaturityLevel = MATURITY_ALPHA; 

Otherwise the JSAPI widget never loads.

Best regards,
Bart

Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG  DELFT

tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl

>>> Abe Gillespie <abe.gillespie at gmail.com> 06/24/05 06:49pm >>>
Yeah, this is the way I was trying to do it before (saw it in other
widgets).  Not only was I hoping for a more formal approach to
dependencies, but this doesn't seem to work anyhow.  The
isset($this->maSharedResourceWidgets["CWCJSAPI"]) test always comes
back false.  It doesn't matter if the cwcjsapi widget is or isn't
included, nor does it matter where in the template it's included
(above or below the depending widget).

Thanks.
-Abe

On 6/24/05, Bart van den Eijnden <BEN at syncera-itsolutions.nl> wrote:
> Abe,
> 
> I think the way this is done is by checking in your widget code if the JSAPI sharedresource is loaded. If this is not the case and your widget depends on it, you could raise an error or echo something so the application developer would see and could correct the problem.
> 
>         if (isset($this->maSharedResourceWidgets["CWCJSAPI"]))
>           $bCWCJSAPI = 1;
>         else
>           $bCWCJSAPI = 0;
> 
> Btw a lot of widgets have a JSAPI mode of operation and a normal mode of operation.
> 
> Hope this helps.
> 
> Best regards,
> Bart
> 
> Bart van den Eijnden
> Syncera IT Solutions
> Postbus 270
> 2600 AG  DELFT
> 
> tel.nr.: 015-7512436
> email: BEN at Syncera-ITSolutions.nl 
> 
> >>> Abe Gillespie <abe.gillespie at gmail.com> 06/23/05 10:42pm >>>
> I'm just getting into using / developing-for Chameleon; forgive my
> ignorance.  What's the best way to create a dependency of one widget
> on another.  Specifically, how can I ensure the cwcjsapi widget is
> loaded since a custom widget I'm writing depends on it.
> 
> Thanks.
> -Abe
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org 
> http://lists.maptools.org/mailman/listinfo/chameleon 
> 
>




More information about the Chameleon mailing list