Re: [Pharo-users] startUp Application

2017-02-24 Thread Hilaire
Hi Pablo,

Concerning the World menu you first define your menu in a method, and
tag it with a dedicated pragma, for example in Dr. Geo I wrote:

worldMenu: aBuilder

(aBuilder item: 'New' translated)
action: [DrGeo newFullScreen];
icon: ThemeIcons current smallNewIcon;
order: 0.
(aBuilder item: 'Open' translated)
action: [DrGeo openFigureThumbnail: nil];
icon: ThemeIcons current smallOpenIcon;
order: 1.
(aBuilder item: 'Quit' translated) action: [DrGeo quit]; order: 999


Then you register this as your new world menu using the pragma name:

WorldState desktopMenuPragmaKeyword:  'drgeoMenu'.


Hilaire

Le 24/02/2017 à 02:24, Pablo R. Digonzelli a écrit :
> Hi, I want to know how to do in order a desktop application start with
> its custom menu without pharo panel.
> I read something about to startUp method but i need more information.
> Sorry for my english and TIA
> 

-- 
Dr. Geo
http://drgeo.eu




Re: [Pharo-users] Which is the best way of opening a PDF and HTML local files from Pharo

2017-02-24 Thread Alistair Grant
Hi Offray,

Which version of Pharo are you running?  My understanding is that
Pharo5 & 6 use OSSubprocess, not OSProcess.

I'm using xdg-open to open pdf files on linux (Arch):

| proc |

proc := OSSUnixSubprocess new.
proc
command: 'xdg-open';
arguments: (Array with: url).
proc run.
UIManager inform: 'Opened: ', url.

url is the path to the file in this case.

You can check the exit status with:

proc exitStatusInterpreter

e.g.:

proc exitStatusInterpreter isSuccess

Cheers,
Alistair


On 25 February 2017 at 05:07, Offray Vladimir Luna Cárdenas
 wrote:
> Thanks Hilaire.
>
> I was thinking in something that depend on OSProcess and invoke xdg-open on
> Linux, for example, but is not working neither.
>
> OSProcess command: 'xdg-open ', pdfPathString
>
> doesn't open the PDF file :-/.
>
> Cheers,
>
> Offray
>
>
>
> On 24/02/17 13:02, Hilaire wrote:
>>
>> Oh, you can add your extension to the OSPlateform hierarchy.
>>
>> So one your extensions added in the hierarchy, your code will use it
>> with an uniform:
>>
>> OSPlateforme current openPdf: 'grafoscopio.pdf'
>>
>>
>> Le 24/02/2017 à 18:55, Hilaire a écrit :
>>>
>>> But likely there is already something like that in the system but I
>>> can't see.
>
>
>



Re: [Pharo-users] Grafoscopio User Manual: Early beta

2017-02-24 Thread Offray Vladimir Luna Cárdenas
As a side note, Grafoscopio documentation was made in Grafoscopio... you 
know, we love self-referential systems ;-).


Cheers,

Offray


On 24/02/17 09:17, Offray Vladimir Luna Cárdenas wrote:


Hi all,

I'm making a couple of articles for the JOSS[1], which, by the way is 
an interesting critic/hack to the anachronistic published paper on 
indexed journal[2], making visible the work of research who use mainly 
software as a medium to communicate and make research.


[1] http://joss.theoj.org/ 
[2] http://joss.theoj.org/about

JOSS proposes a pretty good structure for the companion readme file 
for the software. I started to write it, but I entered to some kind of 
"writing frenzy" and, after almost 40 pages(!), it ended in the 
English Grafoscopio User Manual:


http://mutabit.com/repos.fossil/grafoscopio/doc/tip/Docs/En/Books/Manual/manual.pdf 



Is the first text I write of such length in English, so any critic on 
typos, clarity or others are welcomed. Please see the "Community 
Guidelines" section, particularly "Report issues or problems", so I 
can follow and address the suggestions better.


I will be making some minor updates on the software and the manual to 
improve consistency (manual URL, remains the same, pointing to the 
last version).


Cheers,

Offray








Re: [Pharo-users] Loading Seaside via Bootstrap in Pharo 6

2017-02-24 Thread Sven Van Caekenberghe
Hi Torsten,

