Pharo-users
By thread
pharo-users@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
August 2014
- 76 participants
- 426 messages
Re: [Pharo-users] PharoLauncher can only run 1 instance on OSX?
by Tim Mackinnon
Actually Ben - I take it back, it still seems to want to only launch a single instance with v.3.0.0 - Iâm not sure whatâs going on (and when iâm back at the office I will have to check it with my desktop version as swear it was working properly).
Tim
On 9 Aug 2014, at 13:20, Tim Mackinnon <tim(a)testit.works> wrote:
> Thanks Ben - you are right, there has been another release since I downloaded it (might have to look at how to detect a version update in the launcher to spot that - that would keep me busy ;)
>
> Iâm fixed now.
>
> Tim
>
> On 9 Aug 2014, at 06:29, Ben Coman <btc(a)openInWorld.com> wrote:
>
>> Tim Mackinnon wrote:
>>> I really like the PharoLauncher project - itâs very handy. However Iâve noticed that on OSX when I launch an image and then try and run PhaorLauncher (e.g. pharo.app) again, it just switches me to my already running image?
>>>
>>> Anyone know why it does that - or if there is some way to avoid it? iâm wondering it its the way that the launcher, launches the images (is it an os sub-process or something - and so this is why it just switches back to that process if you try and run it again?).
>>>
>>> Tim
>>>
>>>
>>
>> I had this behaviour on Mavericks, and after a while I was going to report it, but a few days ago I noticed that it suddenly went away, and now could launch multiple images and open PharoLauncher again each time. When I noticed this, it had been a few days since anything changed, so I can't pin down what that might be. Maybe I downloaded a newer VM from files.pharo.org, or maybe I re-installed PharoLauncher with a later version, or maybe an OSX update. My PharoLauncher's current system details are:
>> * Image: #30848 .
>> * VM:
>> Mac Cocoa Cog 5.8b12 21-Sep-10
>> NBCoInterpreter NativeBoost-CogPlugin-GuillermoPolito.19 May 15 2014
>> NBCogit NativeBoostCogPlugin-GuillermoPolito.19 May 15 2014.
>>
>> cheers -ben
>>
>>
>>
>
>
Aug. 9, 2014
Any thoughts on improving MC browser?
by Tim Mackinnon
I was just about to ask how do I compare two arbitrary versions in Monticello - as I canât multiselect - until I realised that the Diff button prompts you for a version against what you have currently selected. This is a very weird UI experience. Now that we seem to have multi-select widgets - are there any proposals to improve MC?
Tim
Aug. 9, 2014
Re: [Pharo-users] PharoLauncher can only run 1 instance on OSX?
by Tim Mackinnon
Thanks Ben - you are right, there has been another release since I downloaded it (might have to look at how to detect a version update in the launcher to spot that - that would keep me busy ;)
Iâm fixed now.
Tim
On 9 Aug 2014, at 06:29, Ben Coman <btc(a)openInWorld.com> wrote:
> Tim Mackinnon wrote:
>> I really like the PharoLauncher project - itâs very handy. However Iâve noticed that on OSX when I launch an image and then try and run PhaorLauncher (e.g. pharo.app) again, it just switches me to my already running image?
>>
>> Anyone know why it does that - or if there is some way to avoid it? iâm wondering it its the way that the launcher, launches the images (is it an os sub-process or something - and so this is why it just switches back to that process if you try and run it again?).
>>
>> Tim
>>
>>
>
> I had this behaviour on Mavericks, and after a while I was going to report it, but a few days ago I noticed that it suddenly went away, and now could launch multiple images and open PharoLauncher again each time. When I noticed this, it had been a few days since anything changed, so I can't pin down what that might be. Maybe I downloaded a newer VM from files.pharo.org, or maybe I re-installed PharoLauncher with a later version, or maybe an OSX update. My PharoLauncher's current system details are:
> * Image: #30848 .
> * VM:
> Mac Cocoa Cog 5.8b12 21-Sep-10
> NBCoInterpreter NativeBoost-CogPlugin-GuillermoPolito.19 May 15 2014
> NBCogit NativeBoostCogPlugin-GuillermoPolito.19 May 15 2014.
>
> cheers -ben
>
>
>
Aug. 9, 2014
Re: [Pharo-users] Website redirects?
by Tim Mackinnon
Another url was: http://www.pharo.org/get-involved
On 9 Aug 2014, at 12:32, Tim Mackinnon <tim(a)testit.works> wrote:
> Guys - some of the URLâs on the pharo website have changed - I think it would make sense to have redirects instead of a Not Found error? e.g. http://www.pharo.org/get-help
>
> Just saying? Should I raise a ticket for this?
>
> Tim
Aug. 9, 2014
Website redirects?
by Tim Mackinnon
Guys - some of the URLâs on the pharo website have changed - I think it would make sense to have redirects instead of a Not Found error? e.g. http://www.pharo.org/get-help
Just saying? Should I raise a ticket for this?
Tim
Aug. 9, 2014
Re: [Pharo-users] Rephrasing my question on Stackoverflow (Re: [Moose-dev] Re: Tree/Outliners of playgrounds, markdown inside comments and some quick medium size dreams for Pharo/Smalltalk)
by PBKResearch
Hi Offray
Well, none of the experts has come forward to help, so maybe I can comment as almost a complete beginner. I think you need two additional bits of specification in your example to get the output you want:
a. To show the node titles in the #tree pane, you need to add a format: clause, which is a block taking the node as argument and returning the text to be output.
b. To show the body of the selected tree node in the #body pane, you need a display: clause, which is a similar block generating the body details that you want.
To give you a specific example, here is some code I have used. I am using a GlamorousBrowser to examine the tree representation of an HTML page generated by Todd Blanchard's superb HTMLCSS parser. The browser I produce is similar to yours, but without the #plugins pane.
domBrowser := GLMTabulator new.
domBrowser
column: #details;
column: #nodeDetails.
domBrowser transmit to: #details; andShow: [ :a |
a tree
display: [ :model | model nodesSelect: [ :each | each tag = 'html'] ];
children: [ :node | node children ];
format: [ :node ||nid| node tag,' ', ((nid := node id) isNil ifTrue:[''] ifFalse:['id=',nid,' '])] ].
domBrowser transmit from: #details; to: #nodeDetails;
andShow: [ :each| each text display: [:node| node innerContents ]].
domBrowser title: 'Browse HTML'.
I hope this makes it clear; if not, ask again.
Best wishes
Peter Kenny
-----Original Message-----
From: Pharo-users [mailto:pharo-users-bounces@lists.pharo.org] On Behalf Of Offray Vladimir Luna Cárdenas
Sent: 09 August 2014 05:08
To: pharo-users(a)lists.pharo.org
Subject: [Pharo-users] Rephrasing my question on Stackoverflow (Re: [Moose-dev] Re: Tree/Outliners of playgrounds, markdown inside comments and some quick medium size dreams for Pharo/Smalltalk)
Hi again,
I'm testing my luck in Stackoverflow to see if I can get more eyes and keep the conversation going:
http://stackoverflow.com/questions/25215103/building-a-tree-outliner-like-g…
This community is very responsive but I feel I'm not understanding quickly/properly enough the main logic of tree-like browsers on Moose.
So, any extra help is welcomed.
Cheers,
Offray
On 08/07/2014 03:28 PM, Offray Vladimir Luna Cárdenas wrote:
> Hi Doru and Community :-),
>
> In the screenshot at [1] you can see my explorations. I took the code
> from treeWithChildrenByeLevel in the GLMBasicExamples and modified it
> until I got this:
>
> [1] http://www.enlightenment.org/ss/e-53e3dee6777744.68598023.jpg
>
> So I have now a browser which shows a tree made of UbakyeNodes (a tree
> like data structure I defined), but I would like not to show the
> Ubakye Nodes, but the titles of each node (headers) and the contents
> (bodies) of them when selected. With your help I have understood that
> I need to pass the collection of all children (not just the headers of
> them), but I don't know who to sellect something particular in that
> collection to be shown on the browser, like headers of nodes in the
> #tree panel or bodies in the #body panel.
>
> I would like to change also the size of each panel to be more like the
> shown in the screenshot, instead of the default one and be relative to
> window size. Is this possible?
>
> Thanks,
>
> Offray
>
> Below is the code, for easiness of reading:
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> "
> Another exploration of Outliners provided by Glamorous Toolkit and
> browsers. This code was obtained by running 'GLMBasicExamples open'
> and then browsing until 'treeWithChildrenByLevel'. Some code was
> modified to open explicitely the browser on the world and starting to
> hack on it.
> "
>
> | browser mainTree |
>
> mainTree := UbakyeNode new.
> mainTree becomeDefaultTree.
>
> browser := GLMTabulator new.
> browser
> column: #tree;
> column: [ :c |
> c
> row: #body;
> row: #plugins ].
> (browser transmit)
> to: #tree;
> andShow: [ :a |
> (a tree)
> title: mainTree header;
> children: [ :eachNode |
> eachNode children. ] "Children
> must return a collection" ].
> (browser transmit)
> to: #body;
> from: #tree;
> andShow: [ :a | a text title: 'Cuerpo | Body ' ].
> (browser transmit)
> to: #plugins;
> from: #tree port: #selectionPath;
> andShow: [ :a | a text title: 'Plugins | Extensiones' ].
>
> browser openOn: mainTree children.
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
>
> On 08/05/2014 12:19 AM, Tudor Girba wrote:
>> Hi,
>>
>> You probably need this:
>>
>> explorer transmit to: #tree; andShow: [:a |
>> a tree
>> display: headers;
>> *children: [:eachNode | eachNode
>> theMessageYouUseToGoToTheChildrenOfANode ]*].
>>
>> A tree is a recursive structure, and to describe it you need:
>> - a way to construct the root elements. This is the result of
>> applying
>> display:
>> to the input object. So, display: either takes a collection or a
>> block that will return a collection when executed.
>> - a way to define the children for each node. This is the result of
>> applying
>> children:
>>
>> You should also take a look at the examples from:
>> GLMBasicExamples open
>>
>> Does this help now?
>>
>> Cheers,
>> Doru
>>
>>
>>
>>
>>
>> On Sun, Jul 27, 2014 at 4:59 PM, Offray Vladimir Luna Cárdenas
>> <offray(a)riseup.net <mailto:offray@riseup.net>> wrote:
>>
>> Hi,
>>
>> Answering to myself: I have solved the code that selects the
>> headers of the
>> main tree. The key is to create a new collection containing only
>> node names.
>> Here is the code:
>>
>> "*************************"
>> | mainTree node1 node2 explorer headers |
>>
>> mainTree := UbakyeNode
>> header: 'Arbol raÃz'
>> body: ''.
>>
>> node1 := UbakyeNode
>> header: 'Nodo 1'
>> body: 'Texto 1'.
>>
>> node2 := UbakyeNode
>> header: 'Nodo 2'
>> body: 'Texto 2'.
>>
>> mainTree
>> addNode: node1;
>> addNode: node2.
>>
>>
>> explorer := GLMTabulator new
>> title: (mainTree header).
>> explorer column: #tree;
>> column: #body.
>>
>> headers := (mainTree children)
>> collect: [:node | node header].
>>
>>
>> explorer transmit to: #tree; andShow: [:a |
>> a tree
>> display: headers].
>>
>> explorer openOn: mainTree.
>>
>> "*************************"
>>
>> Now I need to make the children sellectable, and that all the
>> contents of
>> the tree can be updated with a shortcut.
>>
>> I will keep you posted.
>>
>> Cheers,
>>
>> Offray
>>
>>
>> On 07/26/2014 09:01 PM, Offray Vladimir Luna Cárdenas wrote:
>>
>> Hi again,
>>
>> I will be using this thread to update my advances and
>> questions about
>> how to build an outliner in Pharo Smalltalk. If there is a
>> better method
>> like starting a new thread for particular questions, or a
>> less narrative
>> style, please let me know.
>>
>> The idea is to use the tools provided by Moose to build a
>> quick outliner
>> that can be extended to suit my needs on academical writing.
>> This is
>> kind of a strange approach in the sense that I'm not
>> following the
>> tutorials with a predefined problems (make a game and so)
>> but trying to
>> start with a real (in the sense of closer) problem (making
>> an
>> outliner)
>> and to see which knowledge I need to solve this necessity.
>> In that sense
>> is more like the Freire's alphabetization of adults in Brazil.
>>
>> So, the things I have done so far was to search for a good
>> model to
>> start with. Something already done that can be used as
>> scaffolding for
>> my outliner. The Help System seems like a good start for an
>> outliner (in
>> fact it is already one), so I have taken the Help-Core
>> system and start
>> to use it as a base for my project.
>>
>> After that I have used the Moose browsers to build a simple
>> interface,
>> as seen here:
>>
>>
>> http://mutabit.com/offray/__static/blog/output/galleries/__objetos/ub
>> akye-browser.jpg
>>
>>
>> <http://mutabit.com/offray/static/blog/output/galleries/objetos/ubaky
>> e-browser.jpg>
>>
>>
>>
>> The part I want to deal with is this:
>>
>> ===============
>>
>> explorer := GLMTabulator new
>> title: (mainTree header).
>> explorer column: #tree;
>> column: #body.
>>
>> explorer transmit to: #tree; andShow: [:a |
>> a tree
>> display: mainTree children ].
>>
>> explorer openOn: mainTree.
>>
>> ===============
>>
>> So, instead of "display: mainTree children" I need something
>> that takes
>> the get names (headers) of the two nodes and the contents in
>> the right
>> panel. For that I think that I need to learn some iterators.
>> I have
>> already a "header" method for the nodes. Any clue would be
>> appreciated
>> and I will keep you posted on my advances.
>>
>> Cheers,
>>
>> Offray
>>
>>
>> On 07/21/2014 12:58 PM, Offray Vladimir Luna Cárdenas wrote:
>>
>> Hi Damien,
>>
>> Thanks for your answer. Comments below.
>>
>> On 07/21/2014 11:09 AM, Damien Cassou wrote:
>>
>> On Sat, Jul 19, 2014 at 2:47 AM, Offray Vladimir
>> Luna Cárdenas
>> <offray(a)riseup.net <mailto:offray@riseup.net>> wrote:
>>
>> The first idea that comes to mind is using STON
>> for storage
>> nodes and
>> tree
>> information, so I can interchange it with the
>> flatland files
>> world
>> and keep
>> it readable. Sounds that reasonable?
>>
>>
>>
>> without more information, it is hard to stay. Try
>> with STON and
>> change
>> if that does not work :-). We have XML and JSON
>> generators as well.
>>
>>
>>
>> This is a kind of raw preview of I'm talking about:
>>
>>
>> http://www.enlightenment.org/__ss/e-53cd4f36f021e9.68569046.__jpg
>>
>> <http://www.enlightenment.org/ss/e-53cd4f36f021e9.68569046.jpg>
>>
>> Of course in this case, it is just a Help browser with a
>> Playground
>> window over it, but I would like to have something like
>> Playgrounds
>> inside the help browser. I was trying to build a custom
>> browser with
>> Glamour, but seems that Help Browser already has the
>> machinery I'm
>> looking for.
>>
>> So my first question is how to use the Help Browser
>> class as a template
>> for my outliner class? And can I put a Playground where
>> the plain text
>> is located right now?
>>
>>
>> The second thing I would like to do is to add
>> pandoc's
>> markdown inside
>> comments, but I don't like the syntax of comments in
>> Smalltalk because
>> single quotes are fairly easy to find in light
>> markup
>> language like
>> markdown. Is difficult to change it to create
>> something more
>> like
>> python
>> (with """) or Lua (with -[]- )?
>>
>>
>>
>> There is only one syntax for comments in Pharo.
>> Instead of Markdown,
>> you might want to have a look at Pillar which is
>> implemented in
>> Pharo
>> and can generate Markdown (and html, and pdf) :
>> https://github.com/pillar-__markup/pillar-documentation/
>>
>> <https://github.com/pillar-markup/pillar-documentation/>
>>
>>
>>
>> I have seen Pillar. Seems really interesting, but
>> Pandocs markdown
>> support academic citation in several formats and I have
>> already long
>> docs wrote on that format integrated in my workflow from
>> Zotero and even
>> there is a growing community working on Scholarly
>> Markdown[1][2] so I
>> would like to stick with it as much as I can for my own
>> writing.
>> That being said. I would like also a better integration
>> between
>> Smalltalk outliners and all the academic publication
>> work flow,
>> including working better with pandoc as a external library.
>>
>> [1] https://github.com/scholmd/__scholmd/wiki
>> <https://github.com/scholmd/scholmd/wiki>
>> [2]
>>
>> http://blog.martinfenner.org/__2013/06/29/metadata-in-__scholarly-mar
>> kdown/
>>
>>
>> <http://blog.martinfenner.org/2013/06/29/metadata-in-scholarly-markdown/>
>> [3]
>>
>> http://programminghistorian.__org/lessons/sustainable-__authorship-in
>> -plain-text-__using-pandoc-and-markdown
>>
>>
>> <http://programminghistorian.org/lessons/sustainable-authorship-in-pl
>> ain-text-using-pandoc-and-markdown>
>>
>>
>>
>>
>> Thanks again, this conversation with people in the
>> community is very
>> valuable to me,
>>
>> Offray
>>
>>
>>
>>
>>
>>
>>
>> _________________________________________________
>> Moose-dev mailing list
>> Moose-dev(a)iam.unibe.ch <mailto:Moose-dev@iam.unibe.ch>
>> https://www.iam.unibe.ch/__mailman/listinfo/moose-dev
>> <https://www.iam.unibe.ch/mailman/listinfo/moose-dev>
>>
>>
>>
>>
>> --
>> www.tudorgirba.com <http://www.tudorgirba.com>
>>
>> "Every thing has its own flow"
>>
>
>
>
Aug. 9, 2014
Re: [Pharo-users] PharoLauncher can only run 1 instance on OSX?
by Ben Coman
Tim Mackinnon wrote:
> I really like the PharoLauncher project - itâs very handy. However Iâve noticed that on OSX when I launch an image and then try and run PhaorLauncher (e.g. pharo.app) again, it just switches me to my already running image?
>
> Anyone know why it does that - or if there is some way to avoid it? iâm wondering it its the way that the launcher, launches the images (is it an os sub-process or something - and so this is why it just switches back to that process if you try and run it again?).
>
> Tim
>
>
I had this behaviour on Mavericks, and after a while I was going to
report it, but a few days ago I noticed that it suddenly went away, and
now could launch multiple images and open PharoLauncher again each
time. When I noticed this, it had been a few days since anything
changed, so I can't pin down what that might be. Maybe I downloaded a
newer VM from files.pharo.org, or maybe I re-installed PharoLauncher
with a later version, or maybe an OSX update. My PharoLauncher's
current system details are:
* Image: #30848 .
* VM:
Mac Cocoa Cog 5.8b12 21-Sep-10
NBCoInterpreter NativeBoost-CogPlugin-GuillermoPolito.19 May 15 2014
NBCogit NativeBoostCogPlugin-GuillermoPolito.19 May 15 2014.
cheers -ben
Aug. 9, 2014
Re: [Pharo-users] Accessing DLLs in Smalltalk/V
by Offray Vladimir Luna Cárdenas
Hi,
About active essays and writing documentation inside Pharo, I'm trying
to bring some experience on writing using a tree/outliner like interface
for it. Questions are in another thread, but I hope to help with some
kind of "dynabooklets", for the moment using pandoc's markdown, wich
seems better known and suited for academical writing, but may be at some
point it can share some Pillar insights.
Cheers,
Offray
On 05/30/2014 11:12 AM, kilon alios wrote:
> great point , I think that Pillar already does this but its not exactly hassle
> free. I have to say I really like Pillar, very simple syntax, it generates pdf
> and hmtl ouput as well latex. Still will be an extra effort to bring it inside
> Pharo in a form of an editor. But frankly if you want to make your own
> documentation with Pillar is already very easy and the final result looks very
> good.
>
>
> On Fri, May 30, 2014 at 6:02 PM, Sean P. DeNigris <sean(a)clipperadams.com
> <mailto:sean@clipperadams.com>> wrote:
>
> kilon alios wrote
> > An insane amount of documentation
>
> <rant>
> "insane" may be the key term here. We could be inventing executable active
> essays, which is the kind of magic our live environment makes possible,
> instead of writing and rewriting paper docs that quickly go stale.
> Non-executable docs are a duplication smell and maintenance hassle.
> Text-only is one of the least-effective ways to communicate. I'd love to see
> more lively kernel style docs</rant>
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context:
> http://forum.world.st/Accessing-DLLs-in-Smalltalk-V-tp4760856p4761006.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>
Aug. 9, 2014
Rephrasing my question on Stackoverflow (Re: [Moose-dev] Re: Tree/Outliners of playgrounds, markdown inside comments and some quick medium size dreams for Pharo/Smalltalk)
by Offray Vladimir Luna Cárdenas
Hi again,
I'm testing my luck in Stackoverflow to see if I can get more eyes and
keep the conversation going:
http://stackoverflow.com/questions/25215103/building-a-tree-outliner-like-g…
This community is very responsive but I feel I'm not understanding
quickly/properly enough the main logic of tree-like browsers on Moose.
So, any extra help is welcomed.
Cheers,
Offray
On 08/07/2014 03:28 PM, Offray Vladimir Luna Cárdenas wrote:
> Hi Doru and Community :-),
>
> In the screenshot at [1] you can see my explorations. I took the code
> from treeWithChildrenByeLevel in the GLMBasicExamples and modified it
> until I got this:
>
> [1] http://www.enlightenment.org/ss/e-53e3dee6777744.68598023.jpg
>
> So I have now a browser which shows a tree made of UbakyeNodes (a tree
> like data structure I defined), but I would like not to show the Ubakye
> Nodes, but the titles of each node (headers) and the contents (bodies)
> of them when selected. With your help I have understood that I need to
> pass the collection of all children (not just the headers of them), but
> I don't know who to sellect something particular in that collection to
> be shown on the browser, like headers of nodes in the #tree panel or
> bodies in the #body panel.
>
> I would like to change also the size of each panel to be more like the
> shown in the screenshot, instead of the default one and be relative to
> window size. Is this possible?
>
> Thanks,
>
> Offray
>
> Below is the code, for easiness of reading:
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> "
> Another exploration of Outliners provided by Glamorous Toolkit
> and browsers. This code was obtained by running 'GLMBasicExamples open'
> and then browsing until 'treeWithChildrenByLevel'. Some
> code was modified to open explicitely the browser on the world
> and starting to hack on it.
> "
>
> | browser mainTree |
>
> mainTree := UbakyeNode new.
> mainTree becomeDefaultTree.
>
> browser := GLMTabulator new.
> browser
> column: #tree;
> column: [ :c |
> c
> row: #body;
> row: #plugins ].
> (browser transmit)
> to: #tree;
> andShow: [ :a |
> (a tree)
> title: mainTree header;
> children: [ :eachNode |
> eachNode children. ] "Children
> must return a collection" ].
> (browser transmit)
> to: #body;
> from: #tree;
> andShow: [ :a | a text title: 'Cuerpo | Body ' ].
> (browser transmit)
> to: #plugins;
> from: #tree port: #selectionPath;
> andShow: [ :a | a text title: 'Plugins | Extensiones' ].
>
> browser openOn: mainTree children.
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
>
> On 08/05/2014 12:19 AM, Tudor Girba wrote:
>> Hi,
>>
>> You probably need this:
>>
>> explorer transmit to: #tree; andShow: [:a |
>> a tree
>> display: headers;
>> *children: [:eachNode | eachNode
>> theMessageYouUseToGoToTheChildrenOfANode ]*].
>>
>> A tree is a recursive structure, and to describe it you need:
>> - a way to construct the root elements. This is the result of applying
>> display:
>> to the input object. So, display: either takes a collection or a block
>> that will
>> return a collection when executed.
>> - a way to define the children for each node. This is the result of
>> applying
>> children:
>>
>> You should also take a look at the examples from:
>> GLMBasicExamples open
>>
>> Does this help now?
>>
>> Cheers,
>> Doru
>>
>>
>>
>>
>>
>> On Sun, Jul 27, 2014 at 4:59 PM, Offray Vladimir Luna Cárdenas
>> <offray(a)riseup.net <mailto:offray@riseup.net>> wrote:
>>
>> Hi,
>>
>> Answering to myself: I have solved the code that selects the
>> headers of the
>> main tree. The key is to create a new collection containing only
>> node names.
>> Here is the code:
>>
>> "*************************"
>> | mainTree node1 node2 explorer headers |
>>
>> mainTree := UbakyeNode
>> header: 'Arbol raÃz'
>> body: ''.
>>
>> node1 := UbakyeNode
>> header: 'Nodo 1'
>> body: 'Texto 1'.
>>
>> node2 := UbakyeNode
>> header: 'Nodo 2'
>> body: 'Texto 2'.
>>
>> mainTree
>> addNode: node1;
>> addNode: node2.
>>
>>
>> explorer := GLMTabulator new
>> title: (mainTree header).
>> explorer column: #tree;
>> column: #body.
>>
>> headers := (mainTree children)
>> collect: [:node | node header].
>>
>>
>> explorer transmit to: #tree; andShow: [:a |
>> a tree
>> display: headers].
>>
>> explorer openOn: mainTree.
>>
>> "*************************"
>>
>> Now I need to make the children sellectable, and that all the
>> contents of
>> the tree can be updated with a shortcut.
>>
>> I will keep you posted.
>>
>> Cheers,
>>
>> Offray
>>
>>
>> On 07/26/2014 09:01 PM, Offray Vladimir Luna Cárdenas wrote:
>>
>> Hi again,
>>
>> I will be using this thread to update my advances and
>> questions about
>> how to build an outliner in Pharo Smalltalk. If there is a
>> better method
>> like starting a new thread for particular questions, or a
>> less narrative
>> style, please let me know.
>>
>> The idea is to use the tools provided by Moose to build a
>> quick outliner
>> that can be extended to suit my needs on academical writing.
>> This is
>> kind of a strange approach in the sense that I'm not
>> following the
>> tutorials with a predefined problems (make a game and so) but
>> trying to
>> start with a real (in the sense of closer) problem (making an
>> outliner)
>> and to see which knowledge I need to solve this necessity. In
>> that sense
>> is more like the Freire's alphabetization of adults in Brazil.
>>
>> So, the things I have done so far was to search for a good
>> model to
>> start with. Something already done that can be used as
>> scaffolding for
>> my outliner. The Help System seems like a good start for an
>> outliner (in
>> fact it is already one), so I have taken the Help-Core system
>> and start
>> to use it as a base for my project.
>>
>> After that I have used the Moose browsers to build a simple
>> interface,
>> as seen here:
>>
>>
>> http://mutabit.com/offray/__static/blog/output/galleries/__objetos/ubakye-b…
>>
>>
>> <http://mutabit.com/offray/static/blog/output/galleries/objetos/ubakye-brows…>
>>
>>
>>
>> The part I want to deal with is this:
>>
>> ===============
>>
>> explorer := GLMTabulator new
>> title: (mainTree header).
>> explorer column: #tree;
>> column: #body.
>>
>> explorer transmit to: #tree; andShow: [:a |
>> a tree
>> display: mainTree children ].
>>
>> explorer openOn: mainTree.
>>
>> ===============
>>
>> So, instead of "display: mainTree children" I need something
>> that takes
>> the get names (headers) of the two nodes and the contents in
>> the right
>> panel. For that I think that I need to learn some iterators.
>> I have
>> already a "header" method for the nodes. Any clue would be
>> appreciated
>> and I will keep you posted on my advances.
>>
>> Cheers,
>>
>> Offray
>>
>>
>> On 07/21/2014 12:58 PM, Offray Vladimir Luna Cárdenas wrote:
>>
>> Hi Damien,
>>
>> Thanks for your answer. Comments below.
>>
>> On 07/21/2014 11:09 AM, Damien Cassou wrote:
>>
>> On Sat, Jul 19, 2014 at 2:47 AM, Offray Vladimir Luna
>> Cárdenas
>> <offray(a)riseup.net <mailto:offray@riseup.net>> wrote:
>>
>> The first idea that comes to mind is using STON
>> for storage
>> nodes and
>> tree
>> information, so I can interchange it with the
>> flatland files
>> world
>> and keep
>> it readable. Sounds that reasonable?
>>
>>
>>
>> without more information, it is hard to stay. Try
>> with STON and
>> change
>> if that does not work :-). We have XML and JSON
>> generators as well.
>>
>>
>>
>> This is a kind of raw preview of I'm talking about:
>>
>>
>> http://www.enlightenment.org/__ss/e-53cd4f36f021e9.68569046.__jpg
>>
>> <http://www.enlightenment.org/ss/e-53cd4f36f021e9.68569046.jpg>
>>
>> Of course in this case, it is just a Help browser with a
>> Playground
>> window over it, but I would like to have something like
>> Playgrounds
>> inside the help browser. I was trying to build a custom
>> browser with
>> Glamour, but seems that Help Browser already has the
>> machinery I'm
>> looking for.
>>
>> So my first question is how to use the Help Browser class
>> as a template
>> for my outliner class? And can I put a Playground where
>> the plain text
>> is located right now?
>>
>>
>> The second thing I would like to do is to add
>> pandoc's
>> markdown inside
>> comments, but I don't like the syntax of comments in
>> Smalltalk because
>> single quotes are fairly easy to find in light
>> markup
>> language like
>> markdown. Is difficult to change it to create
>> something more
>> like
>> python
>> (with """) or Lua (with -[]- )?
>>
>>
>>
>> There is only one syntax for comments in Pharo.
>> Instead of Markdown,
>> you might want to have a look at Pillar which is
>> implemented in
>> Pharo
>> and can generate Markdown (and html, and pdf) :
>> https://github.com/pillar-__markup/pillar-documentation/
>> <https://github.com/pillar-markup/pillar-documentation/>
>>
>>
>>
>> I have seen Pillar. Seems really interesting, but Pandocs
>> markdown
>> support academic citation in several formats and I have
>> already long
>> docs wrote on that format integrated in my workflow from
>> Zotero and even
>> there is a growing community working on Scholarly
>> Markdown[1][2] so I
>> would like to stick with it as much as I can for my own
>> writing.
>> That being said. I would like also a better integration
>> between
>> Smalltalk outliners and all the academic publication work
>> flow,
>> including working better with pandoc as a external library.
>>
>> [1] https://github.com/scholmd/__scholmd/wiki
>> <https://github.com/scholmd/scholmd/wiki>
>> [2]
>>
>> http://blog.martinfenner.org/__2013/06/29/metadata-in-__scholarly-markdown/
>>
>>
>> <http://blog.martinfenner.org/2013/06/29/metadata-in-scholarly-markdown/>
>> [3]
>>
>> http://programminghistorian.__org/lessons/sustainable-__authorship-in-plain…
>>
>>
>> <http://programminghistorian.org/lessons/sustainable-authorship-in-plain-tex…>
>>
>>
>>
>>
>> Thanks again, this conversation with people in the
>> community is very
>> valuable to me,
>>
>> Offray
>>
>>
>>
>>
>>
>>
>>
>> _________________________________________________
>> Moose-dev mailing list
>> Moose-dev(a)iam.unibe.ch <mailto:Moose-dev@iam.unibe.ch>
>> https://www.iam.unibe.ch/__mailman/listinfo/moose-dev
>> <https://www.iam.unibe.ch/mailman/listinfo/moose-dev>
>>
>>
>>
>>
>> --
>> www.tudorgirba.com <http://www.tudorgirba.com>
>>
>> "Every thing has its own flow"
>>
>
>
>
Aug. 9, 2014
Re: [Pharo-users] Roassal2 RTDraggable grid and synchronized movement
by Alexandre Bergel
Hi Peter,
How things are going with having a snapOnGrid behavior?
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On Aug 1, 2014, at 2:36 PM, Peter Uhnák <i.uhnak(a)gmail.com> wrote:
> Hi Alex,
>
> While the "snap to grid" might be complicated I thought of simpler solution that might be achievable purely at Roassal level without the need to change Trachel classes. You can look at Umlet, since I am trying to copy it's grid behavior here.
> Basically you don't move objects with mouse immediately but only after fixed increments. However I've encountered a problem with TRMouseDragging>>step, since I would probably need to continuously sum the individual steps and then reset them when dragging has started.
>
> Here is a _very_ crude prototype:
> ---------------------
> "i subclassed RTDraggable and changed initializeElement: method as follows"
> initializeElement: element
> | sum gridSize |
> gridSize := 20.
> sum := 0 @ 0.
> element
> when: TRMouseDragging
> do: [ :e |
> | d t |
> t := RTGroup withAll: groupToDrag.
> (t includes: element)
> ifFalse: [ t add: element ].
> d := element view canvas camera distanceFromPixelToSpace: e step.
> sum := sum + d.
> "move element only in increments of gridSize"
> d := gridSize * ((sum x / gridSize) truncated @ (sum y / gridSize) truncated).
> sum := sum - d.
> t translateBy: d.
> e signalUpdate ]
> ---------------------
>
> and here is a demo utilizing it
>
> -----------------------------
> | v e1 e2 line gridSize b1 b2 b3 b4 edge |
> v := RTView new.
>
> "draw grid"
> gridSize := 20.
>
> (-20 to: 20) do: [ :i |
> b1 := RTBox element.
> b2 := RTBox element.
> b3 := RTBox element.
> b4 := RTBox element.
> b1 translateTo: (i * gridSize) @ -1000. "top side"
> b2 translateTo: (i * gridSize) @ 1000. "bottom side"
> b3 translateTo: -1000 @ (i * gridSize). "left side"
> b4 translateTo: 1000 @ (i * gridSize). "right side"
> "vertical line"
> edge := RTLine edgeFrom: b1 to: b2.
> v add: edge.
> "horizontal line"
> edge := RTLine edgeFrom: b3 to: b4.
> v add: edge.
> ].
>
> e1 := (RTEllipse new size: 30; color: Color magenta) element.
> e1 translateTo: -20 @ 0.
> e1 @ RGGridDraggable.
>
> e2 := (RTEllipse new size: 30; color: Color magenta) element.
> e2 translateTo: 20 @ 0.
> e2 @ RGGridDraggable.
>
> (line := RTLine edgeFrom: e1 to: e2) shape color:Color black.
>
> v add: e1; add: e2; add: line.
>
> v open.
> -----------------------------
>
> Obviously it needs a lot of fine-tuning and such. Since RTInteraction (RTDraggable) instances are not created directly the gridSize would have to be stored probably class side. Also there is a problem with resetting the "sum" variable when dragging starts. (There is no TRMouseDragStart event as far as I've seen). And also drawing the grid itself the way I've done is very brutal and doesn't really work if I want to move the canvas camera (perhaps image pattern as a background would work better).
>
> What are your thoughts on this?
>
> Peter
>
>
>
>
> On Fri, Aug 1, 2014 at 4:07 PM, Alexandre Bergel <alexandre.bergel(a)me.com> wrote:
> Hi Peter!
>
> > While playing with RTMultiLine I thought that it would be nice to have option for RTDraggable elements to snap to a grid / move only by fixed increments - for example the position could only be divisible by 10 (grid size would be 10), so dragging from 20@10 to 26@4 would jump to 30@0. Is something like this possible with current implementation?
>
>
> I first thought this would be easy. But actually it is not.
> The way to achieve the snap on grid behavior is to have an indirection in the Trachel classes. Each trachel shape knows its position (the position is contained in the matrix attached to each shape). The snap-on-grid means you need to slightly process the matrix coordinate. Maybe there are other way to do this, but it does not look like. Changing Trachel because of this seems a bit overkill...
>
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> On Jul 31, 2014, at 3:58 PM, Peter Uhnák <i.uhnak(a)gmail.com> wrote:
>
> > While playing with RTMultiLine I thought that it would be nice to have option for RTDraggable elements to snap to a grid / move only by fixed increments - for example the position could only be divisible by 10 (grid size would be 10), so dragging from 20@10 to 26@4 would jump to 30@0. Is something like this possible with current implementation?
> >
> > The second question is: is it possible for element to subscribe for position updates of another element? (I.e. element A watches for movement of element B and moves accordingly). I know I could add both of them to a composite shape or RTGroup (RTDraggable>>groupToDrag:), however I would prefer something more loosely coupled.
> >
> > In RTDraggable>>initializeElement: i found
> > " element when: TRMouseDragging do: [ :e | e element translateBy: e step. e signalUpdate ]"
> > however it is commented out so perhaps there some other way?
> >
> > Peter
>
>
>
Aug. 8, 2014