On 8/19/06, Jiří Paleček <[EMAIL PROTECTED]> wrote:
no.
well, when KrView was written, it was supposed to be a single interface
for things like KrDetailedView and KrBriefView. KrBriefView was even started
but somehow got lost along the way.
that's why a lot of places actually receive a KrViewItem*, which inside a KrDetailedView,
can only mean KrDetailedViewItem.
basically,
however, i don't remember why there are no static_cast(s) instead of dynamic.
moreover, even if wanting to use the dynamic_cast checking, one has to check for
the pointer being null...
i believe a normal cast is in order, mostly at least.
Hello,
I would like to ask if anything else than KrDetailedViewItem can be
inserted in KrDetailedView.
no.
If no, why are ther so many dynamic_casts in the code?
well, when KrView was written, it was supposed to be a single interface
for things like KrDetailedView and KrBriefView. KrBriefView was even started
but somehow got lost along the way.
that's why a lot of places actually receive a KrViewItem*, which inside a KrDetailedView,
can only mean KrDetailedViewItem.
basically,
however, i don't remember why there are no static_cast(s) instead of dynamic.
moreover, even if wanting to use the dynamic_cast checking, one has to check for
the pointer being null...
i believe a normal cast is in order, mostly at least.
--
Shie Erlich
http://www.krusader.org/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "krusader-users" group.
To post to this group, send email to krusader-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/krusader-users
-~----------~----~----~----~------~----~------~--~---