onunload ClearProperty() not working?
#1
I am currently modding DialogMusicInfo from one of the Titan Skins.
Now i am facing some strange behavior and I don't know why (possible bug?)

I have
xml:
<onunload>ClearProperty(AdditionalInfo)</onunload>
at the beginning of the file, which should clear Additional Infos. This property is used to control various other stuff. I checked that this property is working, as there is a button which actually clears the Additional Infos.

Also if i execute it onload instead of onunload it will clear everything. This will do as workaround, but since the whole skin does similar things all over the place, i was wondering, if i am doing something wrong, or if onunload with ClearProperty() actually isn't working?
onunload does work with other stuff, like Notification().
Reply
#2
Have you tried adding the window ID that was used to set the property?
Reply
#3
I tried with
xml:
<onunload>ClearProperty(AdditionalInfo, 12001)</onunload>
which worked for album and artist indeed, but for songs there is a different id, which i would have to pass.
Also, as i said, it does work for onload, here everything seems to be cleared. Definitely not the behavior i would expect (for onunload)
Reply
#4
It's a race condition. The window is unloaded before the property of the window gets cleared. 

try adding:
Code:
<animation effect="fade" start="100" end="0" time="1" delay="50">WindowClose</animation>

That should give you a small buffer.
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply

Logout Mark Read Team Forum Stats Members Help
onunload ClearProperty() not working?0