No subject


Wed Apr 28 21:25:55 PDT 2010


    e:\ss\storm-899\indra\llui\lluictrlfactory.h(249): error C2248: 'LLFlatListViewEx::LLFlatListViewEx' : cannot access protected member declared in class 'LLFlatListViewEx'
              E:\ss\STORM-899\indra\llui\llflatlistview.h(496) : see declaration of 'LLFlatListViewEx::LLFlatListViewEx'

And indeed, in
> Changeset: https://bitbucket.org/JonathanYap/storm-899
you changed type of the object pointed to by mAttachments from
LLFlatListView to LLFlatListViewEx. The only constructor of the latter
class
<https://bitbucket.org/JonathanYap/storm-899/src/39afebbcccb7/indra/llui/llflatlistview.h#cl-496>
is protected <http://www.cppreference.com/wiki/keywords/protected>, so
only its own methods and methods of its descendant classes may produce
new LLFlatListViewEx objects. LLUICtrlFactory is not a direct or
indirect child of LLFlatListViewEx, but probably responsible for
creating all user interface controls, so this has to fail.

A quick'n'dirty workaround would be to make the constructor public.
Though, looking at the doxygen comment of LLFlatListViewEx
<https://bitbucket.org/JonathanYap/storm-899/src/39afebbcccb7/indra/llui/llflatlistview.h#cl-439>,
the constructor being protected is probably on purpose, as the class "is
intended to be used as a base class for lists which should support two
different messages for empty state.", which might mean it isn't meant to
be used directly.

So the right thing to do is probably to look at its concrete descendants
<http://developer.dimentox.com/d7/dd1/classLLFlatListViewEx.html> (click
"Inheritance diagram for LLFlatListViewEx") and see whether one of them
fits your purpose (maybe LLWearableItemsList?), or, failing that, to
derive your own sub-class from LLFlatListViewEx.

Cheers,
Boroondas

--------------040101080909040402070307
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 05/26/2011 03:22 PM, Jonathan Welch wrote:
    <blockquote
      cite="mid:BANLkTi=0YXvViaKr9TBtcx6qOM7dOaM=2Q at mail.gmail.com"
      type="cite">
      <pre wrap="">I tried to fix Storm-899 this morning and feel that it is pretty close
to being fixed, but I have gotten hung up on a dumb error.  If anyone
would care to point out how to fix it I would appreciate a chance to
improve my c++ skills (and yes, I have tried many different things to
fix this but being low on the learning curve am stymied).

Build log: <a class="moz-txt-link-freetext" href="http://pastebin.com/g5zuPuVF">http://pastebin.com/g5zuPuVF</a>
</pre>
    </blockquote>
    From there:<br>
    <blockquote>
      <pre>e:\ss\storm-899\indra\llui\lluictrlfactory.h(249): error C2248: 'LLFlatListViewEx::LLFlatListViewEx' : cannot access protected member declared in class 'LLFlatListViewEx'
          E:\ss\STORM-899\indra\llui\llflatlistview.h(496) : see declaration of 'LLFlatListViewEx::LLFlatListViewEx'
</pre>
    </blockquote>
    And indeed, in <br>
    <blockquote
      cite="mid:BANLkTi=0YXvViaKr9TBtcx6qOM7dOaM=2Q at mail.gmail.com"
      type="cite">
      <pre wrap="">Changeset: <a class="moz-txt-link-freetext" href="https://bitbucket.org/JonathanYap/storm-899">https://bitbucket.org/JonathanYap/storm-899</a>
</pre>
    </blockquote>
    you changed type of the object pointed to by <tt>mAttachments</tt>
    from <tt>LLFlatListView</tt> to <tt>LLFlatListViewEx</tt>. The
    only <a
href="https://bitbucket.org/JonathanYap/storm-899/src/39afebbcccb7/indra/llui/llflatlistview.h#cl-496">constructor
      of the latter class</a> is <a
      href="http://www.cppreference.com/wiki/keywords/protected"><tt>protected</tt></a>,
    so only its own methods and methods of its descendant classes may
    produce new <tt>LLFlatListViewEx</tt> objects. <tt>LLUICtrlFactory</tt>
    is not a direct or indirect child of <tt>LLFlatListViewEx</tt>, but
    probably responsible for creating all user interface controls, so
    this has to fail.<br>
    <br>
    A quick'n'dirty workaround would be to make the constructor <tt>public</tt>.
    Though, looking at the <a
href="https://bitbucket.org/JonathanYap/storm-899/src/39afebbcccb7/indra/llui/llflatlistview.h#cl-439">doxygen
      comment of <tt>LLFlatListViewEx</tt></a>, the constructor being <tt>protected</tt>
    is probably on purpose, as the class "is intended to be used as a
    base class for lists which should support two different messages for
    empty state.", which might mean it isn't meant to be used directly.<br>
    <br>
    So the right thing to do is probably to look at its concrete <a
      href="http://developer.dimentox.com/d7/dd1/classLLFlatListViewEx.html">descendants</a>
    (click "Inheritance diagram for LLFlatListViewEx") and see whether
    one of them fits your purpose (maybe <tt>LLWearableItemsList</tt>?),
    or, failing that, to derive your own sub-class from <tt>LLFlatListViewEx</tt>.<br>
    <br>
    Cheers,<br>
    Boroondas<br>
  </body>
</html>

--------------040101080909040402070307--


More information about the opensource-dev mailing list