Sounds like a nice setup you got there :). I want to integrate documents displayed in the system viewer, as they cannot be displayed within Pharo (Web, PDF, …). So hyperlinking is the only way I see to get something close. I created a little demo where I injected hyperlinks in a PDF like ‘pharo://click?whatever=youwant' <pharo://click?whatever=youwant'>. When you click them, a little Objective-C app catches the OS event and forwards it to an HTTP server running in Pharo. So I can do things like this:
https://youtu.be/CR_scZSDf3s <https://youtu.be/CR_scZSDf3s> > On 11 Oct 2017, at 00:24, Dimitris Chloupis <kilon.al...@gmail.com> wrote: > > I think I remember this disussed before. > By talking with Pharo I assume here about another program talking to Pharo ? > Possible not wrriten in Pharo ? > > If thats the case then you can use whatever IPC works better for your needs. > If the communication will be remotely I recommend sockets, for fast local > communication I recommend shared memory. They are both very mature > technologies , very reliable and cross platform. > > Now on the URI protocol, I think that will depend what you want to achieve. > Any string will be easy to parse with Pharo's regex and trigger the > approriate methods. Pharo also have Annoucements, think of it as an event > system that awaits to be triggered by an event, usually a Pharo event but I > see no reason why it cant listen to external events either. > > I do not think you will need a middle application , a servel client relation > shipe should be more than enough. > > With my Atlas bridge which is a Pharo library that allows you to use Python > libraries I did a neat trick with Pharo that it already communicated with > Python via sockets, sending python commands but also Python could communicate > back errors , then Pharo would trigger the debugger, display the python error > inside the Pharo debugger and the debugger would pop up on the exact pharo > command that send the faulty python code. You could then change the pharo > command on the spot and it was resent and python continued like the error > never happened to retain the all important live coding workflow. > > I created a tiny protocol to difirentia incoming messages talking about > errors from the ones returning python varriable values. Something stupid like > "pythonError: blah blah" but it got the job done > > > > On Tue, Oct 10, 2017 at 10:07 PM Manuel Leuenberger <leuenber...@inf.unibe.ch > <mailto:leuenber...@inf.unibe.ch>> wrote: > Hi, > > Is there any support from the VM/Application package to add custom URI > schemes to listen to from within Pharo? I would like to have a hyperlink like > ‘pharo://send?data=fancypants’ <> in an arbitrary document that, when > clicked, switches to Pharo and calls a hook I can register. Could someone > give me a hint how to achieve that, or do I have to build a little bridge > application that handles the scheme registration and talks with Pharo through > another channel? Currently, I only need this for OS X. > > Cheers, > Manuel >