On 04/06/15 00:03, Rogier Schaaf wrote:
Hi Stephan,

I'm just starting out with Magritte and QCMagritte and combined they're quite a substantial code base to get your head around. Before doing an attempt at something useful I wanted to get it working for my specific situation, so I subclassed MACommandColumn and re-implemented renderCellLinkContent:on: like so:

renderCellLinkContent: anObject on: html

html tbsButtonGroup: [
html tbsDropdownButton
beDefault;
beExtraSmall;
with: [
html text: 'Commands ';
tbsCaret
].
html tbsDropdownMenu: [ 
self commands
do: [ :each |
each value = 'divider'
ifTrue: [ html tbsDivider ]
ifFalse: [
html tbsDropdownMenuItem: [
html anchor
callback: [ each key value: anObject ];
with: each value ]
]
]
]
]

I used the Twitter Bootstrap implementation by Torsten Bergmann to perform the rendering. Again, not sure if this is within the scope of QCMagritte.

Sounds fine. It's just like what we do more often in QC-Magritte-Bootstrap. Might fit in
QC-Magritte-Bootstrap-Component, or you might want to add an option
in QCBToManyComponent to use this style. Perhaps subclass QCCommandColumn
for this, and look at where that is used?

Stephan


Cheers,

Rogier

On 3 June 2015 at 21:45, Stephan Eggermont <stephan@stack.nl> wrote:
Hi Rogier,

Please feel free to add something for this to QCMagritte

>I've experimented with QCCommandColumn but without
>success (it needs something in its component instance
>variable but I'm clueless as to what).

QCCommandColumn>>execute: aBlock with: aRow
    aBlock isSymbol ifTrue: [ ^aRow perform: aBlock ].
    ^aBlock cull: aRow cull: self component

A command may want to have access to both the row it operates
on and the report, or the component containing the report

QCToManyReport>>buildCommandColumn
    | retVal |
    retVal := (QCCommandColumn on: self) setReport: self report.
    self addDefaultCommandsTo: retVal.
    self addDescriptionCommandsTo: retVal.
    self addOrderingCommandsTo: retVal.
    ^ retVal

Stephan
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki



_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki