Revision: 29831
          http://sourceforge.net/p/bibdesk/svn/29831
Author:   hofman
Date:     2025-11-17 10:19:56 +0000 (Mon, 17 Nov 2025)
Log Message:
-----------
rename convenience initializer

Modified Paths:
--------------
    trunk/bibdesk/BDSKComplexString.m
    trunk/bibdesk/BDSKStringNode.h
    trunk/bibdesk/BDSKStringNode.m
    trunk/bibdesk/UnitTests/TestComplexString.m

Modified: trunk/bibdesk/BDSKComplexString.m
===================================================================
--- trunk/bibdesk/BDSKComplexString.m   2025-11-17 10:18:45 UTC (rev 29830)
+++ trunk/bibdesk/BDSKComplexString.m   2025-11-17 10:19:56 UTC (rev 29831)
@@ -140,7 +140,7 @@
             if (nesting > 0) {
                 error = [NSError localErrorWithCode:kBDSKComplexStringError 
localizedDescription:[NSString stringWithFormat:NSLocalizedString(@"Unbalanced 
string: [%@]", @"error description"), nodeStr]];
             } else {
-                node = [[BDSKStringNode alloc] initWithQuotedString:nodeStr];
+                node = [[BDSKStringNode alloc] initWithString:nodeStr];
                 [returnNodes addObject:node];
             }
         }
@@ -165,7 +165,7 @@
             if (nesting > 0 || ![nodeStr 
isStringTeXQuotingBalancedWithBraces:YES connected:NO]) {
                 error = [NSError localErrorWithCode:kBDSKComplexStringError 
localizedDescription:[NSString stringWithFormat:NSLocalizedString(@"Unbalanced 
string: [%@]", @"error description"), nodeStr]];
             } else {
-                node = [[BDSKStringNode alloc] initWithQuotedString:nodeStr];
+                node = [[BDSKStringNode alloc] initWithString:nodeStr];
                 [returnNodes addObject:node];
             }
         }
@@ -264,7 +264,7 @@
 
 static inline
 void __BDStringNodesInsertString(NSMutableArray *nodes, NSString *string, 
NSUInteger i) {
-    BDSKStringNode *node = [[BDSKStringNode alloc] 
initWithQuotedString:string];
+    BDSKStringNode *node = [[BDSKStringNode alloc] initWithString:string];
     [nodes insertObject:node atIndex:i];
 }
 
@@ -667,7 +667,7 @@
         if ([node type] == BDSKStringNodeString) {
             string = [[node value] stringByTeXifyingString];
             if (string != [node value]) {
-                newNode = [[BDSKStringNode alloc] initWithQuotedString:string];
+                newNode = [[BDSKStringNode alloc] initWithString:string];
                 changed = YES;
             }
         }
@@ -698,7 +698,7 @@
         if ([node type] == BDSKStringNodeString) {
             string = [[node value] stringByDeTeXifyingString];
             if (string != [node value]) {
-                newNode = [[BDSKStringNode alloc] initWithQuotedString:string];
+                newNode = [[BDSKStringNode alloc] initWithString:string];
                 changed = YES;
             }
         }
@@ -767,7 +767,7 @@
 }
 
 - (NSArray *)nodes{
-    return @[[[BDSKStringNode alloc] initWithQuotedString:self]];
+    return @[[[BDSKStringNode alloc] initWithString:self]];
 }
 
 + (BOOL)isEmptyAsComplexString:(NSString *)aString{

Modified: trunk/bibdesk/BDSKStringNode.h
===================================================================
--- trunk/bibdesk/BDSKStringNode.h      2025-11-17 10:18:45 UTC (rev 29830)
+++ trunk/bibdesk/BDSKStringNode.h      2025-11-17 10:19:56 UTC (rev 29831)
@@ -53,13 +53,13 @@
 }
 
     /*!
-       @method     initWithQuotedString:
+       @method     initWithString:
      @abstract   Returns a newly allocated and initialized string node for a 
quoted string. The string is expected to be valid, i.e. it should not contain 
unbalanced braces. Error checking is not performed.
      @discussion (comprehensive description)
      @param      s The string value without the quotes. 
      @result     A newly allocated string node of string type. 
      */
-- (BDSKStringNode *)initWithQuotedString:(NSString *)s;
+- (BDSKStringNode *)initWithString:(NSString *)s;
 
     /*!
                @method     initWithType:value:

Modified: trunk/bibdesk/BDSKStringNode.m
===================================================================
--- trunk/bibdesk/BDSKStringNode.m      2025-11-17 10:18:45 UTC (rev 29830)
+++ trunk/bibdesk/BDSKStringNode.m      2025-11-17 10:19:56 UTC (rev 29831)
@@ -44,7 +44,7 @@
 
 @synthesize type, value;
 
-- (BDSKStringNode *)initWithQuotedString:(NSString *)s{
+- (BDSKStringNode *)initWithString:(NSString *)s{
     return [self initWithType:BDSKStringNodeString value:s];
 }
 

Modified: trunk/bibdesk/UnitTests/TestComplexString.m
===================================================================
--- trunk/bibdesk/UnitTests/TestComplexString.m 2025-11-17 10:18:45 UTC (rev 
29830)
+++ trunk/bibdesk/UnitTests/TestComplexString.m 2025-11-17 10:19:56 UTC (rev 
29831)
@@ -51,7 +51,7 @@
 }
 
 - (void)testStringFromBibTeXString{
-    BDSKStringNode *sn = [[[BDSKStringNode alloc] 
initWithQuotedString:@"string"] autorelease];
+    BDSKStringNode *sn = [[[BDSKStringNode alloc] initWithString:@"string"] 
autorelease];
     
     STAssertNotNil(sn,nil);
     STAssertTrue(BDSKStringNodeString==[sn type],nil);
@@ -166,7 +166,7 @@
 }
 
 - (void)testDisplaySingleStringNode{
-    NSArray *a = [NSArray arrayWithObjects:[[[BDSKStringNode alloc] 
initWithQuotedString:@"string"] autorelease], nil];
+    NSArray *a = [NSArray arrayWithObjects:[[[BDSKStringNode alloc] 
initWithString:@"string"] autorelease], nil];
     NSString *cs = [NSString stringWithNodes:a
                                                                                
macroResolver:[self macroResolver]];
     STAssertNotNil(cs,nil);

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to