<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://library.morph.zone/index.php?action=history&amp;feed=atom&amp;title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w</id>
		<title>Przeciążanie konstruktorów - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://library.morph.zone/index.php?action=history&amp;feed=atom&amp;title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w"/>
		<link rel="alternate" type="text/html" href="https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;action=history"/>
		<updated>2026-05-12T06:43:26Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;diff=1205&amp;oldid=prev</id>
		<title>Krashan: Link switched to Polish version.</title>
		<link rel="alternate" type="text/html" href="https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;diff=1205&amp;oldid=prev"/>
				<updated>2011-01-26T07:49:37Z</updated>
		
		<summary type="html">&lt;p&gt;Link switched to Polish version.&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 07:49, 26 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l6&quot; &gt;Line 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Obiekty bez obiektów potomnych==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Obiekty bez obiektów potomnych==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Konstruktor obiektu (metoda ''OM_NEW()'') ma tę samą strukturę parametrów ''opSet'' co metoda ''[[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Overriding &lt;/del&gt;OM_SET()|OM_SET()]]''. Struktura ta zawiera pole ''ops_AttrList'' będące wskaźnikiem na [[Taglists|taglistę]] zawierającą początkowe wartości atrybutów obiektu. Implementacja konstruktora dla obiektu nie zawierającego obiektów potomnych jest raczej prosta. Na początku wywołuje się konstruktor klasy nadrzęnej. Jeżeli zwróci on wskaźnik na obiekt, konstruktor inicjalizuje dane obieku, alokuje potrzebne zasoby (np. bufory w pamięci) i ustawia początkowe wartości atrybutów zgodnie z tagami przekazanymi w ''ops_AttrList''.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Konstruktor obiektu (metoda ''OM_NEW()'') ma tę samą strukturę parametrów ''opSet'' co metoda ''[[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Przeciążanie metody &lt;/ins&gt;OM_SET()|OM_SET()]]''. Struktura ta zawiera pole ''ops_AttrList'' będące wskaźnikiem na [[Taglists|taglistę]] zawierającą początkowe wartości atrybutów obiektu. Implementacja konstruktora dla obiektu nie zawierającego obiektów potomnych jest raczej prosta. Na początku wywołuje się konstruktor klasy nadrzęnej. Jeżeli zwróci on wskaźnik na obiekt, konstruktor inicjalizuje dane obieku, alokuje potrzebne zasoby (np. bufory w pamięci) i ustawia początkowe wartości atrybutów zgodnie z tagami przekazanymi w ''ops_AttrList''.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Najważniejszą zasadą przy przeciążaniu konstruktorów jest '''nie zostawianie nigdy częściowo skonstruowanego obiektu'''. Konstruktor powinien zwrócić albo kompletny i całkowicie zaincjalizowany obiekt, albo zakończyć się niepowodzeniem, ale przedtem zwrócić wszystkie te zasoby, które udało się mu zarezerwować. Jest to szczególnie istotne, jeżeli obiekt uzyskuje przydział więcej niż jednego zasobu i którykolwiek z przydziałów zakończy się niepowodzeniem (przykładowo alokacja dużego obszaru pamięci albo otwarcie pliku). W przykładzie poniżej obiekt usiłuje zarezerwować trzy zasoby nazwane umownie ''A'', ''B'' i ''C''.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Najważniejszą zasadą przy przeciążaniu konstruktorów jest '''nie zostawianie nigdy częściowo skonstruowanego obiektu'''. Konstruktor powinien zwrócić albo kompletny i całkowicie zaincjalizowany obiekt, albo zakończyć się niepowodzeniem, ale przedtem zwrócić wszystkie te zasoby, które udało się mu zarezerwować. Jest to szczególnie istotne, jeżeli obiekt uzyskuje przydział więcej niż jednego zasobu i którykolwiek z przydziałów zakończy się niepowodzeniem (przykładowo alokacja dużego obszaru pamięci albo otwarcie pliku). W przykładzie poniżej obiekt usiłuje zarezerwować trzy zasoby nazwane umownie ''A'', ''B'' i ''C''.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Krashan</name></author>	</entry>

	<entry>
		<id>https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;diff=1193&amp;oldid=prev</id>
		<title>Krashan: Switched one of links to Polish version.</title>
		<link rel="alternate" type="text/html" href="https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;diff=1193&amp;oldid=prev"/>
				<updated>2011-01-26T06:49:59Z</updated>
		
		<summary type="html">&lt;p&gt;Switched one of links to Polish version.&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 06:49, 26 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l27&quot; &gt;Line 27:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Jeżeli destruktor obiektu zwalnia zasoby ''A'', ''B'' i ''C'' (co byłoby logiczne, skoro są rezerwowane w konstruktorze), oczyszczanie po nieudanej konstrukcji można wykonać przy jego użyciu. Taki destruktor musi być jednak przygotowany na fakt, że może mieć do czynienia z częściowo skonstruowanym obiektem.&amp;#160; Nie może zakładać, że wszystkie zasoby do zwolnienia na pewno zostały przydzielone. Najcześciej oznacza to sprawdzenie każdego wskaźnika do zasobu na okoliczność wartości zerowej (lub innej, jeżeli zero jest prawidłowym identyfikatorem zasobu). Destruktor wywołuje następnie destruktor klasy nadrzędnej. Przykłady destruktorów z objaśnieniami znajdują się w rozdziale &amp;quot;[[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Overriding Destructors&lt;/del&gt;]]&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Jeżeli destruktor obiektu zwalnia zasoby ''A'', ''B'' i ''C'' (co byłoby logiczne, skoro są rezerwowane w konstruktorze), oczyszczanie po nieudanej konstrukcji można wykonać przy jego użyciu. Taki destruktor musi być jednak przygotowany na fakt, że może mieć do czynienia z częściowo skonstruowanym obiektem.&amp;#160; Nie może zakładać, że wszystkie zasoby do zwolnienia na pewno zostały przydzielone. Najcześciej oznacza to sprawdzenie każdego wskaźnika do zasobu na okoliczność wartości zerowej (lub innej, jeżeli zero jest prawidłowym identyfikatorem zasobu). Destruktor wywołuje następnie destruktor klasy nadrzędnej. Przykłady destruktorów z objaśnieniami znajdują się w rozdziale &amp;quot;[[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Przeciążanie destruktorów&lt;/ins&gt;]]&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Pozostaje jeszcze otwarta kwestia funkcji ''CoerceMethod()''. Jakie jest jej działanie i dlaczego została tu użyta zamiast zwykłego ''DoMethod()''? Funkcja ta wykonuje metodę na obiekcie, tak samo jak ''DoMethod()'', ale wykonuje tzw. &amp;quot;wymuszenie&amp;quot; (ang. ''coercion'') wykonania metody ściśle określonej klasy, poprzez bezpośredni skok do jej dispatchera, zamiast do rzeczywistej klasy obiektu. Jeżeli obiekt jest klasy pochodnej względem tej, której konstruktor przeciążamy, to będą to oczywiście dwie różne klasy. Diagram poniżej ilustruje problem:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Pozostaje jeszcze otwarta kwestia funkcji ''CoerceMethod()''. Jakie jest jej działanie i dlaczego została tu użyta zamiast zwykłego ''DoMethod()''? Funkcja ta wykonuje metodę na obiekcie, tak samo jak ''DoMethod()'', ale wykonuje tzw. &amp;quot;wymuszenie&amp;quot; (ang. ''coercion'') wykonania metody ściśle określonej klasy, poprzez bezpośredni skok do jej dispatchera, zamiast do rzeczywistej klasy obiektu. Jeżeli obiekt jest klasy pochodnej względem tej, której konstruktor przeciążamy, to będą to oczywiście dwie różne klasy. Diagram poniżej ilustruje problem:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Krashan</name></author>	</entry>

	<entry>
		<id>https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;diff=1188&amp;oldid=prev</id>
		<title>Krashan at 07:56, 25 January 2011</title>
		<link rel="alternate" type="text/html" href="https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;diff=1188&amp;oldid=prev"/>
				<updated>2011-01-25T07:56:56Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 07:56, 25 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l32&quot; &gt;Line 32:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 32:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Coercemethod&lt;/del&gt;.png|center]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Coercemethod_pl&lt;/ins&gt;.png|center]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Krashan</name></author>	</entry>

	<entry>
		<id>https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;diff=1187&amp;oldid=prev</id>
		<title>Krashan: Translated comments in code snippets.</title>
		<link rel="alternate" type="text/html" href="https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;diff=1187&amp;oldid=prev"/>
				<updated>2011-01-24T21:23:05Z</updated>
		
		<summary type="html">&lt;p&gt;Translated comments in code snippets.&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 21:23, 24 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l46&quot; &gt;Line 46:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 46:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  if (obj = DoSuperNew(cl, obj,&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  if (obj = DoSuperNew(cl, obj,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;  MUIA_Group_Child, MUI_NewObject(MUIC_Text,&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;  MUIA_Group_Child, MUI_NewObject(MUIC_Text,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160;  /* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;attributes for the first subobject &lt;/del&gt;*/&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160;  /* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;atrybuty dla pierwszego podobiektu &lt;/ins&gt;*/&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;  TAG_END),&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;  TAG_END),&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;  MUIA_Group_Child, MUI_NewObject(MUIC_Text,&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;  MUIA_Group_Child, MUI_NewObject(MUIC_Text,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160;  /* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;attributes for the second subobject &lt;/del&gt;*/&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160;  /* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;atrybuty dla drugiego podobiektu &lt;/ins&gt;*/&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;  TAG_END),&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;  TAG_END),&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  TAG_MORE, msg-&amp;gt;ops_AttrList)) &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  TAG_MORE, msg-&amp;gt;ops_AttrList)) &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l59&quot; &gt;Line 59:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 59:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;amp;&amp;amp; (d-&amp;gt;ResourceC = ObtainResourceC())&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;amp;&amp;amp; (d-&amp;gt;ResourceC = ObtainResourceC())&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;  {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;  {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160;  return (IPTR)obj;&amp;#160; &amp;#160; /* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;success &lt;/del&gt;*/&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160;  return (IPTR)obj;&amp;#160; &amp;#160; /* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;sukces &lt;/ins&gt;*/&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;  }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;  }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;  else CoerceMethod(cl, obj, OM_DISPOSE);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;  else CoerceMethod(cl, obj, OM_DISPOSE);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Krashan</name></author>	</entry>

	<entry>
		<id>https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;diff=1186&amp;oldid=prev</id>
		<title>Krashan: Translation finished (except of diagram).</title>
		<link rel="alternate" type="text/html" href="https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;diff=1186&amp;oldid=prev"/>
				<updated>2011-01-24T21:21:47Z</updated>
		
		<summary type="html">&lt;p&gt;Translation finished (except of diagram).&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 21:21, 24 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l68&quot; &gt;Line 68:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 68:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Warto zauważyć, że funkcja ''DoSuperNew()'' '''łączy''' taglistę przekazaną konstruktorowi w polu ''ops_AttrList'' struktury parametrów metody z taglistą zbudowaną ze swoich argumentów. Robi się to za pomoca specjalnego taga ''TAG_MORE'', który przekierowuje iterator [[Taglists|taglisty]] (taki jak na przykład funkcja ''NextTagItem()'') do następnej części znajdującej się pod adresem określonym przez wartość tego taga. Łączenie taglist pozwala na modyfikowanie obiektu tagami podanymi w wywołaniu konstruktora, na przykład dodanie ramki lub tła do grupy z powyższego przykładu.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Warto zauważyć, że funkcja ''DoSuperNew()'' '''łączy''' taglistę przekazaną konstruktorowi w polu ''ops_AttrList'' struktury parametrów metody z taglistą zbudowaną ze swoich argumentów. Robi się to za pomoca specjalnego taga ''TAG_MORE'', który przekierowuje iterator [[Taglists|taglisty]] (taki jak na przykład funkcja ''NextTagItem()'') do następnej części znajdującej się pod adresem określonym przez wartość tego taga. Łączenie taglist pozwala na modyfikowanie obiektu tagami podanymi w wywołaniu konstruktora, na przykład dodanie ramki lub tła do grupy z powyższego przykładu.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Automatyczna obsługa błędów przy tworzeniu obiektów potomnych działa następująco&lt;/ins&gt;: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;jeżeli konstruktor któregokolwiek z podobiektów zwróci &lt;/ins&gt;''NULL''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, wskaźnik ten umieszczany jest w budowanej na stosie tagliście jako wartość taga (np&lt;/ins&gt;. ''MUIA_Group_Child''). &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Wszystkie standardowe klasy &lt;/ins&gt;MUI&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, które mogą posiadać obiekty potomne zaprojektowane są w sposób taki, że&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The automatic handling of failed child objects works in the following way&lt;/del&gt;: &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;when a subobject fails, its constructor returns &lt;/del&gt;''NULL''. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;This ''NULL'' value is then inserted as the value of a &amp;quot;child&amp;quot; tag (&lt;/del&gt;''MUIA_Group_Child'') &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;in the example&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;All &lt;/del&gt;MUI &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;classes able to have child objects are designed in a way that&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Konstruktor zwraca &lt;/ins&gt;''NULL'', &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;jeżeli wskaźnik na którykolwiek z przekazanych obiektów potomnych jest równy ''NULL''.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the constructor fails if any &amp;quot;child&amp;quot; tag has a &lt;/del&gt;''NULL'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;value&lt;/del&gt;,&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Konstruktor usuwa wszystkie pomyślnie stworzone obiekty potomne przed wyjściem&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the constructor disposes any successfully constructed child objects before exiting&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Ponieważ wynik funkcji &lt;/ins&gt;''DoSuperNew()'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;jest wynikiem działania konstruktora klasy nadrzędnej, funkcja ta również zwróci zerowy wskaźnik&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;W ten sposób w przypadku jakiegokolwiek błędu przy budowaniu drzewa obiektów aplikacji wszystkie stworzone obiekty zostaną prawidłowo zniszczone&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;bez pozostawiania obiektów &amp;quot;osieroconych&amp;quot;&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Finally &lt;/del&gt;''DoSuperNew()'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;returns ''NULL'' as well&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;This design ensures that in case of any fail while building the application&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;all objects created are disposed and there are no orphaned ones&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Krashan</name></author>	</entry>

	<entry>
		<id>https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;diff=1185&amp;oldid=prev</id>
		<title>Krashan: Translation in progress.</title>
		<link rel="alternate" type="text/html" href="https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;diff=1185&amp;oldid=prev"/>
				<updated>2011-01-24T21:04:43Z</updated>
		
		<summary type="html">&lt;p&gt;Translation in progress.&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 21:04, 24 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l66&quot; &gt;Line 66:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 66:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;An important thing to observe is the fact&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;that &lt;/del&gt;''DoSuperNew()'' '''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;merges&lt;/del&gt;''' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the taglist passed to the constructor via the message &lt;/del&gt;''ops_AttrList'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;field and the one specified in the function arguments list&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;It is done with a special &lt;/del&gt;''TAG_MORE'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tag&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;which directs a taglist &lt;/del&gt;iterator (&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;like &lt;/del&gt;''NextTagItem()'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;function&lt;/del&gt;) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;to jump to another &lt;/del&gt;taglist &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pointed by the value of this tag. Taglist merging allows for modifying the object being constructed with tags passed to ''NewObject()''&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;for example adding a frame or background to the group in the above example&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Warto zauważyć&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;że funkcja &lt;/ins&gt;''DoSuperNew()'' '''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;łączy&lt;/ins&gt;''' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;taglistę przekazaną konstruktorowi w polu &lt;/ins&gt;''ops_AttrList'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;struktury parametrów metody z taglistą zbudowaną ze swoich argumentów&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Robi się to za pomoca specjalnego taga &lt;/ins&gt;''TAG_MORE'', &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;który przekierowuje &lt;/ins&gt;iterator &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[Taglists|taglisty]] &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;taki jak na przykład funkcja &lt;/ins&gt;''NextTagItem()'') &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;do następnej części znajdującej się pod adresem określonym przez wartość tego taga. Łączenie &lt;/ins&gt;taglist &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;pozwala na modyfikowanie obiektu tagami podanymi w wywołaniu konstruktora&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;na przykład dodanie ramki lub tła do grupy z powyższego przykładu&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The automatic handling of failed child objects works in the following way: when a subobject fails, its constructor returns ''NULL''. This ''NULL'' value is then inserted as the value of a &amp;quot;child&amp;quot; tag (''MUIA_Group_Child'') in the example. All MUI classes able to have child objects are designed in a way that:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The automatic handling of failed child objects works in the following way: when a subobject fails, its constructor returns ''NULL''. This ''NULL'' value is then inserted as the value of a &amp;quot;child&amp;quot; tag (''MUIA_Group_Child'') in the example. All MUI classes able to have child objects are designed in a way that:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Krashan</name></author>	</entry>

	<entry>
		<id>https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;diff=1184&amp;oldid=prev</id>
		<title>Krashan: Translation in progress.</title>
		<link rel="alternate" type="text/html" href="https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;diff=1184&amp;oldid=prev"/>
				<updated>2011-01-24T20:54:32Z</updated>
		
		<summary type="html">&lt;p&gt;Translation in progress.&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 20:54, 24 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l40&quot; &gt;Line 40:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 40:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Obiekty z obiektami potomnymi==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Obiekty z obiektami potomnymi==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Konstruktor klasy, która dodaje obiektowi obiekty potomne, jest napisany zgodnie z podstawowymi zasadami omówionymi powyżej, ale pewne szczegóły są inne. Z klas standardowych MUI mogących posiadać obiekty potomne najcześciej klasy pochodne tworzy się od klasy ''Group'' i ''Application'' (obiektami potomnymi aplikacji są okna). Bardzo często używa się również klas pochodnych od ''Window'', z tym, że obiekt tej klasy posiada tylko jeden obiekt potomny, klasy ''Group'', specyfikowany atrybutem ''MUIA_Window_RootObject''. Oczywiście ten obiekt posiada z reguły liczne podobiekty, mianowicie całą zawartość okna.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Konstruktor klasy, która dodaje obiektowi obiekty potomne, jest napisany zgodnie z podstawowymi zasadami omówionymi powyżej, ale pewne szczegóły są inne. Z klas standardowych MUI mogących posiadać obiekty potomne najcześciej klasy pochodne tworzy się od klasy ''Group'' i ''Application'' (obiektami potomnymi aplikacji są okna). Bardzo często używa się również klas pochodnych od ''Window'', z tym, że obiekt tej klasy posiada tylko jeden obiekt potomny, klasy ''Group'', specyfikowany atrybutem ''MUIA_Window_RootObject''. Oczywiście ten obiekt posiada z reguły liczne podobiekty, mianowicie całą zawartość okna. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Konstruktor powinien najpierw przystąpić do tworzenia obiektów potomnych &lt;/ins&gt;a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;dopiero potem wywołać konstruktor klasy nadrzędnej&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Jeżeli jego wywołanie zakończy się sukcesem&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;konstruktor wykonuje inicjalizację danych i stanu obiektu oraz rezerwuje potrzebne zasoby&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Ponieważ każda z faz konstruktora może zakończyć się niepowodzeniem&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;prawidłowa obsługa błędów staje się dość skomplikowana&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Dodatkowo wstawianie wskaźników stworzonych podobiektów do taglisty &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;jako wartości atrybutów takich jak &lt;/ins&gt;''MUIA_Group_Child'') &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;jest niezbyt wygodne&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Na szczęście zadania te upraszcza funkcja &lt;/ins&gt;''DoSuperNew()'', &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;która łączy tworzenie obiektów potomnych i wywołanie konstruktora klasy nadrzędnej w jedną operację&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Zapewnia również automatyczną obsługę błędów przy konstrukcji obiektów potomnych&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Poniższy przykład demonstruje konstruktor klasy pochodnej od &lt;/ins&gt;''Group'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tworzącej dwa obiekty tekstowe (klasa &lt;/ins&gt;''Text''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;):&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;While retaining the same principles, the constructor of an object with subobjects is designed &lt;/del&gt;a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;bit differently&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The most commonly subclassed classes able to have child objects are ''Application''&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and ''Group''&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The ''Window'' class is also often subclassed in a similar way. While a ''Window'' object can have only one child&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;specified by ''MUIA_Window_RootObject'', this child often has multiple subobjects. The constructor should create its child objects first, then insert them into the ''ops_AttrList'' [[Taglists|taglist]] and call the superclass constructor. If it succeeds, then resources may be allocated if needed. As any of the three constructor stages may fail, proper handling of errors becomes complicated&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Also inserting objects created into the taglist as values of child tags &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;like &lt;/del&gt;''MUIA_Group_Child'') &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is cumbersome&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Fortunately one can use the &lt;/del&gt;''DoSuperNew()'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;function&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;which merges the creation of subobjects and the calling of the superclass into one operation&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;It also provides automatic handling of failed child object construction&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;An example below is a constructor for a &lt;/del&gt;''Group'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;subclass putting two &lt;/del&gt;''Text'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;objects in the group.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; IPTR MyClassNew(Class *cl, Object *obj, struct opSet *msg)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; IPTR MyClassNew(Class *cl, Object *obj, struct opSet *msg)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Krashan</name></author>	</entry>

	<entry>
		<id>https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;diff=1183&amp;oldid=prev</id>
		<title>Krashan: Translation in progress.</title>
		<link rel="alternate" type="text/html" href="https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;diff=1183&amp;oldid=prev"/>
				<updated>2011-01-24T20:44:45Z</updated>
		
		<summary type="html">&lt;p&gt;Translation in progress.&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 20:44, 24 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l39&quot; &gt;Line 39:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 39:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Obiekty z obiektami potomnymi==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Obiekty z obiektami potomnymi==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Konstruktor klasy, która dodaje obiektowi obiekty potomne, jest napisany zgodnie z podstawowymi zasadami omówionymi powyżej, ale pewne szczegóły są inne. Z klas standardowych MUI mogących posiadać obiekty potomne najcześciej klasy pochodne tworzy się od klasy ''Group'' i ''Application'' (obiektami potomnymi aplikacji są okna). Bardzo często używa się również klas pochodnych od ''Window'', z tym, że obiekt tej klasy posiada tylko jeden obiekt potomny, klasy ''Group'', specyfikowany atrybutem ''MUIA_Window_RootObject''. Oczywiście ten obiekt posiada z reguły liczne podobiekty, mianowicie całą zawartość okna.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;While retaining the same principles, the constructor of an object with subobjects is designed a bit differently. The most commonly subclassed classes able to have child objects are ''Application'', and ''Group''. The ''Window'' class is also often subclassed in a similar way. While a ''Window'' object can have only one child, specified by ''MUIA_Window_RootObject'', this child often has multiple subobjects. The constructor should create its child objects first, then insert them into the ''ops_AttrList'' [[Taglists|taglist]] and call the superclass constructor. If it succeeds, then resources may be allocated if needed. As any of the three constructor stages may fail, proper handling of errors becomes complicated. Also inserting objects created into the taglist as values of child tags (like ''MUIA_Group_Child'') is cumbersome. Fortunately one can use the ''DoSuperNew()'' function, which merges the creation of subobjects and the calling of the superclass into one operation. It also provides automatic handling of failed child object construction. An example below is a constructor for a ''Group'' subclass putting two ''Text'' objects in the group.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;While retaining the same principles, the constructor of an object with subobjects is designed a bit differently. The most commonly subclassed classes able to have child objects are ''Application'', and ''Group''. The ''Window'' class is also often subclassed in a similar way. While a ''Window'' object can have only one child, specified by ''MUIA_Window_RootObject'', this child often has multiple subobjects. The constructor should create its child objects first, then insert them into the ''ops_AttrList'' [[Taglists|taglist]] and call the superclass constructor. If it succeeds, then resources may be allocated if needed. As any of the three constructor stages may fail, proper handling of errors becomes complicated. Also inserting objects created into the taglist as values of child tags (like ''MUIA_Group_Child'') is cumbersome. Fortunately one can use the ''DoSuperNew()'' function, which merges the creation of subobjects and the calling of the superclass into one operation. It also provides automatic handling of failed child object construction. An example below is a constructor for a ''Group'' subclass putting two ''Text'' objects in the group.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Krashan</name></author>	</entry>

	<entry>
		<id>https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;diff=1182&amp;oldid=prev</id>
		<title>Krashan: Translation in progress.</title>
		<link rel="alternate" type="text/html" href="https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;diff=1182&amp;oldid=prev"/>
				<updated>2011-01-24T19:50:18Z</updated>
		
		<summary type="html">&lt;p&gt;Translation in progress.&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 19:50, 24 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l35&quot; &gt;Line 35:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 35:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The class &lt;/del&gt;''B'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;on the diagram is a subclass of the class &lt;/del&gt;''A'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and similarly&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the class &lt;/del&gt;''C'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is a subclass of &lt;/del&gt;''B''. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Let's assume an object of the class &lt;/del&gt;''C'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is being constructed&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;As every constructor calls the superclass first&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the call goes up to &lt;/del&gt;''rootclass'' (&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the root of all &lt;/del&gt;BOOPSI &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;classes&lt;/del&gt;) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;first&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Then going down the class tree&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;every class constructor allocates its resources&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Unfortunately the constructor of class &lt;/del&gt;''A'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;has been unable to allocate one of its resources and decided to fail&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;If it had just called &lt;/del&gt;''DoMethod(obj, OM_DISPOSE)'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;it will unnecessarily execute destructors in classes &lt;/del&gt;''B'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and &lt;/del&gt;''C'', &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;while constructors in these classes have been not yet fully executed&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Even if these destructors can cope with this&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;calling them is superfluous&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;With the &lt;/del&gt;''CoerceMethod()'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the destructor in the class &lt;/del&gt;''A'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is called directly&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Then class &lt;/del&gt;''A'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;constructor returns &lt;/del&gt;NULL, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;which causes constructors in classes &lt;/del&gt;''B'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and &lt;/del&gt;''C'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;to fail immediately without resource allocation attempts&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Klasa &lt;/ins&gt;''B'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;na rysunku jest klasą pochodną klasy &lt;/ins&gt;''A'', &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;klasa &lt;/ins&gt;''C'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;jest klasą pochodną &lt;/ins&gt;''B''. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Załóżmy, że konstruujemy obiekt klasy &lt;/ins&gt;''C''. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Ponieważ każdy konstruktor zaczyna pracę od wywołania konstruktora klasy nadrzędnej&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;łańcuch wywołań dociera do klasy &lt;/ins&gt;''rootclass'' (&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;klasy głównej wszystkich klas &lt;/ins&gt;BOOPSI). &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Następnie wywołania schodzą w dół drzewa klas&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;konstruktory tych klas inicjalizują swoje części obiektu i rezerwują zasoby&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Niestety okazało się, że konstruktor klasy &lt;/ins&gt;''A'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;nie dostał wszystkich oczekiwanych zasobów i zakończył się niepowodzeniem&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Gdyby w tym wypadku po prostu wywołał destruktor przez &lt;/ins&gt;''DoMethod(obj, OM_DISPOSE)''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, niepotrzebnie wywołałby destruktory klas &lt;/ins&gt;''B'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; i &lt;/ins&gt;''C'', &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;mimo tego, że ich konstruktory nie zostały jeszcze wykonane&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Nawet jeżeli konstruktory te potrafią sobie poradzić z taką sytuacją&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;wywoływanie ich jest całkowicie zbędne&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Uruchomienie destruktora funkcją &lt;/ins&gt;''CoerceMethod()'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;powoduje, że od razu wywoływany jest destruktor w klasie &lt;/ins&gt;''A''. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Po zwolnieniu tych zasobów, do których dało się uzyskać dostęp, konstruktor klasy &lt;/ins&gt;''A'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;zwraca ''&lt;/ins&gt;NULL&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;co z kolei powoduje natychmiastowe zakończenie wykonywania się konstruktorów klas &lt;/ins&gt;''B'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;i &lt;/ins&gt;''C''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, również z wynikiem zerowym, bez próby inicjalizacji obiektu i alokacji zasobów&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Krashan</name></author>	</entry>

	<entry>
		<id>https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;diff=1181&amp;oldid=prev</id>
		<title>Krashan: Translation in progress.</title>
		<link rel="alternate" type="text/html" href="https://library.morph.zone/index.php?title=Przeci%C4%85%C5%BCanie_konstruktor%C3%B3w&amp;diff=1181&amp;oldid=prev"/>
				<updated>2011-01-24T19:09:06Z</updated>
		
		<summary type="html">&lt;p&gt;Translation in progress.&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 19:09, 24 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l27&quot; &gt;Line 27:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Jeżeli destruktor obiektu zwalnia zasoby ''A'', ''B'' i ''C'' (co byłoby logiczne, skoro są rezerwowane w konstruktorze), &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Jeżeli destruktor obiektu zwalnia zasoby ''A'', ''B'' i ''C'' (co byłoby logiczne, skoro są rezerwowane w konstruktorze), &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;oczyszczanie po nieudanej konstrukcji można wykonać przy jego użyciu. Taki destruktor musi być jednak przygotowany na fakt, że może mieć do czynienia z częściowo skonstruowanym obiektem. &lt;/ins&gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Nie może zakładać&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;że wszystkie zasoby do zwolnienia na pewno zostały przydzielone&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Najcześciej oznacza to sprawdzenie każdego wskaźnika do zasobu na okoliczność wartości zerowej (lub innej&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;jeżeli zero jest prawidłowym identyfikatorem zasobu)&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Destruktor wywołuje następnie destruktor klasy nadrzędnej&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Przykłady destruktorów z objaśnieniami znajdują się w rozdziale &amp;quot;&lt;/ins&gt;[[Overriding Destructors]]&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the cleanup job may be delegated to the destructor. It requires however&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;that the destructor must be prepared for destruction of a not fully constructed object&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;It can't assume all three resources have been allocated&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;so it should check every resource pointer against ''NULL'' before calling a freeing function&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The destructor also takes care of calling a superclass destructor when resources are freed&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;See &lt;/del&gt;[[Overriding Destructors]] &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;for some destructor example code and explanation&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Pozostaje jeszcze otwarta kwestia funkcji ''CoerceMethod()''. Jakie jest jej działanie i dlaczego została tu użyta zamiast zwykłego ''DoMethod()''? Funkcja ta wykonuje metodę na obiekcie, tak samo jak ''DoMethod()'', ale wykonuje tzw. &amp;quot;wymuszenie&amp;quot; (ang. ''coercion'') wykonania metody ściśle określonej klasy, poprzez bezpośredni skok do jej dispatchera, zamiast do rzeczywistej klasy obiektu. Jeżeli obiekt jest klasy pochodnej względem tej, której konstruktor przeciążamy, to będą to oczywiście dwie różne klasy. Diagram poniżej ilustruje problem:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Pozostaje jeszcze otwarta kwestia funkcji ''CoerceMethod()''. Jakie jest jej działanie i dlaczego została tu użyta zamiast zwykłego ''DoMethod()''? Funkcja ta wykonuje metodę na obiekcie, tak samo jak ''DoMethod()'', ale wykonuje tzw. &amp;quot;wymuszenie&amp;quot; (ang. ''coercion'') wykonania metody ściśle określonej klasy, poprzez bezpośredni skok do jej dispatchera, zamiast do rzeczywistej klasy obiektu. Jeżeli obiekt jest klasy pochodnej względem tej, której konstruktor przeciążamy, to będą to oczywiście dwie różne klasy. Diagram poniżej ilustruje problem:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Krashan</name></author>	</entry>

	</feed>