03-19-2020 12:52 AM - edited 03-23-2020 03:15 PM
Please see the screenshot of the Create Method Dialog (EndevoGOOP400) window attached. Why is Property Node Disabled? Why are no Get Property/Set Property method templates available? The whole dialog just doesn't work for my class, but works for other EndevoGOOP400 classes. My class was created from my template class, but that template class is just an EndevoGOOP400 class too and this dialog works correctly for it.
03-23-2020 03:12 PM - edited 03-23-2020 03:31 PM
03-24-2020 03:20 PM
From Mikael's explanations:
If you want the Create Method Dialog to let you use some method templates while adding methods to a class created off your class template (including standard accessors, "Property Method" and "Property Node") then your class template folder (which you put into <LabVIEW 20XX>\resource\Framework\Providers\Open_GDS\ClassProviders\Provider_EndevoGOOP400\Templates) better have a "methods" folder in it similar to other template classes provided with Open GDS in the same Templates folder, for example, G4BaseTemplate_Simple_4x4x4. The VI's in that folder are not actually methods of your template class! They are templates for creating methods for classes created off the template class. Since my template class was created off the Simple DVR class template that comes with Open GDS, I just copied the "methods" folder from G4BaseTemplate_Singleton_4x4x4 folder to the folder for my template class (or class template?) and got the standard Get/Set, Read/Write method TEMPLATES available again in the Create Method Dialog for the classes created of my class template. You can add your own method templates to your class templates too! Again, method templates in a class template are not methods of the template class itself! They are just that, templates for creating new methods in classes created of that class template!
03-24-2020 10:08 PM
Well, just copying "methods" folder from another class template into your class template folder won't work. The Create Method Dialog will now show correctly and allow you to choose the same method templates but it will not create correct methods off the VI's in that copied "methods" folder for your classes made off your template. You have to edit all the methods templates correspondingly to match your template class (replace "reference in", "reference out" controls and the calls to ..._GetAttributes.vi). While you are at it you might as well rename every VI in that "methods" folder to include your template class name and edit the methods.ini file there to reflect the names changes.
03-25-2020 04:21 PM
Yes that is the correct way of doing it.
If there are more good class templates out there, we could add them as permanent templates in the OpenGDS, or maybe add a repository that the tool can look at, and automatically download them from.
One issue with custom templates is that you need to install them on all your development computers, so you can create new classes of that template and create methods for that class.
You might also get some issues implementation some design patterns if the class templates looks very different.