> On 21 Feb 2017, at 14:24, Torsten Bergmann  wrote:
> 
> Hi,
> 
> regarding the problem Sven mentioned on 
> http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/2017-February/030542.html
> 
> here are my findings:
> 
> When I use latest Pharo 6 (Image 60404) and run
> 
>  Metacello new
> smalltalkhubUser: 'Seaside' project: 'MetacelloConfigurations';
> configuration: 'Seaside3';
> version: #'release3.2';
> load
> 
> it loads the latest release 3.2 (which internally loads 3.2.1).  The package 
> is "ConfigurationOfSeaside3-JohanBrichau.323.mcz"

Yes that worked for me too.

I then had to load my own project using the same API, so not:

ConfigurationOfBetaNineT3 project bleedingEdge load: 'trackit'.

But:

Metacello new
configuration: 'BetaNineT3';
version: #bleedingEdge;   
load: 'trackit'.

This then loaded Bootstrap as needed (with Seaside already present).

> This loads fine in Pharo 6 except that after installation the "Tools" -> 
> "Seaside control panel" is not working anymore as 
> "NewListModel" is not found anymore. So the control panel is broken. Dont 
> know what the migration path is for UI's 
> who used the removed "NewListModel" class.

Here is how I quickly patched the control panel:

WAPharoServerAdapterSpecBrowser>>#initializeWidgets

self instantiateModels: #(
listModel ListModel
textModel TextModel
toolbarModel WAServerAdapterToolbar).

WAPharoServerAdapterSpecBrowser>>initializePresenter

self initializeAdaptors.

textModel aboutToStyle: false.

listModel 
whenSelectedItemChanged: [ :selection | adaptor := selection. 
self updateUIState];
whenListChanged: [ self updateUIState];
displayBlock: [ :item | (item class name,' ',item statusString) 
asStringMorph ];
"icons: [ :item | self iconForAdaptor: item];
iconMaxSize: 16@16;"
menu: [ :aMenu | self adaptorsMenu: aMenu].

self focusOrder
add: listModel;
add: toolbarModel;
add: textModel.

self disableAllButtons

So I replaced NewListModel with ListModel and I commented out the icon related 
stuff. This might be a bit too quick, I don't know.

> So yes - one can (by using the above script) use Seaside but currently has to 
> start the server with a script 
> until this is fixed. This is good to know - but does not solve the "loading 
> from catalog" issue.
> 
> -
> 
> So (in a fresh image 60404) I loaded "Bootstrap" from catalog and I received 
> the error Sven reported. 
> 
> But ConfigurationOfBootstrap itself is not the problem I guess. Because it is 
> also only referencing the 
> "release3.2" version of Seaside and also 
> "ConfigurationOfSeaside3-JohanBrichau.323.mcz" is loaded.
> 
> 
> The Transcript shows the following error output:
> 
>  Loaded -> ConfigurationOfSeaside3-JohanBrichau.323 --- 
> http://smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main/ ---   
>  http://smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main/Error: Name 
> not found: Seaside-Pharo-Development
> 
> Also when you try to open the ConfigurationOfSeaside3 using Versionner I 
> receiver an error "Name not found: Seaside-Pharo-Development". 
> 
> So there must be something wrong with the Seaside config I thought - or (what 
> would be worse) with the newer Metacello 
> version included in Pharo 6. At least the config looks OK and in both 
> situations "ConfigurationOfSeaside3-JohanBrichau.323" is used.
> 
> Additionally I tried: 
> 
> - when I load the Bootstrap config in a fresh Pharo 5.0 image (50769) from 
> Catalog all loads fine. 
> - when I manipulate the Pharo 6 image to have a version 5 signature
>   SystemVersion newVersion: 'Pharo5.0'. SystemVersion  current inspect.
>   and load from catalog afterwards it also does not work. So I guess a Pharo 
> 5.x specific config rule could not be the cause.
> 
> 
> Now I checked how Catalog loads the configs. And in class CatalogProject you 
> will notice that for the catalog we still use Gofer for loading
> 
>   installStableVersion 
>   Gofer it 
>   url: self repositoryUrl;
>   configurationOf: self name;
>   loadStable
>
> when I change it to Metacello API
> 
>installStableVersion 
> Metacello new
>   repository: self repositoryUrl, '/',self name;
>   configuration: self name;
>   version: #'stable';
>   load
> 
> what a surprise: anything loads fine. I still wonder and do not know about 
> the difference why Gofer and Metacello loading in Pharo 6
> makes a difference now. 
> 
> So we could fix it for the catalog ... still I 

