Upvote 1

Dynamic, Reusable Functions

Under Consideration Adam Diestelkamp 7 years ago

Very impressed with this tool. It's bit clunky in ways, but again very impressed with the capabilities!


I'm working on prototyping a to-do list and would like to be able to define one function to "delete" a to-do item and reuse that function on any to-do items that a user creates.


To do that I would imagine the function would be able to be set to select the current object using something like the .this in javascript so that it could be used agnostic from what object is selected.

Replies (2)
photo
1

Hi Adam,


Can you clarify more on what you're looking for? From what you're describing, it sounds like data masters, data master actions, and data list/data grids should fit this. You can learn more about those here:

https://www.justinmind.com/support/how-to-create-and-populate-a-data-master-in-your-interactive-prototypes/

https://www.justinmind.com/support/delete-rows-from-a-data-list-in-your-web-prototypes/


Let me know if you have any questions.


Best,

Danielle

photo
1

Hey Danielle,


Thanks for those examples, I had been able to find that editing the grid item in a data grid carried that functionality over to every other grid item and was able to accomplish what I had wanted!


There is still a lot of repetition though, if I wanted to perform the same function on 'focus out' as on 'key up' I can copy the actions over (which definitely saves time, thank you for that feature!) but it still leaves things very duplicated. If I could instead define a function that I could reuse, I could update that function once and everywhere it was used would then be updated instead of finding all those instances and copying and pasting. Data grids/lists help with that but if I want to do something out side of a data grid such as do a complicated calculation to set the height of an object it would be nice to not have to repeat that.


Using a self-referential capability (like the grid and list items do automatically) would be nice to use in other cases and allow functions to be more reusable without having to manually copy over an action and manually set the target.


Really loving the capabilities though and looking to get this through our procurement team!

Leave a Comment
 
Attach a file