mirror of
https://github.com/gnustep/libs-steptalk.git
synced 2025-02-21 02:31:01 +00:00
Code cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/steptalk/trunk@13882 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b8f8753be3
commit
2b961fe6fe
10 changed files with 33 additions and 21 deletions
|
@ -1,3 +1,7 @@
|
|||
2002 Jun 10
|
||||
|
||||
* NSObject+additions: removed -className as it was added to the base library
|
||||
|
||||
2002 Jun 8
|
||||
|
||||
* STEnvironmentDescription: added module amd finder list; little code
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
obj = [[obj allObjects] sortedArrayUsingSelector:@selector(compare:)];
|
||||
for(i = 0;i<[obj count]; i++)
|
||||
{
|
||||
printf("%s\n", i,
|
||||
printf("%s\n",
|
||||
[self displayCStringForObject:[obj objectAtIndex:i]]);
|
||||
}
|
||||
|
||||
|
|
|
@ -91,7 +91,6 @@ int complete_handler(void)
|
|||
|
||||
completitionList = [[NSMutableArray alloc] init];
|
||||
[completitionList addObjectsFromArray:STAllObjectiveCSelectors()];
|
||||
[completitionList addObjectsFromArray:[env knownObjectNames]];
|
||||
|
||||
updateCompletitionList = NO;
|
||||
}
|
||||
|
@ -277,6 +276,15 @@ int complete_handler(void)
|
|||
}
|
||||
}
|
||||
|
||||
enumerator = [[env knownObjectNames] objectEnumerator];
|
||||
while( (str = [enumerator nextObject]) )
|
||||
{
|
||||
if( [str hasPrefix:match] )
|
||||
{
|
||||
[set addObject:str];
|
||||
}
|
||||
}
|
||||
|
||||
array = [set allObjects];
|
||||
|
||||
if( [array count] == 0 )
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
extern NSMutableDictionary *STAllObjectiveCClasses(void);
|
||||
extern NSMutableDictionary *STGetFoundationConstants(void);
|
||||
extern NSMutableDictionary *STClassDictionaryFromNames(NSArray *classNames);
|
||||
extern NSMutableDictionary *STClassDictionaryWithNames(NSArray *classNames);
|
||||
extern NSArray *STAllObjectiveCSelectors(void);
|
||||
|
||||
extern NSValue *STValueFromSelector(SEL sel);
|
||||
|
|
|
@ -23,13 +23,5 @@
|
|||
{
|
||||
return YES;
|
||||
}
|
||||
- (NSString *)className
|
||||
{
|
||||
return NSStringFromClass([self class]);
|
||||
}
|
||||
+ (NSString *)className
|
||||
{
|
||||
return NSStringFromClass([self class]);
|
||||
}
|
||||
@end
|
||||
|
||||
|
|
|
@ -182,7 +182,7 @@
|
|||
*/
|
||||
- (void)addClassesWithNames:(NSArray *)names
|
||||
{
|
||||
[self addNamedObjectsFromDictionary:STClassDictionaryFromNames(names)];
|
||||
[self addNamedObjectsFromDictionary:STClassDictionaryWithNames(names)];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -414,6 +414,7 @@
|
|||
STClassInfo *class;
|
||||
NSString *selector;
|
||||
|
||||
selector = [selectorCache objecForKey:aString]
|
||||
class = [self findClassInfoForObject:anObject];
|
||||
|
||||
NSDebugLLog(@"STSending",
|
||||
|
|
|
@ -42,7 +42,6 @@ NSString *STInterpreterInconsistencyException = @"STInterpreterInconsistencyExce
|
|||
|
||||
NSString *STLibraryDirectory = @"StepTalk";
|
||||
NSString *STScriptsDirectory = @"Scripts";
|
||||
// NSString *STScriptExtension = @"stalk";
|
||||
|
||||
NSString *STModulesDirectory = @"Modules";
|
||||
NSString *STModuleExtension = @"stmodule";
|
||||
|
|
|
@ -70,7 +70,7 @@ NSMutableDictionary *STAllObjectiveCClasses(void)
|
|||
return dict;
|
||||
}
|
||||
|
||||
NSMutableDictionary *STClassDictionaryFromNames(NSArray *classNames)
|
||||
NSMutableDictionary *STClassDictionaryWithNames(NSArray *classNames)
|
||||
{
|
||||
NSEnumerator *enumerator = [classNames objectEnumerator];
|
||||
NSString *className;
|
||||
|
|
|
@ -2,6 +2,4 @@
|
|||
|
||||
array := NSMutableArray array.
|
||||
|
||||
1 to: 10000 do: [ :i | array addObject: i].
|
||||
|
||||
Transcript showLine:array count.
|
||||
1 to: 2000 do: [ :i | array addObject: i].
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
main
|
||||
|
||||
array := #(A B C D E F G H).
|
||||
|
||||
self testBlock.
|
||||
self testExceptions.
|
||||
^self
|
||||
|
@ -11,14 +9,26 @@ main
|
|||
!
|
||||
|
||||
testBlock
|
||||
| count |
|
||||
| count array |
|
||||
|
||||
Transcript showLine:'> Block test'.
|
||||
|
||||
array := #( ).
|
||||
1 to: 5 do: [ :i | array addObject:i ].
|
||||
|
||||
count := 0.
|
||||
array do: [ :element | count := count + 1. ].
|
||||
|
||||
Transcript showLine:' Count ', (count stringValue).
|
||||
Transcript showLine:'count ', (count stringValue).
|
||||
|
||||
array do: [ :i |
|
||||
array do: [ :j |
|
||||
Transcript show:((i stringValue), (j stringValue),' ').
|
||||
|
||||
].
|
||||
Transcript show:'\n'.
|
||||
].
|
||||
|
||||
^self
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue