Re: [Pharo-users] Pharo not running with macOS Sierra

2016-09-23 Thread MartinW
vivus-ignis wrote
> which image were you using? The "unofficial" VM from the link presents a
> dialog to open a file and once I select an image, it just disappears and
> nothing happens after that.

The cog_macos32x86_pharo.cog.spur_201609201401.tar.gz   works for me, the
cog_macos64x64_pharo.cog.spur_201609201401.tar.gz does not.



--
View this message in context: 
http://forum.world.st/Pharo-not-running-with-macOS-Sierra-tp4916468p4916700.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Pharo not running with macOS Sierra

2016-09-21 Thread MartinW
Thank you, Henrik.

This VM first shows a black window too, but it comes alive, once you click
one time into the window.

Best regards,
Martin.


Henrik Sperre Johansen wrote
>> i just updated to macOS Sierra, and Pharo now starts with an empty black
>> window and 100% CPU load and stays like this forever.
> 
> It's not an "official" official release, but the following link to a new
> VM build was posted on Slack yesterday; two user have reported it working
> ("briefly" and "for several hours" respectively) on Sierra so far:
> https://bintray.com/estebanlm/pharo-vm/build/201609201407#files
> ;





--
View this message in context: 
http://forum.world.st/Pharo-not-running-with-macOS-Sierra-tp4916468p4916474.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Pharo not running with macOS Sierra

2016-09-21 Thread MartinW
Hello,

i just updated to macOS Sierra, and Pharo now starts with an empty black
window and 100% CPU load and stays like this forever.
Any ideas?

Best regards,
Martin.



--
View this message in context: 
http://forum.world.st/Pharo-not-running-with-macOS-Sierra-tp4916468.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] I wish there were ePUB versions of Pharo books

2016-02-26 Thread MartinW
I can imagine that you are busy.
I will have a look as soon as I have some spare time, but this will not be
in the next two month...

Martin.


stepharo wrote
> Hi martin
> 
> Why don't you give a try?
> Pillar has
>  - a nice document
>  - some nice visitors
>  - nice test system
> So someone can extend it.
> Because we cannot do everything. You cannot imagine how we are busy 
> right now.
> Stef
> 
> Le 25/2/16 19:04, MartinW a écrit :
>> I like Pharo's new book site: http://files.pharo.org/books/
>>
>> And since I use a tablet more often, I wish there were ePUB versions of
>> the
>> books.
>>
>> Why is it important?
>> You could change the color scheme to light text on dark background and
>> increase font sizes and thus have a much more comfortable reading
>> experience
>> than with PDFs.
>>
>> I remember there was some talk about this some time ago.
>>
>> Best regards,
>> Martin.
>>
>>
>>
>> --
>> View this message in context:
>> http://forum.world.st/I-wish-there-were-ePUB-versions-of-Pharo-books-tp4880836.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>
>>





--
View this message in context: 
http://forum.world.st/I-wish-there-were-ePUB-versions-of-Pharo-books-tp4880836p4880964.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Is Seaside's Canvas/Brush metaphor for creating HTML available outside of Seaside?

