It's me again. That is, what I tried altering the 'helloworld' example which came with the series 60 sdk 1.2:
* Step 1:
// Place this line in the header file of your view or container
CPAlbImageViewerBasic* iViewer;
* My try 1:
I chose the 'helloworldappview.h' header and put it right at the beginning of the 'class CHelloWorldAppView : public CCoeControl' definition. When I added 'typedef' in front of it, Error 1 disappeared.
* Result 1:
Error1 (Type name expected)
Error2 (Declaration missing)
* Question 1:
How should the missing declaration look like?
* Step 2:
// Place this line in the contructor of your view or container
iViewer=CPAlbImageViewerBasicNewL(this,Rect());
iViewer->SetAnimationObserver(this,ETrue);
* My try 2:
I put this into the construct function 'void CHelloWorldAppView::ConstructL(const TRect& aRect)' in 'helloworldappview.cpp'.
* Result 2:
Error1 (Undefined symbol 'iViewer' in function CHelloWorldAppView::ConstructL(const TRect &😉)
Error2 (Call to undefined function 'CPAlbImageViewerBasicNewL' in function CHelloWorldAppView::ConstructL(const TRect &😉)
* Step 3:
// Call this to load and display every image you want
iViewer->LoadImageL(_L("C\\Nokia\\Images\\Example.gif"😉,EColor4K);
iViewer->PlayAnimationL(); // support image and animation
* My try 3:
I put this into the draw function 'void CHelloWorldAppView:😃raw(const TRect& /*aRect*/) const' in 'helloworldappview.cpp'
* Result 3:
Error (Undefined symbol 'iViewer' in function CHelloWorldAppView:😃raw(const TRect &😉 const)
* Step 4:
// The iViewer must be registered as component control
TInt CountComponentControls() const;
CCoeControl* ComponentControl(TInt aIndex) const;
* My try 4:
I put this into the 'helloworldappview.h' right at the beginning of the 'class CHelloWorldAppView : public CCoeControl' declaration.
* Step 5:
// Derive your view or container class from
MPAlbAnimationObserver
* My try 5:
I put 'class MPAlbAnimationObserver' into the 'helloworlddocument.h' by extending the forward references right at the beginning.
* Result 5:
All errors except the 'missing declaration' are gone.
* Step 6:
// Implement or override the following in your view or container class
void Notify(TAnimationEvent aEvent)
* My try 6:
I did not put this anywhere, as 'notify events' is already contained in 'PAlbImageViewerBasic.h'.
* Step 7:
// Include this header file
Palbimageviewerbasic.h
* My try 7:
I put '#include "Palbimageviewerbasic.h"' into 'helloworld.cpp'.
* Question 7:
Do I have to include it in any further files?
* Step 8:
// Link against this library
Palbview.lib
* My try 8:
I extended the list in 'helloworld.mmp' with 'LIBRARY Palbview.lib'.
* Step 9:
// need to add some code to the header file ("Epoc32\Include\Palbimageviewerbasic.h"😉 [...] Note that if you are using the latest Series 60 SDK v1.00, you may skip the above procedure, because MPAlbAnimLoadObserver.h header file is already included in this version.
* My try 9:
I did not alter the file as I am using series 60 sdk 1.2, but I cannot see any 'MPAlbAnimLoadObserver.h' file in the 'include' directory. At least '#include <MPAlbAnimLoadObserver.h>' is included in the 'Palbimageviewerbasic.h' file.
* Question 9:
Is the 'MPAlbAnimLoadObserver.h' missing in the series 60 sdk 1.2?
Any ideas?
Kind regards, Lars