Skip to content
  • Protopie and Figma
  • Protopie Tips
  • Experience Prototyping
  • Protopie and Figma
  • Protopie Tips
  • Experience Prototyping

PROTOPIE

Distinctive initial variable values

Often one finds that a variable that should have acquired a certain value has not yet done so. Or a condition depends upon a value that has been erroneously set. 

A useful ploy to help you see these kinds of problems is to use something like -99 as your default value, which is unlikely to occur normally in your pie. Then if you see -99 in your running pie, you can much more quickly see what is going on.

Likewise, especially when getting text from an API, or by string manipulation, having “” as. the default text value for a variable is easily overlooked as a problem. Using “Null” as your default value – which will again not be likely to occur in your pie anywhere else will help you distinguish between something not having been done and having been done with an empty string.

Potentially related posts ...

Working with Components
more ...
Moving between Figma and Protopie
more ...
Rough, Rapid, Right
more ...
Arrays and multiple parameters
Protopie seems limited since a message can be sent using only one value as a parameter. However, arrays (written as text strings and manipulated by parseJson) can be used for contexts where multiple parameters need to be passed.
more ...

© 2023: David J Gilmore