/[gzz]/gzz/gzz/modules/pp/demotest.py
ViewVC logotype

Diff of /gzz/gzz/modules/pp/demotest.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.71 by mudyc, Wed Feb 5 02:31:24 2003 UTC revision 1.72 by mudyc, Fri Feb 7 08:25:10 2003 UTC
# Line 50  identityManager = DummyIdentityManager() Line 50  identityManager = DummyIdentityManager()
50  slicer = SingleSlicer("foo")  slicer = SingleSlicer("foo")
51    
52  usingNormalBindings = 0  usingNormalBindings = 0
53    ownUse = 0
54    
55  PPDIR=os.getcwd()+'/gzz/modules/pp/example/'  if ownUse:
56        PPDIR=os.getcwd()+'/pp/'
57        FILE=File
58    else:
59        PPDIR=os.getcwd()+'/gzz/modules/pp/example/'
60        
61  def clean_data(args=''):  def clean_data(args=''):
62      os.system('rm '+PPDIR+'b_*')      os.system('rm '+PPDIR+'b_*')
63      os.system('rm '+PPDIR+'d*')      os.system('rm '+PPDIR+'d*')
# Line 77  class PPView2Scene: Line 83  class PPView2Scene:
83              clean_data('full')              clean_data('full')
84          os.system('mv '+ PPDIR +'ps_FOO '+ PPDIR+'ps_foo')                      os.system('mv '+ PPDIR +'ps_FOO '+ PPDIR+'ps_foo')            
85    
86            print os.getcwd()+PPDIR
87    
88          # Next, the mediaserver we'll save to.          # Next, the mediaserver we'll save to.
89          self.ms = gzz.mediaserver.SimpleMediaserver(          self.ms = gzz.mediaserver.SimpleMediaserver(
90              gzz.mediaserver.storage.DirStorer(File(os.getcwd()+'/gzz/modules/pp/example/')))              gzz.mediaserver.storage.DirStorer(File(PPDIR)))
91                    
92          # We need to get a "filer" for storing versions of our space.          # We need to get a "filer" for storing versions of our space.
93          # Accept this part as 'magic' for now...          # Accept this part as 'magic' for now...
# Line 287  class PPView2Scene: Line 295  class PPView2Scene:
295                  self.ppactions.insertText(c.getId(), offs, '\n')                  self.ppactions.insertText(c.getId(), offs, '\n')
296                  self.avc.setCursorOffset(offs+1)                  self.avc.setCursorOffset(offs+1)
297              if key == "Backspace":              if key == "Backspace":
298                  if offs != 0:                  if offs > 0:
299                      self.ppactions.deleteText(c.getId(), offs-1, offs)                      self.ppactions.deleteText(c.getId(), offs-1, offs)
300                      self.avc.setCursorOffset(offs-1)                      self.avc.setCursorOffset(offs-1)
301                        
302                  if c.t() == None or c.t() == '':                  if c.t() == None or c.t() == '':
303                      d = self.ppv.d                      d = self.ppv.d
304                      print 'Cell empty!'                      print 'Cell empty!'
# Line 300  class PPView2Scene: Line 309  class PPView2Scene:
309                          self.avc.setAccursed(paper)                          self.avc.setAccursed(paper)
310                          self.ppv.showLinkbuoys = 0                          self.ppv.showLinkbuoys = 0
311                          self.ppv.viewMode = self.ppv.JUST_BROWSING                          self.ppv.viewMode = self.ppv.JUST_BROWSING
312                        else:
313                            print '...what\'s then?'
314                            self.ppactions.insertText(c.getId(), 0, '_')
315                            
316                                            
317              if key == "Delete":              if key == "Delete":
318                  print 'Untested! Doesn\'t check the length'                  print 'Untested! Doesn\'t check the length'

Legend:
Removed from v.1.71  
changed lines
  Added in v.1.72

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26