[Pharo-users] Pharo3 for Debian

2014-05-05 Thread Bernat Romagosa
Hi list,

I'm afraid the vm shipped in the latest stable Pharo version is not working
for Debian. Neither is the latest VM downloadable from the project page or
the latest of the versions downloadable from the file server. This is the
error I get:

(...)/pharo3.0/bin/pharo: /lib/i386-linux-gnu/i686/cmov/libc.so.6: version
`GLIBC_2.15' not found (required by (...)/pharo3.0/bin/pharo)


So I'm currently using an older VM to work with Pharo3.0 on Debian:

NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.18 uuid:
a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013
NBCogit NativeBoost-CogPlugin-EstebanLorenzano.18 uuid:
a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013
git://gitorious.org/cogvm/blessed.git Commit:
412abef33cbed05cf1d75329e451d71c0c6aa5a7 Date: 2013-03-13 17:48:50 +0100
By: Esteban Lorenzano  Jenkins build #14535


I've tried the latest Pharo3 package under Ubuntu in another box and it
works perfectly, so I guess the official VMs are compiled for Ubuntu. Maybe
it'd be good to specify this in the project page and provide a package with
the VM compiled for other linuxes?

Cheers!

Bernat.

-- 
Bernat Romagosa.


Re: [Pharo-users] Pharo3 for Debian

2014-05-05 Thread p...@highoctane.be
This is how I have the VM working on Debian.

http://philippeback.be/2014/02/pharovm-now-running-on-debian-wheezy/

HTH
Phil

On Mon, May 5, 2014 at 10:30 AM, Bernat Romagosa <
tibabenfortlapala...@gmail.com> wrote:

> Hi list,
>
> I'm afraid the vm shipped in the latest stable Pharo version is not
> working for Debian. Neither is the latest VM downloadable from the project
> page or the latest of the versions downloadable from the file server. This
> is the error I get:
>
> (...)/pharo3.0/bin/pharo: /lib/i386-linux-gnu/i686/cmov/libc.so.6: version
> `GLIBC_2.15' not found (required by (...)/pharo3.0/bin/pharo)
>
>
> So I'm currently using an older VM to work with Pharo3.0 on Debian:
>
>  NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.18 uuid:
> a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013
> NBCogit NativeBoost-CogPlugin-EstebanLorenzano.18 uuid:
> a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013
> git://gitorious.org/cogvm/blessed.git Commit:
> 412abef33cbed05cf1d75329e451d71c0c6aa5a7 Date: 2013-03-13 17:48:50 +0100
> By: Esteban Lorenzano  Jenkins build #14535
>
>
> I've tried the latest Pharo3 package under Ubuntu in another box and it
> works perfectly, so I guess the official VMs are compiled for Ubuntu. Maybe
> it'd be good to specify this in the project page and provide a package with
> the VM compiled for other linuxes?
>
> Cheers!
>
> Bernat.
>
> --
> Bernat Romagosa.
>


Re: [Pharo-users] Pharo3 for Debian

2014-05-05 Thread peter yoo
you needed then can using old version vm.

im using old version cogvm. but can use.


[Pharo-users] Zeroconf scripts updated

2014-05-05 Thread Esteban Lorenzano
Hi, 

I updated stable releases of Zeroconf to download Pharo3. 

cheers, 
Esteban



[Pharo-users] XMLOrderedList Concantenation

2014-05-05 Thread Thushar G R
Hi,

I am getting an error while doing this.

a := XMLOrderedList new.
a add:'1'.
a , XMLOrderedList new.

Thanks,

Thushar


Re: [Pharo-users] Pharo3 for Debian

2014-05-05 Thread Sergi Reyner
2014-05-05 11:06 GMT+01:00 p...@highoctane.be :

> This is how I have the VM working on Debian.
>
> http://philippeback.be/2014/02/pharovm-now-running-on-debian-wheezy/
>

Mixing in packages from experimental is always a nice thing to do... not.

Cheers,
Sergi


Re: [Pharo-users] XMLOrderedList Concantenation

2014-05-05 Thread Ben Coman

Thushar G R wrote:

Hi,

I am getting an error while doing this.

a := XMLOrderedList new.
a add:'1'.
a , XMLOrderedList new.

Thanks,

Thushar
I could give you "an answer" ;) - but it would be what you wanted.  It 
would help if you told what the error was, where it occurs (which of the 
three lines), and what you expect each line is doing (especially the 
third line).


Also I don't see XMLOrderedList in the default Pharo image, so it would 
help if you describe where you got that from and how you installed it.


cheers -ben



Re: [Pharo-users] Pharo3 for Debian

2014-05-05 Thread p...@highoctane.be
Indeed.

That's why I am using CentOS6 for my production :-)

Phil

On Mon, May 5, 2014 at 2:12 PM, Sergi Reyner  wrote:

> 2014-05-05 11:06 GMT+01:00 p...@highoctane.be :
>
>> This is how I have the VM working on Debian.
>>
>> http://philippeback.be/2014/02/pharovm-now-running-on-debian-wheezy/
>>
>
> Mixing in packages from experimental is always a nice thing to do... not.
>
> Cheers,
> Sergi
>


Re: [Pharo-users] XMLOrderedList Concantenation

2014-05-05 Thread Thushar G R
XMLOrderedList belongs to package XML-Parser-Nodes.

