on develop help sign in
Get rid of traces in Reflex.Dom.Widget.Basic and Reflex.Dom.Internal
commitf992dc41055d402d6ffab56f6d46cb69c08addcd authorRyan Trinkle <ryan.trinkle@gmail.com> dateSun 8 Mar 2015, 20:08 (12 years ago) parent48eed83
2 files changed+3−4
src/Reflex/Dom/Internal.hs−1 src/Reflex/Dom/Widget/Basic.hs+3−3
src/Reflex/Dom/Internal.hs−1
@@ -197,7 +197,6 @@ mainWidgetWithCss css w = runWebGUI $ \webView -> do
197197attachWidget :: (IsHTMLElement e) => e -> Widget Spider (Gui Spider SpiderHost (HostFrame Spider)) a -> IO a
198198attachWidget rootElement w = runSpiderHost $ do --TODO: It seems to re-run this handler if the URL changes, even if it's only the fragment
199199 Just doc <- liftM (fmap castToHTMLDocument) $ liftIO $ nodeGetOwnerDocument rootElement
200− liftIO $ putStrLn "Using Widget2"
201200 frames <- liftIO newChan
202201 rec let guiEnv = GuiEnv doc (writeChan frames . runSpiderHost) runWithActions :: GuiEnv Spider SpiderHost
203202 runWithActions dm = do
src/Reflex/Dom/Widget/Basic.hs+3−3
@@ -167,7 +167,7 @@ listWithKey vals mkChild = do
167167 endPlaceholder <- text' ""
168168 (newChildren, newChildrenTriggerRef) <- newEventWithTriggerRef
169169 performEvent_ $ fmap (const $ return ()) newChildren --TODO: Get rid of this hack
170− children <- hold Map.empty $ traceEventWith (\x -> "newChildren: " <> show (Map.size x)) newChildren
170+ children <- hold Map.empty newChildren
171171 addVoidAction $ switch $ fmap (mergeWith (>>) . map snd . Map.elems) children
172172 runWidget <- getRunWidget
173173 let buildChild df k v = runWidget df $ do
@@ -228,7 +228,7 @@ listWithKey' initialVals valsChanged mkChild = do
228228 return (result, (childStart, childEnd))
229229 Just df <- liftIO $ documentCreateDocumentFragment doc
230230 initialState <- iforM initialVals $ \k v -> subWidgetWithVoidActions (toNode df) $ wrapChild k v --Note: we have to use subWidgetWithVoidActions rather than runWidget here, because running post-build actions during build can cause not-yet-constructed values to be read
231− children <- holdDyn initialState $ traceEventWith (\x -> "newChildren: " <> show (Map.size x)) newChildren
231+ children <- holdDyn initialState newChildren
232232 addVoidAction $ switch $ fmap (mergeWith (>>) . map snd . Map.elems) $ current children
233233 Just p <- liftIO $ nodeGetParentNode endPlaceholder
234234 liftIO $ nodeInsertBefore p (Just df) (Just endPlaceholder)
@@ -277,7 +277,7 @@ listViewWithKey' vals mkChild = do
277277 endPlaceholder <- text' ""
278278 (newChildren, newChildrenTriggerRef) <- newEventWithTriggerRef
279279 performEvent_ $ fmap (const $ return ()) newChildren --TODO: Get rid of this hack
280− children <- hold Map.empty $ traceEventWith (\x -> "newChildren: " <> show (Map.size x)) newChildren
280+ children <- hold Map.empty newChildren
281281 addVoidAction $ switch $ fmap (mergeWith (>>) . map snd . Map.elems) children
282282 runWidget <- getRunWidget
283283 let buildChild df k v = runWidget df $ do