Forum > Beginners

Message methods [SOLVED]

(1/6) > >>

pascal111:
كُنتُ أقرأ في وثائق الـ free Pascal وصادفتني الـ Message methods كما في هذا الرابط الرسمي https://www.freepascal.org/docs-html/current/ref/refsu31.html#x83-1050006.6.7 غير أنّي لم أستوعب الفكرة ولم أعرف فائدة أو جدوى الـ Message methods ولماذا تمّت إضافتها للأصناف فعلى ما أتذكّر لم يُوجد هذا النّوع من الـ methods في نسخ الـ OOP القياسيّة للغات التي كانت تعمل في النّظام DOS.

google translate:

"I was reading the free Pascal documents and came across the Message methods as well as in this official link https://www.freepascal.org/docs-html/current/ref/refsu31.html#x83-1050006.6.7 However, I did not understand the idea and did not know the usefulness or usefulness of Message methods and why they were added to classes. As far as I can remember, this type of method was not found in the standard OOP versions of languages ​​that were running in DOS."

MarkMLl:
Assuming that we're thinking about the same thing (and if not, I apologise) it's for hanging methods onto externally-generated events:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---...  private    { Private declarations }    fastTerminate, trimWorkingSetAsap: BOOLEAN;    procedure WMQueryEndSession(var Message: TWMQueryEndSession); message WM_QUERYENDSESSION;    procedure WMSysColorChange(var Message: TWMSysColorChange); message WM_SYSCOLORCHANGE;  public    { Public declarations }  end; 
MarkMLl

VTwin:
You can also add custom messages. For example, I have several applications that draw several plots of data. If the data changes, the data Form sends a message, and the plot Forms update when they receive the message.

pascal111:
يُمكننا أن قرع كأسينا أيها النبيل @MarkMLl نخب هذه المعلومة الرائعة ولكن بذكر مُساعدة النبيل @VTwin فلقد أوضح كلامكـ المُوجز "it's for hanging methods onto externally-generated events" وإنّها لعبارة إنجليزيّة أنيقة وبليغة وقياسيّة وبلغة علميّة للتعبير عن المعنى المنشود (أعذراني فأنا أُحب أسلوب الروايات الإنجليزيّة).

إستفساري التالي هو كيف يكونُ هناكـ مُتغيّر اسمه Message وأنا على ما أظنّ أنّها كلمة من كلمات لغة البرمجة نفسها كما أوردت في الكود الذي زوّدتنا به؟!

google translate:

"We can knock our glasses, noble @MarkMLl, toast "in honor of" this wonderful information, but by mentioning the help of the noble @VTwin, "he made it clear" your brief statement made it clear: "it's for hanging methods onto externally-generated events" and it is an elegant, eloquent, standard English phrase and scientific language to express the desired meaning (excuse me, I love the style English novels).

My next inquiry is: How can there be a variable named Message, and I think it is one of the words of the programming language itself, as it was mentioned in the code that you provided us with ?!"


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---    procedure WMQueryEndSession(var Message: TWMQueryEndSession); message WM_QUERYENDSESSION; 

VTwin:
My understanding is that the message methods take untyped parameters, so can refer to any data such as a record. The final "message" indicates an integer (dword) value that identifies the method to be called.

So a message call includes an identifier, along with data to be used by the receiving method. The identifier tells which method to be called, which then uses the data.

Navigation

[0] Message Index

[#] Next page

Go to full version