×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    13

    change softkey shortcuts on an "installing-SIS-file application"

    Hi

    I want to change the shortcut softkeys as described here: http://wiki.forum.nokia.com/index.ph...ne_Wrapper_API

    I've followed the steps and it works for stand-alone applications, but does not for an "installing-SIS-file application". Is there a way to do it?

  2. #2
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: change softkey shortcuts on an "installing-SIS-file application"

    I don't understand what you mean by an "installing-SIS-file application"? What's special about it, what works and what not? And if it does not work, how exaclty does it fail?
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: change softkey shortcuts on an "installing-SIS-file application"

    Perhaps mike_p wants a .sis file to be installed (instead of an application to be executed), but that is only a guess. In that case it could be still viable to create an executable for launching the installer (even in the silent way).

  4. #4
    Registered User
    Join Date
    Dec 2008
    Posts
    13

    Re: change softkey shortcuts on an "installing-SIS-file application"

    wizard_hu_, you guessed correctly - I want a .sis file to be installed instead of an application to be executed.

    I have created a console application and run. it did not return any error code, it just crashed.
    Last edited by mike_p; 2009-01-05 at 15:08.

  5. #5
    Registered User
    Join Date
    Dec 2008
    Posts
    13

    Re: change softkey shortcuts on an "installing-SIS-file application"

    The following imperative makes the program crash:

    iShortcut = CScShortcutEngineWrapper::NewL(iSession,*this);

    (code originaly taked from http://wiki.forum.nokia.com/index.ph...ne_Wrapper_API)

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: change softkey shortcuts on an "installing-SIS-file application"


  7. #7
    Registered User
    Join Date
    Nov 2008
    Posts
    9

    Re: change softkey shortcuts on an "installing-SIS-file application"

    I had a case where my program crashed without "Program closed:/n%S"... does this denote a "panic" situation as well?

  8. #8
    Registered User
    Join Date
    Dec 2008
    Posts
    13

    Re: change softkey shortcuts on an "installing-SIS-file application"

    My application doesn't prompt a "Program closed:/n%S" message or gives an "App. closed" message...

  9. #9
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: change softkey shortcuts on an "installing-SIS-file application"

    Just to make sure, have you installed the errrd.sis file?
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  10. #10
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: change softkey shortcuts on an "installing-SIS-file application"

    The issue we had with this API was that if you are running it from the installer you CANNOT guarantee that your API will be registered with the application manager by the time the shortcut creator app is run. You need to delay and retry until your application is found (ie keep calling AsynchronouslyPrepareShortcutListL)

    Anyway there insufficient information to determine what you are doing from the HandleShortcutEvent
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  11. #11
    Registered User
    Join Date
    Dec 2008
    Posts
    13

    Re: change softkey shortcuts on an "installing-SIS-file application"

    ltomuta, what is the errrd.sis file good for and how do I use it?

    Paul.Todd, my application crashes before I get a change to call AsynchronouslyPrepareShortcutListL, it crashes on the instantiation of the CScShortcutEngineWrapper. Anyway, can you please post a reference to applying this technique? As a .net developer, I would use try..catch inside a loop with a delay, but I'm a newbie with Simbian/Open c.... And, is there any information in HandleShortcutEvent that can help me overcome the crashing problem?

    Thanks, ltomuta and Paul.Todd.

  12. #12
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: change softkey shortcuts on an "installing-SIS-file application"

    As I said in the original post, you must post your code.
    Also follow Wizard's advice and enable error logging so you know what the crash is.

    The fact the example code works and your does not does rather indicate its a problem in your code.

    Which device are you trying this on?
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  13. #13
    Registered User
    Join Date
    Dec 2008
    Posts
    13

    Re: change softkey shortcuts on an "installing-SIS-file application"

    * My code is listed below. The application is a console application.

    * The device is E51.

    * How do I enable error logging? Wizard is referring to a "panic" case - is this my case?

    If your application generates a panic it will be closed and an error note is shown by the OS
    My application doesn't generate such a message, it just crashes. And, I don't see any mention of "errrd.sis" file there.

    * I'm interested to try this:

    You need to delay and retry until your application is found
    Can you please provide some directions/references of how to perform this?

    * Thanks

    ShortcutMaker.cpp file:
    Code:
    #ifndef SHORTCUTMAKER_H_
    #define SHORTCUTMAKER_H_
    
    #include <aknappui.h>
    #include <akndoc.h>
    #include <aknapp.h>
    
    #include <CScShortcutEngineWrapper.h>
    #include <MScShortcutEngineWrapperObserver.h>
    
    
    class ShortcutMaker:public MScShortcutEngineWrapperObserver
    	{
    	
    public:
    	ShortcutMaker();
    	virtual ~ShortcutMaker();
    protected:
    	void HandleShortcutEvent( TScShortcutEvent aEvent );
        void HandleShortcutError( TScShortcutEvent aEvent, TInt aError );
    private:
    	void ShowNoteL(const TDesC& aMessage);
    	
    	RFs iSession;
    	CScShortcutEngineWrapper* iShortcut;
    	RPointerArray<CScWrapperShortcut> iPArray;
    	};
    
    #endif /* SHORTCUTMAKER_H_ */
    ShortcutMaker.cpp file:
    Code:
     
    #include "ShortcutMaker.h"
    
    #include <aknappui.h>
    #include <akndoc.h>
    #include <aknapp.h>
    #include <f32file.h>
    
    #include<MScShortcutEngineWrapperObserver.h>
    #include<cscshortcutenginewrapper.h>
    
    ShortcutMaker::ShortcutMaker()
    	{
    		iSession.Connect();
    		iShortcut = CScShortcutEngineWrapper::NewL(iSession,*this);
    		iShortcut->AsynchronouslyPrepareShortcutListL(iPArray);
    	}
    
    ShortcutMaker::~ShortcutMaker()
    	{
    	}
    
    void ShortcutMaker::HandleShortcutEvent( TScShortcutEvent aEvent )
    	{
    		if(aEvent==EShortcutListComplete)
    		{
    			//note here 1 is the index to denote that we are creating a shortcut for calendar application
    			iShortcut->SetShortcutL(CScShortcutEngineWrapper::EKeyTypeLeft,1);
    		}
    	}
    
    void ShortcutMaker::HandleShortcutError(TScShortcutEvent aEvent, TInt aError )
        {
        }
    MyApplication.cpp file:
    Code:
    LOCAL_C void MainL()
    	{
    	//
    	// add your program code here, example code below
    	//
    	//console->Write(_L("Hello, world!\n"));
    	ShortcutMaker* s = new ShortcutMaker();
    	
    	}

  14. #14
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: change softkey shortcuts on an "installing-SIS-file application"

    To prevent a lot of pain, derive your class from CBase *** and make sure CBase is first in the list (ie before any M classes) ***

    Revise your handling of non gui applications, you need a trap harness and active scheduler

    Panic's are the same errors and you have to enable them
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  15. #15
    Registered User
    Join Date
    Dec 2008
    Posts
    13

    Re: change softkey shortcuts on an "installing-SIS-file application"

    Thakns.

    * Sorry, the last section of the code I posted was partial - it was generated by a the Carbide. I think that your note "Revise your handling of non gui applications, you need a trap harness and active scheduler" is already taken care of, is this correct? (More code is listed below)

    * How do I enable Panic errors?

    Full code of MyApplication.cpp:

    Code:
    #include "MyApplication.h"
    #include <e32base.h>
    #include <e32std.h>
    #include <e32cons.h>			// Console
    
    #include "ShortcutMaker.h"
    
    //  Constants
    
    _LIT(KTextConsoleTitle, "Console");
    _LIT(KTextFailed, " failed, leave code = %d");
    _LIT(KTextPressAnyKey, " [press any key]\n");
    
    //  Global Variables
    
    LOCAL_D CConsoleBase* console; // write all messages to this
    
    
    //  Local Functions
    
    LOCAL_C void MainL()
    	{
    	//
    	// add your program code here, example code below
    	//
    	//console->Write(_L("Hello, world!\n"));
    	ShortcutMaker* s = new ShortcutMaker();
    	
    	}
    
    LOCAL_C void DoStartL()
    	{
    	// Create active scheduler (to run active objects)
    	CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
    	CleanupStack::PushL(scheduler);
    	CActiveScheduler::Install(scheduler);
    
    	MainL();
    
    	// Delete active scheduler
    	CleanupStack::PopAndDestroy(scheduler);
    	}
    
    //  Global Functions
    
    GLDEF_C TInt E32Main()
    	{
    	// Create cleanup stack
    	__UHEAP_MARK;
    	CTrapCleanup* cleanup = CTrapCleanup::New();
    
    	// Create output console
    	TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
    			KConsFullScreen, KConsFullScreen)));
    	if (createError)
    		return createError;
    
    	// Run application code inside TRAP harness, wait keypress when terminated
    	TRAPD(mainError, DoStartL());
    	if (mainError)
    		console->Printf(KTextFailed, mainError);
    	console->Printf(KTextPressAnyKey);
    	console->Getch();
    
    	delete console;
    	delete cleanup;
    	__UHEAP_MARKEND;
    	return KErrNone;
    	}

Similar Threads

  1. Replies: 0
    Last Post: 2008-02-14, 10:27
  2. File corrupted - with signed sis
    By annehj in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 4
    Last Post: 2007-12-10, 13:44
  3. Replies: 1
    Last Post: 2005-05-26, 14:22
  4. Replies: 0
    Last Post: 2002-06-10, 12:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×