The Factor launcher is for directly running processes.

1) You can run your rake command directly:

    { "rake" "RubyMotionSamples/ios/Timer" } try-process

2) Or if you want to "run it in your Terminal.app", then maybe a bit of
applescript:

    USE: cocoa.apple-script
    "RubyMotionSamples/ios/Timer"
    "tell application \"Terminal\"\n    do script \"rake %s\"\nend tell"
    sprintf run-apple-script



On Tue, Dec 23, 2014 at 7:13 AM, tgkuo <tgk...@gmail.com> wrote:
>
> Hi, group
>
> I had a need to run rake command from a TextEditor ( DevonTHINK) by using
> the factor service.
>
> I tried to use:
>
> : set-rake-pathname ( dir  -- str )
>     rubymotion-projects-path swap "/" glue      ;
>
> : run-terminal ( str -- )
>    "Terminal.app" ascii [
>       "%s " printf
>     ] with-process-writer *;*
>
> SYNTAX: Rake:
>        scan-token set-rake-pathname "cd \"%s\"" sprintf
>    '[ _  run-terminal "rake" run-terminal ] append! ;
>
> and then
>
> Rake: RubyMotionSamples/ios/Timer
>
> seemed not to work…. Error message in factor:
>
> Process exited with error code 255
>
> Launch descriptor:
>
> T{ process
>     { command "Terminal.app" }
>     { environment H{ } }
>     { environment-mode +append-environment+ }
>     { stdin T{ fd { disposed t } { fd 31 } } }
>     { group +same-group+ }
>     { status 255 }
>     { pipe
>         T{ pipe
>             { in T{ fd { disposed t } { fd 31 } } }
>             { out T{ fd { disposed t } { fd 37 } } }
>         }
>     }
> }
>
> All I need is simply to wake up the terminal.app to execute the shell
> script in it’s window..
>
> Best regards.
>
> tgkuo
>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming! The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to