GoCubs;540009 Wrote: 
> I've gone ahead and added a new Perl sub that allows you to add your own
> custom % macros.  It's very simple-
> addMacro('%X1234','VALUE');
> SDT will basically search for whatever value you pass in as argument 1
> and replace it with argument 2 with each data refresh.  Call addMacro
> for each custom macro you'd like to add.
> 
> This will be in 5.8.16.  Not sure when I'll post it, but if you're
> ready for it lemme know and I can quickly post.
> 
> Thanks
> -Greg

Thanks Greg, that will be great but there's no rush. Nappies and work
are time consuming things. If I get to needing the latest cut I'll let
you know.

To prevent collisions each SDT extension could ask for a %prefix,
although I'm not sure programmatically is the right approach. If the
allocated prefix was not consistent it would be annoying for users as
one person's config won't be transferable (or even as Slimserver
versions change and the SDT extensions are not updated in sync). Maybe
it's an registration system?

I could grab (say) %XA[.*] and the next thing could have %XB[.*] and so
on. Which breaks the printf model a bit but shouldn't matter.

The only caveat with the addMacro thing I'll need is to make sure the
macros are replaced in the order they're added (eg array vs hash) to
make sure %X10 and %X1 don't cause weirdness.

Thanks!

Steve.


-- 
stevekgoodwin
------------------------------------------------------------------------
stevekgoodwin's Profile: http://forums.slimdevices.com/member.php?userid=37550
View this thread: http://forums.slimdevices.com/showthread.php?t=14327

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to