[Biococoa-dev] updated project in cvs
Charles Parnot
charles.parnot at gmail.com
Fri Jul 22 01:41:55 EDT 2005
A wild guess: bytes is not terminated by a \000 char. Try 'printf ( "%
s", bytes );' and see if it crashes too.
You should then instead use stringWithBytes:length:encoding
charles
On Jul 21, 2005, at 7:16 PM, Koen van der Drift wrote:
>
> On Jul 20, 2005, at 7:26 PM, Koen van der Drift wrote:
>
>
>> Well, it worked for the translation demo. However, when I start
>> the Peptide demo, it creates a DNA anyway. Charles, I think you
>> wrote the original guess code. Would you mind having a look at it ?
>>
>>
>
> I got a bit further with it, but it is still not working as it
> should. I added a new method to BCSymbolSet,
> stringByRemovingUnknownCharsFromString that should filter a string
> and remove all characters that are not in the symbolSet. Because
> BCSymbolSet has a method containsSymbol, I need to convert each
> character in the string to a unsigned char, then get the symbol,
> and then do the test. That's all fine, and the guessing code now
> works as it should for the Peptides demo. However, for the
> Translation demo, it crashes at the line
>
> [result appendString: [NSString stringWithUTF8String: bytes]];
>
>
> Anyone has an idea what I am doing wrong here? Maybe I should add
> all the bytes together, and then convert it back to an NSString?
> Not sure how to do that, though.
>
>
> thanks,
>
> - Koen.
>
--
Xgrid-at-Stanford
Help science move fast forward:
http://cmgm.stanford.edu/~cparnot/xgrid-stanford
Charles Parnot
charles.parnot at gmail.com
More information about the Biococoa-dev
mailing list