MetaCase Homepage
Forum Home Forum Home > > MetaEdit+
  New Posts New Posts RSS Feed - Condition in the symbol element
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Condition in the symbol element

 Post Reply Post Reply
Author
Message
cmorais View Drop Down
Member
Member
Avatar

Joined: 23.Mar.2018
Location: Ireland
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote cmorais Quote  Post ReplyReply Direct Link To This Post Topic: Condition in the symbol element
    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

Back to Top
stevek View Drop Down
MetaCase
MetaCase
Avatar

Joined: 11.Mar.2008
Points: 556
Post Options Post Options   Thanks (1) Thanks(1)   Quote stevek Quote  Post ReplyReply Direct Link To This Post 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.


Edited by stevek - 07.Sep.2018 at 12:26
Back to Top
cmorais View Drop Down
Member
Member
Avatar

Joined: 23.Mar.2018
Location: Ireland
Points: 8
Post Options Post Options   Thanks (1) Thanks(1)   Quote cmorais Quote  Post ReplyReply Direct Link To This Post 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!

Back to Top
stevek View Drop Down
MetaCase
MetaCase
Avatar

Joined: 11.Mar.2008
Points: 556
Post Options Post Options   Thanks (1) Thanks(1)   Quote stevek Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 10.16
Copyright ©2001-2013 Web Wiz Ltd.

This page was generated in 0.031 seconds.