Navigation
« Slides from My OSLO “PDC Fireworks” Presentation | Main | Like footprints on the moon: beware your software legacy »
Wednesday
Oct292008

Getting Oslo’s Intellipad to show MGrammar Mode

[EDIT: You can just launch Intellipad with Samples Enabled, from the Start Menu. For some reason my first port of call was to run Intellipad from the command line]

Ok I’m beginning to dive into Oslo, so I can at least Appear knowledgeable for the PDC Fireworks talk next week, but there was one thing that was holding me back…

To me the most interesting thing in Oslo is the M language and ability to create on the fly Domain Specific Languages, at the moment this functionality is pretty simplistic but there’s a huge number of applications I can think of, not least with my interest in testing side of things (something that Jeremy Miller alluded to).

As such I wanted to get to grips with how the M language works and how to write grammars and models.

I quickly followed this tutorial but found that the Intellipad experience wasn’t as advertised.

As such here’s a quick primer of how to get the three column view up a little like this:

First navigate to the Oslo SDK Bin Directory (on my machine with x64 windows server 2008 it’s located at C:\Program Files (x86)\Microsoft Oslo SDK 1.0\Bin), open the Intellipad folder and you’ll find a sample sources folder, in this folder is a visual studio solution, Open up and build this solution.

image

Once the solution is built, back in the Intellipad directory you should have another folder (samples), open this folder and copy the directories to the Intellipad components folder

image

Ok so now we have MGrammar support in Intellipad, you can open Intellipad by clicking on ipad.exe in the Intellipad folder

Lets' open up a grammar file and try and get the three pain layout as described in the article.

From the Intellipad open menu navigate to the Oslo SDK samples directory and the song directory under MGrammar

C:\Program Files (x86)\Microsoft Oslo SDK 1.0\Samples\MGrammar\Song

open the Input.song file

This is the easiest way I’ve found to get the three window layout, open the input file first.

Once the input file is loaded you can press Ctrl+Shift+G to turn the mode to MGrammarMode, this will give you extended menu options:

image

From this menu click on Tree Preview this will bring up the open dialogue again, this time select the Song.mg file in the same directory as the Input.song file.

if all is well you should end up with the input.song being in a DynamicParserMode window, the Song.mg being in an MGrammarMode window and a GrammarPreviewMode window.

image

Changes to the input on the left get run through the grammar in the middle and produce the output on the right.

Hopefully this will save some people some time and effort playing round.

 

O

Reader Comments (9)

Thank you

October 28, 2008 | Unregistered Commenterscarnie

if you run ipad from the command line you can launch with samples enabled by running ipad.exe /c:ipad-vs-samples.xaml

If you want this to be the default, you can rename ipad-vs-samples.xaml to ipad.xaml (make sure you backup the original ipad.xaml just in case)

October 30, 2008 | Unregistered CommenterHoop Somuah

Thanks,
Had Douglas point out the start menu command (I still can't believe i missed that)

anyway hopefully someone will find this all useful :)

O

October 30, 2008 | Unregistered Commenterbuildmaster

I posted an entry about MGrammar mode at http://blogs.msdn.com/intellipad">http://blogs.msdn.com/intellipad

October 30, 2008 | Unregistered CommenterHoop Somuah

It didn't work for me. I made sure I followed the steps exactly, twice, and both times ended up with the Input.Song pane in MGrammar mode, and the Song.mg pane in DynamicParser Mode. Also, the two panes are switched/reversed from your screeshot.

Real shoddy tool, even for a CTP. I've never worked for a company that would allow such poor quality for a release.

March 31, 2009 | Unregistered CommenterTrober

fwiw, it works when I *don't* use Control+Shit+G, rather select from the mode combo box MGrammar mode.

March 31, 2009 | Unregistered CommenterTrober

I haven't used oslo for a while, but last time I installed there was a "Samples mode" link in the start menu. did you try that?

March 31, 2009 | Unregistered Commenterbuildmaster

What also works is opening the created song.mg file directly from windows explorer. Then I could switch to MGrammar mode. But this is a great solution to let it work independent of the way how starting Intellipad.

April 16, 2009 | Unregistered CommenterJeroen

thank you for this post

October 13, 2009 | Unregistered CommenterMacPress

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>