a simple trigger (gnue-forms)

Adrian Maier <[email protected]>
Newsgroups gmane.comp.gnu.enterprise.general
Message-ID <[email protected]>
Hello,

Since in this period i don't have many things to do at work, i've
decided to use some of this spare time for gnue.

I am trying to create a trigger (POST-CHANGE) that copies the value
from one field (fldPu)  iinto another (fldVal).


Setting a fixed value (16) works:
       <field name="fldPu" field="pu" typecast="number">
         <trigger name="Trigger1" type="POST-CHANGE"><![CDATA[##
## fldPu.Post-Change (Field-Level Trigger)
##
v = blkProd.fldPu
blkProd.fldVal = 16
return
]]></trigger>
       </field>


But this doesn't work :
v = blkProd.fldPu
blkProd.fldVal = v
return

( i don't have the traceback available right now because i'm writing
emails in windows ,  but my tests have been made in linux. ).


I have tried different variations:
blkProd.fldVal = float(v)
blkProd.fldVal.setValue(16)
blkProd.fldVal.triggerSetValue(16)


Does anyone know which is the correct way to get and set field
values ?


Thanks,
Adrian Maier
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.