Show
Ignore:
Timestamp:
04/27/08 16:35:09 (5 years ago)
Author:
stedwar2
Message:

Reverted getActiveWaveform to return the actual object, not
a tree node. Added an object dump method for debugging.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • ossiedev/branches/jsnyder/ComponentProject/PythonSrc/MainFrameGlue.py

    r7294 r7300  
    22import wavedev.importResource 
    33import wavedev.importNode 
     4import wavedev.WaveformClass 
    45from wavedev.WaveformClass import Waveform 
    56import wavedev.PlatformClass 
     
    89import cPickle 
    910from edu.vt.ossie.jyinterface.interfaces import MainFrame 
     11import traceback 
     12 
     13 
     14#def newUuidgen(): 
     15#   result = commands.getoutput('uuidgen -t') 
     16#   # On some linux-like OSes, uuidgen does not take any parameter to specify 
     17#   # the kind of uuid to generate 
     18#   if (result.find('usage:') >= 0): 
     19#       result = commands.getoutput('uuidgen') 
     20#   return result 
     21 
     22#        try: 
     23#            setattr(wavedev.ComponentClass, 'uuidgen', newUuidgen) 
     24#        except: 
     25#            traceback.print_exc() 
    1026 
    1127class MainFrameTreeNode: 
     
    7490        if os.path.isdir(self.installPath + 'nodes'): 
    7591            nodeList = os.listdir(self.installPath + 'nodes') 
    76             print nodeList 
     92            # print nodeList 
    7793        else: 
    7894            errorMsg(self, "No nodes could be found in: " + self.installPath) 
     
    99115            nodePath = self.installPath + 'nodes/' + nodeName + '/' 
    100116 
    101             print "calling getNode(", nodePath, ",", nodeName, ")" 
     117            # print "calling getNode(", nodePath, ",", nodeName, ")" 
    102118            tmpNode = wavedev.importNode.getNode(nodePath,nodeName,self) 
    103119 
     
    112128 
    113129    def getActiveWaveform(self): 
    114         return [MainFrameTreeNode("Components", self.active_waveform)] 
     130        return self.active_waveform 
    115131 
    116132    def getActivePlatform(self): 
     
    206222            self.active_waveform = tmpObject[1] 
    207223            self.active_platform = tmpObject[2] 
    208      
     224 
     225 
    209226    def addComponentToActiveWaveform(self, newComponent): 
    210227        self.active_waveform.nodes.append(newComponent) 
    211          
    212  
     228 
     229 
     230    def dump(self, x): 
     231        from Utilities import dumpObj 
     232        dumpObj(x) 
     233