Using tops command to update NSLog statements in objective-c code


 
Thread Tools Search this Thread
Top Forums Programming Using tops command to update NSLog statements in objective-c code
# 1  
Old 10-28-2013
Using tops command to update NSLog statements in objective-c code

In my objective-c code base I have several NSLog statements.

eg.

Code:
NSLog(@"Here is the message without arguments");
NSLog(@"Here is the message with arguments: %s, %s","argument1","argument2");

Now I want to do two things:

First to do: updating NSLog statements with NSLocalizedString(<#key#>, <#comment#>)

eg.

Code:
NSLog(NSLocalizedString(@"Here is the message without arguments", @""));
NSLog(NSLocalizedString(@"Here is the message with arguments: %s, %s", @""), "argument1", "argument2");

Second to do: obtaining format strings from NSLog statements and adding it to localizable.strings file

eg.

Code:
"Here is the message without arguments" = "Here is the message without arguments";
"Here is the message with arguments: %s, %s" = "Here is the message with arguments: %s, %s";

Is there any way to do so through `tops` command, please suggest.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. What is on Your Mind?

Don tops the 4000+ thanks...

Sometime today Don Cragun reached 4000+ thanks from different folks. Well done Don, I have learnt a lot from you and other guys on here. Big thanks from we who have benefitted from your expertise. (6 Replies)
Discussion started by: wisecracker
6 Replies

2. UNIX for Beginners Questions & Answers

Answers for few objective questions.

Hi Unix geniuses, I need your help for the answers of few objective Q&A. i dont know if my answers are correct or not. So i really need your help to provide the answers which will help me in unix programming. (1 Reply)
Discussion started by: Vivekit82
1 Replies

3. Programming

Python Conditional Statements Based on Success of Last Command

In shell scripting, I can create a conditional statement based on the success or failure (exit status)of a command such as: pinger() { ping -c 2 $remote_host >/dev/null 2>&1 ping_stat=$? } pinger if ]; then echo "blahblahblah" exit 0 fi how is this done using Python using... (3 Replies)
Discussion started by: metallica1973
3 Replies

4. Programming

Removing goto statements in FORTRAN code

I have the code below and I want to remove the "go to" statements. Any idea how I can do it? if (iorder == 0) then tmincurrent = 1.0e11 if(ireverse == 0 .or. istop /= 1) then do i = 1, 6 if ((side(i) /= sidelimit(i)) .and. (tminside(i) < tmincurrent)) then ... (1 Reply)
Discussion started by: kristinu
1 Replies

5. UNIX for Advanced & Expert Users

Sfmdb proces at top of tops

Good day, I do have a HP-UX B.11.31 U ia64 machine. If I check top a proces called sfmdb is high in use en cpu. It is a postgres-command. Full name is System Fault Management. Google gives an option to restart it in: /sbin/init.d via sfmdb stop en start. But if I now look on the machine I... (2 Replies)
Discussion started by: velde_van_der_a
2 Replies

6. UNIX for Dummies Questions & Answers

Question on variable inheritance & code statements

1) I have the below code in concattxnrecords.sh shell script and it is calling the genericVars.sh shell script which is mentioned as below has some code inside it which would intialize some variables in it, now my question is will this shell script would inherit those variable definitions or not... (3 Replies)
Discussion started by: Ariean
3 Replies

7. Programming

Compiling Objective-C 2.0 under Linux

Hello all, I am new to programming and currently I am taking a swing at Objective-C. I easily compile my programs on my Macintosh, and have compiled some Objective-C programs on my linux box. The problem I am having is when I try to use features demonstrated in the book Programming in... (4 Replies)
Discussion started by: inquen
4 Replies

8. UNIX for Dummies Questions & Answers

UNIX command: mv - Objective: move files based on timestamp

I was wondering if there was a command to move files from one directory to another subdirectory based on the timestamp, i.e. moving from directory A files that have a timestamp of before the year 2005 into directory B. Directory B is a subdirectory located in directory A. I was advised to... (4 Replies)
Discussion started by: HLee1981
4 Replies

9. UNIX for Advanced & Expert Users

SQLPLUS and update statements using bind variables

Hello- The code below works fine expect that it does not update the table CTL_INTERFACE "red highlight". Any idea what I'm doing wrong here? Thanks:D # coNNECT to the database and insert a row then get the new row id cycle_id=`sqlplus -S $XXX_USER/$XXX_PW@$XXX_CONNECT << EOF SET ECHO... (3 Replies)
Discussion started by: Nomaad
3 Replies
Login or Register to Ask a Question