[Biococoa-dev] NSMutableData vs malloc
Charles Parnot
charles.parnot at gmail.com
Sun Jul 17 12:02:42 EDT 2005
I don't see why we can't keep simply
+ (id) symbolForChar: (unsigned char)aSymbol
There is a direct correspondance between BCSymbol and char, so a
BCSymbol is defined by a char, not a string. I should have a look at
the code to help better, but maybe there is some confusion happpeing
when switching between NSString and char* and char...
charles
On Jul 17, 2005, at 5:45 AM, Koen van der Drift wrote:
>
> On Jul 17, 2005, at 8:30 AM, John Timmer wrote:
>
>
>> I think you want "stringWithUTF8String" or some other method
>> containing
>> UTF8. It's the "modern" equivalent of C strings.
>>
>>
>
> Good point, thanks. So we are going with utf8 encoding, then?
>
> Another issue, of course I should have used unsigned char* instead
> of unsigned char. But now the following won't work, because the
> argument for switch is not an int but a pointer:
>
> + (id) symbolForChar: (unsigned char * )aSymbol
> {
> switch ( aSymbol ) {
>
>
> Any idea how to fix that?
>
>
> Also, I now need to typecast all these lines:
>
> From:
>
> asparagineRepresentation = [[BCAminoAcid alloc]
> initWithSymbolChar: 'N'];
>
> to
>
> asparagineRepresentation = [[BCAminoAcid alloc]
> initWithSymbolChar: (unsigned char *) 'N'];
>
>
> I guess that is unavoidable?
>
> cheers,
>
> - Koen.
>
>
> _______________________________________________
> Biococoa-dev mailing list
> Biococoa-dev at bioinformatics.org
> https://bioinformatics.org/mailman/listinfo/biococoa-dev
>
--
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