2016-02-26 Thread MartinW
Sven Van Caekenberghe-2 wrote
> And Zn has a very simple one too (since recently):
> 
> generateHelp
>   "Generate an HTML page with links to all pages I support"
>   
>   ^ ZnHtmlOutputStream streamContents: [ :html |
>   html page: (self class name, ' Help') do: [ 
> html tag: #h3 with: 'Available Pages'.
> html tag: #ul do: [
>   prefixMap keys sorted do: [ :each | 
> html tag: #li do: [ 
>   html tag: #a attributes: { #href. each } with: each ] ] ] ]
> ]
> 
> But Seaside's is better, though much larger.

Cool. This should come in handy at many occasions.
I will use it right away. Thank you.



--
View this message in context: 
http://forum.world.st/Is-Seaside-s-Canvas-Brush-metaphor-for-creating-HTML-available-outside-of-Seaside-tp4880825p4880963.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Is Seaside's Canvas/Brush metaphor for creating HTML available outside of Seaside?

2016-02-26 Thread MartinW
stepharo wrote
> Hi johan
> 
> What would be good is to have it in a separate package because I wanted 
> to output HTML and loading seaside
> for that was heavy.
> 
> Stef

Yes, this is exactly what I was looking for :)



--
View this message in context: 
http://forum.world.st/Is-Seaside-s-Canvas-Brush-metaphor-for-creating-HTML-available-outside-of-Seaside-tp4880825p4880962.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] I wish there were ePUB versions of Pharo books

2016-02-25 Thread MartinW
I like Pharo's new book site: http://files.pharo.org/books/

And since I use a tablet more often, I wish there were ePUB versions of the
books.

Why is it important?
You could change the color scheme to light text on dark background and
increase font sizes and thus have a much more comfortable reading experience
than with PDFs.

I remember there was some talk about this some time ago.

Best regards,
Martin.



--
View this message in context: 
http://forum.world.st/I-wish-there-were-ePUB-versions-of-Pharo-books-tp4880836.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] [Pharo-dev] Who is using Pharo Launcher and for what

2016-02-25 Thread MartinW
SergeStinckwich wrote
> PharoLauncher is the cornerstone of my workflow in order to manage all
> my Pharo images.

Same here. I use it to create fresh images, manage and start all my images.
I use it for my private projects as well as for my projects at Humboldt
University Berlin.

Thank you for the good work.
Best regards,
Martin.



--
View this message in context: 
http://forum.world.st/Who-is-using-Pharo-Launcher-and-for-what-tp4879192p4880830.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Is Seaside's Canvas/Brush metaphor for creating HTML available outside of Seaside?

2016-02-25 Thread MartinW
Hi,

I know, there are templating systems like Mustache, but I always loved
Seaside's Canvas/Brush metaphor for creating HTML. Is it available as a
standalone package, so it can be used outside of Seaside?

Best regards,
Martin.



--
View this message in context: 
http://forum.world.st/Is-Seaside-s-Canvas-Brush-metaphor-for-creating-HTML-available-outside-of-Seaside-tp4880825.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] [From StackOverflow] How to parse ndjson in Pharo with NeoJSON

2016-01-22 Thread MartinW
Sven Van Caekenberghe-2 wrote
> Well, it is quite a bit of data (I didn't look too deeply), 50.000 records
> of structured/nested data with quite a lot of strings. If each record is
> 1Kb, that makes 50Mb.
> 
> How do you measure your memory consumption ? What did you expect ?

I did only think about memory, when my first attempts to parse the file
reached the VM's memory limit, which seemed to be at ~500MB on OS X out of
the box. Then I did only watch the memory from outside, using OS X's
Activity Monitor and after I gave the VM more memory, the image grew up to
1.2 GB while parsing and inspecting the 80MB file. But I did not yet
investigate, were the memory went - perhaps it is all in the Inspector that
I opened to view the result :)


Sven Van Caekenberghe-2 wrote
> Right now, your JSON is parsed and the result is a combination of lists
> (Array) and maps (Dictionary). If you know/understand well what is inside
> it, and it is regular enough, you could try to build your own
> specialised/optimised data/domain model for it. NeoJSON can also parse
> directly to your objects, instead of the general ones (a process called
> mapping). This is some work, of course, and it might not be worth it,
> YMMV.

Yes, I have used mappings in the past. Here I was just toying with the New
York Public Library's Open Source data for a second...


Sven Van Caekenberghe-2 wrote
> Sven  
> 
>> I tried to parse with
>> PetitParser but the results were similar. I guess, i have to learn to
>> find
>> out were all the memory goes.
>> 
>> Best regards,
>> Martin.
>> 
>> 
>> 
>> Sven Van Caekenberghe-2 wrote
>>> (I don't do StackOverflow)
>>> 
>>> Reading the 'format' is easy, just keep on doing #next for each JSON
>>> expression (whitespace is ignored).
>>> 
>>> | data reader |
>>> data := '{"smalltalk": "cool"}
>>> {"pharo": "cooler"}'.
>>> reader := NeoJSONReader on: data readStream.
>>> Array streamContents: [ :out |
>>>  [ reader atEnd ] whileFalse: [ out nextPut: reader next ] ].
>>> 
>>> Preventing intermediary data structures is easy too, use streaming.
>>> 
>>> | client reader data networkStream |
>>> (client := ZnClient new)
>>>  streaming: true;
>>>  url:
>>> 'https://github.com/NYPL-publicdomain/data-and-utilities/blob/master/items/pd_items_1.ndjson?raw=true';
>>>  get.
>>> networkStream := ZnCharacterReadStream on: client contents.
>>> reader := NeoJSONReader on: networkStream.
>>> data := Array streamContents: [ :out |
>>>  [ reader atEnd ] whileFalse: [ out nextPut: reader next ] ].
>>> client close.
>>> data.
>>> 
>>> It took a couple of seconds, it is 80MB+ over the network for 50K items
>>> after all.
>>> 
>>> 
>>> 
>>> HTH,
>>> 
>>> Sven 
>>> 
>>> 
 On 21 Jan 2016, at 12:02, Esteban Lorenzano <
>> 
>>> estebanlm@
>> 
>>> > wrote:
 
 Hi, 
 
 there is a question I don’t know how to answer.
 
 http://stackoverflow.com/questions/34904337/how-to-parse-ndjson-in-pharo-with-neojson
 
 Transcript: 
 
 I want to parse ndjson (newline delimited json) data with NeoJSON on
 Pharo Smalltalk.
 
 ndjson data looks like this:
 
 {"smalltalk": "cool"}
 {"pharo": "cooler"}
 At the moment I convert my file stream to a string, split it on newline
 and then parse the single parts using NeoJSON. This seems to use an
 unnecessary (and extremely huge) amount of memory and time, probably
 because of converting streams to strings and vice-versa all the time.
 What would be an efficient way to do this task?
 
 
 Takers?
 Esteban
>>> 
>>> 
>>> 
>>> Screen Shot 2016-01-21 at 13.33.57.png (480K)
>>> ;
>> 
>> 
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://forum.world.st/From-StackOverflow-How-to-parse-ndjson-in-Pharo-with-NeoJSON-tp4873097p4873385.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.





--
View this message in context: 
http://forum.world.st/From-StackOverflow-How-to-parse-ndjson-in-Pharo-with-NeoJSON-tp4873097p4873399.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] [From StackOverflow] How to parse ndjson in Pharo with NeoJSON

2016-01-22 Thread MartinW
Thank you, Sven! (I asked the question on StackOverflow)

And also let me thank you for NeoJSON, NeoCSV and Zinc, which I use a lot
and which are a joy to use! Also the documentation is very good and helps a
lot.

Your code works well and I save a bit of memory by avoiding intermediary
data structures, but still this operation uses a lot more memory than I had
expected (the example file I use is 80 MB). I tried to parse with
PetitParser but the results were similar. I guess, i have to learn to find
out were all the memory goes.

Best regards,
Martin.



Sven Van Caekenberghe-2 wrote
> (I don't do StackOverflow)
> 
> Reading the 'format' is easy, just keep on doing #next for each JSON
> expression (whitespace is ignored).
> 
> | data reader |
> data := '{"smalltalk": "cool"}
> {"pharo": "cooler"}'.
> reader := NeoJSONReader on: data readStream.
> Array streamContents: [ :out |
>   [ reader atEnd ] whileFalse: [ out nextPut: reader next ] ].
> 
> Preventing intermediary data structures is easy too, use streaming.
> 
> | client reader data networkStream |
> (client := ZnClient new)
>   streaming: true;
>   url:
> 'https://github.com/NYPL-publicdomain/data-and-utilities/blob/master/items/pd_items_1.ndjson?raw=true';
>   get.
> networkStream := ZnCharacterReadStream on: client contents.
> reader := NeoJSONReader on: networkStream.
> data := Array streamContents: [ :out |
>   [ reader atEnd ] whileFalse: [ out nextPut: reader next ] ].
> client close.
> data.
> 
> It took a couple of seconds, it is 80MB+ over the network for 50K items
> after all.
> 
> 
> 
> HTH,
> 
> Sven 
> 
> 
>> On 21 Jan 2016, at 12:02, Esteban Lorenzano <

> estebanlm@

> > wrote:
>> 
>> Hi, 
>> 
>> there is a question I don’t know how to answer.
>> 
>> http://stackoverflow.com/questions/34904337/how-to-parse-ndjson-in-pharo-with-neojson
>> 
>> Transcript: 
>> 
>> I want to parse ndjson (newline delimited json) data with NeoJSON on
>> Pharo Smalltalk.
>> 
>> ndjson data looks like this:
>> 
>> {"smalltalk": "cool"}
>> {"pharo": "cooler"}
>> At the moment I convert my file stream to a string, split it on newline
>> and then parse the single parts using NeoJSON. This seems to use an
>> unnecessary (and extremely huge) amount of memory and time, probably
>> because of converting streams to strings and vice-versa all the time.
>> What would be an efficient way to do this task?
>> 
>> 
>> Takers?
>> Esteban
> 
> 
> 
> Screen Shot 2016-01-21 at 13.33.57.png (480K)
> ;





--
View this message in context: 
http://forum.world.st/From-StackOverflow-How-to-parse-ndjson-in-Pharo-with-NeoJSON-tp4873097p4873385.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Status of Twitter (api/analysis/visualization) in Pharo?

2015-06-25 Thread MartinW
Offray wrote
> Thanks, we had already detected the problem with Jpeg images and even 
> reported here to the list, but until now the solution eluded us. Your 
> solution is already on the repo.

Cool :)




--
View this message in context: 
http://forum.world.st/Status-of-Twitter-api-analysis-visualization-in-Pharo-tp4832460p4834114.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Status of Twitter (api/analysis/visualization) in Pharo?

2015-06-21 Thread MartinW
Offray wrote
> Ok. Let me know what happens.

Hi Offray,
I got the scraping, importing and visualization working. Not sure, what went
wrong the first time.

I found one little bug, when the avatar was a jpeg. It can be solved by
changing the following lines in TwitterProfile>>scrapAvatarFrom:

from:

((avatarUrl asLowercase endsWith: '.jpeg') or: (avatarUrl asLowercase
endsWith: '.jpg'))
ifTrue: [
avatarImage := ZnEasy get: avatarUrl.
"(PNGReadWriter on: avatarImage ) nextPutImage: 
(JPEGReadWriter on:
avatarImage )" ].

to:

((avatarUrl asLowercase endsWith: '.jpeg') or: (avatarUrl asLowercase
endsWith: '.jpg'))
ifTrue: [avatarImage := ZnEasy getJpeg: avatarUrl.].


Very nice result. Thank you a lot for sharing it!
Best regards,
Martin.



--
View this message in context: 
http://forum.world.st/Status-of-Twitter-api-analysis-visualization-in-Pharo-tp4832460p4833396.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Status of Twitter (api/analysis/visualization) in Pharo?

2015-06-16 Thread MartinW
MartinW wrote
> I succeeded in installing parts of TwitterRoassalPlayGround in a Pharo 3
> image.
> http://smalltalkhub.com/#!/~arturozambrano/TwitterRoassalPlayGround
> 
> - The RESTRetriever seems to work fine, but the Rest results are very
> limited due to Twitter's own limitations.
> - The StreamingRetriever does simply not produce any results at all, but
> also no errors.

I got the StreamingRetriever to work..




--
View this message in context: 
http://forum.world.st/Status-of-Twitter-api-analysis-visualization-in-Pharo-tp4832460p4832684.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Status of Twitter (api/analysis/visualization) in Pharo?

2015-06-16 Thread MartinW
I succeeded in installing parts of TwitterRoassalPlayGround in a Pharo 3
image.
http://smalltalkhub.com/#!/~arturozambrano/TwitterRoassalPlayGround

- The RESTRetriever seems to work fine, but the Rest results are very
limited due to Twitter's own limitations.
- The StreamingRetriever does simply not produce any results at all, but
also no errors.



--
View this message in context: 
http://forum.world.st/Status-of-Twitter-api-analysis-visualization-in-Pharo-tp4832460p4832673.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Status of Twitter (api/analysis/visualization) in Pharo?

2015-06-16 Thread MartinW
Thank you very much, Offray, that looks very interesting.

When was the last time, you used the scraping plugin? It does run and
scrolls down the twitter pages, but there is no result at all to be found in
the console. Can it be that Twitter changed the format lately?

I will try to find a way to harvest tweets first, and then I will try your
visualization engine.

Martin.



--
View this message in context: 
http://forum.world.st/Status-of-Twitter-api-analysis-visualization-in-Pharo-tp4832460p4832672.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Status of Twitter (api/analysis/visualization) in Pharo?

2015-06-15 Thread MartinW
Hi,

I want to do some interaction with the Twitter API (retrieve tweets based on
hashtags mostly) and visualize results of some analyses using Roassal.

I saw there are some projects on Smalltalkhub, but none has
much/any/up-to-date documentation. What is the current status of these
projects? Does anyone know about any up-to-date documentation or examples?

I am thankful for all hints.

Best regards, Martin.





--
View this message in context: 
http://forum.world.st/Status-of-Twitter-api-analysis-visualization-in-Pharo-tp4832460.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Programming Puzzles & Code Golf: What color is this?

2014-06-25 Thread MartinW
MartinW wrote
> 
> MartinW wrote
>> 
>> Nicolai Hess wrote
>>> Color class>>r: r g: g b: b
>>> "Return a color with the given r, g, and b components in the range
>>> [0.0..1.0]."
>>> 
>>> :-) Range is [0..1] not [0..255]
>> Oh, thank you, how embarassing. I correct it to:
>> color := Color r: 255 g: 0 b: 0 range: 255.
>> 
>> Still the problem remains the same. I tested the code with Color random
>> and only for the post changed to Color r:g:b:.
> And some colors are found to be next to „transparent“ for example
> color := Color r: 100 g: 0 b: 0 range: 255.
> which clearly has alpha 1.0.

Ok, i have to get rid of transparent :)
colorNames := Color registeredColorNames copyWithout: #transparent.



--
View this message in context: 
http://forum.world.st/Programming-Puzzles-Code-Golf-What-color-is-this-tp4764770p4764834.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Programming Puzzles & Code Golf: What color is this?

2014-06-25 Thread MartinW
MartinW wrote
> 
> Nicolai Hess wrote
>> Color class>>r: r g: g b: b
>> "Return a color with the given r, g, and b components in the range
>> [0.0..1.0]."
>> 
>> :-) Range is [0..1] not [0..255]
> Oh, thank you, how embarassing. I correct it to:
> color := Color r: 255 g: 0 b: 0 range: 255.
> 
> Still the problem remains the same. I tested the code with Color random
> and only for the post changed to Color r:g:b:.

And some colors are found to be next to „transparent“ for example
color := Color r: 100 g: 0 b: 0 range: 255.
which clearly has alpha 1.0.



--
View this message in context: 
http://forum.world.st/Programming-Puzzles-Code-Golf-What-color-is-this-tp4764770p4764833.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Programming Puzzles & Code Golf: What color is this?

2014-06-25 Thread MartinW
Nicolai Hess wrote
> Color class>>r: r g: g b: b
> "Return a color with the given r, g, and b components in the range
> [0.0..1.0]."
> 
> :-) Range is [0..1] not [0..255]

Oh, thank you, how embarassing. I correct it to:
color := Color r: 255 g: 0 b: 0 range: 255.

Still the problem remains the same. I tested the code with Color random and
only for the post changed to Color r:g:b:.



--
View this message in context: 
http://forum.world.st/Programming-Puzzles-Code-Golf-What-color-is-this-tp4764770p4764832.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Programming Puzzles & Code Golf: What color is this?

2014-06-25 Thread MartinW
Hi,
i entered a Pharo version to this Code Golf contest:
http://codegolf.stackexchange.com/a/32535/26615

"Given three number values - being the Red, Green, and Blue elements of a
colour (eight bits per channel, 0 to 255) - your program must output the
name of the given colour.“

