dynamic sub browser gets not rendered :/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

dynamic sub browser gets not rendered :/

Guillermo Polito
Hi!

I have a browser where I do something like:

browser transmit
    to: #somePane;
    andShow: [ :a |
        a dynamic presentation: [ :some :element | some custom: element buildCustomBrowser ]
    ]


And then, I have implemented #buildCustomBrowser for example as:

buildCustomBrowser
    | browser |
    browser := GLMTabulator new.
    browser row: #tables.
    browser transmit
        to: #tables;
        andShow: [ :a |
    a table
        title: ('Columns for {1}' format: { table name });
        addColumn: (GLMTableColumn new title: 'Column name'; computation: #name);
        addColumn: (GLMTableColumn new title: 'Null'; computation: [ :column | column nullable asString ]);
        addColumn: (GLMTableColumn new title: 'Type'; computation: [ :column | column typeName asString ]);
        addColumn: (GLMTableColumn new title: 'Length'; computation: [ :column | column length asString ]);
        addColumn: (GLMTableColumn new title: 'Primary Key'; computation: [ :column | column isPrimaryKey asString ]);
        display: self columns;
        yourself.
    ].
     ^browser


And It does not render the table :(.  If I change it to something like:

buildCustomBrowser
    | browser |
    browser := GLMTablePresentation new.
    browser
        title: ('Columns for {1}' format: { table name });
        addColumn: (GLMTableColumn new title: 'Column name'; computation: #name);
        addColumn: (GLMTableColumn new title: 'Null'; computation: [ :column | column nullable asString ]);
        addColumn: (GLMTableColumn new title: 'Type'; computation: [ :column | column typeName asString ]);
        addColumn: (GLMTableColumn new title: 'Length'; computation: [ :column | column length asString ]);
        addColumn: (GLMTableColumn new title: 'Primary Key'; computation: [ :column | column isPrimaryKey asString ]);
        display: self columns.
     ^browser

It works, but I can't have several presentations for the same object... :(

I tried debugging the code, but I get lost and lost a lot of time without figuring anything :(.

Is there a way to do this? any workaround?  or is it a bug or it is ignorance from my side?

Thanks!
Guille

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: dynamic sub browser gets not rendered :/

Tudor Girba-2
Hi,

This is the part of glamour i am not satisfied with.

Currently, you have to start the browser explicitly. Try something like:

browser transmit
    to: #somePane;
    andShow: [ :a |
        a dynamic presentation: [ :some :element | some custom:
(element buildCustomBrowser startOn: 'something')  ]
    ]

Cheers,
Doru


On Tue, Jan 10, 2012 at 4:14 PM, Guillermo Polito
<[hidden email]> wrote:

> Hi!
>
> I have a browser where I do something like:
>
> browser transmit
>     to: #somePane;
>     andShow: [ :a |
>         a dynamic presentation: [ :some :element | some custom: element
> buildCustomBrowser ]
>     ]
>
>
> And then, I have implemented #buildCustomBrowser for example as:
>
> buildCustomBrowser
>     | browser |
>     browser := GLMTabulator new.
>     browser row: #tables.
>     browser transmit
>         to: #tables;
>         andShow: [ :a |
>     a table
>         title: ('Columns for {1}' format: { table name });
>         addColumn: (GLMTableColumn new title: 'Column name'; computation:
> #name);
>         addColumn: (GLMTableColumn new title: 'Null'; computation: [ :column
> | column nullable asString ]);
>         addColumn: (GLMTableColumn new title: 'Type'; computation: [ :column
> | column typeName asString ]);
>         addColumn: (GLMTableColumn new title: 'Length'; computation: [
> :column | column length asString ]);
>         addColumn: (GLMTableColumn new title: 'Primary Key'; computation: [
> :column | column isPrimaryKey asString ]);
>         display: self columns;
>         yourself.
>     ].
>      ^browser
>
>
> And It does not render the table :(.  If I change it to something like:
>
> buildCustomBrowser
>     | browser |
>     browser := GLMTablePresentation new.
>     browser
>         title: ('Columns for {1}' format: { table name });
>         addColumn: (GLMTableColumn new title: 'Column name'; computation:
> #name);
>         addColumn: (GLMTableColumn new title: 'Null'; computation: [ :column
> | column nullable asString ]);
>         addColumn: (GLMTableColumn new title: 'Type'; computation: [ :column
> | column typeName asString ]);
>         addColumn: (GLMTableColumn new title: 'Length'; computation: [
> :column | column length asString ]);
>         addColumn: (GLMTableColumn new title: 'Primary Key'; computation: [
> :column | column isPrimaryKey asString ]);
>         display: self columns.
>      ^browser
>
> It works, but I can't have several presentations for the same object... :(
>
> I tried debugging the code, but I get lost and lost a lot of time without
> figuring anything :(.
>
> Is there a way to do this? any workaround?  or is it a bug or it is
> ignorance from my side?
>
> Thanks!
> Guille
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>



--
www.tudorgirba.com

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: dynamic sub browser gets not rendered :/

Guillermo Polito
Oh yeah, it worked :D !

Thank you very much!

On Tue, Jan 10, 2012 at 1:22 PM, Tudor Girba <[hidden email]> wrote:
Hi,

This is the part of glamour i am not satisfied with.

Currently, you have to start the browser explicitly. Try something like:

browser transmit
   to: #somePane;
   andShow: [ :a |
       a dynamic presentation: [ :some :element | some custom:
(element buildCustomBrowser startOn: 'something')  ]
   ]

Cheers,
Doru


On Tue, Jan 10, 2012 at 4:14 PM, Guillermo Polito
<[hidden email]> wrote:
> Hi!
>
> I have a browser where I do something like:
>
> browser transmit
>     to: #somePane;
>     andShow: [ :a |
>         a dynamic presentation: [ :some :element | some custom: element
> buildCustomBrowser ]
>     ]
>
>
> And then, I have implemented #buildCustomBrowser for example as:
>
> buildCustomBrowser
>     | browser |
>     browser := GLMTabulator new.
>     browser row: #tables.
>     browser transmit
>         to: #tables;
>         andShow: [ :a |
>     a table
>         title: ('Columns for {1}' format: { table name });
>         addColumn: (GLMTableColumn new title: 'Column name'; computation:
> #name);
>         addColumn: (GLMTableColumn new title: 'Null'; computation: [ :column
> | column nullable asString ]);
>         addColumn: (GLMTableColumn new title: 'Type'; computation: [ :column
> | column typeName asString ]);
>         addColumn: (GLMTableColumn new title: 'Length'; computation: [
> :column | column length asString ]);
>         addColumn: (GLMTableColumn new title: 'Primary Key'; computation: [
> :column | column isPrimaryKey asString ]);
>         display: self columns;
>         yourself.
>     ].
>      ^browser
>
>
> And It does not render the table :(.  If I change it to something like:
>
> buildCustomBrowser
>     | browser |
>     browser := GLMTablePresentation new.
>     browser
>         title: ('Columns for {1}' format: { table name });
>         addColumn: (GLMTableColumn new title: 'Column name'; computation:
> #name);
>         addColumn: (GLMTableColumn new title: 'Null'; computation: [ :column
> | column nullable asString ]);
>         addColumn: (GLMTableColumn new title: 'Type'; computation: [ :column
> | column typeName asString ]);
>         addColumn: (GLMTableColumn new title: 'Length'; computation: [
> :column | column length asString ]);
>         addColumn: (GLMTableColumn new title: 'Primary Key'; computation: [
> :column | column isPrimaryKey asString ]);
>         display: self columns.
>      ^browser
>
> It works, but I can't have several presentations for the same object... :(
>
> I tried debugging the code, but I get lost and lost a lot of time without
> figuring anything :(.
>
> Is there a way to do this? any workaround?  or is it a bug or it is
> ignorance from my side?
>
> Thanks!
> Guille
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>



--
www.tudorgirba.com

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: dynamic sub browser gets not rendered :/

Tudor Girba-2
Glad to be of help :).

Please keep the questions going. I am also interested to see results in form of videos or pictures.

Cheers,
Doru


On 10 Jan 2012, at 17:37, Guillermo Polito wrote:

> Oh yeah, it worked :D !
>
> Thank you very much!
>
> On Tue, Jan 10, 2012 at 1:22 PM, Tudor Girba <[hidden email]> wrote:
> Hi,
>
> This is the part of glamour i am not satisfied with.
>
> Currently, you have to start the browser explicitly. Try something like:
>
> browser transmit
>    to: #somePane;
>    andShow: [ :a |
>        a dynamic presentation: [ :some :element | some custom:
> (element buildCustomBrowser startOn: 'something')  ]
>    ]
>
> Cheers,
> Doru
>
>
> On Tue, Jan 10, 2012 at 4:14 PM, Guillermo Polito
> <[hidden email]> wrote:
> > Hi!
> >
> > I have a browser where I do something like:
> >
> > browser transmit
> >     to: #somePane;
> >     andShow: [ :a |
> >         a dynamic presentation: [ :some :element | some custom: element
> > buildCustomBrowser ]
> >     ]
> >
> >
> > And then, I have implemented #buildCustomBrowser for example as:
> >
> > buildCustomBrowser
> >     | browser |
> >     browser := GLMTabulator new.
> >     browser row: #tables.
> >     browser transmit
> >         to: #tables;
> >         andShow: [ :a |
> >     a table
> >         title: ('Columns for {1}' format: { table name });
> >         addColumn: (GLMTableColumn new title: 'Column name'; computation:
> > #name);
> >         addColumn: (GLMTableColumn new title: 'Null'; computation: [ :column
> > | column nullable asString ]);
> >         addColumn: (GLMTableColumn new title: 'Type'; computation: [ :column
> > | column typeName asString ]);
> >         addColumn: (GLMTableColumn new title: 'Length'; computation: [
> > :column | column length asString ]);
> >         addColumn: (GLMTableColumn new title: 'Primary Key'; computation: [
> > :column | column isPrimaryKey asString ]);
> >         display: self columns;
> >         yourself.
> >     ].
> >      ^browser
> >
> >
> > And It does not render the table :(.  If I change it to something like:
> >
> > buildCustomBrowser
> >     | browser |
> >     browser := GLMTablePresentation new.
> >     browser
> >         title: ('Columns for {1}' format: { table name });
> >         addColumn: (GLMTableColumn new title: 'Column name'; computation:
> > #name);
> >         addColumn: (GLMTableColumn new title: 'Null'; computation: [ :column
> > | column nullable asString ]);
> >         addColumn: (GLMTableColumn new title: 'Type'; computation: [ :column
> > | column typeName asString ]);
> >         addColumn: (GLMTableColumn new title: 'Length'; computation: [
> > :column | column length asString ]);
> >         addColumn: (GLMTableColumn new title: 'Primary Key'; computation: [
> > :column | column isPrimaryKey asString ]);
> >         display: self columns.
> >      ^browser
> >
> > It works, but I can't have several presentations for the same object... :(
> >
> > I tried debugging the code, but I get lost and lost a lot of time without
> > figuring anything :(.
> >
> > Is there a way to do this? any workaround?  or is it a bug or it is
> > ignorance from my side?
> >
> > Thanks!
> > Guille
> >
> > _______________________________________________
> > Moose-dev mailing list
> > [hidden email]
> > https://www.iam.unibe.ch/mailman/listinfo/moose-dev
> >
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Beauty is where we see it."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: dynamic sub browser gets not rendered :/

Guillermo Polito
Here is a little screenshot, nothing super fabulous :$.

-On the left is the tree of objects of a database.
-On the right what I wanted to do is:
  - show a description of the selected object (i.e. if you select a table, list the columns and foreign keys)
  - put a panel to send querys to the database.

I'm trying to public an stable version today so, you'll see the ANN in the lists soon :)

On Tue, Jan 10, 2012 at 4:07 PM, Tudor Girba <[hidden email]> wrote:
Glad to be of help :).

Please keep the questions going. I am also interested to see results in form of videos or pictures.

Cheers,
Doru


On 10 Jan 2012, at 17:37, Guillermo Polito wrote:

> Oh yeah, it worked :D !
>
> Thank you very much!
>
> On Tue, Jan 10, 2012 at 1:22 PM, Tudor Girba <[hidden email]> wrote:
> Hi,
>
> This is the part of glamour i am not satisfied with.
>
> Currently, you have to start the browser explicitly. Try something like:
>
> browser transmit
>    to: #somePane;
>    andShow: [ :a |
>        a dynamic presentation: [ :some :element | some custom:
> (element buildCustomBrowser startOn: 'something')  ]
>    ]
>
> Cheers,
> Doru
>
>
> On Tue, Jan 10, 2012 at 4:14 PM, Guillermo Polito
> <[hidden email]> wrote:
> > Hi!
> >
> > I have a browser where I do something like:
> >
> > browser transmit
> >     to: #somePane;
> >     andShow: [ :a |
> >         a dynamic presentation: [ :some :element | some custom: element
> > buildCustomBrowser ]
> >     ]
> >
> >
> > And then, I have implemented #buildCustomBrowser for example as:
> >
> > buildCustomBrowser
> >     | browser |
> >     browser := GLMTabulator new.
> >     browser row: #tables.
> >     browser transmit
> >         to: #tables;
> >         andShow: [ :a |
> >     a table
> >         title: ('Columns for {1}' format: { table name });
> >         addColumn: (GLMTableColumn new title: 'Column name'; computation:
> > #name);
> >         addColumn: (GLMTableColumn new title: 'Null'; computation: [ :column
> > | column nullable asString ]);
> >         addColumn: (GLMTableColumn new title: 'Type'; computation: [ :column
> > | column typeName asString ]);
> >         addColumn: (GLMTableColumn new title: 'Length'; computation: [
> > :column | column length asString ]);
> >         addColumn: (GLMTableColumn new title: 'Primary Key'; computation: [
> > :column | column isPrimaryKey asString ]);
> >         display: self columns;
> >         yourself.
> >     ].
> >      ^browser
> >
> >
> > And It does not render the table :(.  If I change it to something like:
> >
> > buildCustomBrowser
> >     | browser |
> >     browser := GLMTablePresentation new.
> >     browser
> >         title: ('Columns for {1}' format: { table name });
> >         addColumn: (GLMTableColumn new title: 'Column name'; computation:
> > #name);
> >         addColumn: (GLMTableColumn new title: 'Null'; computation: [ :column
> > | column nullable asString ]);
> >         addColumn: (GLMTableColumn new title: 'Type'; computation: [ :column
> > | column typeName asString ]);
> >         addColumn: (GLMTableColumn new title: 'Length'; computation: [
> > :column | column length asString ]);
> >         addColumn: (GLMTableColumn new title: 'Primary Key'; computation: [
> > :column | column isPrimaryKey asString ]);
> >         display: self columns.
> >      ^browser
> >
> > It works, but I can't have several presentations for the same object... :(
> >
> > I tried debugging the code, but I get lost and lost a lot of time without
> > figuring anything :(.
> >
> > Is there a way to do this? any workaround?  or is it a bug or it is
> > ignorance from my side?
> >
> > Thanks!
> > Guille
> >
> > _______________________________________________
> > Moose-dev mailing list
> > [hidden email]
> > https://www.iam.unibe.ch/mailman/listinfo/moose-dev
> >
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Beauty is where we see it."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

browser.png (113K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: dynamic sub browser gets not rendered :/

Tudor Girba-2
Excellent stuff.

I would be interested in getting this things closer to Moose.

Cheers,
Doru


On 10 Jan 2012, at 20:19, Guillermo Polito wrote:

> Here is a little screenshot, nothing super fabulous :$.
>
> -On the left is the tree of objects of a database.
> -On the right what I wanted to do is:
>   - show a description of the selected object (i.e. if you select a table, list the columns and foreign keys)
>   - put a panel to send querys to the database.
>
> I'm trying to public an stable version today so, you'll see the ANN in the lists soon :)
>
> On Tue, Jan 10, 2012 at 4:07 PM, Tudor Girba <[hidden email]> wrote:
> Glad to be of help :).
>
> Please keep the questions going. I am also interested to see results in form of videos or pictures.
>
> Cheers,
> Doru
>
>
> On 10 Jan 2012, at 17:37, Guillermo Polito wrote:
>
> > Oh yeah, it worked :D !
> >
> > Thank you very much!
> >
> > On Tue, Jan 10, 2012 at 1:22 PM, Tudor Girba <[hidden email]> wrote:
> > Hi,
> >
> > This is the part of glamour i am not satisfied with.
> >
> > Currently, you have to start the browser explicitly. Try something like:
> >
> > browser transmit
> >    to: #somePane;
> >    andShow: [ :a |
> >        a dynamic presentation: [ :some :element | some custom:
> > (element buildCustomBrowser startOn: 'something')  ]
> >    ]
> >
> > Cheers,
> > Doru
> >
> >
> > On Tue, Jan 10, 2012 at 4:14 PM, Guillermo Polito
> > <[hidden email]> wrote:
> > > Hi!
> > >
> > > I have a browser where I do something like:
> > >
> > > browser transmit
> > >     to: #somePane;
> > >     andShow: [ :a |
> > >         a dynamic presentation: [ :some :element | some custom: element
> > > buildCustomBrowser ]
> > >     ]
> > >
> > >
> > > And then, I have implemented #buildCustomBrowser for example as:
> > >
> > > buildCustomBrowser
> > >     | browser |
> > >     browser := GLMTabulator new.
> > >     browser row: #tables.
> > >     browser transmit
> > >         to: #tables;
> > >         andShow: [ :a |
> > >     a table
> > >         title: ('Columns for {1}' format: { table name });
> > >         addColumn: (GLMTableColumn new title: 'Column name'; computation:
> > > #name);
> > >         addColumn: (GLMTableColumn new title: 'Null'; computation: [ :column
> > > | column nullable asString ]);
> > >         addColumn: (GLMTableColumn new title: 'Type'; computation: [ :column
> > > | column typeName asString ]);
> > >         addColumn: (GLMTableColumn new title: 'Length'; computation: [
> > > :column | column length asString ]);
> > >         addColumn: (GLMTableColumn new title: 'Primary Key'; computation: [
> > > :column | column isPrimaryKey asString ]);
> > >         display: self columns;
> > >         yourself.
> > >     ].
> > >      ^browser
> > >
> > >
> > > And It does not render the table :(.  If I change it to something like:
> > >
> > > buildCustomBrowser
> > >     | browser |
> > >     browser := GLMTablePresentation new.
> > >     browser
> > >         title: ('Columns for {1}' format: { table name });
> > >         addColumn: (GLMTableColumn new title: 'Column name'; computation:
> > > #name);
> > >         addColumn: (GLMTableColumn new title: 'Null'; computation: [ :column
> > > | column nullable asString ]);
> > >         addColumn: (GLMTableColumn new title: 'Type'; computation: [ :column
> > > | column typeName asString ]);
> > >         addColumn: (GLMTableColumn new title: 'Length'; computation: [
> > > :column | column length asString ]);
> > >         addColumn: (GLMTableColumn new title: 'Primary Key'; computation: [
> > > :column | column isPrimaryKey asString ]);
> > >         display: self columns.
> > >      ^browser
> > >
> > > It works, but I can't have several presentations for the same object... :(
> > >
> > > I tried debugging the code, but I get lost and lost a lot of time without
> > > figuring anything :(.
> > >
> > > Is there a way to do this? any workaround?  or is it a bug or it is
> > > ignorance from my side?
> > >
> > > Thanks!
> > > Guille
> > >
> > > _______________________________________________
> > > Moose-dev mailing list
> > > [hidden email]
> > > https://www.iam.unibe.ch/mailman/listinfo/moose-dev
> > >
> >
> >
> >
> > --
> > www.tudorgirba.com
> >
> > "Every thing has its own flow"
> >
> > _______________________________________________
> > Moose-dev mailing list
> > [hidden email]
> > https://www.iam.unibe.ch/mailman/listinfo/moose-dev
> >
> > _______________________________________________
> > Moose-dev mailing list
> > [hidden email]
> > https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "Beauty is where we see it."
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> <browser.png>_______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Problem solving should be focused on describing
the problem in a way that makes the solution obvious."





_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev