Search code examples
user-interfacepharospec-ui

Easy way to display alert


Is it possible to display an alert for user in an easy way? Something like:

save

  title
    ifEmpty: [ 'Title cannot be empty' alert ]
    ifNotEmpty: [ "…do the saving…" ]

so that if title ivar will be empty user will see the dialog with appropriate message.


Solution

  • it would be:

    self inform: 'Title cannot be empty'
    

    but to be honest, I'm not happy with it, because is like a growl notification.

    Most of the time, that's exactly what you want, but some times you need a modal notification... anyway, that's what you need :)