Skip to content

Commit fe401c6

Browse files
committed
minor tweaks to get warnings back down to 0 ; rename MPWMessagePortDescriptor -> ST
1 parent 5deee0f commit fe401c6

13 files changed

+56
-54
lines changed

Diff for: Classes/MPWClassMethodStore.h

+1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@
2626
-(NSDictionary*)externalMethodDict;
2727
-(MPWMethodCallBack*)addMethodString:(NSString*)methodScript withHeaderString:(NSString*)headerString;
2828
-(void)installMethodString:(NSString*)methodScript withHeaderString:(NSString*)headerString;
29+
-(void)installClassMethod:aMethod;
2930

3031
@end

Diff for: Classes/MPWConnectToDefault.m

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88

99
#import "MPWConnectToDefault.h"
10-
#import "MPWMessagePortDescriptor.h"
10+
#import "STMessagePortDescriptor.h"
1111
#import <MPWFoundation/MPWStreamSource.h>
1212
#import "MPWScheme.h"
1313

@@ -68,7 +68,7 @@ @implementation NSObject(connecting)
6868

6969
-defaultInputPort
7070
{
71-
return [[[MPWMessagePortDescriptor alloc] initWithTarget:self key:nil protocol:nil sends:NO] autorelease];
71+
return [[[STMessagePortDescriptor alloc] initWithTarget:self key:nil protocol:nil sends:NO] autorelease];
7272
}
7373

7474
-defaultOutputPort
@@ -96,12 +96,12 @@ @implementation MPWWriteStream(connecting)
9696

9797
-defaultOutputPort
9898
{
99-
return [[[MPWMessagePortDescriptor alloc] initWithTarget:self key:@"target" protocol:@protocol(Streaming) sends:YES] autorelease];
99+
return [[[STMessagePortDescriptor alloc] initWithTarget:self key:@"target" protocol:@protocol(Streaming) sends:YES] autorelease];
100100
}
101101

102102
-defaultInputPort
103103
{
104-
return [[[MPWMessagePortDescriptor alloc] initWithTarget:self key:nil protocol:@protocol(Streaming) sends:NO] autorelease];
104+
return [[[STMessagePortDescriptor alloc] initWithTarget:self key:nil protocol:@protocol(Streaming) sends:NO] autorelease];
105105
}
106106

107107
+defaultComponentInstance
@@ -116,7 +116,7 @@ @implementation MPWStreamSource(connecting)
116116

117117
-defaultOutputPort
118118
{
119-
return [[[MPWMessagePortDescriptor alloc] initWithTarget:self key:@"target" protocol:@protocol(Streaming) sends:YES] autorelease];
119+
return [[[STMessagePortDescriptor alloc] initWithTarget:self key:@"target" protocol:@protocol(Streaming) sends:YES] autorelease];
120120
}
121121

122122

@@ -133,7 +133,7 @@ @implementation MPWFileBinding(connecting)
133133

134134
//-defaultInputPort
135135
//{
136-
// return [[[MPWMessagePortDescriptor alloc] initWithTarget:self key:@"sink" protocol:@protocol(Streaming) sends:NO] autorelease];
136+
// return [[[STMessagePortDescriptor alloc] initWithTarget:self key:@"sink" protocol:@protocol(Streaming) sends:NO] autorelease];
137137
//}
138138
//
139139

