More problems with a dialog - 18/12/05 03:05 PM
This first picture shows the current display when information is initially entered, and it should be the same display after pressing the Store New Info button, as well as when the information is recalled (presuming nothing new has been added)
This next picture shows what is currently being displayed after the Store New Info button has been pressed
And, finally, this last picture shows what is being displayed when the information is recalled
Here's what I believe are the relevant sections of my code.
I have further steps to go before this project is complete, but until these problems have been resolved, there's not much I can do with the next step.
This next picture shows what is currently being displayed after the Store New Info button has been pressed
And, finally, this last picture shows what is being displayed when the information is recalled
Here's what I believe are the relevant sections of my code.
Code:
on *:DIALOG:Observer:sclick:7: { set %acct $iif($did($dname,$did).seltext,$v1,$did($dname,$did)) did -ra $dname 9 $hget($dname,$+(%rte,.,%acct,.Name)) did -ra $dname 11 $hget($dname,$+(%rte,.,%acct,.Address)) did -ra $dname 13 $hget($dname,$+(%rte,.,%acct,.Apt)) did -ra $dname 15 $hget($dname,$+(%rte,.,%acct,.Phone)) did $iif($hget($dname,$+(%rte,.,%acct,.Active)),-c,-u) $dname 18 did -ra $dname 122 $asctime($hget($dname,$+(%rte,.,%acct,.Expiry)),mmm dd yyyy) var %x = 1, %lines = $hfind($dname,$+(%rte,.,%acct,.data.*),0,w) while (%x <= %lines) { var %data = $hget($dname,$+(%rte,.,%acct,.data.,%x)) did -a $+ $iif(%x = 1,r) $dname 118 $iif($gettok(%data,1,44) != -, $asctime($v1,mmm dd yyyy),-) did -a $+ $iif(%x = 1,r) $dname 37 $iif($gettok(%data,2,44) != -, $asctime($v1,mmm dd yyyy),-) did -a $+ $iif(%x = 1,r) $dname 38 $gettok(%data,3,44) did -a $+ $iif(%x = 1,r) $dname 43 $gettok(%data,4,44) did -a $+ $iif(%x = 1,r) $dname 39 $iif($gettok(%data,5,44) != -, $asctime($v1,mmm dd yyyy),-) did -a $+ $iif(%x = 1,r) $dname 45 $gettok(%data,6,44) inc %x } did -ca $dname 17 $hget($dname,$+(%rte,.,%acct,.Delivery)) did -ca $dname 127 $hget($dname,$+(%rte,.,%acct,.Billing)) var %balance = $calc(($ctime($did($dname,122)) - $ctime) / 1209600) var %balance = $calc(%balance * $iif(($left($did($dname,17),1) == D) || ($did($dname,17).sel == 1),6.8,3)) var %decimal = $len($gettok($round(%balance,2),-1,46)) did -ra $dname 34 $iif(!%balance,$0.00,$+($,%balance,$iif(!%decimal,.00,$iif(%decimal = 1,0)))) } on *:DIALOG:Observer:sclick:3: { var %rte = $iif(!$did($dname,5).seltext,$did($dname,5),$did($dname,5).seltext) var %acct = $iif(!$did($dname,7).seltext,$did($dname,7),$did($dname,7).seltext) .hadd -m $dname $+(%rte,.,%acct,.Name) $did($dname,9) .hadd -m $dname $+(%rte,.,%acct,.Address) $did($dname,11) .hadd -m $dname $+(%rte,.,%acct,.Apt) $did($dname,13) if !$did($dname,15) { find.a.person $gettok($did($dname,9),1,44) $iif($gettok($did($dname,9),2-,44),$v1) } .hadd -m $dname $+(%rte,.,%acct,.Phone) $did($dname,15) .hadd -m $dname $+(%rte,.,%acct,.Active) $did($dname,18).state .hadd -m $dname $+(%rte,.,%acct,.Expiry) $ctime($did($dname,122)) var %balance = $calc(($ctime($did($dname,122)) - $ctime) / 1209600) var %balance = $calc(%balance * $iif(($left($did($dname,17),1) == D) || ($did($dname,17).sel == 1),6.8,3)) var %decimal = $len($gettok($round(%balance,2),-1,46)) did -ra $dname 34 $iif(!%balance,$0.00,$+($,%balance,$iif(!%decimal,.00,$iif(%decimal = 1,0)))) if ($did($dname,122).edited == $true) { did -a $dname 118,37 - did -a $dname 38 $did($dname,38,$did($dname,38).lines) did -a $dname 43 $did($dname,43,$did($dname,43).lines) did -a $dname 39 $asctime($ctime,mmm dd yyyy) did -a $dname 45 $did($dname,34) } else did -a $dname 39,45 - var %lines = $did($dname,118).lines, %line = $calc($hfind($dname,$+(%rte,.,%acct,.data.*),0,w) + 1) set %columns 118 37 38 43 39 45 while %line <= %lines { var %col = 1 while %col <= $numtok(%columns,32) { var %data = $iif($chr(32) isin $did($dname,$gettok(%columns,%col,32),%line),$ctime($v2),$v2) set %entry $instok(%entry,%data,%col,44) inc %col } .hadd -m $dname $+(%rte,.,%acct,.data.,%line) %entry inc %line } }
I have further steps to go before this project is complete, but until these problems have been resolved, there's not much I can do with the next step.