typeof class = S;; typeof LBurl2 = ObjText;; typeof ELurl2 = ObjBox;; typeof LBalias2 = ObjText;; typeof ELalias2 = ObjText;; typeof ListBox1 = ObjList;; struct StructRP2 = [ Room_name2 : S, Position2 : S ] mkRP;; typeof MyList2 = [StructRP2 r1];; /******************************************************************************* ajout des pos a la combo *******************************************************************************/ fun AddPositionToMyList2(l,room_name)= if l == nil then 0 else let hd l -> [position _] in ( set MyList2 = (mkRP [room_name position])::MyList2; AddPositionToMyList2 tl l room_name ) ;; /******************************************************************************* ajout des pos a la combo *******************************************************************************/ fun AddPositionToCombo(l,combo)= if l==nil then 0 else let strextr hd l -> l2 in let getInfo l2 "room_name" -> room_name in let getInfo l2 "positions" -> positions in ( _ADDcombo combo 10000 room_name; /* MODIF */ AddPositionToMyList2 (strextr positions) room_name ; AddPositionToCombo tl l combo ) ;; /* Efface et recréer les positions de la Listbox*/ fun AddToList(List,param) = _SDELlist ListBox1 List.Position2; _ADDlist ListBox1 10000 List.Position2 ;; /* Enlève les positions qui ne sont pas de cette Cellule */ fun Search (List, room_name) = if (strcmp List.Room_name2 room_name) then ( _SDELlist ListBox1 List.Position2; _SELlist ListBox1 0 ) else nil ;; /******************************************************************************* recuperation des positions, ajout a la combo *******************************************************************************/ fun getpos(param, ulist, data) = let data -> [combo pos room l] in ( AddPositionToCombo hd strextr param combo; _SSELcombo combo room; apply_on_list MyList2 @AddToList nil; apply_on_list MyList2 @Search room; let getInfo l "position" -> pos in _SSELlist ListBox1 pos ); 0 ;; fun CallCombo (combo, paramU, Selnb, room) = apply_on_list MyList2 @AddToList nil; apply_on_list MyList2 @Search room ;; fun openedit(win, param) = let strextr param -> l in let _GETwindowSizePosition win -> [w h x y] in ( set LBurl2 = _CRtext _channel win 5 5 45 18 ET_ALIGN_LEFT _loc this "TEL_CELLULE" nil; set ELurl2 = _CRcombo _channel win 65 5 150 300 CB_DOWN nil; set LBurl2 = _CRtext _channel win 5 40 50 18 ET_ALIGN_LEFT _loc this "TEL_POSITION" nil; set ListBox1 = _CRlist _channel win 65 40 150 80 LB_VSCROLL|LB_DOWN; set LBalias2 = _CRtext _channel win 240 5 40 18 ET_ALIGN_LEFT _loc this "TEL_ALIAS" nil; set ELalias2 = _CReditLine _channel win 300 5 150 20 ET_DOWN|ET_HSCROLL|ET_AHSCROLL let getInfo l "alias" -> string in if (nil == string) then "" else string; let getInfo l "position" -> pos in ( if (nil == pos) then "" else pos; let getInfo l "room_name" -> room in ( if (nil == room) then "" else room; _DMSeventTag this strcat class ".getpositions" nil nil [mkfun3 @getpos [ELurl2 pos room l] 3600 0]; ) ); _CBcombo ELurl2 @CallCombo nil; _CRtext _channel win 5 140 800 120 ET_ALIGN_LEFT _loc this "TEL_EXPLICATION" nil ; /* _CRtext _channel win 5 220 800 20 ET_ALIGN_LEFT _loc this "TEL_PARAM1" nil ; _CRtext _channel win 5 240 800 20 ET_ALIGN_LEFT _loc this "TEL_PARAM2" nil ; _CRtext _channel win 5 260 800 20 ET_ALIGN_LEFT _loc this "TEL_PARAM3" nil ; */ 0 ) ;; fun closeedit() = let _GETcombo ELurl2->[_ room] in let _GETlist ListBox1 -> [_ pos] in ( strbuild ("position" ::pos::nil):: ("room_name"::room::nil):: ("alias"::(_GETtext ELalias2)::nil)::nil ) ;; fun dynamicedit(win, obj, mat, param) = exec @openedit with [win param]; @closeedit ;;