a := XMLOrderedList new.
a add:'1'.
a , XMLOrderedList new.

Here select all and Do it. On line 3 (a , XMLOrderedList new.)  i am
expected to get a copy of 'a' , but instead it throws an error
SubscriptOutOfBounds.




OrderedCollection(Object)>>errorSubscriptBounds:
OrderedCollection>>ensureBoundsFrom:to:
OrderedCollection>>at:put:
OrderedCollection(SequenceableCollection)>>replaceFrom:to:with:startingAt:
XMLOrderedList>>replaceFrom:to:with:startingAt:
XMLOrderedList(SequenceableCollection)>>copyReplaceFrom:to:with:
XMLOrderedList(SequenceableCollection)>>,
UndefinedObject>>DoIt
OpalCompiler>>evaluate
SmalltalkEditor>>evaluateSelectionAndDo:
PluggableTextMorph>>inspectIt in Block: [ textMorph editor
evaluateSelectionAndDo: [ :resu...etc...
PluggableTextMorph>>handleEdit: in Block: [ result := editBlock value ]
TextMorphForEditView(TextMorph)>>handleEdit:
PluggableTextMorph>>handleEdit:
PluggableTextMorph>>inspectIt
SmalltalkEditor class>>buildSmalltalkEditorKeymappingsOn: in Block: [
:morph | morph inspectIt ]
BlockClosure>>cull:
BlockClosure>>cull:cull:
BlockClosure>>cull:cull:cull:
KMCategoryBinding>>completeMatch:buffer:
KMKeymap>>notifyCompleteMatchTo:buffer: in Block: [ :l | l completeMatch:
self buffer: aBuffer ]
Array(SequenceableCollection)>>do:
KMKeymap>>notifyCompleteMatchTo:buffer:
KMKeymap>>onMatchWith:notify:andDo:
KMCategory>>onMatchWith:notify:andDo: in Block: [ :entry | entry
onMatchWith: anEventBuffer notify...etc...
Set>>do:
KMCategory>>onMatchWith:notify:andDo:
KMCategoryBinding>>verifyMatchWith:notifying:thenDoing:
KMDispatcher>>dispatch: in Block: [ :aTarget | ...
OrderedCollection>>do:


Plese refer to the above stack.

Thanks in advance.

thushar

*G R Thushar*
*Team Leader(Technology),*
*Signos Software Solutions Pvt. Ltd.*
*Ground Floor **A.R Plaza, TC 11/43 (2),*
*P.M.G Junction,*
*Thiruvananthapuram, 695004. Kerala, India.*

*Web: www.signossolutions.com *
Email: thushar...@signossolutions.com, thushar...@gmail.com
Phone: +91984652





On Mon, May 5, 2014 at 6:28 PM, Ben Coman  wrote:

> Thushar G R wrote:
>
>> Hi,
>>
>> I am getting an error while doing this.
>>
>> a := XMLOrderedList new.
>> a add:'1'.
>> a , XMLOrderedList new.
>>
>> Thanks,
>>
>> Thushar
>>
> I could give you "an answer" ;) - but it would be what you wanted.  It
> would help if you told what the error was, where it occurs (which of the
> three lines), and what you expect each line is doing (especially the third
> line).
>
> Also I don't see XMLOrderedList in the default Pharo image, so it would
> help if you describe where you got that from and how you installed it.
>
> cheers -ben
>
>


[Pharo-users] No sources files on http://pharo.org/download

2014-05-05 Thread Johan Fabry
Hi all,

looking at the http://pharo.org/download page, I do not find a download link 
for the sources. There’s the one-click, the image, and the vm’s but not a link 
to the sources. Similiarly, in http://files.pharo.org or 
http://files.pharo.org/image/ I cannot find the sources.


---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile




Re: [Pharo-users] No sources files on http://pharo.org/download

2014-05-05 Thread Sven Van Caekenberghe
In http://files.pharo.org/sources/ you can find

  http://files.pharo.org/sources/PharoV30.sources
  http://files.pharo.org/sources/PharoV30.sources.zip

And if you use a very recent VM you get them for free ;-)

On 05 May 2014, at 18:49, Johan Fabry  wrote:

> Hi all,
> 
> looking at the http://pharo.org/download page, I do not find a download link 
> for the sources. There’s the one-click, the image, and the vm’s but not a 
> link to the sources. Similiarly, in http://files.pharo.org or 
> http://files.pharo.org/image/ I cannot find the sources.
> 
> 
> ---> Save our in-boxes! http://emailcharter.org <---
> 
> Johan Fabry   -   http://pleiad.cl/~jfabry
> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
> 
> 




Re: [Pharo-users] XMLOrderedList Concantenation

2014-05-05 Thread Ben Coman





Thanks. That info made it much easier to try.  Sorry I didn't end up
with an answer for you, but I confirm there is some issue here, or
something new I can learn when other chip in. 

Here is what I tried.

* Installed XMLParser (monty.58) from Configuration Browser in Pharo 3.

* Ran your code. Got the same error.

* From the call stack I observed that
XMLOrderedCollection(SequenceableCollection)>>copyReplaceFrom:to:with:
has the line "newSequenceableCollection := self species new: newSize."
such that it seems your error might be reduced to the question of why
the following two snippets fail:
    d := OrderedCollection new: 1.
    d at: 1 put: 1.

    e := OrderedCollection new: 3.
    e at: 2 put: 1.

However I'm sorry that is beyond my knowledge, and I'm hoping someone
else can chip in so I can learn something.

Pushing on, I noticed that XMLOrderedList has an instance variable
/collection/ which holds the OrderedCollection.

Now I wonder (without great experience and hoping to learn something)
if it smells funny that XMLOrderedList inherits all of
SequencableCollection methods that can not operate on /collection/. 

I noticed that XMLOrderedList was using an
inherited SequenceableCollection>>copyReplaceFrom:to:with 
while OrderedCollection overrode that method with its own. So taking
inspiration XMLOrderedList>>copyFrom:to: to override
SequencableCollection>>copyReplaceFrom:to:with: to work with
/collection/
seems to solve your problem:
    XMLOrderedList>>copyReplaceFrom: start to: stop with:
replacementCollection 
    ^ self newWithCollection:
        (collection copyReplaceFrom: start to: stop with:
replacementCollection )


Along the way I noticed a few (possible) bugs that seems not related to
your problem:

* When stepping through XMLOrderedList>>setCollection:
there is a red-box-of-death for the instance variables, which can be
solved by defining the following.
    XMLOrderedList>>size
    ^ collection ifNil: [ 0 ] ifNotNil: [ collection size]

* In the debugger the /collection/ instance variable is not shown!
(e.g. line XMLOrderedList>>at:put:). 
Can someone confirm this should show?

HTH
cheers -ben

Thushar G R wrote:

  XMLOrderedList belongs
to package XML-Parser-Nodes.
  
  
  a
:= XMLOrderedList new.
  a
add:'1'.
  a ,
XMLOrderedList new.
  
  
  Here
select all and Do it. On line 3 (a ,
XMLOrderedList new.)  i am
expected to get a copy of 'a' , but instead it throws an error SubscriptOutOfBounds. 
  
  
  
  
  
  
  
  
  
  OrderedCollection(Object)>>errorSubscriptBounds:
  OrderedCollection>>ensureBoundsFrom:to:
  OrderedCollection>>at:put:
  OrderedCollection(SequenceableCollection)>>replaceFrom:to:with:startingAt:
  XMLOrderedList>>replaceFrom:to:with:startingAt:
  XMLOrderedList(SequenceableCollection)>>copyReplaceFrom:to:with:
  XMLOrderedList(SequenceableCollection)>>,
  UndefinedObject>>DoIt
  OpalCompiler>>evaluate
  SmalltalkEditor>>evaluateSelectionAndDo:
  PluggableTextMorph>>inspectIt in Block: [ textMorph editor
evaluateSelectionAndDo: [ :resu...etc...
  PluggableTextMorph>>handleEdit: in Block: [ result :=
editBlock value ]
  TextMorphForEditView(TextMorph)>>handleEdit:
  PluggableTextMorph>>handleEdit:
  PluggableTextMorph>>inspectIt
  SmalltalkEditor class>>buildSmalltalkEditorKeymappingsOn:
in Block: [ :morph | morph inspectIt ]
  BlockClosure>>cull:
  BlockClosure>>cull:cull:
  BlockClosure>>cull:cull:cull:
  KMCategoryBinding>>completeMatch:buffer:
  KMKeymap>>notifyCompleteMatchTo:buffer: in Block: [ :l | l
completeMatch: self buffer: aBuffer ]
  Array(SequenceableCollection)>>do:
  KMKeymap>>notifyCompleteMatchTo:buffer:
  KMKeymap>>onMatchWith:notify:andDo:
  KMCategory>>onMatchWith:notify:andDo: in Block: [ :entry |
entry onMatchWith: anEventBuffer notify...etc...
  Set>>do:
  KMCategory>>onMatchWith:notify:andDo:
  KMCategoryBinding>>verifyMatchWith:notifying:thenDoing:
  KMDispatcher>>dispatch: in Block: [ :aTarget | ...
  OrderedCollection>>do:
  
  
  
  
  Plese refer to the above stack.
  
  
  Thanks in advance.
  
  
  thushar
  
  
  
  
  On Mon, May 5, 2014 at 6:28 PM, Ben Coman 
wrote:
  

Thushar G R wrote:

Hi,
  
I am getting an error while doing this.
  
a := XMLOrderedList new.
a add:'1'.
a , XMLOrderedList new.
  
Thanks,
  
Thushar



I could give you "an answer" ;) - but it would be what you wanted.  It
would help if you told what the error was, where it occurs (which of
the three lines), and what you expect each line is doing (especially
the third line).

Also I don't see XMLOrderedList in the default Pharo image, so it would
help if you describe where you got that from and how you installed it.

cheers -ben

  
  
  
  








[Pharo-users] compiling Pillar files locally (for LaserGame book)

2014-05-05 Thread Ben Coman


I've haven't been able to find any instructions on how to compile Pillar 
files locally. Any pointers? 


Is TEXLive required for the PDF compilation?
Maybe the setup I reported [1] for PBE1 on Windows would be similar?
However I now have access to a Mavericks machine.  Would that be a 
better option?  What tools would you use to edit with ? (this is my 
first Mac - something to google for would be useful)


I see that [2] runs  ./download.sh
so perhaps that is all that is required in this case for the LaserGame book?

[1] http://blog.openinworld.com/2012/05/contributing-to-pbe/ regarding
[2] 
https://ci.inria.fr/pharo-contribution/job/PharoLaserGame/lastSuccessfulBuild/console


cheers -ben




Re: [Pharo-users] compiling Pillar files locally (for LaserGame book)

2014-05-05 Thread Ignacio Sniechowski
Ben,
1) Yes, it is possible. You could check the compile.sh script that is in
the PharoForTheEnterprise repository in GitHub. It does exactly that.
2) Yes you have to have TEXLive installed.
3) If you install it on Mavericks check the paths. TexLive now install into
a weird location and you should add that location to your path or else
you'll get an error.
4) To edit pillar text I use TextMate with Uko's bundle.
best
Nacho


*Lic. Ignacio Sniechowski, MBA*






On Mon, May 5, 2014 at 2:42 PM, Ben Coman  wrote:

>
> I've haven't been able to find any instructions on how to compile Pillar
> files locally. Any pointers?
> Is TEXLive required for the PDF compilation?
> Maybe the setup I reported [1] for PBE1 on Windows would be similar?
> However I now have access to a Mavericks machine.  Would that be a better
> option?  What tools would you use to edit with ? (this is my first Mac -
> something to google for would be useful)
>
> I see that [2] runs  ./download.sh
> so perhaps that is all that is required in this case for the LaserGame
> book?
>
> [1] http://blog.openinworld.com/2012/05/contributing-to-pbe/ regarding
> [2] https://ci.inria.fr/pharo-contribution/job/PharoLaserGame/
> lastSuccessfulBuild/console
>
> cheers -ben
>
>
>


Re: [Pharo-users] No sources files on http://pharo.org/download

2014-05-05 Thread Johan Fabry

Ok thanks! Maybe it would be worthwhile to point that out on the webpage ...

On May 5, 2014, at 1:04 PM, Sven Van Caekenberghe  wrote:

> In http://files.pharo.org/sources/ you can find
> 
>  http://files.pharo.org/sources/PharoV30.sources
>  http://files.pharo.org/sources/PharoV30.sources.zip
> 
> And if you use a very recent VM you get them for free ;-)
> 
> On 05 May 2014, at 18:49, Johan Fabry  wrote:
> 
>> Hi all,
>> 
>> looking at the http://pharo.org/download page, I do not find a download link 
>> for the sources. There’s the one-click, the image, and the vm’s but not a 
>> link to the sources. Similiarly, in http://files.pharo.org or 
>> http://files.pharo.org/image/ I cannot find the sources.
>> 
>> 
>> ---> Save our in-boxes! http://emailcharter.org <---
>> 
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>> 
>> 
> 
> 
> 



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile




Re: [Pharo-users] No sources files on http://pharo.org/download

2014-05-05 Thread Johan Fabry

About the VM download including the sources, that’s apparently not the case. 
The mac vm download yields only an .app file and dragging an image to the .app 
pops up the no sources notification. (Pharo cannot locate the sources file 
named 
/Users/jfabry/Research/Pharo/Pharo-3.0/Pharo-Image-3.0-latest/PharoV30.sources.)

On May 5, 2014, at 1:04 PM, Sven Van Caekenberghe  wrote:

> In http://files.pharo.org/sources/ you can find
> 
>  http://files.pharo.org/sources/PharoV30.sources
>  http://files.pharo.org/sources/PharoV30.sources.zip
> 
> And if you use a very recent VM you get them for free ;-)
> 
> On 05 May 2014, at 18:49, Johan Fabry  wrote:
> 
>> Hi all,
>> 
>> looking at the http://pharo.org/download page, I do not find a download link 
>> for the sources. There’s the one-click, the image, and the vm’s but not a 
>> link to the sources. Similiarly, in http://files.pharo.org or 
>> http://files.pharo.org/image/ I cannot find the sources.
>> 
>> 
>> ---> Save our in-boxes! http://emailcharter.org <---
>> 
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>> 
>> 
> 
> 
> 



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile




Re: [Pharo-users] No sources files on http://pharo.org/download

2014-05-05 Thread Sergi Reyner
Use the setting, Luke? That works for me.

Cheers,
Sergi


2014-05-05 19:28 GMT+01:00 Johan Fabry :

>
> About the VM download including the sources, that’s apparently not the
> case. The mac vm download yields only an .app file and dragging an image to
> the .app pops up the no sources notification. (Pharo cannot locate the
> sources file named
> /Users/jfabry/Research/Pharo/Pharo-3.0/Pharo-Image-3.0-latest/PharoV30.sources.)
>
> On May 5, 2014, at 1:04 PM, Sven Van Caekenberghe  wrote:
>
> > In http://files.pharo.org/sources/ you can find
> >
> >  http://files.pharo.org/sources/PharoV30.sources
> >  http://files.pharo.org/sources/PharoV30.sources.zip
> >
> > And if you use a very recent VM you get them for free ;-)
> >
> > On 05 May 2014, at 18:49, Johan Fabry  wrote:
> >
> >> Hi all,
> >>
> >> looking at the http://pharo.org/download page, I do not find a
> download link for the sources. There’s the one-click, the image, and the
> vm’s but not a link to the sources. Similiarly, in http://files.pharo.orgor
> http://files.pharo.org/image/ I cannot find the sources.
> >>
> >>
> >> ---> Save our in-boxes! http://emailcharter.org <---
> >>
> >> Johan Fabry   -   http://pleiad.cl/~jfabry
> >> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
> >>
> >>
> >
> >
> >
>
>
>
> ---> Save our in-boxes! http://emailcharter.org <---
>
> Johan Fabry   -   http://pleiad.cl/~jfabry
> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>
>
>


