Thursday, May 20, 2004

As I've already mentioned, I had received a few requests (Robert, Neil, Peter...) to enable filtering support in the SmartList not only for a dialpad keyboard, but also for a Smartphone or Pocket PC devices with a full keyboard. So the update is available in the Source Browser and will eventually make to the SDF binaries as well. I added a new property bool FullKeyboard that is set to false by default and if you'd like to enable full keybard support in the control you just set the property to true.

Seth mentions that SmartList is his favorite. And by the way, don't miss his futuristic vision of a mobile device next generation. I'd like to live in this future too, Seth :). But, in my opinion, many of the things Seth is describing in his “day dream“ are quite possible to develop today. If you are in need to make your dream a reality you can contact us at OpenNETCF Consulting, LLC. (Hey, how is the plug? :))

 

5/20/2004 3:29:53 PM (GMT Daylight Time, UTC+01:00)  #     | 
 Tuesday, May 18, 2004

In order to implement filtering functionality in the SmartList, I had a need to provide the mappings that correspond dialer keyboard key to the characters accordingly to the GSM 02.30 format: 2 - “abc”, 3 - “def” etc... If you look at the code, you'll be able to see that it's simply done by utilizing a Hashtable:

numToLetter.Add('2', "abc");
numToLetter.Add('3', "def");
numToLetter.Add('4', "ghi");
numToLetter.Add('5', "jkl");
...

(By the way, if anybody knows a way to retreive these mapping from the system automatically, please let me know)

This private member is exposed to a developer as the KeyMappings property, which means that you should be able to add/replace the default characters with a language specific ones:

smartList1.KeyMappings['1'] += "ä";
or
smartList1.KeyMappings['1'] = "абв";

The current logic in the control doesn't allow filtering if a Smartphone or Pocket PC device has a built in “qwerty” keyboard. But since I've already received a few requests to enable this functionality in the SmartList, I'll be adding it very soon. 

5/18/2004 2:35:18 PM (GMT Daylight Time, UTC+01:00)  #     | 
 Monday, May 17, 2004

So here are some screenshots from the sample that's using the SmartList control from the SDF v1.1:

 

As I've already written the SmartList implements a quick filtering functinality a-la Contacts app in Smartphone as well as ability to create auto numbering menus. 

To help you with a quick filtering there're a two new events for your use: FilteringStarted and FilteringComplete that would be fired as you can assume from its names when the filtering is been started or completed. Aside from showing a WaitCursor you could also use the property ItemsMatchedCount to check how many items are left after filtering.

 

5/17/2004 10:55:31 PM (GMT Daylight Time, UTC+01:00)  #     | 

We've just released SDF v1.1! It includes loads of new stuff and improvements/bug fixes to the existing code. Grab it while it's hot of the press:

www.OpenNETCF.org/SDF

You can read the official press release here.

 

5/17/2004 10:18:20 PM (GMT Daylight Time, UTC+01:00)  #     | 
 Wednesday, May 12, 2004

I've been following a heated discussions on XML parsing methods that exist in .NET right now: DOM and XmlReader, whereas the first one is the slowest and the second is fast but a more complicated to code against. A must read on this topic is the DonXML's post Waking Up From a DOM Induced Coma who underlines the existing problems with XML parsing and mentions a few other alternatives. All of the problems about XML parsing are relevant to .NetCF as well, therefore they are multiplied due to processing power and memory constraints of the WinCE devices. Don't forget a complete lack of XPath implementation in the current version of CF.

As lucky as we are, Dare Obasanjo and Co., a PM from Microsoft, have just posted another library: XPathReader. And as you can guess, I've immediately pulled the code from the article and tried to compile it against .NetCF... The result of the test was that it runs with a few minor changes to the original code!!! And it is more exiting since we get a some XPath functionlity as well. Here you can see a snapshot of the test program running in the PPC emulator:

Don't you love when something useful comes with the source?

You can download the test and a XPathReaderCF projects from here.

The next step will be to test a comparison performance of this library vs XmlDocument in CF.

5/12/2004 5:30:34 PM (GMT Daylight Time, UTC+01:00)  #     | 
 Tuesday, May 11, 2004

One of the FAQ on the CF newsgroup has been a question on how to send email from WinCE device with attachments or without it. We know that on Pocket PC's emailing functionality is a part of POOM API's as well as exposed in some form of MAPI implementation. All of these options are not easy to implement from .NetCF.  Plus POOM is not available on non PPC devices... But how about just using a SMTP protocol over TCP/IP connection? A quick search on the internet returned quite a few .NET implementations. Due to its simplicity I decided to go with Peter Bromberg's excellent article as a starting point. The code in the article references missing from .NetCF MailMessage and MailAttachment classes which shouldn't be a big problem to implement... Here is the screenshot of the testing program:

A quick test showed that I can successfully send attachments as well.

Download the code here.

5/11/2004 3:22:31 PM (GMT Daylight Time, UTC+01:00)  #     | 
 Monday, May 10, 2004

A question has recently popped up on the CF newsgroups on how to sort ListView columns and show an arrow that would point up or down accordingly to the sorting order. My suggestion to the person who asked this question was to create the owner-drawn header instead of existing one and use the sorting code from QuickStart tutorials. And so... a two train rides (home and back to work) later I had created a HeaderControl that's doing exactly that: sorts the ListView columns and shows the arrow. And since it's an owner-drawn, we can change the Fore/Back color to anything we like:

 

How do we use it? Very easy - create an instance of the HeaderControl and call its Attach method:

// Create instance of the new header

header = new HeaderControl();

// Attach it to the listview

header.Attach(listView1);

// Add control to the form’s controls collection

this.Controls.Add(header);

Download the source code here.

5/10/2004 1:57:08 PM (GMT Daylight Time, UTC+01:00)  #     | 

It's really good to be back after uncontrollable blackout we had with the DNS mishap (“thanks” to our registrar).  Anyway, we are back on line and have a wonderful news for anybody who needs to get their WinCE/Compact Framework projects done. As you have already probably seen, Chris and Neil had mentioned about creation of OpenNETCF Consulting, LLC. So hurry up, since we have a “dream team” of the most knowledgeable professionals in the field here.

5/10/2004 1:34:30 AM (GMT Daylight Time, UTC+01:00)  #     | 
 Friday, April 30, 2004

The Google's IPO is taking a lot of headlines these days. The document they filed to the Sec is remarkable indeed and as it stated in this article Google “...come close to giving Wall Street the middle finger...”. Just take a look at the IPO offerring amount - $2,718,281,828, which one could recognize a natural E or Euler's number. 

4/30/2004 8:00:40 PM (GMT Daylight Time, UTC+01:00)  #     | 
 Wednesday, April 28, 2004

There're a few really cool things have recently poped-up on the blogs I read:

1. Awesome tip from PaulaT on how to send SMS yourself in the emulator. Hey guys how many more you have hidden in your sleeves? Bring it on!

2. Brad mentions this interesting article on the API usablilty testing. May be we should do something like that at OpenNETCF.org. Anybody wants to donate a usability lab?

3. Hey, how about a BadCodingPracticeException from OpenNETCF? 

4/28/2004 2:15:24 PM (GMT Daylight Time, UTC+01:00)  #     |