]> gitweb.factorcode.org Git - factor.git/commitdiff
irc.ui: Fixed bug in constructor
authorWilliam Schlieper <schlieper@unc.edu>
Thu, 14 Aug 2008 05:24:56 +0000 (01:24 -0400)
committerWilliam Schlieper <schlieper@unc.edu>
Thu, 14 Aug 2008 05:24:56 +0000 (01:24 -0400)
extra/irc/ui/ui.factor

index 5d74c884c4cbf835d04799e4378b09980d9b24e7..1aebfcbfcb684b0fe76d4d942703723070fefbe4 100755 (executable)
@@ -123,8 +123,11 @@ M: irc-listener-end write-irc
 M: irc-message write-irc\r
     drop ; ! catch all unimplemented writes, THIS WILL CHANGE    \r
 \r
-: time-happened ( irc-message -- timestamp )\r
-    [ timestamp>> ] [ 2drop now ] recover ;\r
+GENERIC: time-happened ( message -- timestamp )\r
+\r
+M: irc-message time-happened timestamp>> ;\r
+\r
+M: object time-happened drop now ;\r
 \r
 : print-irc ( irc-message -- )\r
     [ time-happened timestamp>hms write " " write ]\r
@@ -188,7 +191,7 @@ M: irc-tab ungraft*
 TUPLE: irc-channel-tab < irc-tab userlist ;\r
 \r
 : <irc-channel-tab> ( listener ui-window -- irc-tab )\r
-    irc-tab new-irc-tab\r
+    irc-channel-tab new-irc-tab\r
     <pile> [ <scroller> @right grid-add ] keep >>userlist ;\r
 \r
 : update-participants ( tab -- )\r