use a when: clause.

For example, look at:

FileReference>> gtInspectorPngIn: composite
<gtInspectorPresentationOrder: 0>
composite morph
title: 'Picture';
display: [ self binaryReadStreamDo: [ :stream | PNGReadWriter formFromStream: stream ] ];
when: [ self mimeTypes notNil and: [ self mimeTypes first matches: ZnMimeType imagePng ] ]

Cheers,
Doru



On Sun, May 31, 2015 at 7:50 PM, Sean P. DeNigris <sean@clipperadams.com> wrote:
Is there a way to specify that a presentation should only be used if a
certain condition is met? The use case I have in mind is adding the Magritte
presentation to object, but only showing if the object has a Magritte
description. It is a PITA to have to copy/paste the presentation method into
every Magritte-described object...



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/GT-Presentation-Show-Conditionally-tp4829638.html
Sent from the Moose mailing list archive at Nabble.com.
_______________________________________________
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"