]> gitweb.factorcode.org Git - factor.git/commitdiff
Merge branch 'master' of git://factorcode.org/git/factor
authorDoug Coleman <erg@jobim.local>
Mon, 13 Apr 2009 20:36:29 +0000 (15:36 -0500)
committerDoug Coleman <erg@jobim.local>
Mon, 13 Apr 2009 20:36:29 +0000 (15:36 -0500)
basis/http/http-tests.factor
basis/ui/backend/cocoa/cocoa.factor
extra/webapps/site-watcher/site-watcher.factor

index 45ad132677b8c031d74f525226de186fd632b05b..5c73377cbe5fb3bed094dc128c823b9f194d031b 100644 (file)
@@ -393,6 +393,10 @@ SYMBOL: a
 [ "OK" ] [ "data" "http://localhost/a" add-port http-post nip ] unit-test
 
 ! Check that download throws errors (reported by Chris Double)
-[ "http://localhost/tweet_my_twat" add-port download ] must-fail
+[
+    "resource:temp" [
+        "http://localhost/tweet_my_twat" add-port download
+    ] with-directory
+] must-fail
 
 [ ] [ "http://localhost/quit" add-port http-get 2drop ] unit-test
index 1bbf46c69e5e6b514a84084cc5e030072bb0eaf5..362305c8f70a4a32cdcf793babfaadd934bfe883 100755 (executable)
@@ -39,13 +39,16 @@ M: pasteboard set-clipboard-contents
     [ 0 0 ] dip dim>> first2 <CGRect> ;
 
 : auto-position ( window loc -- )
+    #! Note: if this is the initial window, the length of the windows
+    #! vector should be 1, since (open-window) calls auto-position
+    #! after register-window.
     dup { 0 0 } = [
         drop
-        windows get [ -> center ] [
-            peek second window-loc>>
+        windows get length 1 <= [ -> center ] [
+            windows get peek second window-loc>>
             dupd first2 <CGPoint> -> cascadeTopLeftFromPoint:
             -> setFrameTopLeftPoint:
-        ] if-empty
+        ] if
     ] [ first2 <CGPoint> -> setFrameTopLeftPoint: ] if ;
 
 M: cocoa-ui-backend set-title ( string world -- )
index 7651afa4e6b1c30473ee1804dbf2d23c034793dc..edd8104a7edd6415c735d204b458ebe52a9f06b5 100644 (file)
@@ -69,7 +69,7 @@ IN: webapps.site-watcher
         8431 >>secure ;
 
 : site-watcher-db ( -- db )
-    "resource:test.db" <sqlite-db> ;
+    "test.db" temp-file <sqlite-db> ;
 
 <site-watcher-app>
 <login-config>