swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch for Raster and ZoomRaster problem with button presses


From: Rick Riolo
Subject: patch for Raster and ZoomRaster problem with button presses
Date: Sat, 27 Sep 1997 09:17:26 -0400 (EDT)

Appended is the patch file I constructed from glen's suggested
changes, which seems to fix the problem I mentioned the other
day with using mouseclicks to raise probes in rasters.
You can apply it with
   cd swarm-1.0.3
   patch < raster-970927.patch
   make
assuming you have put the lines below in the file raster-970927.patch .

btw, perhaps for the faq, to make this patch file I basicaly did the 
following:
  cp src/tkobjc/Raster.h src/tkobjc/Raster-orig.h
  cp src/tkobjc/Raster.m src/tkobjc/Raster-orig.m
  cp src/tkobjc/ZoomRaster.m src/tkobjc/ZoomRaster-orig.m
Edit the 3 files, then
  diff -c src/tkobjc/Raster-orig.h src/tkobjc/Raster.h > raster-970927.patch
  diff -c src/tkobjc/Raster-orig.m src/tkobjc/Raster.m >> raster-970927.patch
  diff -c src/tkobjc/ZoomRaster-orig.m src/tkobjc/ZoomRaster.m >> 
raster-970927.patch
(Note there was no change to the ZoomRaster.h file...the offending
method is not declared there.)

I don't know if this is the best way to make a patch file,
but it works for me (which means its not been worth it for me
to find out if there are better ways!).

 -r
 
Rick Riolo                           address@hidden
Program for Study of Complex Systems (PSCS)
4068 Randall Lab                
University of Michigan         Ann Arbor MI 48109-1120
Phone: 313 763 3323                  Fax: 313 763 9267
http://pscs.physics.lsa.umich.edu/PEOPLE/rlr-home.html
http://pscs.physics.lsa.umich.edu//pscs.html

-----------------------------------------------------------------------------
*** src/tkobjc/Raster-orig.h    Sat Sep 27 08:10:33 1997
--- src/tkobjc/Raster.h Sat Sep 27 08:11:56 1997
***************
*** 36,41 ****
  -draw: (id <XDrawer>) xd X: (int) x Y: (int) y;
  -drawSelf;
  -erase;
! -handleButton: (int) n X: (long) x Y: (long) y;
  -setButton: (int) n Client: c Message: (SEL) s;
  @end
--- 36,41 ----
  -draw: (id <XDrawer>) xd X: (int) x Y: (int) y;
  -drawSelf;
  -erase;
! -handleButton: (int) n X: (int) x Y: (int) y;
  -setButton: (int) n Client: c Message: (SEL) s;
  @end
*** src/tkobjc/Raster-orig.m    Sat Sep 27 08:08:23 1997
--- src/tkobjc/Raster.m Sat Sep 27 08:12:25 1997
***************
*** 174,180 ****
    return self;
  }
  
! -handleButton: (int) n X: (long) x Y: (long) y {
    id c = 0;
    SEL sel = 0;
    switch(n) {
--- 174,180 ----
    return self;
  }
  
! -handleButton: (int) n X: (int) x Y: (int) y {
    id c = 0;
    SEL sel = 0;
    switch(n) {
*** src/tkobjc/ZoomRaster-orig.m        Fri Sep 26 08:43:16 1997
--- src/tkobjc/ZoomRaster.m     Sat Sep 27 08:13:14 1997
***************
*** 155,162 ****
  }
  
  // scale by zoom factor
! -handleButton: (int) n X: (long) x Y: (long) y {
!   return [super handleButton: n X: (x / (long)zoomFactor) Y: (y / 
(long)zoomFactor)];
  }
  
  @end
--- 155,162 ----
  }
  
  // scale by zoom factor
! -handleButton: (int) n X: (int) x Y: (int) y {
!   return [super handleButton: n X: (x / (int)zoomFactor) Y: (y / 
(int)zoomFactor)];
  }
  
  @end


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]