Tag formulæ spaces or not?

I have always understood that tag formulae should not have spaces - I’m using Tomaja’s excellant tutorial:

I have copied and pasted the formulae but this has introduced spaces which I delete, however with spaces it works and without it doesn’t! So now I don’t really know why - anybody help me understand?

2 Likes

Yes, I have formulas that work with spaces in them.

I have had weird effects though in certain fields. Opacity and rotation do not seem to be affected. But nested formulas in X,Y position can be an issue.

As a general rule, I would remove all spaces.

3 Likes

Since that Topic was posted the Syntax rules have changed a little bit . I ten to put () in to debug stuff. Unless you know exactly the Natural Precedence of the Operands it becomes bugged . Can you please show us the code / Formula you are talking about as I can not inspect the face you have Linked .
.
I am struggling to see how that code works . I have seen better implementations of it . If you know what you are doing you don’t need to Hide hand and thing it can be done in one layer . I have an example base don 24 hrs hand which I am sure can be adapted . I had help with that myself .
.

2 Likes

These are the formulae I’m referring to -
Second hand:
Rotation: (interpAccel (#DWE#,0,2,0.8) * #DWFSS#)
Transparency: $ #DWE# < 2 || #DWE# > 4 ? 100 : 0 $
Second second hand:
Rotation: ( #DWFSS# + ( ( sin( (pi) + ( ( 4 - #DWE#) * pi * 5) ) ) ) * ( - ( 4 - #DWE# ) * 5 ) ) )
Transparency: $ #DWE# >= 2 && #DWE# <= 4 ? 100 : 0 $

2 Likes

I’ve learned to simply add brackets everywhere & remove spaces, as weird stuff happens if I don’t, especially since I have lots of long expressions. Apps like Notepad++ are helpfull to edit expressions in before copying and pasting them in Creator, as Notepad++ hilights the opening and closing brackets that your curser is on when editing expressions. That way you can be sure you see immediately when you have brackets in right spots, and it also hilights brackets that can surprise you are are in the wrong spots or not there at all.

3 Likes

Well I got it going . The issue it if the Formula is not format protected it get bugs slipped into it by Marvin . ( Server ) I retyped the Second Second Formula and it worked fine . The rotation Fields do not care much about spaces . One of the formula had an extra ) at the end . It used to work a year ago and before but not now . Loads of my faces have that error .
BUT Opacity is a Fussy old thing and will not tolerate spaces in certain Formulas . I think Boolean Operand make it very fussy seeing the grown ups playing males it a bit nervous .
It is best to get into the habit of protecting the pasted Code / Formula with </> Above after selecting it .
I am certain this trick can be stitched into a one liner .
I will have a go but it is a little beyond me , but I do know a Few Makers that Can . Let see if they are peeking .
.
.

One thing I spotted: when calling a function, never use a space

interpAccel (

should be

interpAccel(

and, yes, the 2 condition left and right of ||, I would put in brackets.

The operations in the Rotation are not critical, that should work.

Transparency: I would also use brackets.

1 Like

I found these work .

Second hand 1 rotation
(interpAccel (#DWE#,0,2,0.8) * #DWFSS#)
Second hand 1 Opacity
$#DWE#<2||#DWE#>4?100:0$

Second hand 2 rotation
( #DWFSS# + ( ( sin( (pi) + ( ( 4 - #DWE#) * pi * 5) ) ) ) * ( - ( 4 - #DWE# ) * 5 ) )
Second hand 2 Opacity
$#DWE#>=2&&#DWE#<=4?100:0$

Hi, the above doesn’t work for me :frowning: I’ve tried just pasting them in, typing them in and pasting in and removing spaces - so I really don’t understand what’s going on here.

Both methods of linking the face here produce the same outcome for me - there was another way by deleting part of the link but I can’t find the way anymore.

I think Marvin is messing me about here!

1 Like

If you have operands (&& or ||) between 2 conditions, better use brackets:

Better: $(#DWE#>=2)&&(#DWE#<=4)?100:0$

1 Like

Try posting the link trimmed .
.
.


.
.

. .

See there should be nothing but a single value in the debugging window . This Opacity Formula still has spaces that is why it is a NOP .

1 Like

Here is a test I made . On my Creator ( Beta ) it works perfectly . With Beta Off it works the same . I copied the formulas I posted above and it works . But not well . I am wondering if your your resources have a high pixel count . I have not looked the rest of the face yet . I think Creator is Miss behaving today . Just now and again BUGs get into the Face . A couple of times on a face with complex formulas that were not very Professional I had to actually start right from the beginning .
.
.

Thanks for the ‘trimming’ hint - here’s my watchface with inspection on -

1 Like

Hmmm - it started like this, I deleted all the gears and stuff -

Maybe I should make a new version from scratch…

1 Like

Sadly you have not got the bounce . I have had a good look at your face I see nothing wrong there . I can not judge how large your resource images are . I like the work you were doing with the date . Nice and true to a Genuine Mechanism . Respect .
.
.

2 Likes

Now. You See . I think that is wonderful . I think you should think about ELITE-II . Think about an emerald green version .

1 Like

inspired by @kvansant

2 Likes

Yes . Very Inspiring work . We are very Privileged .

1 Like

This works . Not as bouncy but a one line solution is always best . I have added it to the test above .
.
.
((interpOvershoot(#DWE#, .75, 2,1))*#DWFSS#)

1 Like

I was looking at your ELITE-S . I think you should not hide the bridges so . I think you need to make a shadow for the date mech so the Current date is left showing a bit brighter . I can do that for you if you have not got the means . But i think you have . See you have two Colins Lurking in your formula . They are naughty when they go out together .
.
.

.
.

1 Like