Talk:SDBUIRadioButton

From MediaMonkey Wiki
Jump to navigation Jump to search

In the code example, wouldn't it be better to use

Dim Rad1Opt1 : Set Rad1Opt1 = SDB.UI.NewRadioButton(Pnl)

' bla bla bla

If Rad1Opt1.Checked Then Station1 = 1

instead of

Dim Rad : Set Rad = SDB.UI.NewRadioButton(Pnl)

' bla bla bla

If Frm.Common.ChildControl("RadioStation1").Common.ChildControl("R01").Checked Then Station1 = 1

In the example you can re-use the variable name Rad, but that isn't a real advantage. Readability, speed, ... is less good. Of course on such a scale that doesn't matter, but I think that a source like the scripting wiki (where novice to advanced scripters rely on) should give the best code as possible. -- Steegy 15:51, 5 May 2008 (EDT)

I agree 100% but some code is better than no code?

Based on this example my script uses the following format, which I didn't think would be suitable for novices.

Execute("Dim Rad"&RadSet&"Opt"&RadOpt)

--MoDementia 18:16, 5 May 2008 (EDT)