Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: an added method doesn't render #199

Closed
tremblap opened this issue Mar 19, 2024 · 9 comments
Closed

Bug: an added method doesn't render #199

tremblap opened this issue Mar 19, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@tremblap
Copy link
Member

Please tell us what you were doing! You can include code and files by drag and dropping them into the text area.

while trying to fix #159 I added the method refer to /doc/DataSet.rst (commit a6fe3a1)

What was the expected result?

for it to be added to Max, SC and Pd ref

What was the actual result?

it doesn't show up!

What operating system were you using?

Mac

Operating system version

10.13

FluCoMa Version

tip

@tremblap tremblap added the bug Something isn't working label Mar 19, 2024
@weefuzzy
Copy link
Member

This is probably because refer isn't a message defined in the C++ client (which provides the master reference for what gets generated) but rather something smuggled into the Max and PD wrappers. Probably the way to solve the problem at hand (i.e. document this message for Max and PD) is to add to the jinja templates

@weefuzzy weefuzzy reopened this Mar 19, 2024
@weefuzzy
Copy link
Member

See https://github.com/flucoma/flucoma-docs/blob/main/flucoma/doc/templates/maxref.xml for example. Something added to the methodlist block like

{%- if  species == 'data' -%}
     <method name='refer'>
       <arglist>
         <arg name="name" optional="0" type='symbol'/>
       </arglist>
       <description>Blah</description>
     </method>
{%- endif -%}

@weefuzzy
Copy link
Member

Likewise for PD. The duplication is sad making, but we never got to the point of anything more elegant

@tremblap
Copy link
Member Author

this is good. so in effect I remove from the rest of the DataSet and I put it there. will it filter automagically if the object is type 'data' then? all our named data object have refer, so I should be as generic as possible in the description. How is that for English (instead of your 'blah' :)

Enables to refer to another object of the same class, thus sharing its state.

I struggle to write it clearly. English is hard.

@weefuzzy
Copy link
Member

this is good. so in effect I remove from the rest of the DataSet and I put it there. will it filter automagically if the object is type 'data' then?

This is what the 'species' marker does, exactly so that we can distinguish these 'named' objects in the documentation.

all our named data object have refer, so I should be as generic as possible in the description. How is that for English (instead of your 'blah' :)

Enables to refer to another object of the same class, thus sharing its state.

Possibly a little terse! Maybe look at the Max doc for coll's refer for inspiration?

@tremblap
Copy link
Member Author

coll: Changes the reference to the data in another named coll object. Changes to the data stored in any referenced will be shared by all other similarly named objects

the problem we have is that all named objects will be receiving this - it is great but we cannot use the class name (except if there is a shortcut I can use in the code?)

new version:
Changes the reference to the data in another named XXX object. Changes to the data stored in any referenced will be shared by all other similarly named XXX objects

xxx = if it can be automagically be the class in question, that is amazing, if not I can put "object of the same class"

@weefuzzy
Copy link
Member

xxx = if it can be automagically be the class in question, that is amazing, if not I can put "object of the same class"

Indeed – the template file is replete with this, especially at the top. The incantation is {{ client_name | as_host_object_name }}.

(Takes the client name then transforms it for the CCE in question, e.g. FluidDataSet -> fluid.dataset~ for Max)

@tremblap
Copy link
Member Author

perfect thanks! I'll also fix the position of 'reset' in the message order (it is at the top in max and at the bottom in Pd)

@tremblap
Copy link
Member Author

this is magic. thanks so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants