From: Rupert B. <rup...@fr...> - 2005-11-11 14:52:04
|
Le 11 nov. 05 =C3=A0 14:58, Rupert BARROW a =C3=A9crit : > Jonathan, > > Le 11 nov. 05 =C3=A0 12:51, Jonathan Paisley a =C3=A9crit : > >> >> On 11 Nov 2005, at 10:19, Rupert BARROW wrote: >> >>> if ([record valueForKey:@"changed"] =3D=3D @"YES") = // this crashes >> >> This is unrelated to the main issue, but note that comparison =20 >> doesn't make sense. >> >> You need to compare NSStrings with isEqualToString:, or if =20 >> 'changed' is returning a bool/int try something like: >> >> [(NSNumber*)[record valueForKey:@"changed"] boolValue] > > This code is part of the Apple SImpleStickies tutorial. I have not =20 > changed it. <CUT> > I hope that you can find something. Meanwhile, I will tool around, =20 > trying to define wrappers for the "changed" key. Bingo, Eureka ! I defined @_changed, as well as its setter and getter : def changed @_changed end def setChanged(v) @_changed =3D v end Everything seems to be working OK. Does anyone know why these have to be defined in Ruby, when they do =20 not in Objective-C ? Rup |