6,817
edits
Changes
m
Now lets analyse the # קובץ הריצה [[Quick_Views#siblings.py|siblings.py]] file.
If the user clicks in the quick view report menu on your reportכאשר משתמש מקיש על דוח מצג מהיר בתפרית ההקשר, the run function is executed with the following three parametersפונקציית הריצה תתבצע עם שלושת המשתנים הבאים:
Soכלומר, your report receives from Gramps the currently opened database name on which to workהדוח מקבל מגרמפס את המשתנים: שם מסד הנתונים שפתוח כעת ונמצע בעבודה, the document on which to writeאת המסמך עליו יש לכתוב, and the person of the object the user is onואת ה'אדם' של שמקושר לעצם שבמוקד המשתמש (עליו מונח מצביע העכבר). For a person quick view reportלדוח מצג מהיר 'אדם', this is a personזהו אדם, for familyובהתאמה לדוח מצג מהיר 'משפחה', a family זוהי משפחה.
In this exampleבדוגמה זו, the function called is הפונקציה שתקרא היא:
→Analysis: the run function: translation
* [https://github.com/gramps-project/gramps/blob/892fc270592095192947097d22a72834d5c70447/gramps/gen/plug/_pluginreg.py#L297-L299 {{man label|requires_mod}}], [https://github.com/gramps-project/gramps/blob/892fc270592095192947097d22a72834d5c70447/gramps/gen/plug/_pluginreg.py#L300-L303 {{man label|requires_gi}}], [https://github.com/gramps-project/gramps/blob/892fc270592095192947097d22a72834d5c70447/gramps/gen/plug/_pluginreg.py#L304-L306 {{man label|requires_exe}}] = האם קיימות דרישות קדם לתוסף.
===Analysisניתוח: the run functionפונקציית הריצה===
<code>run(database, document, person)</code>
<code>def run(database, document, person):</code>