Forum Discussion
Former_Member
8 years agoAccelerator III
Thank you for your response AJ, I understand the principle of what you're demonstrating.
So I changed my test program to something slightly more practical as follows (I created a github account to try and replicate your code presentation, but failed to find where I can actually write the code, but that's for another time!) :
dim newPart as item
dim test as new Foo
'newPart = Me.getInnovator.newResult(test.BlankPart)
newPart = test.BlankPart
End Sub
Public Class Foo
Function BlankPart() as item
dim inv as innovator = me.GetInnovator
dim itemToReturn as item = inv.newitem("Part", get)
Return itemToReturn
End Function
End Class
Function helper() as string
Return "test"
It errored when compiled though. (as another aside the error does not show what the issue, but triggers a pop up where it can't find a dll file whose names changes all the time, so apologies with being vague with the error response)
By commenting out the lines to find out where it breaks, if I simply do this:
dim newPart as item '--No problems
end sub '--This causes a problem
So there must be something not set or defined in the application...? or what have I missed?