FROM : Matthew Formica
DATE : Wed Jan 16 21:05:20 2002
An easier way might be to typecast the NSString into a CFString and use
CFStringGetPascalString or something to do the conversion in one step.
- Matthew
On 1/16/02 11:29 AM, "Josh Ferguson" <<email_removed>> wrote:
> -----Original Message-----
> From: Josh Ferguson
> Sent: Wednesday, January 16, 2002 12:48 PM
> To: '<email_removed>'
> Subject: dealing with different types of strings
>
>
> I'm trying to find the best method of taking input from a TextField and
> converting it to a Pascal String to be inserted as parameters in a
> library function. I can't find a way to get the value from the text
> field as a Pascal string, so I thought of storing it to an NSString,
> then using the getCString (or just cString) method to store it to a char
> * (this may be an extra step), then using CopyCStringToPascal() to copy
> the char * to a Str255 *... I was hoping there was an easier method for
> accomplishing this...anyone have any ideas? I come from a Unix /
> Windows background, so dealing with Pascal strings is totally foreign to
> me...
>
> ==============================
> Josh Ferguson - QA Engineer
> eSellerate, Inc. - Lincoln, NE
> <email_removed>
> ==============================
> _______________________________________________
> cocoa-dev mailing list | <email_removed>
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.
DATE : Wed Jan 16 21:05:20 2002
An easier way might be to typecast the NSString into a CFString and use
CFStringGetPascalString or something to do the conversion in one step.
- Matthew
On 1/16/02 11:29 AM, "Josh Ferguson" <<email_removed>> wrote:
> -----Original Message-----
> From: Josh Ferguson
> Sent: Wednesday, January 16, 2002 12:48 PM
> To: '<email_removed>'
> Subject: dealing with different types of strings
>
>
> I'm trying to find the best method of taking input from a TextField and
> converting it to a Pascal String to be inserted as parameters in a
> library function. I can't find a way to get the value from the text
> field as a Pascal string, so I thought of storing it to an NSString,
> then using the getCString (or just cString) method to store it to a char
> * (this may be an extra step), then using CopyCStringToPascal() to copy
> the char * to a Str255 *... I was hoping there was an easier method for
> accomplishing this...anyone have any ideas? I come from a Unix /
> Windows background, so dealing with Pascal strings is totally foreign to
> me...
>
> ==============================
> Josh Ferguson - QA Engineer
> eSellerate, Inc. - Lincoln, NE
> <email_removed>
> ==============================
> _______________________________________________
> cocoa-dev mailing list | <email_removed>
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Josh Ferguson | Jan 16, 20:29 | |
| Matthew Formica | Jan 16, 21:05 | |
| Douglas Davidson | Jan 16, 21:17 | |
| Bill Bumgarner | Jan 16, 21:29 |






Cocoa mail archive

