Oh yeah, it worked :D !
Thank you very much!
Hi,
This is the part of glamour i am not satisfied with.
Currently, you have to start the browser explicitly. Try something like:
(element buildCustomBrowser startOn: 'something') ]
browser transmit
to: #somePane;
andShow: [ :a |
a dynamic presentation: [ :some :element | some custom:
]
Cheers,
Doru
> _______________________________________________
On Tue, Jan 10, 2012 at 4:14 PM, Guillermo Polito
<guillermopolito@gmail.com> 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
> Moose-dev@iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
--
www.tudorgirba.com
"Every thing has its own flow"
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev