Maksoud Posted September 6, 2016 Share Posted September 6, 2016 السلام عليكم و رحمة الله و بركاته سويت مود المود عبارة عن : اكتب شئ بالايدت و اضغط على زر اقوم باضافة رو يتم حفظ الرو فى xml المشكلة : حفظت الرو | حاولت امسحه | يتمسح بس لما اقفل اللوحة و افتحها القى الرو المسحته موجود الرجاء المساعدة محاولتي لمسح الرو : addEventHandler("onClientGUIClick",root, function ( ) local sel = guiGridListGetSelectedItem(gridLinks) if ( source == btnDelete ) then if sel ~= -1 then local veh = xmlLoadFile ( 'Songs1.xml' ) if veh then for k,v in ipairs ( xmlNodeGetChildren ( veh ) ) do if xmlNodeGetAttributes ( v ).SongNamea == guiGridListGetSelectedItemText ( gridLinks, 1 ) then xmlNodeSetAttribute ( v, 'SongNamea', nil ) xmlNodeSetAttribute ( v, 'SongLinka', nil ) xmlDestroyNode ( v ) end end xmlSaveFile ( veh ) xmlUnloadFile ( veh ) guiGridListRemoveRow(gridLinks,guiGridListGetSelectedItem(gridLinks)) end end end end ) ارجوا الرد السريع شكرا مقدما Link to comment
Abdul KariM Posted September 7, 2016 Share Posted September 7, 2016 لاكن اعتقد انك لازم تسوي حفظ بعد ماتحذف الرو xml مالي خبره بال وتسوي له انلود فايل Link to comment
</Mr.Tn6eL> Posted September 7, 2016 Share Posted September 7, 2016 ورنا كود وضع بيانات الاكس ام ال في القريد ليست + كود الاضافة Link to comment
!#NssoR_) Posted September 7, 2016 Share Posted September 7, 2016 addEventHandler("onClientGUIClick",root, function ( ) if ( source == btnDelete ) then local sel = guiGridListGetSelectedItem(gridLinks) if sel ~= -1 then local veh = xmlLoadFile ( 'Songs1.xml' ) if veh then for k,v in ipairs ( xmlNodeGetChildren ( veh ) ) do if xmlNodeGetAttributes ( v ).SongNamea == guiGridListGetItemText ( gridLinks, sel ,1) then xmlDestroyNode ( v ) xmlSaveFile ( veh ) xmlUnloadFile ( veh ) guiGridListRemoveRow(gridLinks,sel) break end end end end end end ) Link to comment
Maksoud Posted September 7, 2016 Author Share Posted September 7, 2016 2 hours ago, NssoR said: addEventHandler("onClientGUIClick",root, function ( ) if ( source == btnDelete ) then local sel = guiGridListGetSelectedItem(gridLinks) if sel ~= -1 then local veh = xmlLoadFile ( 'Songs1.xml' ) if veh then for k,v in ipairs ( xmlNodeGetChildren ( veh ) ) do if xmlNodeGetAttributes ( v ).SongNamea == guiGridListGetItemText ( gridLinks, sel ,1) then xmlDestroyNode ( v ) xmlSaveFile ( veh ) xmlUnloadFile ( veh ) guiGridListRemoveRow(gridLinks,sel) break end end end end end end ) مشكور اشتغل Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now