Re: [Pharo-users] No sources files on http://pharo.org/download

2014-05-05 Thread Sven Van Caekenberghe
I was referring to the zero-config one:

$ curl get.pharo.org/vm | bash
[...]

$ ls pharo-vm
Pharo.app   PharoV20.sources__MACOSX
PharoV10.sourcesPharoV30.sources

But they should be in the other ones as well.

On 05 May 2014, at 20:28, Johan Fabry  wrote:

> 
> About the VM download including the sources, that’s apparently not the case. 
> The mac vm download yields only an .app file and dragging an image to the 
> .app pops up the no sources notification. (Pharo cannot locate the sources 
> file named 
> /Users/jfabry/Research/Pharo/Pharo-3.0/Pharo-Image-3.0-latest/PharoV30.sources.)
> 
> On May 5, 2014, at 1:04 PM, Sven Van Caekenberghe  wrote:
> 
>> In http://files.pharo.org/sources/ you can find
>> 
>> http://files.pharo.org/sources/PharoV30.sources
>> http://files.pharo.org/sources/PharoV30.sources.zip
>> 
>> And if you use a very recent VM you get them for free ;-)
>> 
>> On 05 May 2014, at 18:49, Johan Fabry  wrote:
>> 
>>> Hi all,
>>> 
>>> looking at the http://pharo.org/download page, I do not find a download 
>>> link for the sources. There’s the one-click, the image, and the vm’s but 
>>> not a link to the sources. Similiarly, in http://files.pharo.org or 
>>> http://files.pharo.org/image/ I cannot find the sources.
>>> 
>>> 
>>> ---> Save our in-boxes! http://emailcharter.org <---
>>> 
>>> Johan Fabry   -   http://pleiad.cl/~jfabry
>>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>> 
>>> 
>> 
>> 
>> 
> 
> 
> 
> ---> Save our in-boxes! http://emailcharter.org <---
> 
> Johan Fabry   -   http://pleiad.cl/~jfabry
> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
> 
> 




Re: [Pharo-users] XMLOrderedList Concantenation

2014-05-05 Thread Nicolai Hess
2014-05-05 19:13 GMT+02:00 Ben Coman :

>
> Thanks. That info made it much easier to try.  Sorry I didn't end up with
> an answer for you, but I confirm there is some issue here, or something new
> I can learn when other chip in.
>
> Here is what I tried.
>
> * Installed XMLParser (monty.58) from Configuration Browser in Pharo 3.
>
> * Ran your code. Got the same error.
>
> * From the call stack I observed that
> XMLOrderedCollection(SequenceableCollection)>>copyReplaceFrom:to:with:
> has the line "newSequenceableCollection := self species new: newSize."
> such that it seems your error might be reduced to the question of why the
> following two snippets fail:
> d := OrderedCollection new: 1.
> d at: 1 put: 1.
>
> e := OrderedCollection new: 3.
> e at: 2 put: 1.
>
> However I'm sorry that is beyond my knowledge, and I'm hoping someone else
> can chip in so I can learn something.
>
> Pushing on, I noticed that XMLOrderedList has an instance variable
> /collection/ which holds the OrderedCollection.
>
> Now I wonder (without great experience and hoping to learn something) if
> it smells funny that XMLOrderedList inherits all of SequencableCollection
> methods that can not operate on /collection/.
>
> I noticed that XMLOrderedList was using an inherited
> SequenceableCollection>>copyReplaceFrom:to:with
> while OrderedCollection overrode that method with its own. So taking
> inspiration XMLOrderedList>>copyFrom:to: to override
> SequencableCollection>>copyReplaceFrom:to:with: to work with /collection/
> seems to solve your problem:
> XMLOrderedList>>copyReplaceFrom: start to: stop with:
> replacementCollection
> ^ self newWithCollection:
> (collection copyReplaceFrom: start to: stop with:
> replacementCollection )
>
>
> Along the way I noticed a few (possible) bugs that seems not related to
> your problem:
>
> * When stepping through XMLOrderedList>>setCollection:
> there is a red-box-of-death for the instance variables, which can be
> solved by defining the following.
> XMLOrderedList>>size
> ^ collection ifNil: [ 0 ] ifNotNil: [ collection size]
>
> * In the debugger the /collection/ instance variable is not shown! (e.g.
> line XMLOrderedList>>at:put:).
> Can someone confirm this should show?
>


I think this is the default Collection inspector (EyeCollectionInspector).
Debugging
a OrderedCollection behaves the same, the debugger does not show the array
and index
instvars.

nicolai



> HTH
> cheers -ben
>
> Thushar G R wrote:
>
> XMLOrderedList belongs to package XML-Parser-Nodes.
>
>  a := XMLOrderedList new.
> a add:'1'.
> a , XMLOrderedList new.
>
>  Here select all and Do it. On line 3 (a , XMLOrderedList new.)  i am
> expected to get a copy of 'a' , but instead it throws an error
> SubscriptOutOfBounds.
>
>
>
>
>  OrderedCollection(Object)>>errorSubscriptBounds:
> OrderedCollection>>ensureBoundsFrom:to:
> OrderedCollection>>at:put:
> OrderedCollection(SequenceableCollection)>>replaceFrom:to:with:startingAt:
> XMLOrderedList>>replaceFrom:to:with:startingAt:
> XMLOrderedList(SequenceableCollection)>>copyReplaceFrom:to:with:
> XMLOrderedList(SequenceableCollection)>>,
> UndefinedObject>>DoIt
> OpalCompiler>>evaluate
> SmalltalkEditor>>evaluateSelectionAndDo:
> PluggableTextMorph>>inspectIt in Block: [ textMorph editor
> evaluateSelectionAndDo: [ :resu...etc...
> PluggableTextMorph>>handleEdit: in Block: [ result := editBlock value ]
> TextMorphForEditView(TextMorph)>>handleEdit:
> PluggableTextMorph>>handleEdit:
> PluggableTextMorph>>inspectIt
> SmalltalkEditor class>>buildSmalltalkEditorKeymappingsOn: in Block: [
> :morph | morph inspectIt ]
> BlockClosure>>cull:
> BlockClosure>>cull:cull:
> BlockClosure>>cull:cull:cull:
> KMCategoryBinding>>completeMatch:buffer:
> KMKeymap>>notifyCompleteMatchTo:buffer: in Block: [ :l | l completeMatch:
> self buffer: aBuffer ]
> Array(SequenceableCollection)>>do:
> KMKeymap>>notifyCompleteMatchTo:buffer:
> KMKeymap>>onMatchWith:notify:andDo:
> KMCategory>>onMatchWith:notify:andDo: in Block: [ :entry | entry
> onMatchWith: anEventBuffer notify...etc...
> Set>>do:
> KMCategory>>onMatchWith:notify:andDo:
> KMCategoryBinding>>verifyMatchWith:notifying:thenDoing:
> KMDispatcher>>dispatch: in Block: [ :aTarget | ...
> OrderedCollection>>do:
>
>
>  Plese refer to the above stack.
>
>  Thanks in advance.
>
>  thushar
>
>
> On Mon, May 5, 2014 at 6:28 PM, Ben Coman  wrote:
>
>>  Thushar G R wrote:
>>
>>> Hi,
>>>
>>> I am getting an error while doing this.
>>>
>>> a := XMLOrderedList new.
>>> a add:'1'.
>>> a , XMLOrderedList new.
>>>
>>> Thanks,
>>>
>>> Thushar
>>>
>>  I could give you "an answer" ;) - but it would be what you wanted.  It
>> would help if you told what the error was, where it occurs (which of the
>> three lines), and what you expect each line is doing (especially the third
>> line).
>>
>> Also I don't see XMLOrderedList in the default Pharo image, so it would
>> help if you describe where you got that from and 

Re: [Pharo-users] XMLOrderedList Concantenation

2014-05-05 Thread Sven Van Caekenberghe
The EyeCollectionInspector show the 'collection view' (what enumeration does), 
the EyeBasicInspector shows the actual instance variables as well as the 
variable part (and thus allows a look inside). That is why there are multiple 
views.

On 05 May 2014, at 23:50, Nicolai Hess  wrote:

> 2014-05-05 19:13 GMT+02:00 Ben Coman :
> 
> Thanks. That info made it much easier to try.  Sorry I didn't end up with an 
> answer for you, but I confirm there is some issue here, or something new I 
> can learn when other chip in. 
> 
> Here is what I tried.
> 
> * Installed XMLParser (monty.58) from Configuration Browser in Pharo 3.
> 
> * Ran your code. Got the same error.
> 
> * From the call stack I observed that 
> XMLOrderedCollection(SequenceableCollection)>>copyReplaceFrom:to:with:
> has the line "newSequenceableCollection := self species new: newSize." such 
> that it seems your error might be reduced to the question of why the 
> following two snippets fail:
> d := OrderedCollection new: 1.
> d at: 1 put: 1.
> 
> e := OrderedCollection new: 3.
> e at: 2 put: 1.
> 
> However I'm sorry that is beyond my knowledge, and I'm hoping someone else 
> can chip in so I can learn something.
> 
> Pushing on, I noticed that XMLOrderedList has an instance variable 
> /collection/ which holds the OrderedCollection.
> 
> Now I wonder (without great experience and hoping to learn something) if it 
> smells funny that XMLOrderedList inherits all of SequencableCollection 
> methods that can not operate on /collection/. 
> 
> I noticed that XMLOrderedList was using an inherited 
> SequenceableCollection>>copyReplaceFrom:to:with 
> while OrderedCollection overrode that method with its own. So taking 
> inspiration XMLOrderedList>>copyFrom:to: to override 
> SequencableCollection>>copyReplaceFrom:to:with: to work with /collection/
> seems to solve your problem:
> XMLOrderedList>>copyReplaceFrom: start to: stop with: 
> replacementCollection 
> ^ self newWithCollection:
> (collection copyReplaceFrom: start to: stop with: 
> replacementCollection )
> 
> 
> Along the way I noticed a few (possible) bugs that seems not related to your 
> problem:
> 
> * When stepping through XMLOrderedList>>setCollection:
> there is a red-box-of-death for the instance variables, which can be solved 
> by defining the following.
> XMLOrderedList>>size
> ^ collection ifNil: [ 0 ] ifNotNil: [ collection size]
> 
> * In the debugger the /collection/ instance variable is not shown! (e.g. line 
> XMLOrderedList>>at:put:). 
> Can someone confirm this should show?
> 
> 
> I think this is the default Collection inspector (EyeCollectionInspector). 
> Debugging
> a OrderedCollection behaves the same, the debugger does not show the array 
> and index
> instvars.
> 
> nicolai
> 
> 
> 
> HTH
> cheers -ben
> 
> Thushar G R wrote:
>> XMLOrderedList belongs to package XML-Parser-Nodes.
>> 
>> a := XMLOrderedList new.
>> a add:'1'.
>> a , XMLOrderedList new.
>> 
>> Here select all and Do it. On line 3 (a , XMLOrderedList new.)  i am 
>> expected to get a copy of 'a' , but instead it throws an error 
>> SubscriptOutOfBounds. 
>> 
>> 
>> 
>> 
>> OrderedCollection(Object)>>errorSubscriptBounds:
>> OrderedCollection>>ensureBoundsFrom:to:
>> OrderedCollection>>at:put:
>> OrderedCollection(SequenceableCollection)>>replaceFrom:to:with:startingAt:
>> XMLOrderedList>>replaceFrom:to:with:startingAt:
>> XMLOrderedList(SequenceableCollection)>>copyReplaceFrom:to:with:
>> XMLOrderedList(SequenceableCollection)>>,
>> UndefinedObject>>DoIt
>> OpalCompiler>>evaluate
>> SmalltalkEditor>>evaluateSelectionAndDo:
>> PluggableTextMorph>>inspectIt in Block: [ textMorph editor 
>> evaluateSelectionAndDo: [ :resu...etc...
>> PluggableTextMorph>>handleEdit: in Block: [ result := editBlock value ]
>> TextMorphForEditView(TextMorph)>>handleEdit:
>> PluggableTextMorph>>handleEdit:
>> PluggableTextMorph>>inspectIt
>> SmalltalkEditor class>>buildSmalltalkEditorKeymappingsOn: in Block: [ :morph 
>> | morph inspectIt ]
>> BlockClosure>>cull:
>> BlockClosure>>cull:cull:
>> BlockClosure>>cull:cull:cull:
>> KMCategoryBinding>>completeMatch:buffer:
>> KMKeymap>>notifyCompleteMatchTo:buffer: in Block: [ :l | l completeMatch: 
>> self buffer: aBuffer ]
>> Array(SequenceableCollection)>>do:
>> KMKeymap>>notifyCompleteMatchTo:buffer:
>> KMKeymap>>onMatchWith:notify:andDo:
>> KMCategory>>onMatchWith:notify:andDo: in Block: [ :entry | entry 
>> onMatchWith: anEventBuffer notify...etc...
>> Set>>do:
>> KMCategory>>onMatchWith:notify:andDo:
>> KMCategoryBinding>>verifyMatchWith:notifying:thenDoing:
>> KMDispatcher>>dispatch: in Block: [ :aTarget | ...
>> OrderedCollection>>do:
>> 
>> 
>> Plese refer to the above stack.
>> 
>> Thanks in advance.
>> 
>> thushar
>> 
>> 
>> On Mon, May 5, 2014 at 6:28 PM, Ben Coman  wrote:
>> Thushar G R wrote:
>> Hi,
>> 
>> I am getting an error while doing this.
>> 
>> a := XMLOrderedList new.
>> a add:'1'.
>> a , XMLOrderedList ne

[Pharo-users] Spec Tabs : how to remove proramatically a tab ?

2014-05-05 Thread Glenn Cavarlé
Hi,

I try to use Tabs with Spec and i would like to remove a tab from the
TabManagerModel but it doesn't work.
TabManagerModel has a method named #removeTab: which call directly its
adapter but the MorphicTabManagerAdapter hasn't the method #removeTab: ...
I looked at the TabManager class and its the same, no method to remove a
tab.

A small example I would like to do :


The only solution (or rather a hack) i found it's to add an extension like
that:

anyone have a clue to do that nicer?

And other mistery, why the tabBar is removed when the last tab is closed ?


If someone can enlighten me.

Regards,



-
Glenn Cavarlé
--
View this message in context: 
http://forum.world.st/Spec-Tabs-how-to-remove-proramatically-a-tab-tp4758004.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] XMLOrderedList Concantenation

2014-05-05 Thread Carlo
Hi

The problem seems to be due to the use of an internal collection class of 
OrderedCollection which has restrictions on use of #at:put:. This means that 
certain methods will have to delegate to the internal collection class to be 
’safe’; in this scenario it is the XMLOrderedList >>copyReplaceFrom:to:with:

I don’t have write access to the 
http://www.smalltalkhub.com/#!/~PharoExtras/XMLParser/ project but here is a 
unit test and code change that seems to work.

Cheers
Carlo

XMLOrderedListTest>>testConcatenation
| anXmlOrderedList expectedConcatenationResult |
expectedConcatenationResult := XMLOrderedList new add: '1'; yourself.
self
shouldnt: [ anXmlOrderedList := expectedConcatenationResult , 
XMLOrderedList new ]
raise: SubscriptOutOfBounds
description:
'Expect that concatenation does not fail even though 
internal collection class of XMLOrderedList is an OrderedCollection. See 
comment for XMLOrderedList>>copyReplaceFrom:to:with:'.
self assert: anXmlOrderedList equals: expectedConcatenationResult.


XMLOrderedList >>copyReplaceFrom: start to: stop with: replacementCollection
"Delegate to my internal collection class as it may restrict copying 
and replacing.
See comment for OrderedCollection>>copyReplaceFrom:to:with: and 
OrderedCollection>>at:put:"

^ self collection copyReplaceFrom: start to: stop with: 
replacementCollection


On 05 May 2014, at 7:13 PM, Ben Coman  wrote:


Thanks. That info made it much easier to try.  Sorry I didn't end up with an 
answer for you, but I confirm there is some issue here, or something new I can 
learn when other chip in. 

Here is what I tried.

* Installed XMLParser (monty.58) from Configuration Browser in Pharo 3.

* Ran your code. Got the same error.

* From the call stack I observed that 
XMLOrderedCollection(SequenceableCollection)>>copyReplaceFrom:to:with:
has the line "newSequenceableCollection := self species new: newSize." such 
that it seems your error might be reduced to the question of why the following 
two snippets fail:
d := OrderedCollection new: 1.
d at: 1 put: 1.

e := OrderedCollection new: 3.
e at: 2 put: 1.

However I'm sorry that is beyond my knowledge, and I'm hoping someone else can 
chip in so I can learn something.

Pushing on, I noticed that XMLOrderedList has an instance variable /collection/ 
which holds the OrderedCollection.

Now I wonder (without great experience and hoping to learn something) if it 
smells funny that XMLOrderedList inherits all of SequencableCollection methods 
that can not operate on /collection/. 

I noticed that XMLOrderedList was using an inherited 
SequenceableCollection>>copyReplaceFrom:to:with 
while OrderedCollection overrode that method with its own. So taking 
inspiration XMLOrderedList>>copyFrom:to: to override 
SequencableCollection>>copyReplaceFrom:to:with: to work with /collection/
seems to solve your problem:
XMLOrderedList>>copyReplaceFrom: start to: stop with: replacementCollection 
^ self newWithCollection:
(collection copyReplaceFrom: start to: stop with: 
replacementCollection )


Along the way I noticed a few (possible) bugs that seems not related to your 
problem:

* When stepping through XMLOrderedList>>setCollection:
there is a red-box-of-death for the instance variables, which can be solved by 
defining the following.
XMLOrderedList>>size
^ collection ifNil: [ 0 ] ifNotNil: [ collection size]

* In the debugger the /collection/ instance variable is not shown! (e.g. line 
XMLOrderedList>>at:put:). 
Can someone confirm this should show?

HTH
cheers -ben

Thushar G R wrote:
> 
> XMLOrderedList belongs to package XML-Parser-Nodes.
> 
> a := XMLOrderedList new.
> a add:'1'.
> a , XMLOrderedList new.
> 
> Here select all and Do it. On line 3 (a , XMLOrderedList new.)  i am expected 
> to get a copy of 'a' , but instead it throws an error SubscriptOutOfBounds. 
> 
> 
> 
> 
> OrderedCollection(Object)>>errorSubscriptBounds:
> OrderedCollection>>ensureBoundsFrom:to:
> OrderedCollection>>at:put:
> OrderedCollection(SequenceableCollection)>>replaceFrom:to:with:startingAt:
> XMLOrderedList>>replaceFrom:to:with:startingAt:
> XMLOrderedList(SequenceableCollection)>>copyReplaceFrom:to:with:
> XMLOrderedList(SequenceableCollection)>>,
> UndefinedObject>>DoIt
> OpalCompiler>>evaluate
> SmalltalkEditor>>evaluateSelectionAndDo:
> PluggableTextMorph>>inspectIt in Block: [ textMorph editor 
> evaluateSelectionAndDo: [ :resu...etc...
> PluggableTextMorph>>handleEdit: in Block: [ result := editBlock value ]
> TextMorphForEditView(TextMorph)>>handleEdit:
> PluggableTextMorph>>handleEdit:
> PluggableTextMorph>>inspectIt
> SmalltalkEditor class>>buildSmalltalkEditorKeymappingsOn: in Block: [ :morph 
> | morph inspectIt ]
> BlockClosure>>cull:
> BlockClosure>>cull:cull:
> BlockClosure>>cull:cull:cull:
> KMCategoryBinding>>completeMatch:

Re: [Pharo-users] XMLOrderedList Concantenation

2014-05-05 Thread Thushar G R
Hi,

Thanks for all the responses.Ben and Carlos solutions works. What
workaround i did was i overrided the concatenation method in XMLOrderedList
for the time being , until someone authorised has
has a solution and commits it.I hope it happens soon so i dont have to
maintain a patch.

Thanks to all,
thushar

*G R Thushar*
*Team Leader(Technology),*
*Signos Software Solutions Pvt. Ltd.*
*Ground Floor **A.R Plaza, TC 11/43 (2),*
*P.M.G Junction,*
*Thiruvananthapuram, 695004. Kerala, India.*

*Web: www.signossolutions.com *
Email: thushar...@signossolutions.com, thushar...@gmail.com
Phone: +91984652





On Mon, May 5, 2014 at 4:47 PM, Thushar G R  wrote:

> Hi,
>
> I am getting an error while doing this.
>
> a := XMLOrderedList new.
> a add:'1'.
> a , XMLOrderedList new.
>
> Thanks,
>
> Thushar
>