Hi Mariano,
Sounds great. This is exactly the spirit of Moose.
On 20 Apr 2011, at 01:10, Mariano Martinez Peck wrote:
> On Wed, Apr 20, 2011 at 1:03 AM, Mariano Martinez Peck <marianopeck@gmail.com> wrote:
>
>
> On Tue, Apr 19, 2011 at 11:39 PM, Mariano Martinez Peck <marianopeck@gmail.com> wrote:
> Hi guys. Since several months, I wanted to create a little browser for learning VM and related stuff. I never did anything because I was lazy. Last week, I took Glamour and without knowing almost anything about it, in less than 3 hours (that includes everything, downloading the image, browsing examples, searching for something similar to what I need, and code the browsers I needed) , I come up with what I want to share with you. Basically, I only have the browsers for the moment. My knowledge is very limited in the Slang to C translator, or machine code simulation. However, the "real VM hackers" will try to provide me such functionalities.
>
> Having said that, there are 3 browsers:
>
> 1) VMBrowserSlang: shows only packages and classes which are written in slang. When you select a method, you have 2 panels: smalltalk code and C translated code.
> Screenshot: http://img857.imageshack.us/i/vmbrowserslang.png/
>
> 2) VMBrowserMethods: shows all packages and classes of the system and for every method, you have 3 panels: smalltalk code, bytecodes and machine code (using the simple mapping)
> Screenshot: http://img862.imageshack.us/i/vmbrowsermethods.png/
>
> 3) VMBrowserMappings: this is for you Eliot!! Basically, it shows all packages and classes of the system and for every method, you have 5 panels: smalltalk code and one panel per strategy to map to machine code (simple cogit, sista, etc).
> Screenshot: http://img4.imageshack.us/f/vmbrowsermappings.png/
>
> As you can see the idea is to see the different stages of our code at the same time: smalltalk code, bytecodes, machine code, etc. The idea is to easily learn.
Could you add a post on your shiny new blog about this? Maybe some code as well? I would love to link to it from the Moose website.
You are trying to reason about your browser from a user interface perspective.
> Now...the questions:
>
> 1) how can I put a title to the browsers ? In this case, they all are subclasses from GLMGlobalBrowserTemplate.
>
>
> I answer my self
>
> buildBrowser
>
> browser := GLMTabulator new.
> browser title: 'A Cool title'.
:)
> 2) Is there a way to easily "close" and auto-adjust subpanes? For example, look this screenshot: http://img4.imageshack.us/f/vmbrowsermappings.png/
> there are 5 panes that are rendered when a method is selected. I would love that somehow (which a little X in the tab title, or a checkbox somewhere with the available panes), one or more of those panes can be automatically removed (and if added again even better). And when I remove one of them, the others auto-adjust to ocupy the full container. It is really difficult to explain by email..
> Ok...I found the method populate: #selection icon: GLMUIThemeExtraIcons glamorousCancel entitled: 'Close' with: [:text :aClass | self halt. ].
> so that I can use it like this:
>
> sourceCodeIn: a
> | lintBrowser |
> (a text)
> title: 'Method source';
> display: [ :class :method | class sourceCodeAt: method ];
> forSmalltalk: [ :class | class ];
> populate: #selection icon: GLMUIThemeExtraIcons glamorousCancel entitled: 'Close' with: [:text :aClass | self halt. ].
>
>
> but still, I don't know how to remove the current code pane from the super container.
>
>
> I found something similar, but still don't know how to make it work:
>
> removePaneIndex: i
> | paneRemoved |
> paneRemoved := self panes removeAt: i.
> paneRemoved unregisterFromAllAnnouncements.
> self announce: (GLMPaneRemoved pane: paneRemoved fromBrowser: self )
Glamour is at a higher level of abstraction and it is meant to not mix the browsing model with rendering.
It looks to me like what you are trying to achieve is that you want to present the same object in 5 different ways, and only look at some of them as you wish.
The straightforward way to achieve this would be by using multiple presentations (like you did for Class list / Hierarchy).
You would still not have the ability of removing a presentation, but you could put them in tabs.
GLMPaneRemoved is an internal announcement and it should not be used through scripting. If you need a user interface interaction that does not match your desire, you should create your own browser or presentation type. Just do not mix the UI with the conceptual browser.
Cheers,
Doru
> _______________________________________________
> thanks for any help
>
> mariano
>
>
> Thanks
>
>
> Thanks in advance
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
> Moose-dev mailing list
> Moose-dev@iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"No matter how many recipes we know, we still value a chef."
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev