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

Monarch.post api doc clarification #94

Closed
paulbaucom opened this issue Aug 1, 2023 · 1 comment
Closed

Monarch.post api doc clarification #94

paulbaucom opened this issue Aug 1, 2023 · 1 comment

Comments

@paulbaucom
Copy link

paulbaucom commented Aug 1, 2023

The current wording in README_API.md for monarch.post says: "If the screen is created through a collection proxy it must have specified a receiver url. If the screen is created through a collection factory the function will post the message to all game objects within the collection."

That confused me as a new user to the API (started using it hours before 4.0 was released), and this wording in the doc tripped me up for a bit. Since those url properties mentioned are now deprecated, I suggest this section point the user to the on_post function so it is clear how to properly receive those monarch.post messages. Unless I am missing something, there is no longer a difference in how monarch.post behaves between collection factory and proxy.

There is also some confusing wording in README_TRANSITIONS.md, but that may just be me. This is coming from a new user perspective (new to Defold, lua, and Monarch). The old way and new way of doing things and the where and when to use monarch.on_message was a bit confusing to figure out between the docs and examples being a mix of old and new. Love how this library works, btw.

@britzl
Copy link
Owner

britzl commented Aug 2, 2023

The current wording in README_API.md for monarch.post says: "If the screen is created through a collection proxy it must have specified a receiver url. If the screen is created through a collection factory the function will post the message to all game objects within the collection."

That confused me as a new user to the API (started using it hours before 4.0 was released), and this wording in the doc tripped me up for a bit. Since those url properties mentioned are now deprecated, I suggest this section point the user to the on_post function so it is clear how to properly receive those monarch.post messages. Unless I am missing something, there is no longer a difference in how monarch.post behaves between collection factory and proxy.

Good point! I've updated the documentation to clarify this. Thanks.

The old way and new way of doing things and the where and when to use monarch.on_message was a bit confusing to figure out between the docs and examples being a mix of old and new

I've updated the examples to use the new way.

@britzl britzl closed this as completed Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants