Hi! Am 25.10.2008 um 20:15 schrieb David Chisnall:
You shouldn't call selValue directly - the compiler will insert this call for you.
You're right. It works now. :-)
Segfault.st: 'a string' class name log. This produces a segfault in objc_msg_dispatch.Do you get any warnings about name being a polymorphic selector? I suspect name is returning a char*, but the compiler is finding one that returns an object, so it's trying to send a message to it directly. Also, is there a reason you didn't do: 'a string' className log.
I don't get the polymorphic selector warning. However, it works when I use the className method instead. :-) Thanks for the hint!As I forgot to attach the Smalltalk files, here's the file (Segfault.st) that produces the
segfault when doing "'a string' class name log.". I also attached a file with a couple of very simple SUnit-style tests. (Operators.st)I also came across problems with -[NSArray select:] not working. In the select: method, which is implemented in Objective-C, the block returns a BigInt object pointer, which always evaluates to true. Inserting a call to - boolValue fixes the issue. It's up to you to decide whether this is a clean solution w.r.t to your
automatic type conversion architecture.Operators.st includes a test called ,,testArraySelect'' that checks whether select:
works as expected. Best regards, Günther
Operators.st
Description: Binary data
Segfault.st
Description: Binary data
array-select.diff
Description: Binary data
_______________________________________________ Etoile-dev mailing list [email protected] https://mail.gna.org/listinfo/etoile-dev
