[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] SIP template
From:       Shaheed Haque <srhaque () theiet ! org>
Date:       2017-08-14 16:46:47
Message-ID: CAHAc2jeoMqxst_qBVRVHRnpmtPkGcFHS8FsZOKvRUBWhEasNtA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On 14 August 2017 at 17:22, Phil Thompson <phil@riverbankcomputing.com>
wrote:

> On 14 Aug 2017, at 11:13 am, Shaheed Haque <srhaque@theiet.org> wrote:
> > I'm still working on variations of this topic. The problem I am having
> at the moment is that a sequence like this, where Bar has a base which is a
> %MappedType:
> >
> > =======
> > %Module(name=xxx)
> >
> > %MappedType FooBad
> > {
> > %ConvertFromTypeCode
> > // blah.
> > %End
> > %ConvertToTypeCode
> > // blah.
> > %End
> > };
> >
> > class FooOK
> > {
> > public:
> >     FooOK();
> > };
> >
> > class Bar: FooBad
> > {  <<<<<<<<<<<<<<<< This is line 20
> > public:
> >     Bar();
> > };
> > =======
> >
> > gives the error "sip: tmp.sip:20: A class, exception, namespace or
> mapped type has already been defined with the same name" but if I change
> the base class from FooBad to the non-%MappedType normal class FooOK, it
> compiles just fine. I'm on 4.19.4.dev1708081632...have I gone mad?
>
> It's a terrible error message, but you can't sub-class from mapped types.
>

Ah, OK.

Thanks, Shaheed


> Phil

[Attachment #5 (text/html)]

<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 14 August \
2017 at 17:22, Phil Thompson <span dir="ltr">&lt;<a \
href="mailto:phil@riverbankcomputing.com" \
target="_blank">phil@riverbankcomputing.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><span class="">On 14 Aug 2017, at 11:13 am, Shaheed Haque \
&lt;<a href="mailto:srhaque@theiet.org">srhaque@theiet.org</a>&gt; wrote:<br> &gt; \
I&#39;m still working on variations of this topic. The problem I am having at the \
moment is that a sequence like this, where Bar has a base which is a %MappedType:<br> \
&gt;<br> &gt; =======<br>
&gt; %Module(name=xxx)<br>
&gt;<br>
&gt; %MappedType FooBad<br>
&gt; {<br>
&gt; %ConvertFromTypeCode<br>
&gt; // blah.<br>
&gt; %End<br>
&gt; %ConvertToTypeCode<br>
&gt; // blah.<br>
&gt; %End<br>
&gt; };<br>
&gt;<br>
&gt; class FooOK<br>
&gt; {<br>
&gt; public:<br>
&gt;        FooOK();<br>
&gt; };<br>
&gt;<br>
&gt; class Bar: FooBad<br>
&gt; {   &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; This is \
line 20<br> &gt; public:<br>
&gt;        Bar();<br>
&gt; };<br>
&gt; =======<br>
&gt;<br>
&gt; gives the error &quot;sip: tmp.sip:20: A class, exception, namespace or mapped \
type has already been defined with the same name&quot; but if I change the base class \
from FooBad to the non-%MappedType normal class FooOK, it compiles just fine. I&#39;m \
on 4.19.4.dev1708081632...have I gone mad?<br> <br>
</span>It&#39;s a terrible error message, but you can&#39;t sub-class from mapped \
types.<span class="HOEnZb"><font \
color="#888888"><br></font></span></blockquote><div><br></div><div>Ah, \
OK.<br><br></div><div>Thanks, Shaheed<br></div><div>  </div><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"> \
Phil</font></span></blockquote></div><br></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic