Theme: Launchpad
WabDev 2.7
Related Thread
In addition to opening a particular widget from an existing widget (ScaleBar widget) when the app loads, I need to remove or disable another widget in the widgetpool. Remove it or disable it is fine, whichever is easiest.
<SPAN class="keyword token">var</SPAN> widgetsConfig <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>appConfig<SPAN class="punctuation token">.</SPAN>widgetPool<SPAN class="punctuation token">.</SPAN>widgets<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> widgetId<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">for</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">var</SPAN> i <SPAN class="keyword token">in</SPAN> widgetsConfig<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>widgetsConfig<SPAN class="punctuation token">[</SPAN>i<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">.</SPAN>name <SPAN class="operator token">==</SPAN> <SPAN class="string token">"My Widget Name"</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
widgetId <SPAN class="operator token">=</SPAN> widgetsConfig<SPAN class="punctuation token">[</SPAN>i<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">.</SPAN>id<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">break</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">var</SPAN> abc <SPAN class="operator token">=</SPAN> WidgetManager<SPAN class="punctuation