Print Page | Close Window

Condition in the symbol element

Printed From: MetaCase
Category:
Forum Name: MetaEdit+
Forum Description: All topics relating to MetaEdit+ or DSM
URL: http://www.metacase.com/forums/forum_posts.asp?TID=896
Printed Date: 14.Dec.2018 at 14:39
Software Version: Web Wiz Forums 10.16 - http://www.webwizforums.com


Topic: Condition in the symbol element
Posted By: cmorais
Subject: Condition in the symbol element
Date Posted: 06.Sep.2018 at 15:31
Hi there!

I'm creating a symbol that, if it has a explosion subgraph, it would show a small black circle in the corner... to show the user that this item has  a subgraph.

But I can't make it work... I think it is due to the MERL syntax.

The generator that I'm using is
do .() {
explosions
}

In the script part, it returns the name of the explosion...
But I think I'm missing somethig, because even when I put STRING = # (any string value),
it doesn't work (no show). I think I have to call the "parent" object, or something like this. But I don't know how =/

Any help, please? =D




Replies:
Posted By: stevek
Date Posted: 06.Sep.2018 at 16:49
# isn't any value, but any single character; any value is *, and any non-empty value is #*. NB both are only valid if you are doing a wildcard comparison with =~ rather than a simple string comparison with =.

From an object, do .() will go to any connected object, which is probably also not what you want.
My guess is:
do explosions { 'T' }
and check that the result is not equal to the empty string.


Posted By: cmorais
Date Posted: 07.Sep.2018 at 10:54
Yay, it worked!

But not as an empty string, I had to use the #* wildcard.
So i used the do explosions { 'T' }
And the String =~ comparison  with #* in the condition field.

Thank you very much!



Posted By: stevek
Date Posted: 07.Sep.2018 at 12:24
Glad that you got it working! I guess with the empty string you had a simple mistake like forgetting to change the comparison to <> (not equal), or having a space or something in the text field so it wasn't empty.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 10.16 - http://www.webwizforums.com
Copyright ©2001-2013 Web Wiz Ltd. - http://www.webwiz.co.uk