Show
Ignore:
Timestamp:
07/11/07 14:40:20 (7 years ago)
Author:
DrewCormier
Message:

name the property variable after the name given in the PropertiesDialog?

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • WaveDev/trunk/WaveDev/wavedev/generate/templates/py_comp/genStructure.py

    r4314 r4315  
    222222    '''write teh code that will read propeties from the prf file''' 
    223223    # TODO: test this method 
    224     simpleCount = 0 
    225     simplesequenceCount = 0 
    226224 
    227225    # check to make sure there are properties 
     
    243241            ts = " "*12 + "if property.id == '" +  p.id + "':\n"; output.write(ts) 
    244242            # TODO: find out if int() type casting is needed 
    245             ts = " "*16 + "simpleProperty" + str(simpleCount) + " = int(property.value.value())\n"; output.write(ts)  
    246             simpleCount = simpleCount + 1 
     243            ts = " "*16 + p.name " = int(property.value.value())\n"; output.write(ts)  
    247244 
    248245        elif p.elementType == "SimpleSequence": 
    249246            ts = " "*12 + "if property.id == '" +  p.id + "':\n"; output.write(ts) 
    250             ts = " "*16 + "simpleSequenceProperty" + str(simplesequenceCount) + " = []\n"; output.write(ts) 
     247            ts = " "*16 + str(p.name) + " = []\n"; output.write(ts) 
    251248            # TODO: find out if int() type casting is needed 
    252             ts = " "*16 + "simpleSequenceProperty" + str(simplesequenceCount) + ".extend(int([val for val in property.values.value()))\n"; output.write(ts)  
    253             simplesequenceCount = simplesequenceCount + 1 
     249            ts = " "*16 + str(p.name) + ".extend(int([val for val in property.values.value()))\n"; output.write(ts)  
    254250 
    255251        else: