Page 1 of 1

Bug with wizard and RegisterAndCreateDeviceProperty?

Posted: Sat Sep 27, 2008 5:17 pm
by dlmorgan999
I'm working on a new plugin. I'm using RegisterAndCreateDeviceProperty for two properties and specifying wizard text. One of the properties is type ptNumeric and the wizard works as expected. The other property is ptAlpha. I don't get any errors and the property gets created and registered just fine but the wizard never runs. Has anyone else seen this?

-- Dave

Re: Bug with wizard and RegisterAndCreateDeviceProperty?

Posted: Sun Sep 28, 2008 4:51 pm
by ScottBot
Does your wizard text contain any colons?

Re: Bug with wizard and RegisterAndCreateDeviceProperty?

Posted: Sun Sep 28, 2008 7:08 pm
by dlmorgan999
Nope - just plain old text. It may be something with my plugin but I can't see any obvious issues. The text is

"Enter the IP Address used for the TheaterTek server"

-- Dave

Re: Bug with wizard and RegisterAndCreateDeviceProperty?

Posted: Sun Sep 28, 2008 7:34 pm
by ScottBot
I've seen this problem before... but I just can't remember what the problem was.

Do any of the OTHER properties with wizard text contain a colon in the wizard text?

Re: Bug with wizard and RegisterAndCreateDeviceProperty?

Posted: Sun Sep 28, 2008 7:38 pm
by dlmorgan999
No. There is only one other property with wizard text. That text does contain left and right parentheses though. Maybe that's it?

"Enter the IP Port used by the TheaterTek server (typically 2663)"

-- Dave

Re: Bug with wizard and RegisterAndCreateDeviceProperty?

Posted: Sun Sep 28, 2008 8:16 pm
by ScottBot
I think the problem is actually the fact that you have a number (2663) in the text. I know it sounds stupid, and I need to fix that.

There's an undocumented feature where you can specify the order that the properties are prompted by prefixing the wizard text with an order number and colon, then the wizard text. So using the following wizard text:

Code: Select all

2:This one goes second
1:This one goes first
as wizard text would ensure that "This one goes first" is the first value prompted for.

The code is pretty brain-dead and sees the number in your wizard text and makes an incorrect assumption. I'll fix that in the next release. I guess a work around would be to actually use "1:", "2:", etc as prefixes to your wizard text.

Re: Bug with wizard and RegisterAndCreateDeviceProperty?

Posted: Sun Sep 28, 2008 8:30 pm
by dlmorgan999
Hi Scott,

Your workaround solved the problem. Actually it's nice to be able to specify the order in which you are prompted so I'm not sure anything needs to be changed - it just needed to be documented. :wink:

-- Dave