mIRC Home    About    Download    Register    News    Help

Print Thread
#150607 06/06/06 03:49 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Can someone please explain why this line
Code:
set %rte $iif(!$did(40).edited,$did(40).seltext,$did(40))  
from this dialog code
Code:
 dialog Observer {
  title "Observer"
  size -1 -1 670 205
  option pixels
  text "Account", 10, 5 5 120 16, center
  combo 20, 5 21 120 100, edit drop
  text "Route", 30, 125 5 60 16, center
  combo 40, 125 21 60 100, edit drop
  text "Name", 50, 190 5 30 16
  edit "", 60, 240 4 280 18
  text "Address", 70, 190 23 50 16
  edit "", 80, 240 22 200 18
  text "Apt", 90, 445 23 20 16
  edit "", 100, 470 22 50 18
  text "Phone", 110, 530 25 30 16
  edit "", 120, 565 24 100 18
  text "Special Directions", 130, 190 41 50 45, center
  edit "", 140, 240 40 425 45, multi
  box "Deliveries", 150, 5 120 70 80
  check "Daily", 160, 7 134 50 16, 3state
  check "MP/LL", 170, 7 150 50 16, 3state
  check "Sat. Only", 180, 7 166 65 16, 3state
  box "Billing", 200, 73 120 61 80
  radio "PIO", 210, 75 134 40 16, group
  radio "CMP", 220, 75 150 40 16
  radio "Mthly", 230, 75 166 45 16
  radio "Bi-Wkly", 240, 75 182 55 16
  text "Start", 250, 190 105 100 15, center
  list 270, 190 120 100 80, size
  text "Stop", 280, 295 105 100 15, center
  list 300, 295 120 100 80, size
  text "Deliveries", 310, 400 105 50 15, center
  list 320, 400 120 50 80, size
  text "Billing", 330, 455 105 50 15, center
  list 340, 455 120 50 80, size
  text "Payment Amount && Date", 350, 510 105 155 15, center
  edit "", 360, 136 136 50 18
  edit "", 370, 136 170 50 18, disable
  list 380, 510 120 50 80, size
  list 390, 565 120 100 80, size
  button "OK", 400, 530 6 40 18, ok
  button "Cancel", 410, 575 5 40 18, cancel
  button "Apply", 420, 620 5 40 18, default
  text "Payment", 1, 136 120 50 16, center
  text "Balance", 2, 136 154 50 16, center
  edit "", 3, 190 85 100 18, read
  edit "", 4, 295 85 100 18, read
  edit "", 5, 565 85 100 18, read
  edit "", 6, 400 85 50 18, read
  edit "", 7, 455 85 50 18, read
  edit "", 8, 510 85 50 18, read
}
on *:dialog:Observer:close:*:{
  .hsave -o Observer Observer.hsh
}
on *:dialog:Observer:init:*:{
  if !$hget(Observer) { .hmake Observer 100 }
  if $exists(Observer.hsh) { .hload Observer Observer.hsh }
  did -r $dname 40
  didtok $dname 40 32 $hget(Observer,Rtes)
}
on *:dialog:Observer:sclick:40:{
  set %rte $iif(!$did(40).edited,$did(40).seltext,$did(40))
  echo -a %rte
  .hadd -m Observer Rtes $addtok($hget(Observer,Rtes),%rte,32)
  did -r $dname 20
  var %a = 1, %b = $hget(Observer,0).item
  while %a <= %b {
    $iif($hfind(Observer,$+(%rte,*),%a,w),did -a $dname 20 $v1)
    inc %a
  }
}
 

isn't setting the variable?

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
becuase

on *:dialog:Observer:sclick:40:{

never occurs ?

also shouldnt it be (i might be wrong here im a bit under the weather, do u not need the $dname when in its event? oh ho hum who knows)

set %rte $iif(!$did(Observer,40).edited,$did(Observer,40).seltext,$did(Observer,40))
echo -a  $+ %rte

(echo starting with a ctrl-o incase its an empty var)


either way maybe start with
on *:dialog:Observer:sclick:40:{ ///echo -st IN EVENT IN QUESTION

then see if it ever trips off

Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
You were right, it never was tripping, but the dialog name isn't required in the $did's...from the help file
Quote:
If used in the on dialog event, name is optional.


*sigh* more work for me..thanks


Link Copied to Clipboard