Mike Taulty's Blog
Bits and Bytes from Microsoft UK

January 2006 - Mike Taulty's Blog

Blogs

Mike Taulty's Blog

Elsewhere

  • Doing the Sparkle (Expression Interactive Designer) Tutorials

    I'm pretty new to Sparkle. I've been aware of it for quite a long time and I've played with various versions along the way but, today, I sat down and went through the tutorials that come with the Jan CTP and I was absolutely blown away by it. It's not often that a piece of software surprises me like this, but this thing is looking really, really cool - it seems to me the perfect combination of the power of the WPF platform and a great tool. I was so impressed with what I managed to achieve by following the tutorial that I thought I'd record it and put it up here. Take a look - here's the WMV . If you've got WinFX then go visit http://www.microsoft.com/expression to grab a preview of Sparkle. If you've not got WinFX, go get it ;-)
  • Monad RSS Provider 8: Tidying Up :-)

    Following on from this post , when I've got tired of messing around with my RSS feeds and I want to go back to how things were I can remove feeds and folders. MSH feeds:\Renamed New Feeds\Mike Taulty> cd .. MSH feeds:\Renamed New Feeds> rmdir "Mike Taulty" Confirm The item at feeds:\Renamed New Feeds\Mike Taulty has children and the -recurse parameter was not specified. If you continue, all children will be removed with the item. Are you sure you want to continue? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y MSH feeds:\Renamed New Feeds> cd .. MSH feeds:\> rmdir "Renamed New Feeds" MSH feeds:\> stop-transcript That's it, no more Monad posts from me for a while but what a fantastic command shell.
  • Monad RSS Provider 7: Downloading feeds and navigating feed items

    Following on from this post , now I've got my new RSS feed created if I want to go and download it I can do a quick; MSH feeds:\Renamed New Feeds> invoke-item "Mike Taulty" and then drop into that folder and do a quick dir to see what items are available on that feed and then view one of the items MSH feeds:\Renamed New Feeds> cd 'Mike Taulty' MSH feeds:\Renamed New Feeds\Mike Taulty> dir | format-list Title, Link, PubData << Snip >> Title : PowerPoint 12 Link : http://mtaulty.com/blog/archive/2006/01/24/9094.aspx << Snip >> MSH feeds:\Renamed New Feeds\Mike Taulty> invoke-item "PowerPoint 12" I have that list invoke-item command wired up to fire up IE at this point with the posting details.
  • Monad RSS Provider 6: Making new feeds

    Following on from this post , if I want to add a new subscription in my current folder I can either create a new feed object and then create the feed from it or I can create the new feed with defaults (as below) and then alter the various properties on it. Here's the latter syntax; MSH feeds:\> cd 'Renamed New Feeds' MSH feeds:\Renamed New Feeds> new-item NewFeed -type feed MshPath : RssCmdletProvider::\Renamed New Feeds\NewFeed MshParentPath : RssCmdletProvider::\Renamed New Feeds MshChildName : NewFeed MshDrive : feeds MshProvider : RssCmdletProvider MshIsContainer : True Title : NewFeed UnreadItemCount : 0 Ttl : 0 SkipHours : SkipDays : PubDate : 1/1/0001 12:00:00 AM Link : LastWriteTime : 1/1/0001 12:00:00 AM LastDownloadTime : 1/1/0001 12:00:00 AM LastDownloadError : FDE_NONE LastBuildDate : 1/1/0001 12:00:00 AM Language : ItemCount : 0 Image : DownloadStatus : FDS_NONE XmlUrl : http://www.notset.com Interval : 15 Copyright : Description : MSH feeds:\Renamed New Feeds> $feed = get-item NewFeed MSH...
  • Monad RSS provider 5: Making new folders and feeds

    Following up on this post , if I want to create new folders for feeds to live in so that I can subscribe to new feeds then I can go ahead and do that; MSH feeds:\Technology\Mike Taulty's Weblog> cd .. MSH feeds:\Technology> cd .. MSH feeds:\> mkdir NewFeeds MshPath : RssCmdletProvider::\NewFeeds MshParentPath : RssCmdletProvider::\ MshChildName : NewFeeds MshDrive : feeds MshProvider : RssCmdletProvider MshIsContainer : True Name : NewFeeds TotalItemCount : 0 TotalUnreadItemCount : 0 MSH feeds:\> cd NewFeeds MSH feeds:\NewFeeds> cd .. MSH feeds:\> $folder = get-item "NewFeeds" MSH feeds:\> $folder.Name = "Renamed New Feeds" MSH feeds:\> dir | format-list Name Name : Renamed New Feeds Name : Technology Name : UK Bloggers on MSDN MSH feeds:\> cd 'Renamed New Feeds' MSH feeds:\Renamed New Feeds>
  • Monad RSS provider 4: Viewing a feed

    Following up on this post , if I've navigated into a feed I can then go and view a particular item by invoking it (this is a bit hacky in my view as I use the shell to launch the browser at this point :-)); MSH feeds:\Technology\Mike Taulty's Weblog> invoke-item "Full-Fat Office Updates"
  • Monad RSS Provider 3: Moving around a little, listing feeds and items

    Following up on this post , if I want to navigate around my feed store a little then it feels just like the file system, I chose to make folders and feeds both feel like directories. MSH feeds:\> cd Technology MSH feeds:\Technology> dir | format-list Title, XmlUrl Title : savas blog XmlUrl : http://savas.parastatidis.name/feeds/rss.aspx Title : A Byte Of Life XmlUrl : http://www.ianwij.com/weblog/rss.aspx << Truncated output here as it gets a bit long… >> Title : Mike Taulty's Weblog XmlUrl : http://mtaulty.com/blog/Rss.aspx MSH feeds:\Technology> cd "Mike Taulty's Weblog" MSH feeds:\Technology\Mike Taulty's Weblog> dir | format-list Title, PubDate, Link << Truncated output here as it gets a bit long… >> Title : Full-Fat Office Updates PubDate : 1/29/2006 5:07:00 AM Link : http://mtaulty.com/blog/archive/2006/01/29/9111.aspx << Truncated output here as it gets a bit long… >>
  • Monad RSS Provider 2: Listing root folders

    Following up on this post , I can navigate to the root of my RSS store and get a list of top level items (folder/feeds) up there. Note: I'm not 100% sure that I have this exactly right as I'd like to lose the generic Msh stuff listed here but I haven't figured that out yet. Note also that The "TotalItemCount" and "TotalUnreadItemCount" values don't seem to come back correctly for me from the Feeds API right now. MSH W:\development\monad\RssProvider\RssProvider\bin\Debug> cd feeds:/ MSH feeds:\> dir MshPath : RssCmdletProvider::\Technology MshParentPath : RssCmdletProvider::\ MshChildName : Technology MshDrive : feeds MshProvider : RssCmdletProvider MshIsContainer : True Name : Technology TotalItemCount : 0 TotalUnreadItemCount : 0 MshPath : RssCmdletProvider::\UK Bloggers on MSDN MshParentPath : RssCmdletProvider::\ MshChildName : UK Bloggers on MSDN MshDrive : feeds MshProvider : RssCmdletProvider MshIsContainer : True Name : UK Bloggers on MSDN TotalItemCount : 0 TotalUnreadItemCount : 0 MSH feeds:\>...
  • Monad RSS Provider 1: Locating our new provider

    Following up on this post , here's how I can see that my new provider is up and active within the Monad shell; ********************** MSH Transcript Start ********************** Transcript started, output file is w:\temp\trans.txt MSH W:\development\monad\RssProvider\RssProvider\bin\Debug> get-provider Name Capabilities Drives ---- ------------ ------ RssCmdletProvider None {feeds} Alias ShouldProcess {Alias} Environment ShouldProcess {Env} FileSystem Filter, ShouldProcess {C, D, E, W, F, G, O} Function ShouldProcess {Function} Registry ShouldProcess {HKLM, HKCU} Variable ShouldProcess {Variable} Certificate ShouldProcess {cert} This lets me know that the root of my "RSS drive" is called feeds.
  • Playing with RSS feeds from the Monad Shell

    I had a go at writing a command-let provider for the Monad Shell (currently installed by adding WinFX or the WinFX SDK - not exactly sure!) that I'm running on my Vista box. Because it's Vista, there's the new central store for RSS feedds and I thought I'd have a go at making that navigable by exposing it to the shell. I thought I'd share the bits - as usual, these are not intended to be best practise and come under the general disclaimer for materials obtained from this site. It'd be fair to say that I was still figuring stuff out as I implemented this provider so there would be things I'd do differently if I was attacking it again. One way of using the provider is to make a new shell. The provider builds an assembly called RssProvider.DLL so you can make a new shell with; make-shell -out RssShell.exe -namespace RssProvider -reference RssProvider.dll And then you'd invoke rssshell.exe to experiment with the shell. I'll post some follow up posts of the sort of basic things that the provider allows you to do. The...
  • Hosting WPF inside Windows Forms

    I've been writing demos with WPF over the last couple of days and I knocked together something very simple to show some interoperability between Windows Forms and WPF. I thought I'd share it here as it's (at least to me) illustrative of how smart the object model is within the WPF - in about 10 lines of code I'm doing both a simplistic version of hosting WPF in Windows Forms and I'm also dynamically loading up some XAML and turning it into an object graph at runtime (I should say that I'm doing practically no work here and it's the WPF that's doing the lot). Here's a picture of the application - this is a Windows Forms application where you can type some XAML into the right hand pane and it gets displayed in the left hand pane. I've done nothing to make this smart or clever but I thought I'd share anyway. This is January CTP WinFX stuff. Project file is here .
  • Full-Fat Office Updates

    I got into a bit of a pickle yesterday. I needed a patch to my installation of Office because I wasn't being allowed onto the Corporate Network without it. However, the automatic installation of the patch was failing and I realised why when I went to install it myself manually - it was prompting for the original location that I installed office from for a CAB file. Now, I originally installed Office from the Corporate Network so I was stuck in a Catch 22. I tried to find an MSDN DVD with Office on it with this missing CAB file but I couldn't find it anywhere. In desperation I rang up our IT helpdesk who told me to uninstall Office and reinstall it but that seemed like a bit of a chore just to get this patch installed. In the end I found that on the Office Update site you can elect to download "full file" updates that try their best not to depend on you having the original installation bits to hand when you're doing the patch - took about 5 minutes to resolve my problem once I'd found the site. So, I thought I...
  • WinFX and the January CTP

    Marcus and I did an MSDN evening event last night down at the Microsoft Campus in Reading covering off introductory materials on WinFX. It felt like a good event to me - a fairly packed room of about 100 or so people (the room maxes out at about 120) and people seemed interested in what they were seeing. In some ways an event like this where we spend 2 hours talking about a subject as big as WinFX is quite a challenge and probably more so for the people that attend than the presenter as there's just so much stuff to try and take in all in one go. Marcus did a great job of talking about the Windows Presentation Foundation and I did a shoe-horn style job of trying to squeeze the WCF and the WF into a single hour which is a little bit tricky. I'm hoping that the MSDN events this year will allow us to spend a lot more time on these technologies as I think they're worthy of a whole tonne of investigation and people will want detail before they're prepared to bet their applications on them - it's not sufficient to deliver...
  • Argh! WCF Needs a Message Visualizer for the Debugger

    I'm finding that peering inside a WCF Message needs some assistance - grabbing out the headers, their constituent pieces (Actor, MustUnderstand, etc) and then the body whilst hoping that you don't cause a timeout on the client. It needs a VS 2005 Debugger Visualizer :-) I'll build one at some point if no-one else does but it's definitely needed.
  • Exception handling - what's the best way to do this…

    I'm writing some code today that looks a little bit like this; this .title = feed.Title; this .xmlUrl = feed.url; this .pubDate = feed.PubDate; It's basically a copy of a bunch of properties from one object to another. The problem is that each one of the property accessors on the "source" object might throw an exception but I want as many of the properties copied across as possible with default values supplied if the property accessor throws. Initially I find myself writing this kind of thing; try { this .title = feed.Title; } catch { } try { this .xmlUrl = feed.url; } catch { } But then I find that's getting boring really quickly so I try and find a slightly better solution and end up with something that looks like this; public delegate T CodeDelegate <T>(); class Utility { public static T TryCode<T>( CodeDelegate <T> d) { T returnValue = default (T); try { returnValue = d(); } catch { } return (returnValue); } } and using it something like this; this .title = Utility .TryCode< string >...
1 2 3 Next >