Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tops command line help please



On Monday, March 29, 2004, at 12:11 am, Justin Walker wrote:

On Mar 28, 2004, at 12:58, Ben Dougall wrote:

command line tool help (deciphering of man page) required for tops tool please:

how to tell tops to change a variable in a objective-c code file (if it can do that)? eg, say i've got this following code in Test.m and i want to change all uses of the test variable (but nothing else) to otherName :

Did you check the man page for 'tops'? It seems to answer your question.

yes i did, but i still don't know how to do it. i've tried several things that i thought would work but don't -- i don't completely understand the man page -- that's the reason i'm after some help. i know it must seem very simple to anyone who's up on this sort of thing but that man page is not that helpful to me.

the best i've managed, which isn't very good is this:

tops ./Test.m replace "test<b args>" with "anotherName<b args>"

which changed:


#import "Test.h"

@implementation Test

- (Test *)initTest:(unsigned)val
{
if( self = [super init] ) {
test = val;
tester = @selector(test);
}
return self;
}

- (unsiged)test
{
test += test;
if( test < 100 )
return test;
else
[self test];
}

@end


to:


#import "Test.h"

@implementation Test

- (Test *)initTest:(unsigned)val
{
if( self = [super init] ) {
anotherName= val;
tester = @selector(anotherName);
}
return self;
}

- (unsiged)anotherName{
anotherName+= anotherName;
if( anotherName< 100 )
return anotherName;
else
[self anotherName];
}

@end


it hasn't made any distinction between variable names and method names. i can't see which option, if any, specifies only change variables. args seemed to be the most likely but doesn't look like it.

how do you specify only variables?

thanks, ben.
_______________________________________________
darwin-userlevel mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-userlevel
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: tops command line help please (From: Justin Walker <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.