Bug with wizard and RegisterAndCreateDeviceProperty?

HouseBot Plugin Development Discussions.
Post Reply
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Bug with wizard and RegisterAndCreateDeviceProperty?

Post 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
ScottBot
Site Admin
Posts: 2786
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Bug with wizard and RegisterAndCreateDeviceProperty?

Post by ScottBot »

Does your wizard text contain any colons?
Scott
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Re: Bug with wizard and RegisterAndCreateDeviceProperty?

Post 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
ScottBot
Site Admin
Posts: 2786
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Bug with wizard and RegisterAndCreateDeviceProperty?

Post 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?
Scott
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Re: Bug with wizard and RegisterAndCreateDeviceProperty?

Post 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
ScottBot
Site Admin
Posts: 2786
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Bug with wizard and RegisterAndCreateDeviceProperty?

Post 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.
Scott
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Re: Bug with wizard and RegisterAndCreateDeviceProperty?

Post 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
Post Reply