Hi pharoers,
Is it possible to select a file and open it with an external application ? For example, I need to open a pdf file. How can I do that ? Thank you for the help, Jannik |
The only solution currently is to use OSProcess and
- open under OSX - gnome-open under linux On 2013-03-27, at 23:05, jannik.laval <[hidden email]> wrote: > Hi pharoers, > > Is it possible to select a file and open it with an external application ? > For example, I need to open a pdf file. > > How can I do that ? > > Thank you for the help, > Jannik > |
Do you have an example of code ?
Jannik On Mar 27, 2013, at 11:26 PM, Camillo Bruni <[hidden email]> wrote: > The only solution currently is to use OSProcess and > - open under OSX > - gnome-open under linux > > > On 2013-03-27, at 23:05, jannik.laval <[hidden email]> wrote: > >> Hi pharoers, >> >> Is it possible to select a file and open it with an external application ? >> For example, I need to open a pdf file. >> >> How can I do that ? >> >> Thank you for the help, >> Jannik >> > > |
I just see that it is not integrated in Pharo2.0.
Where can I find it ? Jannik On Mar 28, 2013, at 6:49 AM, jannik.laval <[hidden email]> wrote: > Do you have an example of code ? > > Jannik > > On Mar 27, 2013, at 11:26 PM, Camillo Bruni <[hidden email]> wrote: > >> The only solution currently is to use OSProcess and >> - open under OSX >> - gnome-open under linux >> >> >> On 2013-03-27, at 23:05, jannik.laval <[hidden email]> wrote: >> >>> Hi pharoers, >>> >>> Is it possible to select a file and open it with an external application ? >>> For example, I need to open a pdf file. >>> >>> How can I do that ? >>> >>> Thank you for the help, >>> Jannik >>> >> >> > |
In reply to this post by Camillo Bruni-3
On 27.03.2013, at 23:26, Camillo Bruni <[hidden email]> wrote: > The only solution currently is to use OSProcess and > - open under OSX > - gnome-open under linux Or use NativeBoost (e.g. run C code that does what you want). But Camillo's solution is certainly easier to implement. > > > On 2013-03-27, at 23:05, jannik.laval <[hidden email]> wrote: > >> Hi pharoers, >> >> Is it possible to select a file and open it with an external application ? >> For example, I need to open a pdf file. >> >> How can I do that ? >> >> Thank you for the help, >> Jannik >> > > |
In reply to this post by Camillo Bruni-3
On Wed, Mar 27, 2013 at 11:26:21PM +0100, Camillo Bruni wrote:
> The only solution currently is to use OSProcess and > - open under OSX > - gnome-open under linux Please use xdg-open to work on all free desktop implementations. |
Thank you all.
Jannik
2013/3/28 Holger Hans Peter Freyther <[hidden email]>
~~Dr. Jannik Laval~~ |
Hi again,
I took the ConfigurationOfOSProcess in http://www.squeaksource.com/MetacelloRepository When I load the stable version in Pharo2.0, there is a lot of error that things are undeclared in Transcript:
=== CommandShell>>builtinCommandProxyFor:input:output:error: (ShellBuiltinEvaluator is Undeclared) CommandShell>>evaluationProxyFor:input:output:error: (ExpressionEvaluator is Undeclared)
CommandShell>>installCommands: (ShellBuiltin is Undeclared) CommandShell>>open (CommandShellTranscript is Undeclared) CommandShell>>openLabel: (CommandShellTranscript is Undeclared)
CommandShell>>pipeline: (ProxyPipeline is Undeclared) CommandShell>>pipelineCollectionFrom: (ProxyPipeline is Undeclared) CommandShell>>processProxyFor:input:output:error:predecessorProxy: (InternalPipe is Undeclared)
CommandShell>>processProxyFor:input:output:error:predecessorProxy: (PipeJunction is Undeclared) CommandShell>>processProxyFor:input:output:error:predecessorProxy: (PipeableOSProcess is Undeclared)
CommandShell>>scheduleToEvaluate: (ScheduledControllers is Undeclared) CrLfFileEditor class>>fileNamed:inDirectoryPath: (CrLfFileStream is Undeclared) CrLfFileEditor class>>fileNamed:withLabel: (CrLfFileStream is Undeclared)
CrLfFileEditor>>bogusTruncate: (CrLfFileStream is Undeclared) CrLfFileEditor>>fileContentsMenu:shifted: (ParagraphEditor is Undeclared) CrLfFileEditor>>getAnotherFileName: (PopUpMenu is Undeclared)
CrLfFileEditor>>getAnotherFileName: (FillInTheBlank is Undeclared) CrLfFileEditor>>getFileName: (PopUpMenu is Undeclared) CrLfFileEditor>>getFileName: (FillInTheBlank is Undeclared)
CrLfFileEditor>>mvcWithLabel: (StandardSystemView is Undeclared) CrLfFileEditor>>mvcWithLabel: (StandardSystemController is Undeclared) CrLfFileEditor>>mvcWithLabel: (PluggableTextView is Undeclared)
CrLfFileEditor>>put: (CrLfFileStream is Undeclared) CrLfFileEditor>>put: (CrLfFileStream is Undeclared) CrLfFileEditor>>saveAs (FillInTheBlank is Undeclared) CommandShellTranscript>>openLabel: (StandardSystemView is Undeclared)
CommandShellTranscript>>openLabel: (StandardSystemController is Undeclared) CommandShellTranscript>>openLabel: (ShellWindowView is Undeclared) === Do I have the correct version ?
Thanks, Jannik 2013/3/29 jannik laval <[hidden email]> Thank you all. ~~Dr. Jannik Laval~~ |
Looks like OSProcess is not your best bet.
Check NBWin32Shell instead (in NativeBoostWin32) (Smalltalk at: #NBWin32Shell) shellBrowse: '<a href="http://localhost:'">http://localhost:', self port asString Phil 2013/3/29 jannik laval <[hidden email]>: > Hi again, > > I took the ConfigurationOfOSProcess in > http://www.squeaksource.com/MetacelloRepository > When I load the stable version in Pharo2.0, there is a lot of error that > things are undeclared in Transcript: > > === > CommandShell>>builtinCommandProxyFor:input:output:error: > (ShellBuiltinEvaluator is Undeclared) > CommandShell>>evaluationProxyFor:input:output:error: (ExpressionEvaluator is > Undeclared) > CommandShell>>installCommands: (ShellBuiltin is Undeclared) > CommandShell>>open (CommandShellTranscript is Undeclared) > CommandShell>>openLabel: (CommandShellTranscript is Undeclared) > CommandShell>>pipeline: (ProxyPipeline is Undeclared) > CommandShell>>pipelineCollectionFrom: (ProxyPipeline is Undeclared) > CommandShell>>processProxyFor:input:output:error:predecessorProxy: > (InternalPipe is Undeclared) > CommandShell>>processProxyFor:input:output:error:predecessorProxy: > (PipeJunction is Undeclared) > CommandShell>>processProxyFor:input:output:error:predecessorProxy: > (PipeableOSProcess is Undeclared) > CommandShell>>scheduleToEvaluate: (ScheduledControllers is Undeclared) > CrLfFileEditor class>>fileNamed:inDirectoryPath: (CrLfFileStream is > Undeclared) > CrLfFileEditor class>>fileNamed:withLabel: (CrLfFileStream is Undeclared) > CrLfFileEditor>>bogusTruncate: (CrLfFileStream is Undeclared) > CrLfFileEditor>>fileContentsMenu:shifted: (ParagraphEditor is Undeclared) > CrLfFileEditor>>getAnotherFileName: (PopUpMenu is Undeclared) > CrLfFileEditor>>getAnotherFileName: (FillInTheBlank is Undeclared) > CrLfFileEditor>>getFileName: (PopUpMenu is Undeclared) > CrLfFileEditor>>getFileName: (FillInTheBlank is Undeclared) > CrLfFileEditor>>mvcWithLabel: (StandardSystemView is Undeclared) > CrLfFileEditor>>mvcWithLabel: (StandardSystemController is Undeclared) > CrLfFileEditor>>mvcWithLabel: (PluggableTextView is Undeclared) > CrLfFileEditor>>put: (CrLfFileStream is Undeclared) > CrLfFileEditor>>put: (CrLfFileStream is Undeclared) > CrLfFileEditor>>saveAs (FillInTheBlank is Undeclared) > CommandShellTranscript>>openLabel: (StandardSystemView is Undeclared) > CommandShellTranscript>>openLabel: (StandardSystemController is Undeclared) > CommandShellTranscript>>openLabel: (ShellWindowView is Undeclared) > === > > Do I have the correct version ? > > Thanks, > Jannik > > 2013/3/29 jannik laval <[hidden email]> >> >> Thank you all. >> >> Jannik >> >> >> 2013/3/28 Holger Hans Peter Freyther <[hidden email]> >>> >>> On Wed, Mar 27, 2013 at 11:26:21PM +0100, Camillo Bruni wrote: >>> > The only solution currently is to use OSProcess and >>> > - open under OSX >>> > - gnome-open under linux >>> >>> Please use xdg-open to work on all free desktop implementations. >>> >> >> >> >> -- >> >> ~~Dr. Jannik Laval~~ >> École des Mines de Douai >> Enseignant-chercheur >> http://www.jannik-laval.eu > > > > > -- > > ~~Dr. Jannik Laval~~ > École des Mines de Douai > Enseignant-chercheur > http://www.jannik-laval.eu |
Hi Phil, Thank you for the help. But this line is only available for Windows. I don't find the same for MacOS and Linux. Thanks, Jannik 2013/3/29 [hidden email] <[hidden email]> Looks like OSProcess is not your best bet. ~~Dr. Jannik Laval~~ |
For OSX, it is just a matter of calling open from the OSProcess as
Cami told us in the list already. It works. Phil 2013/3/29 jannik laval <[hidden email]>: > Hi Phil, > > Thank you for the help. > But this line is only available for Windows. > I don't find the same for MacOS and Linux. > > Thanks, > Jannik > > > 2013/3/29 [hidden email] <[hidden email]> >> >> Looks like OSProcess is not your best bet. >> >> Check NBWin32Shell instead (in NativeBoostWin32) >> >> (Smalltalk at: #NBWin32Shell) shellBrowse: '<a href="http://localhost:'">http://localhost:', >> self >> port asString >> >> Phil >> >> 2013/3/29 jannik laval <[hidden email]>: >> > Hi again, >> > >> > I took the ConfigurationOfOSProcess in >> > http://www.squeaksource.com/MetacelloRepository >> > When I load the stable version in Pharo2.0, there is a lot of error that >> > things are undeclared in Transcript: >> > >> > === >> > CommandShell>>builtinCommandProxyFor:input:output:error: >> > (ShellBuiltinEvaluator is Undeclared) >> > CommandShell>>evaluationProxyFor:input:output:error: >> > (ExpressionEvaluator is >> > Undeclared) >> > CommandShell>>installCommands: (ShellBuiltin is Undeclared) >> > CommandShell>>open (CommandShellTranscript is Undeclared) >> > CommandShell>>openLabel: (CommandShellTranscript is Undeclared) >> > CommandShell>>pipeline: (ProxyPipeline is Undeclared) >> > CommandShell>>pipelineCollectionFrom: (ProxyPipeline is Undeclared) >> > CommandShell>>processProxyFor:input:output:error:predecessorProxy: >> > (InternalPipe is Undeclared) >> > CommandShell>>processProxyFor:input:output:error:predecessorProxy: >> > (PipeJunction is Undeclared) >> > CommandShell>>processProxyFor:input:output:error:predecessorProxy: >> > (PipeableOSProcess is Undeclared) >> > CommandShell>>scheduleToEvaluate: (ScheduledControllers is Undeclared) >> > CrLfFileEditor class>>fileNamed:inDirectoryPath: (CrLfFileStream is >> > Undeclared) >> > CrLfFileEditor class>>fileNamed:withLabel: (CrLfFileStream is >> > Undeclared) >> > CrLfFileEditor>>bogusTruncate: (CrLfFileStream is Undeclared) >> > CrLfFileEditor>>fileContentsMenu:shifted: (ParagraphEditor is >> > Undeclared) >> > CrLfFileEditor>>getAnotherFileName: (PopUpMenu is Undeclared) >> > CrLfFileEditor>>getAnotherFileName: (FillInTheBlank is Undeclared) >> > CrLfFileEditor>>getFileName: (PopUpMenu is Undeclared) >> > CrLfFileEditor>>getFileName: (FillInTheBlank is Undeclared) >> > CrLfFileEditor>>mvcWithLabel: (StandardSystemView is Undeclared) >> > CrLfFileEditor>>mvcWithLabel: (StandardSystemController is Undeclared) >> > CrLfFileEditor>>mvcWithLabel: (PluggableTextView is Undeclared) >> > CrLfFileEditor>>put: (CrLfFileStream is Undeclared) >> > CrLfFileEditor>>put: (CrLfFileStream is Undeclared) >> > CrLfFileEditor>>saveAs (FillInTheBlank is Undeclared) >> > CommandShellTranscript>>openLabel: (StandardSystemView is Undeclared) >> > CommandShellTranscript>>openLabel: (StandardSystemController is >> > Undeclared) >> > CommandShellTranscript>>openLabel: (ShellWindowView is Undeclared) >> > === >> > >> > Do I have the correct version ? >> > >> > Thanks, >> > Jannik >> > >> > 2013/3/29 jannik laval <[hidden email]> >> >> >> >> Thank you all. >> >> >> >> Jannik >> >> >> >> >> >> 2013/3/28 Holger Hans Peter Freyther <[hidden email]> >> >>> >> >>> On Wed, Mar 27, 2013 at 11:26:21PM +0100, Camillo Bruni wrote: >> >>> > The only solution currently is to use OSProcess and >> >>> > - open under OSX >> >>> > - gnome-open under linux >> >>> >> >>> Please use xdg-open to work on all free desktop implementations. >> >>> >> >> >> >> >> >> >> >> -- >> >> >> >> ~~Dr. Jannik Laval~~ >> >> École des Mines de Douai >> >> Enseignant-chercheur >> >> http://www.jannik-laval.eu >> > >> > >> > >> > >> > -- >> > >> > ~~Dr. Jannik Laval~~ >> > École des Mines de Douai >> > Enseignant-chercheur >> > http://www.jannik-laval.eu >> > > > > -- > > ~~Dr. Jannik Laval~~ > École des Mines de Douai > Enseignant-chercheur > http://www.jannik-laval.eu |
Yes,
But I am thinking that using 2 differents things to do the same work is not cool. So, I will use that for now. Thank you Jannik On Mar 29, 2013, at 12:47 PM, [hidden email] wrote: > For OSX, it is just a matter of calling open from the OSProcess as > Cami told us in the list already. It works. > > Phil > > 2013/3/29 jannik laval <[hidden email]>: >> Hi Phil, >> >> Thank you for the help. >> But this line is only available for Windows. >> I don't find the same for MacOS and Linux. >> >> Thanks, >> Jannik >> >> >> 2013/3/29 [hidden email] <[hidden email]> >>> >>> Looks like OSProcess is not your best bet. >>> >>> Check NBWin32Shell instead (in NativeBoostWin32) >>> >>> (Smalltalk at: #NBWin32Shell) shellBrowse: '<a href="http://localhost:'">http://localhost:', >>> self >>> port asString >>> >>> Phil >>> >>> 2013/3/29 jannik laval <[hidden email]>: >>>> Hi again, >>>> >>>> I took the ConfigurationOfOSProcess in >>>> http://www.squeaksource.com/MetacelloRepository >>>> When I load the stable version in Pharo2.0, there is a lot of error that >>>> things are undeclared in Transcript: >>>> >>>> === >>>> CommandShell>>builtinCommandProxyFor:input:output:error: >>>> (ShellBuiltinEvaluator is Undeclared) >>>> CommandShell>>evaluationProxyFor:input:output:error: >>>> (ExpressionEvaluator is >>>> Undeclared) >>>> CommandShell>>installCommands: (ShellBuiltin is Undeclared) >>>> CommandShell>>open (CommandShellTranscript is Undeclared) >>>> CommandShell>>openLabel: (CommandShellTranscript is Undeclared) >>>> CommandShell>>pipeline: (ProxyPipeline is Undeclared) >>>> CommandShell>>pipelineCollectionFrom: (ProxyPipeline is Undeclared) >>>> CommandShell>>processProxyFor:input:output:error:predecessorProxy: >>>> (InternalPipe is Undeclared) >>>> CommandShell>>processProxyFor:input:output:error:predecessorProxy: >>>> (PipeJunction is Undeclared) >>>> CommandShell>>processProxyFor:input:output:error:predecessorProxy: >>>> (PipeableOSProcess is Undeclared) >>>> CommandShell>>scheduleToEvaluate: (ScheduledControllers is Undeclared) >>>> CrLfFileEditor class>>fileNamed:inDirectoryPath: (CrLfFileStream is >>>> Undeclared) >>>> CrLfFileEditor class>>fileNamed:withLabel: (CrLfFileStream is >>>> Undeclared) >>>> CrLfFileEditor>>bogusTruncate: (CrLfFileStream is Undeclared) >>>> CrLfFileEditor>>fileContentsMenu:shifted: (ParagraphEditor is >>>> Undeclared) >>>> CrLfFileEditor>>getAnotherFileName: (PopUpMenu is Undeclared) >>>> CrLfFileEditor>>getAnotherFileName: (FillInTheBlank is Undeclared) >>>> CrLfFileEditor>>getFileName: (PopUpMenu is Undeclared) >>>> CrLfFileEditor>>getFileName: (FillInTheBlank is Undeclared) >>>> CrLfFileEditor>>mvcWithLabel: (StandardSystemView is Undeclared) >>>> CrLfFileEditor>>mvcWithLabel: (StandardSystemController is Undeclared) >>>> CrLfFileEditor>>mvcWithLabel: (PluggableTextView is Undeclared) >>>> CrLfFileEditor>>put: (CrLfFileStream is Undeclared) >>>> CrLfFileEditor>>put: (CrLfFileStream is Undeclared) >>>> CrLfFileEditor>>saveAs (FillInTheBlank is Undeclared) >>>> CommandShellTranscript>>openLabel: (StandardSystemView is Undeclared) >>>> CommandShellTranscript>>openLabel: (StandardSystemController is >>>> Undeclared) >>>> CommandShellTranscript>>openLabel: (ShellWindowView is Undeclared) >>>> === >>>> >>>> Do I have the correct version ? >>>> >>>> Thanks, >>>> Jannik >>>> >>>> 2013/3/29 jannik laval <[hidden email]> >>>>> >>>>> Thank you all. >>>>> >>>>> Jannik >>>>> >>>>> >>>>> 2013/3/28 Holger Hans Peter Freyther <[hidden email]> >>>>>> >>>>>> On Wed, Mar 27, 2013 at 11:26:21PM +0100, Camillo Bruni wrote: >>>>>>> The only solution currently is to use OSProcess and >>>>>>> - open under OSX >>>>>>> - gnome-open under linux >>>>>> >>>>>> Please use xdg-open to work on all free desktop implementations. >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> ~~Dr. Jannik Laval~~ >>>>> École des Mines de Douai >>>>> Enseignant-chercheur >>>>> http://www.jannik-laval.eu >>>> >>>> >>>> >>>> >>>> -- >>>> >>>> ~~Dr. Jannik Laval~~ >>>> École des Mines de Douai >>>> Enseignant-chercheur >>>> http://www.jannik-laval.eu >>> >> >> >> >> -- >> >> ~~Dr. Jannik Laval~~ >> École des Mines de Douai >> Enseignant-chercheur >> http://www.jannik-laval.eu > |
Yes, that's frustrating. Example: Help Server using NBShell32 and not working on OSX... 2013/3/29 jannik.laval <[hidden email]> Yes, |
why? you just need to implement an strategy for that.
On Mar 29, 2013, at 4:25 PM, "[hidden email]" <[hidden email]> wrote:
|
OOTB I mean, from the configuration browser 2013/3/29 Esteban Lorenzano <[hidden email]>
|
Free forum by Nabble | Edit this page |