Mark,
Interesting problem here....when using your Selection Widget in a flexviewer where Robert Scheitlin's TOC widget is open, the TOC widget populates with whatever layers are placed into the Selection Widget XML.
Example - Say I have layer one, layer two and layer three in the drop down of the Selection Widget. The selection widget is not set to preload, but the TOC widget is, and lists, say, 3 map services. If I then activate the Selection Widget, as soon as it opens, the TOC widget then lists layer one, layer two and layer three right above the map services in the TOC, and has them turned on. Unchecking them does nothing - the layer visibility of these additions is not controlled from here. They persist even if the selection widget is turned off. The only way to remove them from the TOC wdiget window is to restart the viewer. So, the addition of these layers to the TOC dont cause any issues, but can be confusing for a potential user to see.
My question - is there any way to prevent or fix it so this doesnt happen?
Thanks