I am trying to use the Glamour and as I first step I copied the code provided in the examples and pasted it in a new class called tree browser.
|browser accum renderer| browser := TreeBrowser new. accum := browser accumulator. renderer := GLMMorphicRenderer new. accum renderGlamorouslyOn: renderer. I thought that executing this would give a window or something but it didn't and I can't figure out how to do so. I don’t get any error message or anything. How is it supposed to show a window on the screen? Is there some other command
I have to add to display the window? Thank you J |
I think you are using Glamour the wrong way :). As I understand, you have a TreeBrowser>>#accumulator method that answers an instance of a GLMAccumulator. In this case, all you have to do is:
TreeBrowser new accumulator openOn: yourDesiredInputObject. I suggest that you take a look at the "GLMBasicExamples open", and perhaps you can also read the Glamour chapter from the MooseBook (http://themoosebook.org/book/internals/glamour).
Doru On Sat, Aug 24, 2013 at 3:10 PM, Mohammad Al Houssami (Alumni) <[hidden email]> wrote:
"Every thing has its own flow"
|
Actually yes I was using it the wrong way
J. I was checking the rendering part of the book and this is what was provided only.
From: Pharo-users [mailto:[hidden email]]
On Behalf Of Tudor Girba I think you are using Glamour the wrong way :). As I understand, you have a TreeBrowser>>#accumulator method that answers an instance of a GLMAccumulator. In this case, all you have to do is: TreeBrowser new accumulator openOn: yourDesiredInputObject. I suggest that you take a look at the "GLMBasicExamples open", and perhaps you can also read the Glamour chapter from the MooseBook (http://themoosebook.org/book/internals/glamour). Doru On Sat, Aug 24, 2013 at 3:10 PM, Mohammad Al Houssami (Alumni) <[hidden email]> wrote: I am trying to use the Glamour and as I first step I copied the code provided in the examples and pasted it in a new class called tree browser.
|browser accum renderer| browser := TreeBrowser new. accum := browser accumulator. renderer := GLMMorphicRenderer new. accum renderGlamorouslyOn: renderer.
I thought that executing this would give a window or something but it didn't and I can't figure out how to do so. I don’t get any error message or anything. How is it supposed to
show a window on the screen? Is there some other command I have to add to display the window?
Thank you
J
-- "Every thing has its own flow" |
Hi, It seems to me that you are trying to execute the code from Glamour directly in Pharo. However, the book is meant to work with a Moose image in which you already loaded the target case study. This tells me that you need more basic support. So, let's start from the beginning. Could you tell us what you want to do? What should you browser look like. And what do you have in the TreeBrowser? Is the code available?
Cheers, Doru On Sat, Aug 24, 2013 at 9:31 PM, Mohammad Al Houssami (Alumni) <[hidden email]> wrote:
"Every thing has its own flow"
|
Yes I am. But I have loaded the Moose and Glamour image into pharo.
From: Pharo-users [mailto:[hidden email]]
On Behalf Of Tudor Girba Hi, It seems to me that you are trying to execute the code from Glamour directly in Pharo. However, the book is meant to work with a Moose image in which you already loaded the target case study. This tells me that you need more basic support. So, let's start from the beginning. Could you tell us what you want to do? What should you browser look like. And what do you have in the TreeBrowser? Is the code available? Cheers, Doru On Sat, Aug 24, 2013 at 9:31 PM, Mohammad Al Houssami (Alumni) <[hidden email]> wrote: Actually yes I was using it the wrong way
J. I was checking the rendering part of the book and this is what was provided only.
From: Pharo-users [mailto:[hidden email]]
On Behalf Of Tudor Girba I think you are using Glamour the wrong way :). As I understand, you have a TreeBrowser>>#accumulator method that answers an instance of a GLMAccumulator. In this case, all you have to do is: TreeBrowser new accumulator openOn: yourDesiredInputObject. I suggest that you take a look at the "GLMBasicExamples open", and perhaps you can also read the Glamour chapter from the MooseBook (http://themoosebook.org/book/internals/glamour). Doru On Sat, Aug 24, 2013 at 3:10 PM, Mohammad Al Houssami (Alumni) <[hidden email]> wrote: I am trying to use the Glamour and as I first step I copied the code provided in the examples and pasted it in a new class called tree browser.
|browser accum renderer| browser := TreeBrowser new. accum := browser accumulator. renderer := GLMMorphicRenderer new. accum renderGlamorouslyOn: renderer.
I thought that executing this would give a window or something but it didn't and I can't figure out how to do so. I don’t get any error message or anything. How is it supposed to
show a window on the screen? Is there some other command I have to add to display the window?
Thank you
J
--
"Every thing has its own flow"
-- "Every thing has its own flow" |
Hi, Ok. So you have a an object holding your DOM tree. Let's call it domRoot. And let's suppose that an element in tree can get the children via a #children selector. In this case, if you want to display the tree, do this: GLMCompositePresentation new tabulator with: [ :t |
t column: #tree; column: #content. t transmit to: #tree; andShow: [ :a | a tree children: #children ].
t transmit from: #tree; to: #content; andShow: [ :a | a text display: [ :el | el asString ] ] ]; openOn: domRoot
Cheers, Doru On Sat, Aug 24, 2013 at 9:50 PM, Mohammad Al Houssami (Alumni) <[hidden email]> wrote:
"Every thing has its own flow"
|
Thank you Doru.
From: Pharo-users [mailto:[hidden email]]
On Behalf Of Tudor Girba Hi, Ok. So you have a an object holding your DOM tree. Let's call it domRoot. And let's suppose that an element in tree can get the children via a #children selector. In this case, if you want to display the tree, do this: GLMCompositePresentation new tabulator with: [ :t | t column: #tree; column: #content. t transmit to: #tree; andShow: [ :a | a tree children: #children ]. t transmit from: #tree; to: #content; andShow: [ :a | a text display: [ :el | el asString ] ] ]; openOn: domRoot Cheers, Doru On Sat, Aug 24, 2013 at 9:50 PM, Mohammad Al Houssami (Alumni) <[hidden email]> wrote: Yes I am. But I have loaded the Moose and Glamour image into pharo.
From: Pharo-users [mailto:[hidden email]]
On Behalf Of Tudor Girba
Hi, It seems to me that you are trying to execute the code from Glamour directly in Pharo. However, the book is meant to work with a Moose image in which you already loaded the target
case study. This tells me that you need more basic support. So, let's start from the beginning. Could you tell us what you want to do? What should you browser look like. And what do you have in the TreeBrowser? Is the code available? Cheers, Doru On Sat, Aug 24, 2013 at 9:31 PM, Mohammad Al Houssami (Alumni) <[hidden email]>
wrote: Actually yes I was using it the wrong way
J. I was checking the rendering part of the book and this is what was provided only.
From: Pharo-users [mailto:[hidden email]]
On Behalf Of Tudor Girba I think you are using Glamour the wrong way :). As I understand, you have a TreeBrowser>>#accumulator method that answers an instance of a GLMAccumulator. In this case, all you have to do is: TreeBrowser new accumulator openOn: yourDesiredInputObject. I suggest that you take a look at the "GLMBasicExamples open", and perhaps you can also read the Glamour chapter from the MooseBook (http://themoosebook.org/book/internals/glamour). Doru On Sat, Aug 24, 2013 at 3:10 PM, Mohammad Al Houssami (Alumni) <[hidden email]>
wrote: I am trying to use the Glamour and as I first step I copied the code provided in the examples and pasted it in a new class called tree browser.
|browser accum renderer| browser := TreeBrowser new. accum := browser accumulator. renderer := GLMMorphicRenderer new. accum renderGlamorouslyOn: renderer.
I thought that executing this would give a window or something but it didn't and I can't figure out how to do so. I don’t get any error message or anything. How is it supposed to
show a window on the screen? Is there some other command I have to add to display the window?
Thank you
J
--
"Every thing has its own flow"
--
"Every thing has its own flow"
-- "Every thing has its own flow" |
Great. Please feel free to send more questions. You can also join the Moose mailing list for more technical issues: Cheers, Doru On Sun, Aug 25, 2013 at 12:01 AM, Mohammad Al Houssami (Alumni) <[hidden email]> wrote:
"Every thing has its own flow"
|
Free forum by Nabble | Edit this page |