[FIXED]: documentation typo?

Posted on
Wed Sep 03, 2014 9:17 pm
kw123 offline
User avatar
Posts: 8332
Joined: May 12, 2013
Location: Dallas, TX

[FIXED]: documentation typo?

on page
http://wiki.indigodomo.com/doku.php?id=indigo_6_documentation:plugin_guide#menuitemsxml
of the documentation the following seems to have a mistake:
Code: Select all
def validateEventConfigUi(self, typeId, eventId, valuesDict):
    # Do your validation logic here
    errorDict = indigo.Dict()
    errorDict["someKey"] = "The value of this field must be from 1 to 10"
    errorMsgDict[“showAlertText”] = “Some very descriptive message to your user that will help them solve the validation problem.”  <<<< is this correct?
    valuesDict["someOtherKey"] = someNewValue
    return (False, valuesDict, errorDict)

"errorMsgDict" is not used in return, should it be just "errorDict" ?

Karl

Posted on
Wed Sep 03, 2014 9:44 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: documentation typo?

Thanks for the pointer – corrected!

Image

Posted on
Tue Mar 01, 2016 1:19 pm
jblackburn offline
Posts: 77
Joined: Dec 11, 2013
Location: Quebec, Canada

Re: [FIXED]: documentation typo?

Hi,

I've found another typo in the wiki:

http://wiki.indigodomo.com/doku.php?id=indigo_6_documentation:plugin_guide#validation_methods

For event validation method, we have the definition:
Code: Select all
validateEventConfigUi(self, valuesDict, typeId, eventId)

In the following exemples, the function parameters order are not the same...

Code: Select all
def validateEventConfigUi(self, typeId, eventId, valuesDict):      <-----
    # Do your validation logic here
    return True

def validateEventConfigUi(self, typeId, eventId, valuesDict):      <-----
    # Do your validation logic here
    valuesDict["someKey"] = someNewValue
    return (True, valuesDict)
...

I took me a while to found my problem after a Copy and Paste... :D

Thanks!

Joël

Posted on
Tue Mar 01, 2016 3:16 pm
jay (support) offline
Site Admin
User avatar
Posts: 18185
Joined: Mar 19, 2008
Location: Austin, Texas

Re: [FIXED]: documentation typo?

Fixed, thanks!

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 9 guests