My answer is:

| color colorNames nearestColorName |
color := Color r: 255 g: 0 b: 0.
colorNames := Color registeredColorNames.
nearestColorName := colorNames detectMin: [ :each | (Color named: each)
diff: color].

But, the results are of mixed quality. All darker colors are named as gray,
dark gray or very dark gray.

Is it my fault, the fault of Color’s diff: method or the fault of the
available color names?

M.



--
View this message in context: 
http://forum.world.st/Programming-Puzzles-Code-Golf-What-color-is-this-tp4764770.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] [ANN] DrGeo 14.07 "Athens landing"

2014-06-20 Thread MartinW
Hilaire Fernandes-6 wrote
> Windows users, I test the application with Wine it works! But I have
> this strange bugs: https://bugs.launchpad.net/drgeo/+bug/1331559
> Do you have it?

It occurs on OS X 10.9.3 too.

And also on OS X there is a dialog after startup that says: „Got startup
errors, proceed to open debuggers“. The error is "MessageNotUnderstood:
UndefinedObject class>>useHTTPProxy:“ I attach the debug log.

But apart from that it looks very good! I’m a big fan. Perhaps one day you
could publish a part of it as a Pharo-Desktop-Application-Framework :) I
aleardy used Dr.Geo twice as inspiration for how to deploy Pharo desktop
applications.

M.

PharoDebug.log   



--
View this message in context: 
http://forum.world.st/ANN-DrGeo-14-07-Athens-landing-tp4763710p4763997.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Drag and drop items between list views

2014-04-07 Thread MartinW
Benjamin Van Ryseghem (Pharo) wrote
> Out of this thread, I have made this post:
> http://spec.st/docs/drag_n_drop/
> With a small change in the Spec code base (to not sort by default, but
> only when a sorting block is specified),
> it gives an example of how to do what you want :)

Cool. Thank you.

Still the fact that the passenger does only know the object's string
representation is a problem. Because in a real application i would not
display strings and integers in the lists, but my domain objects. And
already with this example it does not work: you convert the string to an
integer when it leaves list1 - but of course a user might drag it back from
list2 to list1 - and here you can no longer convert it as you do not know if
the dragged object is a string or an integer…

Why does the passenger only know an object's string representation? Can this
be changed?



--
View this message in context: 
http://forum.world.st/Drag-and-drop-items-between-list-views-tp4752285p4753118.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Drag and drop items between list views

2014-04-04 Thread MartinW
Goubier Thierry wrote
> By the way, any chance of having your code as an example for Spec? I 
> went through the spec documentation and I couldn't see anything similar, 
> and, from our difficulties to get that to work, I would guess a bit of 
> work on Spec drag and drop support could be a good thing.

I just start investigating my ui possibilities with pharo for a new
application. The code examples in this thread are all there is at the
moment.


Goubier Thierry wrote
>> Are there other possibilities if i do not use Spec?
> 
> Yes. Drag and drop code in Morphic is fairly similar. The Morphic code 
> for opening windows is certainly longer, however.

Yes, there are more possibilities if i do it in pure Mophic/Polymorph? — or
possibilites are quite similar? :)



--
View this message in context: 
http://forum.world.st/Drag-and-drop-items-between-list-views-tp4752285p4752691.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Drag and drop items between list views

2014-04-04 Thread MartinW
Goubier Thierry wrote
> Yes, I've seen that. It's fine by me that the list displayed in the 
> widget is copied and sorted, just that I would have liked to be able to 
> touch the true collection hidden inside the ListModel. Unless the list 
> model is more like a ListAdaptor in meaning, in which cas I'll know that 
> I have to build better objects around it.
> 
> But then, as that example shows, I then have problem connecting the drag 
> and drop to the model.
> 
>> Then for the convenient methods, I am not that sure :P
>> But maybe it’s a good use case for traits :P
> 
> I'd say it depends what a ListModel is. Is this a model, in which case 
> I'd like it to stand for the abstract collection inside and be able to 
> add and remove items in it (and not use the trick of l1 items: l1 
> getItems), or is this just an adapter? If an adapter, then drag and drop 
> is hard to implement.

Yes exactly. I just naively tried it, without knowing if it was made for
this purpose. But i wanted to be able to touch the real collections behind
the ListModels and also the real object behind the drag-operation, not only
it's string representation. So the user could drag around things between
lists and the real objects would get added/removed to the real collections
represented by those lists.
In the next step i would also have wanted objects represented on the screen
by a simple textlabel to be dragged and dropped on any list and then be
added to the collection represented by this particular list.



--
View this message in context: 
http://forum.world.st/Drag-and-drop-items-between-list-views-tp4752285p4752690.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Drag and drop items between list views

2014-04-03 Thread MartinW
Goubier Thierry wrote
> Another approach, that I would use, is to put more complex objects 
> inside the lists. Thoses objects would know how to get added / removed 
> from their respective collections, and then I would propagate collection 
> changes to the ListModel instances.

That sounded promising. I made a Collectible class. It's instances know how
to add themselves to a collection (i'm not sure if that's a good idea, but
as experiment..)

The problem is, i never get to these objects in my acceptDropBlock. In
 
list1 acceptDropBlock: [ :transfer :event :source :receiver :index | 
   transfer passenger do: [:element | element addSelfToCollection:
collection1] ]. 

