Web Connection
Error in wwbusinessobject.prg
Gravatar is a globally recognized avatar based on your email address. Error in wwbusinessobject.prg
  Randy Godfrey
  All
  Jan 3, 2019 @ 05:18pm

In function Item the return statement still has reference to aRows I think RETURN THIS.aRows.Item(lnIndex) should probably be RETURN THIS.oRows.Item(lnIndex)

Gravatar is a globally recognized avatar based on your email address. re: Error in wwbusinessobject.prg
  Rick Strahl
  Randy Godfrey
  Jan 3, 2019 @ 06:40pm

Thanks Randy...

Fixed on this end for inclusion in the next update.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Error in wwbusinessobject.prg
  Randy Godfrey
  Rick Strahl
  Jan 3, 2019 @ 07:31pm

You are quite welcome. I did find another issue - in the wwBusinessChildCollection.clear the only line this.oRows.ResetToDefault() gives a not enough parameters error. To fix it quick and easy I replaced it with a loop to remove all the items. Is there a better way?

Gravatar is a globally recognized avatar based on your email address. re: Error in wwbusinessobject.prg
  Rick Strahl
  Randy Godfrey
  Jan 4, 2019 @ 12:47am

Thanks...

The ChildBusiness object was a bit hurried in the last minute conversion of the wwBusinessObject and the big issue is that I rarely use it so I don't actually have it in production anywhere where I can see it fail...

Most of the code moved over as is from the old object but obviously I missed a couple of issues.

Anyway the the Clear() method should be:

FUNCTION Clear()
THIS.oRows = CREATEOBJECT("Collection")
ENDFUNC

Iterating over each item shouldn't be necessary as the ref count of the collection should handle that in the VFP background processing. If it's only SCATTER NAME objects or wwBusinessObject instances they should release with no issues.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Error in wwbusinessobject.prg
  Randy Godfrey
  Rick Strahl
  Jan 4, 2019 @ 08:38am

Thanks. That solution works and is much cleaner than mine. I really like the idea of using a collection instead of an array for the cursor updates. All other functions seem to be working properly.

© 1996-2019