<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Allocation of PrefsDialogObject]]></title><description><![CDATA[<p dir="auto">Hi.</p>
<p dir="auto">Nice new forum. ^^</p>
<p dir="auto">While adapting my plugin for R20 I've been sifting through the code in order to get rid of all the red underlines vc++ throws at me. This is the last one:</p>
<p dir="auto">class SoloPrefs : public PrefsDialogObject<br />
{<br />
INSTANCEOF(SoloPrefs, PrefsDialogObject)</p>
<p dir="auto">public:<br />
virtual Bool InitValues(const DescID &amp;id, Description* desc = NULL);</p>
<p dir="auto">virtual Bool Init(GeListNode* node);<br />
virtual Bool GetDParameter(GeListNode *node, const DescID &amp;id, GeData &amp;t_data, DESCFLAGS_GET &amp;flags);<br />
virtual Bool SetDParameter(GeListNode *node, const DescID &amp;id, const GeData &amp;t_data, DESCFLAGS_SET &amp;flags);<br />
virtual Bool GetDEnabling(GeListNode *node, const DescID &amp;id, const GeData &amp;t_data, DESCFLAGS_ENABLE flags, const BaseContainer *itemdesc);<br />
virtual Bool GetDDescription(GeListNode <em>node, Description <em>description, DESCFLAGS_DESC &amp;flags);<br />
virtual Bool Message(GeListNode</em> node, Int32 type, void</em> data);</p>
<p dir="auto">BaseContainer *GetSoloPrefs();<br />
Int32 dirty;</p>
<p dir="auto">static NodeData *Alloc() { return <em><strong>gNew SoloPrefs</strong></em>; }<br />
};</p>
<p dir="auto">How to do the last line correctly? Thanks.</p>
]]></description><link>http://developers.maxon.net/forum//topic/11052/allocation-of-prefsdialogobject</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Mar 2026 10:37:18 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum//topic/11052.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 05 Oct 2018 10:03:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Allocation of PrefsDialogObject on Mon, 08 Oct 2018 11:21:58 GMT]]></title><description><![CDATA[<p dir="auto">In your specific example, it could look like this:</p>
<pre><code class="language-cpp">static maxon::Result&lt;NodeData*&gt; Alloc() 
{
    iferr_scope;
    return NewObj(SoloPrefs) iferr_return; 
}
</code></pre>
<p dir="auto">And when you construct your <code>NodeData</code>class, you have to access the actual value of <code>maxon::Result</code>:</p>
<pre><code class="language-cpp">SoloPrefs::Alloc().GetValue();
</code></pre>
<p dir="auto">Note, if that allocation fails that you can access the error with <code>GetError()</code>.<br />
There have changed lots of things, Sebastian already posted the links to the relevant documentation.</p>
]]></description><link>http://developers.maxon.net/forum//post/55934</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/55934</guid><dc:creator><![CDATA[mp5gosu]]></dc:creator><pubDate>Mon, 08 Oct 2018 11:21:58 GMT</pubDate></item><item><title><![CDATA[Reply to Allocation of PrefsDialogObject on Mon, 08 Oct 2018 10:16:15 GMT]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto"><code>gNew</code> was already removed and replaced in R15. See <a href="https://developers.maxon.net/docs/cpp/2023_2/page_changes_for_new_naming_scheme.html" target="_blank" rel="noopener noreferrer nofollow ugc">Changes for New Naming Scheme</a>.</p>
<p dir="auto"><code>NewObjClear()</code> is deprecated and should only be used to handle old code.</p>
<p dir="auto">If you write new code, please use <code>NewObj()</code> and proper error handling. See <a href="https://developers.maxon.net/docs/cpp/2023_2/page_maxonapi_creation.html" target="_blank" rel="noopener noreferrer nofollow ugc">Entity Creation</a>.</p>
<p dir="auto">You find some example of handling the error in the <a href="https://github.com/PluginCafe/cinema4d_cpp_sdk_extended/blob/fb28fee81285132f25c7be9c9fbc3a1fa3654b3c/plugins/microsdk/source/user_interface.cpp#L26-L38" target="_blank" rel="noopener noreferrer nofollow ugc">microsdk example</a>.</p>
<p dir="auto">Also, please use tags when creating a new post. See <a href="https://developers.maxon.net/forum/topic/10958/read-before-posting" target="_blank" rel="noopener noreferrer nofollow ugc">Read Before Posting</a>.</p>
<p dir="auto">best wishes,<br />
Sebastian</p>
]]></description><link>http://developers.maxon.net/forum//post/55931</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/55931</guid><dc:creator><![CDATA[s_bach]]></dc:creator><pubDate>Mon, 08 Oct 2018 10:16:15 GMT</pubDate></item><item><title><![CDATA[Reply to Allocation of PrefsDialogObject on Fri, 05 Oct 2018 16:45:36 GMT]]></title><description><![CDATA[<p dir="auto">SOLVED<br />
It's just static NodeData *Alloc() { return NewObjClear(SoloPrefs); }</p>
]]></description><link>http://developers.maxon.net/forum//post/55921</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/55921</guid><dc:creator><![CDATA[Yakuza]]></dc:creator><pubDate>Fri, 05 Oct 2018 16:45:36 GMT</pubDate></item></channel></rss>