Variable works not more

Started by sinus, May 31, 2019, 08:21:19 AM

Previous topic - Next topic

sinus

Hmmm, I work with the new version 2019.5.2

On all my images I have now an icon, (bulb), what indicates, that this file has some entries in the notes of attributes.
But these files has no entried.

This app is basically 99% the same like the native notes - app from Mario.

If there is nothing in the attribute, nothing is displayed.
If I write something in the attributes of a file, a yellow bulb is displayed.
If the word "done" is in the notes, a switched off bulb is displayed.


But with the new versions ALL files has this yellow bulb, what is wrong, see attachment.
The only correct file is this with the bulb switched off.
All the yellow bulbs are wrong, the have nothing in the attributes, hence no icon should be there.


Hence, I guess, it has to do with my variable in the Windows Layout:

{File.AT.Anmerkungen.Allgemein|contains:done,bulboff,;pereplace:bulboff==<Image Source='file://c:\sinus-icons\\bulb18off.png'/>}
{File.AT.Anmerkungen.Allgemein|contains:done,,bulbon;pereplace:bulbon==<Image Source='file://c:\sinus-icons\\bulb18.png'/>} 

But I did not find something in the release notes, except defaultx, but I have not used this.
These variables worked since a long time.

What I am missing here?
Thanks for tips.

BTW: I am not sure, this is maybe my fault, therefore I write this not in the bug-sector
Best wishes from Switzerland! :-)
Markus

Mario

#1
Try your variable in the VarToy. Does it produce the correct values?

I've made a quick check here and it seems to work. I see my icon in the file window when the attribute I check contains a specific word. Else no icon is shown.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

Quote from: Mario on May 31, 2019, 09:17:04 AM
Try your variable in the VarToy. Does it produce the correct values?

I've made a quick check here and it seems to work. I see my icon in the file window when the attribute I check contains a specific word. Else no icon is shown.

Thanks, Mario
Maybe you can remember, I have just updated the newest version yesterday.
Before this worked perfect and since yesterday (Auffahrt) I have done nothing with the window layout.

I have tried the variables in the VarToy and they looks the same like in the windows layout, wrong.
I have also more details, but I tend to be too long, hence here I can say it shorter:

If a file has no attributes (empty), in the versions before this variable
{File.AT.Anmerkungen.Allgemein|contains:done,,bulbon;pereplace:bulbon==<Image Source='file://c:\sinus-icons\\bulb18.png'/>} 
displayed nothing, no icon (bulb), the variable in VarToy was simply also empty, what was correct.

With the newest IMatch-Version the same variable show an icon (yellow bulb) for all files with empty attributes.

VarToy shows now this for the variable: <Image Source='file://c:\sinus-icons\\bulb18.png'/>

in the version before it showed nothing, hence no icon was displayed.

I think, I can change the variable to get again correct results, but since the last version something in the code must affect this variable, and I think that's interesting to know anyway.


Best wishes from Switzerland! :-)
Markus

Mario

Nothing has changed as far as I can tell (except the new default function). And I've tested with the same version that has been shipped.

I have tried the variable you posted and it works here.
I just replaced the name of the attribute and the path to the image.
I get an image when the attributes contain "fun" and no icon otherwise.

I used this

{File.AT.Notes.Description|contains:fun,bulboff,;pereplace:bulboff==<Image Source='file://c:\temp\add.png'/>}

This is what I get (the baby has a description attribute containing the word fun:

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

Thanks, Mario
for your effort.

Very curious.
Because I have nothing changed, for sure not.
And all the different versions before it worked.

Hm, okay, I will do some other examinations.
I am sure, I will find another way with a variable to do, what I want.

I will report my "investigations" here.  8)

Best wishes from Switzerland! :-)
Markus

sinus

OK, I could solve it, I had to insert the "default"-part.

Old variable:
{File.AT.Anmerkungen.Allgemein|contains:done,,bulbon;pereplace:bulbon==<Image Source='file://c:\sinus-icons\\bulb18.png'/>}

New variable:
{File.AT.Anmerkungen.Allgemein|default:;contains:done,,bulbon;pereplace:bulbon==<Image Source='file://c:\sinus-icons\\bulb18.png'/>}

Now it works again, like before.

Thanks for listening!  :)
Best wishes from Switzerland! :-)
Markus

Ooteboe

Quote from: sinus on May 31, 2019, 06:15:08 PM

New variable:
{File.AT.Anmerkungen.Allgemein|default:;contains:done,,bulbon;pereplace:bulbon==<Image Source='file://c:\sinus-icons\\bulb18.png'/>}

Now it works again, like before.

Thanks for listening!  :)

Same problem here after upgrading, same solution. Thanks!

Hans

Mario

This has been fixed in the 209.6.2 release. Did it not?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Ooteboe

Quote from: Mario on June 17, 2019, 08:57:20 PM
This has been fixed in the 209.6.2 release. Did it not?

Aha, It occurred after upgrading to 2019.5.2 (I was a bit late). Now I've upgraded tot 2019.6.2.

Hans