Error calling functions in other script in v2.21

Here is a snippet of code that worked fine right from v1.5 - 2.1

However on upgrading to 2.21 I keep running into this problem. I was wondering if you could help me shed some light on this.
["log_function" addFailureNamesLogFile: "general_ledger_admin_close_fiscal_year"]

This is the error I get
SRUN_UnknownCommand ERROR: No Handler Found for Function message: 'addfailurenameslogfile:'

This is the header for the function
on addFailureNamesLogFile sTestName
	put sTestName & return after file getFailureNamesLogLoc()
end addFailureNamesLogFile

These functions called from the same script has no problems though.
["log_function" incrementFailureLogFile:]
["log_function" incrementPassLogFile:]

Comments

  • This seems to be a problem for every call that takes in one parameter.

    Some other calls to functions with more than one parameter or no parameters work fine.
  • SenseTalkDougSenseTalkDoug ForumAdmin admin
    Thanks for pointing this out -- we weren't previously aware of this problem. It will be fixed for our next release.

    In the meantime, the simplest way to work around this may be to take advantage of the observation you made that the problem only occurs when exactly one parameter is passed. If you add a meaningless second parameter to your calls, the message will be delivered properly and your handler can simply ignore the additional parameter. Or, if you prefer, you could use a different calling syntax, as this bug only affects the use of the square bracket syntax. We apologize for the inconvenience, and hope to have a new version of Eggplant available soon.
  • Something else I've noticed is that the initially the script name in the square bracket syntax did not need to be within quotes for the function call to go through correctly.

    Now however the script name has to be within quotes. I don't know if this is an intentional change or not, so figured I would let you know.
  • Also is there any way I can get v2.1? I do not have the time to edit my code to workaround this error.

    I forgot to create a backup for this version.
  • SenseTalkDougSenseTalkDoug ForumAdmin admin
    You shouldn't need to put the script name in quotes as long as it conforms to the standard symbol naming conventions: the name should begin with a letter or underscore, and contain only letters, digits, and underscores. If the name has any other characters in it (such as a space, period, slash, or hyphen) you will need to quote it.

    To obtain an earlier version of Eggplant, send a note by email to support (at) redstonesoftware (dot) com indicating the version you want and your company name (and license number if you have that handy) and we'll be happy to provide you with the download information.
Sign In or Register to comment.