<div dir="ltr">I'm trying to make an application on os X and get it to respond to drag and drop/giving it a file. But I cannot get either application-start-empty-handler or application-file-handler to get called. Am I doing something wrong? The documentation says that they should be called. It also says that the arguments are passed into the current command line arguments, but that also doesn't seem to be done.<div>
<br></div><div style>My program. (tmp.rkt)</div><div style><br></div><div style><div>#lang racket/gui</div><div><br></div><div>(application-start-empty-handler<br></div><div> (λ ()</div><div> (define frame (new frame% (label "start")))</div>
<div> (define label (new message% (label "hello") (parent frame)))</div><div> (void)))</div><div><br></div><div>(application-file-handler</div><div> (λ (file)</div><div> (define frame (new frame% (label "file")))</div>
<div> (define label (new message% (label (format "~a" file)) (parent frame)))</div><div> (void)))</div><div><br></div><div>(define frame (new frame% (label "tmp")))</div><div>(define label (new message% (label (format "~a" (current-command-line-arguments))) (parent frame)))</div>
<div>(send frame show #t)</div><div><br></div><div><br></div><div style>Built with:</div><div style>raco exe --gui -l tmp.rkt</div><div style><br></div><div style>Tried opening app with 'tmp.rkt' as an argument:</div>
<div style>open -a tmp.app tmp.rkt</div><div style>and</div><div style>right clicking tmp.rkt, and selecting open with tmp.app</div><div style><br></div><div style>This always resulted in just the 'tmp' frame being created with the empty vector message. I know racket can do this because DrRacket works with this on my system.</div>
</div></div>