Re: [Pharo-users] Which is the best way of opening a PDF and HTML local files from Pharo

2017-02-24 Thread Offray Vladimir Luna Cárdenas

Thanks Hilaire.

I was thinking in something that depend on OSProcess and invoke xdg-open 
on Linux, for example, but is not working neither.


OSProcess command: 'xdg-open ', pdfPathString

doesn't open the PDF file :-/.

Cheers,

Offray


On 24/02/17 13:02, Hilaire wrote:

Oh, you can add your extension to the OSPlateform hierarchy.

So one your extensions added in the hierarchy, your code will use it
with an uniform:

OSPlateforme current openPdf: 'grafoscopio.pdf'


Le 24/02/2017 à 18:55, Hilaire a écrit :

But likely there is already something like that in the system but I
can't see.





Re: [Pharo-users] Which is the best way of opening a PDF and HTML local files from Pharo

2017-02-24 Thread Hilaire
Oh, you can add your extension to the OSPlateform hierarchy.

So one your extensions added in the hierarchy, your code will use it
with an uniform:

OSPlateforme current openPdf: 'grafoscopio.pdf'


Le 24/02/2017 à 18:55, Hilaire a écrit :
> But likely there is already something like that in the system but I
> can't see.

-- 
Dr. Geo
http://drgeo.eu




Re: [Pharo-users] Which is the best way of opening a PDF and HTML local files from Pharo

2017-02-24 Thread Hilaire
Hi Offray,

You may want to do it with a hierarchy of classes, one for each host, to
handle concretely the PDF and HTML OS viewer you want to use, and
another class to handle it uniformly.

For example MyOperation>>openPdf: aFile
then it will delegate to LinuxOperation/WindowsOperation/MacOperation
depending on the host running the VM.

That way you could add up more operation when needed.

But likely there is already something like that in the system but I
can't see.

Hilaire


Le 24/02/2017 à 02:11, Offray Vladimir Luna Cárdenas a écrit :
> 
> I'm trying to open some local files from Pharo. They're in PDF and HTML
> format. I thought that I could use WebBrowser, so it can delegate to the
> browser opening the files, without any other requirement, but is not
> working. There is a better way to open such files from several platforms?

-- 
Dr. Geo
http://drgeo.eu




[Pharo-users] Pharo days 2017 at Lille: block the dates 18/19 of May

2017-02-24 Thread stepharong

Dear Pharoers

I’m happy to tell you that we will organise a new edition of the PharoDays  
at Lille the 18 et 19 of May.


The program and registration will be announced soon.
The setup will be similar to the ones of previous editions: Little cool  
presentations and hacking/discussions sessions

and a great social event.

https://medium.com/concerning-pharo/pharo-days-2016-c52fe4d7caf#.mqurj6rvi

So reserve the dates.

S.

PS: for students, we got some sponsoring from inria and cristal and if you  
need support let us know.




Re: [Pharo-users] Crash in Athens

2017-02-24 Thread stepharong

Hi alex

can you try the fix of ronie and let us know if it makes roassal more  
stable?


Stef


Dear Alexander,

Sine the new FFI of Pharo, using Athens has become unreliable. This is a  
pity, but fixing this is not trivial at all (we have been trying for  
years).


What exactly are you doing with Athens?

Alexandre


On Feb 22, 2017, at 12:55 AM, Alexander Samoylovich  
 wrote:


Hello

I am writing graphic demo programs using Athens on Mac Sierra.
Time by time Pharo VM crashes. Programs not using Athens work reliably.
I believe the behavior is reproducible.
How should I report a bug?

Alex





--
Using Opera's mail client: http://www.opera.com/mail/



[Pharo-users] Grafoscopio User Manual: Early beta

2017-02-24 Thread Offray Vladimir Luna Cárdenas

