Bored themer needed to help debug Thread last updated on 2003-11-18 05:13:44

Posted by member 71746 on 2003-11-12 19:33:31

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...

Posted by member 71746 on 2003-11-12 23:56:08 link

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..

Posted by member 7223 on 2003-11-13 00:31:28 link

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 :)

Posted by member 71746 on 2003-11-13 00:43:21 link

Interesting idea smurth but it didn't fix it unfortunately..

Posted by member 71746 on 2003-11-13 13:06:21 link

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)

Posted by member 7223 on 2003-11-13 16:05:30 link

are you sure you are using a recent version of systray2 ?

Posted by member 71746 on 2003-11-13 16:43:33 link

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.

Posted by member 35 on 2003-11-13 16:53:27 link

have you tried vtray?

Posted by member 7223 on 2003-11-13 23:11:10 link

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 !

Posted by member 71746 on 2003-11-13 23:29:57 link

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

Posted by member 7223 on 2003-11-14 01:09:40 link

Are you joking ?
I'm using systray2-2.0.1 and it works... and it worked with older releases, too.

Can't help anymore :(

Posted by member 333 on 2003-11-14 04:34:34 link

what Smurth said... systray2-2.0.1 definately works

Posted by member 71746 on 2003-11-14 15:06:19 link

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

Posted by member 7223 on 2003-11-14 16:59:52 link

Take a look at my first reply !!!

Posted by member 71746 on 2003-11-15 20:03:50 link

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.

Posted by member 71746 on 2003-11-15 20:50:05 link

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.

Posted by member 7223 on 2003-11-15 23:23:24 link

Why not simply !netreloadmodule lsbox after systray2 (I mean everything in *script start lines)

Posted by member 71746 on 2003-11-16 02:50:36 link

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$

Posted by member 182 on 2003-11-16 18:42:18 link

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

Posted by member 71746 on 2003-11-16 19:03:32 link

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 :)

Posted by member 7223 on 2003-11-18 01:45:06 link

Use a timer

Posted by member 182 on 2003-11-18 05:13:44 link

or, setup your theme to work with the size of the systray before it sends the onadd commands.