Re: [Factor-talk] FUEL listener running web page
On Sun, Aug 15, 2010 at 9:47 PM, Jim mack wrote: > Hi, I've got FUEL working w/listener, on Mac, factor version = yesterday's > binaries. I'm launching a furnace website. > > If I launch it from Factor listener directly, it executes but locks the > listener, and I have to restart it. (Once I've restarted it, I can modify > source, hit F2 and the website reflects those changes, and if I call the > launching word again, it no longer locks the listener - only the first > time.) If this seems just too weird, see my explanation below. The 'httpd' word does not return until the HTTP server stops running. So what you should do is launch it in a thread, [ httpd ] in-thread > If I launch from aquamacs, the same thing happens, but I don't know how to > restart the listener. If I launch it from aquamacs listener in a thread, it > serves the website but I don't know how to get it to refresh its code. > > Is there a way to work interactively whereby C-c C-r will update my > website's code, just as I can do in the factor listener? Separate the part that sets main-responder and the part that starts httpd into two words. Then to refresh your web site, reload your code with refresh-all, and re-invoke the word that sets up main-responder. If the HTTP server is still running, subsequent requests will invoke your new actions. Slava -- This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
[Factor-talk] FUEL listener running web page
Hi, I've got FUEL working w/listener, on Mac, factor version = yesterday's binaries. I'm launching a furnace website. If I launch it from Factor listener directly, it executes but locks the listener, and I have to restart it. (Once I've restarted it, I can modify source, hit F2 and the website reflects those changes, and if I call the launching word again, it no longer locks the listener - only the first time.) If this seems just too weird, see my explanation below. If I launch from aquamacs, the same thing happens, but I don't know how to restart the listener. If I launch it from aquamacs listener in a thread, it serves the website but I don't know how to get it to refresh its code. Is there a way to work interactively whereby C-c C-r will update my website's code, just as I can do in the factor listener? Thanks, Jim What's launching the website, in case I'm causing this problem: : 4eyes-web ( -- ) [ route-and-return ] to: trick-to-get-reloading "4eyes" [ <4eyes-responder> 4eyes-db init-4eyes-dbs main-responder set-global 8080 httpd ] with-logging ; It probably isn't important, but just in case, I know it's non standard and I have my doubts I'd try it again, but I use one action and have it parse the request's url & params to decide what to do, from within the display slot, and that's what trick-to-get-reloading is. Until I did this, I didn't seem to get the website code refreshed just by hitting F2, unless I directly called 4eyes-web again (it was early in my learning curve, so maybe I just got something wrong, but it's working). -- This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] >>gadgets
Try using instead of . If you want to use , also set the filled-cell slot, eg: { 1 1 } >>filled-cell Slava On Sun, Aug 15, 2010 at 8:43 PM, Андрей Полищук wrote: > Hi > > I'm trying to make frame with four cells, and label in each cell in that way: > > MAIN-WINDOW: main-window { { title "[ gui - training ]" } } > { 256 256 } >>pref-dim 2 2 > { "A" "B" "C" "D" } [ ] map > { { 0 0 } { 0 1 } { 1 0 } { 1 1 } } > [ grid-add ] 2each >>gadgets ; > > But that dont work, throwing > Sequence index out of bounds > index 0 > seq f > > Can someone please tell where's my mistake? > I've found no examples of using frame in /extra/ - dir. > > Thanks > Ander > > -- > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > ___ > Factor-talk mailing list > Factor-talk@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/factor-talk > -- This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
[Factor-talk] >>gadgets
Hi I'm trying to make frame with four cells, and label in each cell in that way: MAIN-WINDOW: main-window { { title "[ gui - training ]" } } { 256 256 } >>pref-dim 2 2 { "A" "B" "C" "D" } [ ] map { { 0 0 } { 0 1 } { 1 0 } { 1 1 } } [ grid-add ] 2each >>gadgets ; But that dont work, throwing Sequence index out of bounds index 0 seq f Can someone please tell where's my mistake? I've found no examples of using frame in /extra/ - dir. Thanks Ander -- This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk