FROM : Joseph Kelly
DATE : Fri Aug 11 18:41:35 2006
Write your own printf that takes variable arguments, and pass it to NSString - (id)initWithFormat:(NSString *)format arguments:(va_list)argList, and then prtintf -cStringUsingEncoding.
If you've never used variable argument lists, then refer to K&R.
joe
On Friday, August 11, 2006, at 11:27AM, Roland Silver <<email_removed>> wrote:
>Yes, that'll work (but the method cString is deprecated in favor of
>cStringUsingEncoding: ).
>
>That takes care of the example I gave, but not the general case where
>one wants a format that includes "%@".
>
>On Aug 11, 2006, at 10:19 AM, Dirk Stegemann wrote:
>
>> Ok; then you'll probably want to try something like this:
>>
>> printf("sender = %s \n", [[sender description] cString]);
>>
>
>
> _______________________________________________
>Do not post admin requests to the list. They will be ignored.
>Cocoa-dev mailing list (<email_removed>)
>Help/Unsubscribe/Update your Subscription:
>http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
>This email sent to <email_removed>
>
>
----
Joseph V. Kelly
<email_removed>
DATE : Fri Aug 11 18:41:35 2006
Write your own printf that takes variable arguments, and pass it to NSString - (id)initWithFormat:(NSString *)format arguments:(va_list)argList, and then prtintf -cStringUsingEncoding.
If you've never used variable argument lists, then refer to K&R.
joe
On Friday, August 11, 2006, at 11:27AM, Roland Silver <<email_removed>> wrote:
>Yes, that'll work (but the method cString is deprecated in favor of
>cStringUsingEncoding: ).
>
>That takes care of the example I gave, but not the general case where
>one wants a format that includes "%@".
>
>On Aug 11, 2006, at 10:19 AM, Dirk Stegemann wrote:
>
>> Ok; then you'll probably want to try something like this:
>>
>> printf("sender = %s \n", [[sender description] cString]);
>>
>
>
> _______________________________________________
>Do not post admin requests to the list. They will be ignored.
>Cocoa-dev mailing list (<email_removed>)
>Help/Unsubscribe/Update your Subscription:
>http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
>This email sent to <email_removed>
>
>
----
Joseph V. Kelly
<email_removed>
| Related mails | Author | Date |
|---|---|---|
| Roland Silver | Aug 11, 17:55 | |
| Dirk Stegemann | Aug 11, 17:57 | |
| Roland Silver | Aug 11, 18:08 | |
| Dirk Stegemann | Aug 11, 18:19 | |
| Roland Silver | Aug 11, 18:26 | |
| Piers Uso Walter | Aug 11, 18:41 | |
| Joseph Kelly | Aug 11, 18:41 | |
| Dirk Stegemann | Aug 11, 18:47 | |
| Deborah Goldsmith | Aug 11, 23:41 | |
| Andrew Farmer | Aug 12, 00:28 | |
| Wayne Hasley | Aug 12, 01:28 |






Cocoa mail archive

