opengds / OpenGDS

Open GOOP Development Suite
MIT License
54 stars 14 forks source link

Add the option to create Property Node methods with a Get/Set prefix (instead of Read/Write) #93

Open StefanCals opened 7 months ago

StefanCals commented 7 months ago

When creating a new Property Node method, I can only select :

image

Depending on what I chose here, my method will get the prefix "Read" or "Write".

I would like to see the option to have this prefix be "Get" or "Set".

Either the option to change it here : image

or possibly a Boolean selector somewhere to change between Read/Write and Get/Set.


I know this is personal preference and LabVIEW native also calls them Read/Write. But I prefer to use the term Read\Write to the VIs that interact with instruments. And prefer to use the term Get\Set to VIs that interact with a class (attribute accessors).

For example: The accessor name ‘Read Data’ will make me think that this VI will read Data from an Instrument. So I prefer ‘Get Data’ instead, because it's stored in the attributes.

StefanCals commented 7 months ago

Even better would be if this options could be toggled from the GOOP4 Options in the GOOP4 configurations.

image

MikaelHolmstrom commented 7 months ago

I agree I also use Read and Write when talking to instruments and Get and Set when I only access the Instrument object's attribute And I most often just use Property Methods not Property Node Method. And Yes I used the NI naming convention for this. Okay it would be easy to add that extra option in the GOOP4 Config dialog

MikaelHolmstrom commented 7 months ago

Hi, we are working on some major clean up tasks in the code right now. This is to disconnect the UML modeller from the OpenGDS base function, just to make it smaller so we can publish it on tools network so you can find it in VIPM. BTW I see that you are not using the latest version, the config dialog looks like this now: image

StefanCals commented 7 months ago

Thanks for the update! I'll check out the latest version. Appreciate the heads-up!