Hi all,

I'm making a couple of articles for the JOSS[1], which, by the way is an 
interesting critic/hack to the anachronistic published paper on indexed 
journal[2], making visible the work of research who use mainly software 
as a medium to communicate and make research.


[1] http://joss.theoj.org/ 
[2] http://joss.theoj.org/about

JOSS proposes a pretty good structure for the companion readme file for 
the software. I started to write it, but I entered to some kind of 
"writing frenzy" and, after almost 40 pages(!), it ended in the English 
Grafoscopio User Manual:


http://mutabit.com/repos.fossil/grafoscopio/doc/tip/Docs/En/Books/Manual/manual.pdf 



Is the first text I write of such length in English, so any critic on 
typos, clarity or others are welcomed. Please see the "Community 
Guidelines" section, particularly "Report issues or problems", so I can 
follow and address the suggestions better.


I will be making some minor updates on the software and the manual to 
improve consistency (manual URL, remains the same, pointing to the last 
version).


Cheers,

Offray






[Pharo-users] [Pillar] Free beginners guide to Latex

2017-02-24 Thread Dimitris Chloupis
Pillar is the official documentation system of Pharo. It uses syntax
similar to markdown which make it simple and easy to learn. However Pillars
power and flexibility goes far beyond that because it leverages Latex ,
epecially for generating PDFs ( every PDF you have seen read for Pharo uses
Latex and Pillar, except a few that use only Latex) or using advanced
features like math notations , more precise image locations etc.

However can be tricky to learn, Packt publishing is a website that sells
online ebooks and videos , they also offer a free ebook each day. Today
they offer a free beginner guide for Latex. Offer expires in 9 hours and 45
minutes, so get it now that is free.

https://www.packtpub.com/packt/offers/free-learning


Re: [Pharo-users] [Verssioner] Committing changes -> "SubscriptOoutOfBounds: 1"

2017-02-24 Thread sergio ruiz
Hi, offray..

yes, this is exactly what i did..

thanks!


On February 24, 2017 at 7:53:58 AM, Offray Vladimir Luna Cárdenas 
(offray.l...@mutabit.com) wrote:

I'm using versionner right now (and was starting to understand it, so kind of 
sad to know it will be deprecated). The workaround I found to stop the 
"SubscriptOutOfBounds: 1" message was to commit from Monticello instead.



peace,
sergio
photographer, journalist, visionary

Public Key: http://bit.ly/29z9fG0
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
http://www.Village-Buzz.com
http://www.ThoseOptimizeGuys.com
http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101

signature.asc
Description: Message signed with OpenPGP using AMPGpg


Re: [Pharo-users] [Verssioner] Committing changes -> "SubscriptOoutOfBounds: 1"

2017-02-24 Thread sergio ruiz
I am using pharo 5..

oh! is there a way i can start using the git versioner now?

thanks!


On February 24, 2017 at 7:53:58 AM, Offray Vladimir Luna Cárdenas 
(offray.l...@mutabit.com) wrote:

in which verison of pharo are you?
Yes versionner will be deprecated because we are migrating to git and it has 
some glitches. 

peace,
sergio
photographer, journalist, visionary

Public Key: http://bit.ly/29z9fG0
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
http://www.Village-Buzz.com
http://www.ThoseOptimizeGuys.com
http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101

signature.asc
Description: Message signed with OpenPGP using AMPGpg


Re: [Pharo-users] [Verssioner] Committing changes -> "SubscriptOoutOfBounds: 1"

2017-02-24 Thread Offray Vladimir Luna Cárdenas

Hi,


On 24/02/17 02:39, stepharong wrote:
On Fri, 24 Feb 2017 00:32:15 +0100, Offray Vladimir Luna Cárdenas 
 wrote:


Hi Sergio,

I'm using versionner right now (and was starting to understand it,
so kind of sad to know it will be deprecated).

But we will develop something that manages projects :)
because this is really needed.
Now if you have some bug fixes we will integrate them.



Glad to know :-). I don't have any bug fix, just a workaround: using 
versioner for initial config, and monticello for commiting (that's where 
the "SubscriptOutOfBounds: 1" bug is showed).


Cheers,

Offray