Ello gents.
So I'm working on a follow-up to the Slick interface, under the project name "Intuition" ...
One of the changes is having the tray slide up vertically so it can be displayed concurrently with the audio/vwm boxes.
I've basically just changed the graphics and positioning settings around and changed the box movement/resizing scripts to reflect Y values instead of X values, but I haven't made any changes to the scripting apart from that.
After the changes, everything displays properly *most* of the time, but sometimes when I recycle or boot up, the tray doesn't seem to register the scripting to move and resize the box... The weird thing is it doesn't do this every time, just sometimes...
If there's anyone who's up to digging around in the guts of the theme, the current package can be downloaded from my webserver at
http://www.guerillamusic.net:4280/tmp/intuition.traybug.lsz
Hopefully we can figure out why systray would be calling those scripts sometimes, and other times, not calling them.
Due to the nature of problem you may need to recycle 10 or 15 times for the symptoms to appear...
Update: I find that sometimes it gets into a loop of always skipping the box resize/move routines no matter how many times I recycle, but as soon as I toggle the pin-state of the tray and recycle, it starts using the box resize/move routines..
The resize/move routines are triggered by !SystrayOnAdd/OnDel if that helps anyone..
I don't have time to take a look at this but:
- I guess !systrayonadd/del calls !bangs defined with mzscript,
- I guess that systray2 (or vtray, no matter) is load by regular *netloadmodule line,
- then, I guess removing the *netloadmodule systray2 line from theme.rc and adding a *script start !netreloadmodule systray2 at the end of your script file should solve the problem :)
Interesting idea smurth but it didn't fix it unfortunately..
Further update: I've had a couple instances where it seems it triggers the OnAdd/OnDel actions for *some* of the icons (ie, the tray stretches up to show 4 icons when there are 7 in the tray.. then I can recycle and it'll show 1 icon or all 7)
are you sure you are using a recent version of systray2 ?
I'm using systray2-lsbox.
systray2-2.0 or 2.0.1 don't have support for SystrayOnAdd or SystrayOnDel, both of which are needed to size the LsBox the tray sits in. They claim to have support for the features added in systray2-lsbox and systray2kad but they don't actually have the support.
hum, systray2 HAVE support for this since a long while now. Use the last systray2 release you can find and everything should be right. I bet you !
Tried vtray - when vtray is hooked to an LsBox it doesn't update the icons (ie, zonealarm's netmeters are useless, icq doesn't flash msg's etc etc)
Tried the latest systray2 release - the OnAdd and OnDel commands aren't executed with systray2-2.0.1 or systray2-2.0
Are you joking ?
I'm using systray2-2.0.1 and it works... and it worked with older releases, too.
Can't help anymore :(
what Smurth said... systray2-2.0.1 definately works
aHA! Ok I did some experimenting, replaced the OnAdd/Del commands with !Alerts instead of my script bangs, and the result was the alerts came up while the tray was loading, allowing me to see what's happening:
Systray2-2.0.1 *does* in fact work, but the problem is this: the systray is fully loading before litestep moves on to loading the next module. As a result, by the time LsBox is loaded and the systray is hooked into its box, all the OnAdd/Del commands have gone through.
Basically the systray is being created, loading all its icons, each of which is calling the bang command to resize and move the tray's lsbox, but the box hasn't been created yet so the bangs just float off into space and have their destiny go unfulfilled. Sad story, really..
So, what I'm looking for now, I suppose, is a way to load systray2-2.0.1 and have it wait until lsBox loads before populating itself with icons. (systray2 has to be loaded before lsbox or the hook won't work)
I've seen some modules that have a command like
ModuleNameWaitForBoxHook
but as far as the docs lead me to believe, there's no support for that with systray2-2.0.1
Take a look at my first reply !!!
Smurth, take a look at MY first reply :P
I suppose I can explain my results a little further than "doesn't work" though ;)
If I try your proposed solution, the tray loads outside the box and doesn't get hooked because the box has already been created. Then litestep crashes. Then I cry ;)
What I need is a way to hook the tray into the already-created box *after* the !NetReloadModule is called.
Ohhhkay so I've found a way around this little problem :D I've found that if I use systray2-lsbox, and load it with a *WharfModule instead of a *NetLoadModule and a !hook, it works perfectly 100% of the time. Hot dog!
Still, it'd be nice to have a !SystrayWaitForBoxHook command to make it so we can use the most recent release and still be able to have a hooked auto-sizing, auto-box-sizing systray ;)
I officially pronounce this problem solved.
Why not simply !netreloadmodule lsbox after systray2 (I mean everything in *script start lines)
Tried that, calling...
!NetReloadModule systray2-2.0.1
!NetReloadModule lsbox-3.0-pre
...right afterwards... Caused litestep to hang. The -lsbox solution works perfectly, I just have to make sure to set the initial *WharfModule x y w h settings so the h value is $ResolutionY$
inhlaer, have you got
*ModuleHook !SystrayHook
in your .box file?
i'm using (/me checks)
*NetLoadModule systray2-2.0.1
with no problems.
my tray is actually being loaded before the box too.
maybe try the lsbox 3 pre
psynapse, i was using *ModuleHook !SystrayHook and *NetLoadModule systray2-2.0.1, and using lsbox-3.0-pre
The problem wasn't with LSBox, it's that Systray2-2.0.1 and 2.0 are too dang efficient in their loading - they get the tray icons loaded before litestep moves on to the next instruction. This resulted in all the icons being added and triggering their OnAdd's before mzScript was loaded to register the custom !Bangs the OnAdd's call, and before the tray's LsBox had been created to receieve the resize/move commands.
As I say though, the solution of using the older systray2-lsbox and loading it using a *NetInstallModule in the theme.rc and *WharfModule in the box file, works perfectly. Now we just need the dudes working on Systray2 to add a SystrayWaitForBoxHook command to make the tray wait for a !SystrayHook to be called before loading the tray icons, then we can use the up-to-date systray2 module to achieve the desired functionality :)
or, setup your theme to work with the size of the systray before it sends the onadd commands.