--- core0712/gui/Source/NSTextView.m_org	Wed Jul  3 04:30:10 2002
+++ core0712/gui/Source/NSTextView.m	Tue Jul 23 21:47:49 2002
@@ -1184,8 +1184,8 @@
 - (void) _syncTextViewsByCalling: (SEL)action  withFlag: (BOOL)flag
 {
   NSArray *array;
+  NSInvocation *inv;
   int i, count;
-  void (*msg)(id, SEL, BOOL);
 
   if (IS_SYNCHRONIZING_FLAGS == YES)
     {
@@ -1197,15 +1197,19 @@
   array = [_layoutManager textContainers];
   count = [array count];
 
-  msg = (void (*)(id, SEL, BOOL))[self methodForSelector: action];
+  inv = [NSInvocation invocationWithMethodSignature:
+          [self methodSignatureForSelector: action]];
 
-  if (!msg)
+  if (!inv)
     {
       [NSException raise: NSGenericException
 		   format: @"invalid selector in "
 		   @"_syncTextViewsCalling:withFlag:"];
     }
 
+  [inv setSelector: action];
+  [inv setArgument: &flag atIndex: 2];
+
   IS_SYNCHRONIZING_FLAGS = YES;
 
   for (i = 0; i < count; i++)
@@ -1213,15 +1217,15 @@
       NSTextView *tv; 
 
       tv = [(NSTextContainer *)[array objectAtIndex: i] textView];
-      (*msg) (tv, action, flag);
+      [inv invokeWithTarget: tv];
     }
 
   IS_SYNCHRONIZING_FLAGS = NO;
 }
 
-#define NSTEXTVIEW_SYNC(X) \
+#define NSTEXTVIEW_SYNC \
   if (_tvf.multiple_textviews && (IS_SYNCHRONIZING_FLAGS == NO)) \
-    {  [self _syncTextViewsByCalling: X  withFlag: flag]; \
+    {  [self _syncTextViewsByCalling: _cmd  withFlag: flag]; \
     return; }
 
 /*
@@ -1240,7 +1244,7 @@
 
 - (void) setEditable: (BOOL)flag
 {
-  NSTEXTVIEW_SYNC (@selector(setEditable:));
+  NSTEXTVIEW_SYNC;
   [super setEditable: flag];
   
   if ([self shouldDrawInsertionPoint])
@@ -1260,7 +1264,7 @@
 
 - (void) setFieldEditor: (BOOL)flag
 {
-  NSTEXTVIEW_SYNC (@selector(setFieldEditor:));
+  NSTEXTVIEW_SYNC;
   [self setHorizontallyResizable: NO];
   [self setVerticallyResizable: NO];
   [super setFieldEditor: flag];
@@ -1268,13 +1272,13 @@
 
 - (void) setSelectable: (BOOL)flag
 {
-  NSTEXTVIEW_SYNC (@selector(setSelectable:));
+  NSTEXTVIEW_SYNC;
   [super setSelectable: flag];
 }
 
 - (void) setRichText: (BOOL)flag
 {
-  NSTEXTVIEW_SYNC (@selector(setRichText:));
+  NSTEXTVIEW_SYNC;
 
   [super setRichText: flag];
   [self updateDragTypeRegistration];
@@ -1283,7 +1287,7 @@
 
 - (void) setImportsGraphics: (BOOL)flag
 {
-  NSTEXTVIEW_SYNC (@selector(setImportsGraphics:));
+  NSTEXTVIEW_SYNC;
 
   [super setImportsGraphics: flag];
   [self updateDragTypeRegistration];
@@ -1291,7 +1295,7 @@
 
 - (void) setUsesRuler: (BOOL)flag
 {
-  NSTEXTVIEW_SYNC (@selector(setUsesRuler:));
+  NSTEXTVIEW_SYNC;
   _tf.uses_ruler = flag;
 }
 
@@ -1302,7 +1306,7 @@
 
 - (void) setUsesFontPanel: (BOOL)flag
 {
-  NSTEXTVIEW_SYNC (@selector(setUsesFontPanel:));
+  NSTEXTVIEW_SYNC;
   [super setUsesFontPanel: flag];
 }
 
@@ -1310,7 +1314,7 @@
 {
   NSScrollView *sv;
 
-  NSTEXTVIEW_SYNC (@selector(setRulerVisible:));
+  NSTEXTVIEW_SYNC;
 
   sv = [self enclosingScrollView];
   _tf.is_ruler_visible = flag;
