Carbider | 31 October, 2007 13:20
All of the views in my application which is shown here are represented as “Setting Item List” components (classes). Even main screen does. Here I reported vagueness about how to switch from one view (screen) to another. For example as I pick a “PAN” setting from main option menu I should be redirected to new PAN settings screen.
Now I can tell you how it can be done.
The way to this was laid through “MultiViews” S60 SDK example. It is found at “S60_3rd_FP1 / S60Ex / MultiViews” folder. I was solving the rebuses and found out that the final switching comes through AppUi()->ActivateLocalViewL() call. This function takes TUid parameter which is a View’s Identifier.
The accordance between the View and it’s ID is defined as Enumeration at [projectName].hrh file like this:
Listing 1:
enum TguiSetBluspanViewUids
{
EGuiSetBluspanSettingItemListViewId = 1,
EGuiSetBluspanSettingItemList2SettingsPanViewId,
EGuiSetBluspanSettingItemList2SettingsZeroconfViewId,
EGuiSetBluspanSettingItemList2SettingsUserViewId
…
};
So I assigned the Handler function to PAN menu-item click and implemented code:
AppUi()->ActivateLocalViewL(TUid::Uid(EGuiSetBluspanSettingItemList2SettingsPanViewId ) );
Yeah, this name is true long but was generated automatically.

Diagram 01 – Switch from main screen to PAN settings screen.
As I implemented analogous code for the rest Views at Settings submenu (diagram 2)
I discovered that the new child view has Exit soft button which will exit the application if was clicked. But I need it to return back to the main screen not exit.

Diagram 02 – Settings submenu
At properties menu I picked OPTIONS_BACK instead of OPTIONS_EXIT (diagram 3).

Diagram 03 – Options menu properties
But it did not cause the required effect. The button’s name was changed but it still executed Exit function. The reason is the following block of code, situated at HandleCommandL( TInt aCommand ) function:
Listing 2:
// [[[ begin generated region: do not modify [Generated Code]
if ( aCommand == EAknSoftkeyBack )
{
AppUi()->HandleCommandL( EEikCmdExit );
}
// ]]] end generated region [Generated Code]
I changed the code above to this one:
Listing 3:
if ( aCommand == EAknSoftkeyBack )
{
AppUi()->ActivateLocalViewL( TUid::Uid( EGuiSetBluspanSettingItemListViewId ) );
// The ID is in the [projectName].hrh file too
}
So, I’ve activated the Main screen (view) by this call. It works well but there is a problem: the code is situated in the middle of following framework:
// [[[ begin generated region: do not modify [Generated Code]
// ]]] end generated region [Generated Code]
It means that after any change to given View (with help of UI designer) my code would be rewritten with those one that’s shown at listing 2. That are not good news and I didn’t find more appropriate decision yet.
The last version of BluSPAN GUI source code can be found over this Zip Archive here.
Extract files from it, than create new workspace and import Bld.inf file as was shown at previous posts here.
Konstantine Voytenko
Carbider | 02/11/2007, 11:32
Yes, sure I'll try to do it my best. I'm not still fully oriented at new blogs style. But hope i'll find the best way for future.
Thanks for your offer
Konstantine
David | 02/11/2007, 14:43
I have to wonder if Open Source will ever catch on at nokia. Most of the contributions have been limited to natural language and 1/2 of them have been related to font size. where is the hard hitting answers, the tweaked code, the better ideas, the resulting benefit to all of mankind when the brightest minds in the field just chip in.
Fonts,.. text size,.. ?
there are much more serious issues at hand, those kind of comments (on topic) are most helpful and appreciated.
I think you need to ask, am I just writing to Konstantine? if so, then I'll send an email, does my comment benefit mankind by adding or correcting some post I'm commenting on? then post the comment. Kostya's email is bluespan@gmail.com and I'm sure he'd love hearing any comments, or getting personal emails there. He's a good guy and I'm just kind of worried that he'll loose faith when he realises his questions are ignored and starts thinking his posts are being evaluated only for the font size.
Again, I think he's doing a good job, the screen shots and attention to making things as clear as he can are obviously part of his job. Nokia sent him a nice PDF with handy formating suggestions etc and he's doing what they suggested.
Konstantine Voytenko
BluSPAN project coordinator
Fishnest Ltd.
bluspan@gmail.com
RDF Facets:
qfnZtopicQUqfnTopicZseriesE5f60Q
qfnZtypeQUqfnTypeZBlogContentQ
qfnZtypeQUqfnTypeZBlogE45ntryQ
qfnZtypeQUqfnTypeZCommunityContentQ
qfnZtypeQUqfnTypeZWebpageQ
qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX
font size on this page
Mat Dodgson | 02/11/2007, 09:42
Hey I like your article - it contains great info.
However I don't like your use of large fonts. I normally turn up the size of my fonts to large so I can read web pages. Yours is the only site that uses such a large font and I have to turn my fonts down instead! Also you've broken the line spacing - the lines are too close together and on my computer it looks hard to read.
Perhaps you can turn down your font size?