The Interfaces lazarus / 61-Beginners ---------------------------------------------------------------------- pascal111 · 2021-05-28 12:17 أُريدُ توضيحاً أكثر لماهيّة الـ Interfaces والوارد تعريفها على هذا الرابط https://www.freepascal.org/docs- html/current/ref/refse44.html#x97-1210007.1 وما هي أهميّة أو فائدة الـ Interfaces أي لماذا نحتاجها؟ google translate: "I want a more clarification of what Interfaces are, and they can be defined at this link. https://www.freepascal.org/docs- html/current/ref/refse44.html#x97-1210007.1 And what is the importance or usefulness of Interfaces That is, why do we need it?" ---------------------------------------------------------------------- Martin_fr · 2021-05-28 12:41 http://www.delphibasics.co.uk/Article.asp?Name=Interface Read the top. Then imagine you have a function, that is not interested if the object is a car or a washing machine. The subroutine only wants to know about recycling. Then you can pass the interface to the subroutine. Otherwise you pass a TObject, and start doing: "if obj is TCar ... if obj is TWashingMachine..." ---------------------------------------------------------------------- pascal111 · 2021-05-28 13:43 Quote from: Martin_fr on May 28, 2021, 02:41:46 pmhttp://www.delphibasics.co.uk/Article.asp?Name=Interface Read the top. Then imagine you have a function, that is not interested if the object is a car or a washing machine. The subroutine only wants to know about recycling. Then you can pass the interface to the subroutine. Otherwise you pass a TObject, and start doing: "if obj is TCar ... if obj is TWashingMachine..." كلامكـ لهُ علاقة بالسؤال التالي ،فلماذا في أحد أكواد هذا الرابط التالي https://www.freepascal.org/docs- html/current/ref/refse47.html#x100-1240007.4 تمّ الإعلان عن مُتغيّر من نوع الـ interface ثمّ تمّ شحنه بعمل نُسخة من الصنف ولماذا لم يحصل العكس بأنّ يُعلن عن المُتغيّر كمتغيّر صنف كما هو موضّح في الأكواد التالية: google translate: "Your speech is related to the following question, so why in one of the codes for this following link https://www.freepascal.org/docs- html/current/ref/refse47.html#x100-1240007.4 A variant "it's declared" of The type of interface was then charged by making a copy of the class. Why did the opposite not happen? That the variable is declared as a class variable as shown in the following codes:" Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i var    Child: IChildInterface;   begin    Child := TImplementor.Create; بدلاً من: google translate: "instead of:" Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i var    Child: TImplementor;   begin    Child := TImplementor.Create;