Diff for: Classes/MPWLiteralDictionaryExpression.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ -(id)evaluateIn:(id)aContext
8484
MPWLiteralDictionaryExpression *template = [templates at:self.literalClassName];
8585
if ( template ) {
8686
factory=[template factoryForContext:aContext];
87-
baseDictionary=[template dictionaryForLiteralInContext:aContext class:[NSMutableDictionary class]];
87+
baseDictionary=(NSMutableDictionary*)[template dictionaryForLiteralInContext:aContext class:[NSMutableDictionary class]];
8888
}
8989
if ( self.literalClassName && !factory ) {
9090
[NSException raise:@"classnotfound" format:@"Class '%@ not found in literal object expression",self.literalClassName];

Diff for: Classes/MPWScheme.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#import <MPWFoundation/MPWFoundation.h>
1313
#import <MPWFoundation/NSNil.h>
1414
#import "MPWEvaluator.h"
15-
#import "MPWMessagePortDescriptor.h"
15+
#import "STMessagePortDescriptor.h"
1616

1717
@implementation MPWAbstractStore(SchemeCompatibility)
1818

@@ -100,7 +100,7 @@ -(MPWScheme*)cachedBy:cacheScheme
100100

101101
-defaultInputPort
102102
{
103-
return [[[MPWMessagePortDescriptor alloc] initWithTarget:self key:nil protocol:@protocol(MPWStorage) sends:NO] autorelease];
103+
return [[[STMessagePortDescriptor alloc] initWithTarget:self key:nil protocol:@protocol(MPWStorage) sends:NO] autorelease];
104104
}
105105

106106
@end
@@ -109,7 +109,7 @@ @implementation MPWMappingStore(ports)
109109

110110
-defaultOutputPort
111111
{
112-
return [[[MPWMessagePortDescriptor alloc] initWithTarget:self key:@"source" protocol:@protocol(MPWStorage) sends:YES] autorelease];
112+
return [[[STMessagePortDescriptor alloc] initWithTarget:self key:@"source" protocol:@protocol(MPWStorage) sends:YES] autorelease];
113113
}
114114

115115

Diff for: Classes/ObjectiveSmalltalk.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#import <ObjectiveSmalltalk/MPWFrameworkScheme.h>
3434
#import <ObjectiveSmalltalk/MPWGlobalVariableStore.h>
3535
#import <ObjectiveSmalltalk/MPWGetAccessor.h>
36-
#import <ObjectiveSmalltalk/MPWMessagePortDescriptor.h>
36+
#import <ObjectiveSmalltalk/STMessagePortDescriptor.h>
3737
#import <ObjectiveSmalltalk/MPWMethodCallBack.h>
3838
#import <ObjectiveSmalltalk/MPWMethodHeader.h>
3939
#import <ObjectiveSmalltalk/MPWMethodMirror.h>

Diff for: Classes/STBundle.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ -(NSString*)path
5151

5252
-(id <MPWHierarchicalStorage>)storeForSubDir:(NSString*)subdir
5353
{
54-
return [[[self binding] referenceByAppendingReference:[subdir asReference]] asScheme];
54+
return [[[self binding] referenceByAppendingReference:subdir] asScheme];
5555
}
5656

5757
-(id <MPWHierarchicalStorage>)resources
@@ -62,7 +62,7 @@ -(NSString*)path
6262
-(id <MPWReferencing>)resourceRef
6363
{
6464
NSString *path=[[self path] stringByAppendingPathComponent:@"Resources"];
65-
return [path asReference];
65+
return path;
6666
}
6767

6868
-(MPWWriteBackCache*)createResources
@@ -81,7 +81,7 @@ -(MPWWriteBackCache*)createResources
8181

8282
-(NSArray<NSString*>*)sourceNames
8383
{
84-
return (NSArray<NSString*>*)[[[[[[self sourceDir] childrenOfReference:[@"." asReference]] collect] path] collect] lastPathComponent];
84+
return (NSArray<NSString*>*)[[[[[[self sourceDir] childrenOfReference:@"."] collect] path] collect] lastPathComponent];
8585
}
8686

8787
-(NSDictionary*)readInfo

Diff for: Classes/MPWMessagePortDescriptor.h renamed to Classes/STMessagePortDescriptor.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// MPWMessagePortDescriptor.h
2+
// STMessagePortDescriptor.h
33
// MPWTalk
44
//
55
// Created by Marcel Weiher on 8/8/12.
@@ -10,7 +10,7 @@
1010

1111
@class MPWPropertyBinding;
1212

13-
@interface MPWMessagePortDescriptor : NSObject
13+
@interface STMessagePortDescriptor : NSObject
1414
{
1515
MPWPropertyBinding *target;
1616
BOOL isSettable;
@@ -24,6 +24,6 @@ boolAccessor_h(sendsMessages, setSendsMessages)
2424
boolAccessor_h(isSettable, setIsSettable)
2525

2626
-(BOOL)receivesMessages;
27-
-(BOOL)connect:(MPWMessagePortDescriptor*)other;
27+
-(BOOL)connect:(STMessagePortDescriptor*)other;
2828

2929
@end

Diff for: Classes/MPWMessagePortDescriptor.m renamed to Classes/STMessagePortDescriptor.m

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
//
2-
// MPWMessagePortDescriptor.m
2+
// STMessagePortDescriptor.m
33
// MPWTalk
44
//
55
// Created by Marcel Weiher on 8/8/12.
66
//
77
//
88

9-
#import "MPWMessagePortDescriptor.h"
9+
#import "STMessagePortDescriptor.h"
1010
#import <MPWFoundation/MPWFoundation.h>
1111
//#import <objc/Protocol.h>
1212

13-
@implementation MPWMessagePortDescriptor
13+
@implementation STMessagePortDescriptor
1414

1515
objectAccessor(MPWPropertyBinding, target, setTarget)
1616
boolAccessor(sendsMessages, setSendsMessages)
@@ -38,7 +38,7 @@ -(BOOL)receivesMessages
3838
}
3939

4040

41-
-(BOOL)isCompatible:(MPWMessagePortDescriptor*)other
41+
-(BOOL)isCompatible:(STMessagePortDescriptor*)other
4242
{
4343
// NSLog(@"isCompatible self: %@",self);
4444
// NSLog(@"other: %@",other);
@@ -56,7 +56,7 @@ -(BOOL)isCompatible:(MPWMessagePortDescriptor*)other
5656
[[self messageProtocol] isEqual:[other messageProtocol]];
5757
}
5858

59-
-(BOOL)connect:(MPWMessagePortDescriptor*)other
59+
-(BOOL)connect:(STMessagePortDescriptor*)other
6060
{
6161
id connectionTarget=nil,source=nil;
6262
// NSLog(@"connect: %@ to %@",self,other);
@@ -89,7 +89,7 @@ -(NSString *)description{
8989

9090

9191

92-
@implementation MPWMessagePortDescriptor(testing)
92+
@implementation STMessagePortDescriptor(testing)
9393

9494
+_createInputPortDescriptorForStream:(MPWWriteStream*)s1
9595
{
@@ -111,14 +111,14 @@ +(void)testConnectMPWFilter
111111
MPWFilter *s1=[MPWFilter stream];
112112
MPWFilter *s2=[MPWFilter stream];
113113

114-
MPWMessagePortDescriptor *input=[self _createInputPortDescriptorForStream:s2];
114+
STMessagePortDescriptor *input=[self _createInputPortDescriptorForStream:s2];
115115

116116
EXPECTFALSE([input sendsMessages], @"input port sends messages");
117117
EXPECTFALSE([input isSettable], @"input port is settable");
118118
EXPECTTRUE([input receivesMessages], @"input port receives messages");
119119
IDEXPECT([[input target] value], s2, @"input target");
120120

121-
MPWMessagePortDescriptor *output=[self _createOutputPortDescriptorForStream:s1];
121+
STMessagePortDescriptor *output=[self _createOutputPortDescriptorForStream:s1];
122122

123123

124124
EXPECTTRUE([output sendsMessages], @"output port sends messages");
@@ -139,8 +139,8 @@ +(void)testCannotConnectTwoInputs
139139
MPWFilter *s1=[MPWFilter stream];
140140
MPWFilter *s2=[MPWFilter stream];
141141

142-
MPWMessagePortDescriptor *input1=[self _createInputPortDescriptorForStream:s1];
143-
MPWMessagePortDescriptor *input2=[self _createInputPortDescriptorForStream:s2];
142+
STMessagePortDescriptor *input1=[self _createInputPortDescriptorForStream:s1];
143+
STMessagePortDescriptor *input2=[self _createInputPortDescriptorForStream:s2];
144144
EXPECTFALSE([input1 connect:input2], @"connect two input ports");
145145
}
146146

@@ -150,8 +150,8 @@ +(void)testCannotConnectIncompatibleProtocols
150150
MPWFilter *s1=[MPWFilter stream];
151151
MPWFilter *s2=[MPWFilter stream];
152152

153-
MPWMessagePortDescriptor *input1=[self _createInputPortDescriptorForStream:s1];
154-
MPWMessagePortDescriptor *output=[self _createOutputPortDescriptorForStreamWithIncompatibleProtool:s2];
153+
STMessagePortDescriptor *input1=[self _createInputPortDescriptorForStream:s1];
154+
STMessagePortDescriptor *output=[self _createOutputPortDescriptorForStreamWithIncompatibleProtool:s2];
155155
EXPECTFALSE([input1 connect:output], @"connect incompatible protocols");
156156
}
157157

Diff for: GNUmakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ libObjectiveSmalltalk_OBJC_FILES = \
7070
Classes/MPWBlockContext.m \
7171
Classes/MPWAbstractInterpretedMethod.m \
7272
Classes/MPWClassMethodStore.m \
73-
Classes/MPWMessagePortDescriptor.m \
73+
Classes/STMessagePortDescriptor.m \
7474
Classes/MPWMethodCallBack.m \
7575
Classes/MPWResource.m \
7676
Classes/STCompiler.m \

0 commit comments

Comments
 (0)