the element is only a ByteString - the name of my Collectible object. :(

Are there other possibilities if i do not use Spec?



--
View this message in context: 
http://forum.world.st/Drag-and-drop-items-between-list-views-tp4752285p4752625.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Drag and drop items between list views

2014-04-02 Thread MartinW
First of all thank you for taking the time to explain all this to me! I
already learned a lot about working with the spec widgets..

I still have a problem. The first version with the hardcoded collections did
obviously change the original collections (that's the desired behaviour).

Goubier Thierry wrote
> list1 acceptDropBlock: 
> [ :transfer :event :source :receiver :index | 
> transfer passenger do: 
> [:e | 
> collection1 insert: e first before: index. 
> collection2 remove: e first]. 
> list1 items: collection1. 
> list2 items: collection2  ].


The last version though, did change the items in the list views, but not the
original collections.

Goubier Thierry wrote
>   list1
>   acceptDropBlock: [ :transfer :event :source :receiver :index |
>   | c1 c2 l1 l2 |
>   l1 := source model model.
>   c1 := l1 listItems.
>   l2 := transfer source model model.
>   c2 := l2 listItems.
>   transfer passenger
>   do: [ :e |
>   c1 insert: e first before: index.
>   c2 remove: e first ].
>   l1 items: c1.
>   l2 items: c2 ].





--
View this message in context: 
http://forum.world.st/Drag-and-drop-items-between-list-views-tp4752285p4752399.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Drag and drop items between list views

2014-04-02 Thread MartinW
Thank you. This is a step forward. The thing is i can't hardcode the
collections. In the end product i don't have two but seven lists, so i must
be able to detect in the acceptDropBlock which is the receiving
collection/list.


Goubier Thierry wrote
> Ok, look at that code:
> 
>   | collection1 collection2 list1 list2 |
>   collection1 := #(1 2 3 4 5) asOrderedCollection.
>   collection2 := #($a $b $c $d $e) asOrderedCollection.
>   list1 := ListModel new.
>   list1 items: collection1.
>   list1 dragEnabled: true.
>   list1 dropEnabled: true.
>   list1 acceptDropBlock:
>   [ :transfer :event :source :receiver :index |
>   transfer passenger do:
>   [:e |
>   collection1 insert: e first before: index.
>   collection2 remove: e first].
>   list1 items: collection1.
>   list2 items: collection2  ].
>   list1 openWithSpec.
>   list2 := ListModel new.
>   list2 items: collection2.
>   list2 dragEnabled: true.
>   list2 dropEnabled: true.
>   list2 acceptDropBlock: [ :transfer :event :source :receiver :index | 
> self halt ].
>   ^ list2 openWithSpec
> 
> Now you can drag and drop from list2 to list1, and I think the code is 
> good for drag and drop of multiple items.





--
View this message in context: 
http://forum.world.st/Drag-and-drop-items-between-list-views-tp4752285p4752342.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Drag and drop items between list views

2014-04-02 Thread MartinW
I tried the following, but i do not know what to do in the acceptDropBlock.
It seems the receiver in the block is only an item in a list, but how do i
get the receiving list/collection?
What i want to achieve is that a user can drag the '1' from list1 to list2
and the resulting collections will then be collection1: (2 3 4 5)
collection2: ($a $b $c $d $e 1) and the lists will be updated accordingly.


| collection1 collection2 list1 list2 |

collection1 := #(1 2 3 4 5).
collection2 := #($a $b $c $d $e).

list1 := ListModel new.
list1 items: collection1.
list1 dragEnabled: true.
list1 dropEnabled: true.
list1 acceptDropBlock: [ :transfer :event :source :receiver :index |  
self
halt ].
list1 openWithSpec.

list2 := ListModel new.
list2 items: collection2.
list2 dragEnabled: true.
list2 dropEnabled: true.
list2 acceptDropBlock: [ :transfer :event :source :receiver :index |  
self
halt ].
list2 openWithSpec.


Goubier Thierry wrote
> yes, most list-like widgets can drag and drop. Feedback when inserting 
> items in lists could be improved, however (i.e. you can drop on a list 
> item, but I've never seen the feedback for dropping between list items).
> Le 02/04/2014 16:09, MartinW a écrit :
>> i have to make a UI where users can sort items (sentences) into different
>> collections by dragging and dropping them between list views. Is this
>> possible with the widgets currently available in Pharo?





--
View this message in context: 
http://forum.world.st/Drag-and-drop-items-between-list-views-tp4752285p4752328.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Drag and drop items between list views

2014-04-02 Thread MartinW
Hi,
i have to make a UI where users can sort items (sentences) into different
collections by dragging and dropping them between list views. Is this
possible with the widgets currently available in Pharo?
M.



--
View this message in context: 
http://forum.world.st/Drag-and-drop-items-between-list-views-tp4752285.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] How to draw a Morph with Athens?

2014-03-30 Thread MartinW
Igor Stasenko wrote
> u you u no draw morphs by athens :)
> 
> - use AthensWrapMorph.
> put as many submorphs into it, and they all will be drawn via Athens.
> eventually, the need in wrap morph will disappear once WorldMorph (the
> root
> of all morphs) start using Athens directly.

Ok, thank you, that's nice.
What is the intended use - subclass AthensWrapMorph instead of Morph for my
own Morphs, or make my Morphs subclasses of Morph as usual and always create
a AthensWrapMorph and then add them as submorphs?

M.




--
View this message in context: 
http://forum.world.st/How-to-draw-a-Morph-with-Athens-tp4751463p4751715.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] How to draw a Morph with Athens?

2014-03-28 Thread MartinW
At the moment i draw Morphs with Athens by copying how it is done in
AthensDemoMorph:

- adding a surface variable,
- initializing an AthensCairoSurface,
- getting an athens canvas by calling: surface drawDuring: [:canvas | ]
- …

Is there already a more straightforward possibility in the meantime?
Also the way it is done in the AthensDemoMorph, when i save and quit an
image with such a Morph open, there is a drawing error (red rectangle with
yellow cross), once i restart the image.

BTW, i really like drawing with Athens!
M.



--
View this message in context: 
http://forum.world.st/How-to-draw-a-Morph-with-Athens-tp4751463.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Calculate angle between two vectors (probably @Igor :)

2014-03-19 Thread MartinW
Nicolai Hess wrote
> in testIsInFieldOfVision
> subject has velocity 100@0, I understand this as "moves from left to
> right".
> testobject other2 and other3 are above and below subect, and not behind
> and
> in front, both should be visible with the fieldOfView.

Oh, thank you. I made a new testcase. Which is unfortunately passing :( So i
am still looking for a solution…
 


Nicolai Hess wrote
> Btw. the field of view is rather big, 0.75*Float Pi is 135 degree, but
> clock *and* counterclockwise
> ->  270 degree field of view.

That's correct. Most birds have the eyes on the sides of their heads - thus
they have a wide visual field. Some as wide as 360 degrees.



--
View this message in context: 
http://forum.world.st/Calculate-angle-between-two-vectors-probably-Igor-tp4749351p4749824.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Calculate angle between two vectors (probably @Igor :)

2014-03-19 Thread MartinW
Nicolai Hess wrote
> This was of course wrong, I don't know what the
> other method computes, but not the angle between two vectors.

Yes i also wrote a test and i think my method is right.


Nicolai Hess wrote
> Now the question is, why do you think your method is wrong / the boids
> behave wrong?

When i use my method to calculate the field of vision the Boids always fly
from top left to down right and if i turn on the circling option, they crowd
in the bottom right quadrant.
If i give them a 360 degree field of vision by always returning true for
isInFieldOfVision they behave correctly. This means they fly in a nice
circle around the center and if circling is turned off, the swarm flies in
different directions each time you start the simulation.

Perhaps the problem is not the calculation of the angle but is in the
isInFieldOfVision: method...



--
View this message in context: 
http://forum.world.st/Calculate-angle-between-two-vectors-probably-Igor-tp4749351p4749697.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Metacello changes in Pharo 3?

2014-03-16 Thread MartinW
Christophe Demarey wrote
> … Metacello 2 (also known as Metacello Preview) that is now used in Pharo
> 3.0.

Thank you, this was the missing information :)
And i just tried Versionner. It works very well. Thank you. I did not know
about it's existence.
M.



--
View this message in context: 
http://forum.world.st/Metacello-changes-in-Pharo-3-tp4749011p4749353.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Calculate angle between two vectors (probably @Igor :)

2014-03-16 Thread MartinW
Hello,
i probably made some embarassing mistake, but as i cannot find it, i ask you
to have a look at this method.
It should calculate the angle between two vectors. And vectors are instances
of Point (perhaps here is already a misconception?).
It is used in my flocking simulation PharoBoids
(http://smalltalkhub.com/#!/~MartinWalk/Boids)

Here is my version of the method:

angleBetween: vector1 and: vector2 onError: aBlock
| cosinusOfAngle innerProductOfVectors productOfVectorsLengths|
innerProductOfVectors := (vector1 dotProduct: vector2).
productOfVectorsLengths := (vector1 r) * (vector2 r).
productOfVectorsLengths = 0 ifTrue: [ ^ aBlock value ].
cosinusOfAngle := innerProductOfVectors / productOfVectorsLengths.
^ cosinusOfAngle arcCos

But my Boids behave wrong when i use it. I found another implementation of
the same problem by Igor Stasenko which works and looks like this:

angleBetween: p1 and: p2 ifDegenerate: aBlock
" Calculate an angle (in radians) between two vectors. 
Evaluate a block, in case if calculation not possible because one of the
vectors has zero length "

| x1 y1 x2 y2 dot2 n2 |
x1 := p1 x.
y1 := p1 y.
x2 := p2 x.
y2 := p2 y.

dot2 := x1 * x2 + (y1 * y2).
dot2 := dot2 * dot2.

n2 := (x1*x1 + (y1*y1)) * (x2*x2 + (y2*y2)).

n2 = 0 ifTrue: [ ^ aBlock value ].

^ (dot2 / n2) arcCos

Can anybody explain the problem of my method? M.



--
View this message in context: 
http://forum.world.st/Calculate-angle-between-two-vectors-probably-Igor-tp4749351.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Metacello changes in Pharo 3?

2014-03-13 Thread MartinW
Hi,
it seems Metacallo changed in Pharo 3 compared to Pharo 2.
First thing i noticed was that a Configuration does no longer seem to be
supposed to subclass from Object but from ConfigurationOf?
Are there other changes? Where can i learn about them? Is there an official
documentation that describes the Metacello Version in Pharo 3?

Best regards, Martin.



--
View this message in context: 
http://forum.world.st/Metacello-changes-in-Pharo-3-tp4749011.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Add menu item to Nautilus context menu on selected packages?

2013-12-02 Thread MartinW
I have one follow-up question trying to understand how this works:
I see that  is used in AbstractNautilusUI to build the
menus — but why is  here? Also the code seems to work all the
same without ?

Martin.


Benjamin Van Ryseghem-2 wrote
> Here is an example from Nautilus
> 
> AbstractNautilusUI class>>packagesMenu: aBuilder
>   
> 
>   
> 
>   | package target |
>   target := aBuilder model.
> 
>   (package := target selectedPackage) ifNil: [ ^ target ].
>   
>   (aBuilder item: #'Browse scoped')
>   keyText: 'b, s' if: Nautilus useOldStyleKeys not;
>   action: [ target restrictedBrowsePackage ];
>   order: 1000;
>   help: 'Open a browser on a restricted view';
>   withSeparatorAfter.





--
View this message in context: 
http://forum.world.st/Add-menu-item-to-Nautilus-context-menu-on-selected-packages-tp4721406p4726709.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Add menu item to Nautilus context menu on selected packages?

2013-11-13 Thread MartinW
Quite easy indeed. Thank you.
Is there any system behing the ordering of menu entries?

Martin.


Benjamin Van Ryseghem-2 wrote
> It is :)
> And I would even say it is not complicated :P
> 
>> So far i added a wizard to the world menu, but i would rather add a menu
>> item to the Nautilus context menu on selected packages - is this
>> possible?





--
View this message in context: 
http://forum.world.st/Add-menu-item-to-Nautilus-context-menu-on-selected-packages-tp4721406p4721787.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Add menu item to Nautilus context menu on selected packages?

2013-11-12 Thread MartinW
Hi,
i have a tool that works on packages.
So far i added a wizard to the world menu, but i would rather add a menu
item to the Nautilus context menu on selected packages - is this possible?

Best regards,
Martin.



--
View this message in context: 
http://forum.world.st/Add-menu-item-to-Nautilus-context-menu-on-selected-packages-tp4721406.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] [FEEDBACK] Install Pharo on MacOSX

2013-11-05 Thread MartinW
"Damien Cassou“ wrote
> I've just made a .dmg file for installing Pharo on MacOSX. Please try
> it and report problems:

Works fine on 10.8.5.
But in my Applications Folder is already the Pharo VM called „Pharo“, so
perhaps you should rename the launcher to „Pharo Launcher“ or something like
this?

AND, the Launcher looks great! Did you describe somewhere, how you made the
UI so that it fills the whole Pharo Window? And one can even change to and
from „Developer Mode“ easily via settings. I only deployed a Pharo Desktop
application once - and with great pain - and your way of doing things might
be extremly useful to others!

Please write a blogpost about it or a chapter for one of the Pharo books :)

Best regards,
Martin.



--
View this message in context: 
http://forum.world.st/FEEDBACK-Install-Pharo-on-MacOSX-tp4719307p4719320.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] I would rather pay for Smalltalkhub than use Github for free.

2013-11-03 Thread MartinW
Just a thought on the discussions about Smalltalkhub beeing down and people
would love to use Gibhub instead:

I would rather pay for Smalltalkhub than use Github for free.

And there is all this talk about building a business with Pharo - why not
make a business from Smalltalkhub? The thought of course is that when
Smalltalkhub would be a business, it’s makers could spend more time and
effort keeping it up and running and adding new features.

This may have been quoted a lot but still:
"The lesson: People are happy to pay for things that work well. Never be
afraid to put a price on something. If you pour your heart into something
and make it great, sell it. For real money. Even if there are free options,
even if the market is flooded with free. People will pay for things they
love.“
From: http://37signals.com/svn/posts/2794-how-to-get-good-at-making-money



--
View this message in context: 
http://forum.world.st/I-would-rather-pay-for-Smalltalkhub-than-use-Github-for-free-tp4718690.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Two progress bars for each progress in #20623?

2013-10-14 Thread MartinW
EstebanLM wrote
> you probably has some weird status in the progress bar. 
> you can try:
> 
> SystemProgressMorph reset.
> 
> that will clean the progress bar status. 
> 
>>> Recently (for example in #20623) i see two progress bars for each
>>> progress. 
>>> Is this only an optical glitch - or is it something to worry about? 
>>> See screenshot: 

So i uploaded the screenshot again:
http://s9.postimg.org/4460q9utr/twoprogressbars.png

I can see this everytime when i start a freshly downloaded #20623 image and
try to install something via the configuration browser.

I tried SystemProgrssMorph reset, but it does not change anything about
this.
M.



--
View this message in context: 
http://forum.world.st/Two-progress-bars-for-each-progress-in-20623-tp4714181p4714305.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Two progress bars for each progress in #20623?

2013-10-13 Thread MartinW
Recently (for example in #20623) i see two progress bars for each progress. 
Is this only an optical glitch - or is it something to worry about? 
See screenshot: 
 
M.



--
View this message in context: 
http://forum.world.st/Two-progress-bars-for-each-progress-in-20623-tp4714176.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Two progress bars for each progress in #20623?

2013-10-13 Thread MartinW
Recently (for example in #20623) i see two progress bars for each progress.
Is this only an optical glitch - or is it something to worry about?
See screenshot:
 
M.



--
View this message in context: 
http://forum.world.st/Two-progress-bars-for-each-progress-in-20623-tp4714175.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Problems with Categories, PackageInfo and RPackage

2013-09-22 Thread MartinW
I believe you, of course :)
Now where would i look to learn enough about both systems to migrate some
tool/framework from PackageInfo to RPackage?


Stéphane Ducasse wrote
> Because package info is bogus!
> 
>> Now the question is, what can i do?
>> 1) Hope someone fixes the PackageInfo updating?
>> 2) Is there a guide for how to move something from using PackageInfo to
>> RPackage? So i could try to change the relevant pieces in Spy?





--
View this message in context: 
http://forum.world.st/Problems-with-Categories-PackageInfo-and-RPackage-tp4709620p4709632.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Problems with Categories, PackageInfo and RPackage

2013-09-22 Thread MartinW
Hi,
i am using the Spy framework in Pharo 2.0 which makes use of PackageInfo. It
seems PackageInfo is not updated properly:

Try this: 
PackageInfo allPackages size. 562 
RPackageOrganizer default packages size. 540 
SystemOrganization categories size. 476 

Object subclass: #MyClass 
instanceVariableNames: '' 
classVariableNames: '' 
poolDictionaries: '' 
category: 'MyNewCategory' 

PackageInfo allPackages size. 562 
RPackageOrganizer default packages size. 541 
SystemOrganization categories size. 477 

And why are the numbers of PackageInfo packages, RPackage packages and
categories so different in the first place? 

(I did file a bug for this: https://pharo.fogbugz.com/f/cases/11653)

Now the question is, what can i do?
1) Hope someone fixes the PackageInfo updating?
2) Is there a guide for how to move something from using PackageInfo to
RPackage? So i could try to change the relevant pieces in Spy?

M.



--
View this message in context: 
http://forum.world.st/Problems-with-Categories-PackageInfo-and-RPackage-tp4709620.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Is there documentation for Moose DSMMatrix visualization?

2013-08-15 Thread MartinW
I started to play with Moose DSMMatrix visualization.

I tried to do something like "This matrix diagram visualizes character
co-occurrences in Victor Hugo’s Les Misérables." by Mike Bostock:  Les
Misérables Co-occurrence   

I got to this in some minutes:


 

But now i am looking for documentation (labelling, coloring, etc. ) or other
examples. Are there any?



--
View this message in context: 
http://forum.world.st/Is-there-documentation-for-Moose-DSMMatrix-visualization-tp4703749.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Change the Package-Chooser-Dialog when using "Move to package..."?

2013-07-23 Thread MartinW
Hi,
i always find the Package-Chooser-Dialog (See Screenshot) when using "Move
to package..." (e.g. from Nautilus) very strange to use.
Why not replacing it with "SearchFacade rPackageSearch" (See second
Screenshot)?

I tried by changing AbstractTool >> moveInNewPackage:

from:
moveInNewPackage: aCollection

| labels reject lines oldIndex newName item aPackage |
aCollection ifEmpty: [^ nil ].
aPackage := aCollection first package.  
labels := self model packages collect: [:each | each name].
lines := {0}.

newName := UIManager default chooseOrRequestFrom: labels lines: lines
title: ('Change Package (current: ', aPackage name,')').
newName ifNil: [ ^ nil ].
newName := newName asSymbol.

item := self browsedEnvironment packageOrganizer packageNamed: newName.
aCollection do: [:aClass |
aPackage removeClass: aClass.
item addClassDefinition: aClass.
aClass category: item name ].
^ item

to:
moveInNewPackage: aCollection

| originalPackage newPackage |
aCollection ifEmpty: [^ nil ].
originalPackage := aCollection first package.   

newPackage := SearchFacade rPackageSearch chooseFromOwner: self window.
newPackage ifNil: [ ^ nil ].

aCollection do: [:aClass |
originalPackage removeClass: aClass.
newPackage addClassDefinition: aClass.
aClass category: newPackage name ].
^ newPackage

 
 



--
View this message in context: 
http://forum.world.st/Change-the-Package-Chooser-Dialog-when-using-Move-to-package-tp4700280.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Add Nautilus groups programmatically in Startup Preferences or ZeroConfScript?

2013-06-23 Thread MartinW
Hi,
i would love to add (and remove) Nautilus groups programmatically in Pharo
Startup Preference Scripts or ZeroConfScripts,
what is the protocol for adding/removing these groups?
M.



--
View this message in context: 
http://forum.world.st/Add-Nautilus-groups-programmatically-in-Startup-Preferences-or-ZeroConfScript-tp4694655.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] How to split or rename Pharo categories with regard to Monticello packages?

2013-06-14 Thread MartinW
Hi,
i was looking for best practices on how to split or rename Pharo categories
with regard to Monticello packages. Means, when i change category names i
have to somehow reflect this in Monticello packages too?

I asked on Stackoverflow:
http://stackoverflow.com/questions/16981791/how-to-proceed-with-monticello-package-after-renaming-a-package-in-pharo-2-0
http://stackoverflow.com/questions/16981305/how-to-split-a-package-category-in-pharo-2-0-with-regard-to-monticello-packages

but did not get any answers. So i repost the questions here. I found some
similar - older - questions on the mailinglists, but was not sure if there
were any news on this.

/In Pharo 2.0 i started with Classes in one Package/Category (I'm not sure,
what is the right term in Pharo at the moment). I have an identically named
Monticello package which i contribute to.

Now i split the Package/Category:

MyPackage
becomes:

MyPackage-Core
MyPackage-AddOns
What is the intended way to manage these Packages/Categories with Monticello
now? Is there a way to automatically split the Monticello packages
accordingly? (I created some mess doing it manually and ended up starting in
a new image and manually filing in the classes and then creating new
Monticello packages)/

and

/After renaming a Package/Category in Pharo 2.0 that is also under version
control in a Monticello package of the same name, how to proceed?

can i proceed with now renamed packages/categories in a Monticello package
with an old, other name?
can i rename Monticello packages accordingly with/without keeping the
history intact?
What i ended up with for the moment is, loading the renamed Package/Category
into a fresh image, creating a new Monticello package there and losing the
history./



--
View this message in context: 
http://forum.world.st/How-to-split-or-rename-Pharo-categories-with-regard-to-Monticello-packages-tp4693344.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Spec & Roassal?

2013-06-09 Thread MartinW
Benjamin Van Ryseghem-2 wrote
> You have two solutions:
>   - write a spec model for roassal
>   - if presume that Roassal ends up as a Morph or something close. In spec
> you can embed a morph for free
> 
>> how can i combine a Roassal visualization and a Spec UI? 

The snippet below generates the desired UI in Glamour (See also Screenshot).
If you have time to take a look at it, what of the two solutions you
suggested would be the preferable to get there using Spec? And - where would
i learn how to do it?

This does the desired UI in Glamour:

|collection composer| 
collection := OrderedCollection new. 
collection add: #A; add: #B; add: #C; add: #D. 

composer := GLMCompositePresentation new. 
composer tabulator with: [ :t | 
t row: #visualization; row: #details. 
t transmit to: #visualization; andShow: [ :a | 
a stackedArrangement. 
a roassal 
title: 'Visualization'; 
painting: [ :view :viewCollection | 
view shape rectangle size: 30. 
view nodes: viewCollection. 
view shape arrowedLine. 
view 
edges: ((OrderedCollection new) add:
(#A->#B); add: (#A->#C); add: (#C->#D); yourself) 
from: #key 
to: #value. 
view treeLayout ]. 
a list 
title: 'List'.]. 
t transmit from: #visualization; to: #details; andShow: [ :a | 
a text 
title: 'Details'; 
display: [ :number | number asString ]] ]. 
composer openOn: collection

 



--
View this message in context: 
http://forum.world.st/Spec-Roassal-tp4690746p4692515.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Roassal & Spec?

2013-06-01 Thread MartinW
MartinW wrote
> In my case the upper two panes would display the same object, only with
> different views on it (a graph and a list), and the selections would be
> syncronized (select an element in the graph - the same element will be
> selected in the list and vice versa). Is this as easily possible?

Would this be the direction:

|collection composer|
collection := OrderedCollection new.
collection add: #A; add: #B; add: #C; add: #D.

composer := GLMCompositePresentation new. 
composer tabulator with: [ :t | 
t row: #visualization; row: #details.
t transmit to: #visualization; andShow: [ :a |
a stackedArrangement.
a roassal 
title: 'Visualization'; 
painting: [ :view :viewCollection | 
view shape rectangle size: 30.
view nodes: viewCollection.
view shape arrowedLine.
view
edges: ((OrderedCollection new) add: 
(#A->#B); add: (#A->#C); add:
(#C->#D); yourself)
from: #key 
to: #value.
view treeLayout ].
a list
title: 'List'.].
t transmit from: #visualization; to: #details; andShow: [ :a |
a text
title: 'Details';
display: [ :number | number asString ]] ].
composer openOn: collection



--
View this message in context: 
http://forum.world.st/Roassal-Spec-tp4690745p4691206.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Roassal & Spec?

2013-06-01 Thread MartinW
Clément Bera-4 wrote
> How is your Roassal visualization ? Is it a morph ?
> If it is a morph I guess you would need to do a ComposableModel wrapper to
> integrate it in a spec.

Are there others than morphs? I will go with Glamour for the moment, but i
am still interested in this. I hope for more Spec documentation :)

Martin.




--
View this message in context: 
http://forum.world.st/Roassal-Spec-tp4690745p4691191.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Roassal & Spec?

2013-06-01 Thread MartinW
Stephan Eggermont wrote
> And you might want to read that as:
> try to build a UI with Glamour first,
> before diving into spec.

I will take that advice :)



