Doing a bit of refactoring. I've got a class ("MailFields") that holds some data. So far I've always passed the class around, made a copy and got the class back. Since I'm usually dealing with GBs of data I want to eliminate the copying of the data. But I can't seem to understand shared methods.
The class is simple. The normal properties were converted to shared ones:
Shared ContentDescription As String Shared ContentDisposition As String Shared ContentDispositionCharset As string
and so on. Between parsing runs I need to reset the data with
Sub Reset() ContentDescription = "" ContentDisposition = "" ContentDispositionCharset = "" 'and so on End Sub
But now Xojo barfs at
with the error message "Static reference to instance method". At the moment I want to keep this as class because I'm not sure how I want to extend this class. Most likely a module would work at the moment, too.
How do I need to use the shared method here?
Xojo 2015r22, Mac OS 10.10.2.