Change the title of a button

  1. 6 years ago

    matteolovatti

    25 May 2017 User since 2016
    Edited 6 years 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

    25 May 2017 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

    25 May 2017 User since 2016

    Thanks @andrea

or Sign Up to reply!