--
View this message in context: 
http://forum.world.st/Roassal-Spec-tp4690745p4691189.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Roassal & Spec?

2013-06-01 Thread MartinW
Hi Tudor,
thank you very much. That looks amazing. I just start to look at all the
examples in the Moose image.

In my case the upper two panes would display the same object, only with
different views on it (a graph and a list), and the selections would be
syncronized (select an element in the graph - the same element will be
selected in the list and vice versa). Is this as easily possible?

Martin.


Tudor Girba-2 wrote
> You could also try to use Glamour for that:
> 
> composer := GLMCompositePresentation new.
> composer tabulator with: [ :t |
>   t row: #visualization; row: #list; row: #details.
>   t transmit to: #visualization; andShow: [ :a |
>   a roassal 
>   title: 'Visualization';
>   painting: [ :view :collection | 
>   view nodes: collection.
>   view edgesFrom: [ :x | x // 5 ].
>   view radialNarrowTreeLayout ] ].
>   t transmit from: #visualization; to: #list; andShow: [ :a |
>   a list 
>   title: 'List';
>   display: [ :number | 1 to: number ]
>].
>   t transmit from: #list; to: #details; andShow: [ :a | 
>   a text
>   title: 'Details';
>   display: [ :number | number asString ] ] ].
> composer openOn: (1 to: 420)
> 
> Cheers,
> Doru





--
View this message in context: 
http://forum.world.st/Roassal-Spec-tp4690745p4691188.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Spec & Roassal?

2013-05-30 Thread MartinW
=Seems one has to resubscribe to the new mailing-lists? sorry if this comes
as a duplicate=

Hi, 
how can i combine a Roassal visualization and a Spec UI? 
Is there already some Roassal-Spec? 
See attached screenshot for what i am trying to get. 
M. 

 




--
View this message in context: http://forum.world.st/Spec-Roassal-tp4690746.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Roassal & Spec?

2013-05-30 Thread MartinW
Hi,
how can i combine a Roassal visualization and a Spec UI?
Is there already some Roassal-Spec?
See attached screenshot for what i am trying to get. 
M.

 



--
View this message in context: http://forum.world.st/Roassal-Spec-tp4690745.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.