was successfully added to your cart.

Cart

Category

Symbian

Symbian: Going nowhere fast?

By | Rant, Smartphones, Symbian | No Comments

Research companies Gartner and IDC predict that the smartphone operating system market will remain dominated by Symbian in 2014, followed by Android in the No. 2 spot. AllAboutSymbian.com provides a summary – along with some unreasonable Symbian enthusiasm – of these predictions with some graphics relating to the future growth of the different platforms.

So, the bad good news is – that is if Gartner and IDC are correct – is that we have at least 3 uplifting years of  unobscure, well-documented, Symbian development to look forward to. I’m pumped. Not.

Nokia N8’s baffling ad..

By | Symbian | No Comments

The Nokia N8 looks quite sleek and runs Symbian ^3. I don’t quite get what this guy’s trying to do with the phone though. It only makes sense to me in that I don’t mind if my Nokia drops and breaks into a ka-zillion pieces, but I would mind if it was my iPhone.

Symbian S60: ownership of bitmap data for listbox icons.

By | Symbian | No Comments

For those who have worked with the Symbian S60 listbox control before, you will know that the notion of ownership with regard to the text items maintained by the list is very important. Essentially, ownership in this context relates to who has the ultimate responsibility of freeing the resources tied to the backing array of the listbox.

At a basic level, the ownership of the items either lies with the listbox – the items get destroyed with the deletion of the listbox – or it lies externally to be handled independently of the listbox. Listbox ownership is typically dictated at the creation of the listbox, like so:?

CTextListBoxModel* model = iListBox->Model();
model->SetItemTextArray( iSettingItemArray );

// Item ownership with listbox
model->SetOwnershipType( ELbmOwnsItemArray );
OR
// Item ownership externally managed
model->SetOwnershipType( EbmDoesNotOwnItemArray );

Suffice it to say that there is an abundance of documentation surrounding this, so I won’t get into any more details here. However, when it comes to the ownership of bitmap data for listbox icons, the documentation seems to become scarce. Generally, what you will find is that there does not seem to be a means to dictate ownership with a listbox icon array in a similar fashion to that of a listbox text item array. Most existing examples will indicate that the ownership of the icons is transfered to the listbox when the icon array is associated with the listbox, such as:

// Sets the icon array.
CCustomListItemDrawer* itemDrawer = static_cast
	(iListBox->View()->ItemDrawer());
itemDrawer->SetIconArray(iconArray); // transfers ownership

While this is entirely true, what if this is not the desired behavior; for instance, you may want to cache bitmap data (for the icons) from an external source and do not wish for the data to be destroyed with the listbox. Fortunately, Symbian allows for this by specifying the terms of ownership when creating an icon object from bitmap data, such as:

CFbsBitmap* iBitmap;
// bitmap initialization...

CGulIcon* iIcon = CGulIcon::NewL(iBitmap);

// Ownership of the bitmap data is not transferred to the icon.
iIcon->SetBitmapsOwnedExternally( ETrue );

This ensures that when a listbox and its icon objects are deleted, the bitmap data associated with the icons remains intact.

Cheers.