Change the title of a button

  1. 5 months ago

    matteolovatti

    May 25 User since 2016
    Edited 5 months ago by matteolovatti

    Hello !
    just fired the new Beta 6, dragged a button and in the action event put the code

    self.title = "Hello";

    The button changes correctly it's title but i also get this error in the log..

    Runtime Error
    An error occurred while writing key title (NSConcreteAttributedString initWithString:: nil value).

    Honestly i haven't played very mush with Creo in the last months so maybe i'm missing something ?

    Thanks.

  2. andrea

    May 25 Administrator User since 2016

    Hi Matteo,
    thank you for your report.
    The issue will be fixed soon, in the meantime as a workaround you can use the setTitleForState method

    self.setTitleForState("Hello", ControlState.Normal); 
  3. matteolovatti

    May 25 User since 2016

    Thanks @andrea

or Sign Up to reply!