On 05/26/2011 03:22 PM, Jonathan Welch wrote:
> 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: http://pastebin.com/g5zuPuVF
>From there:

    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
_______________________________________________
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Reply via email to