Archives / 2003 / December
  • Dynamic Dialogs

    Roland Weigelt in a recent blog entry talks about having to spend too much time on producing relatively simple dialogs.  In the past, I found myself thinking about this too, mainly because I wanted a dialog (GUI) alternative to providing arguments on the command line.

    I thought of writing a simple dialog editor, but soon realized that essentially all the (script) dialogs I needed to produce looked the same - they have one or more controls and labels in a vertical format like the one below.

    Having a single dynamic dialog class would enable me to use Alintex Script's automatic inheritance mechanism to consume and reuse such a dynamic dialog class across multiple scripts.

    So I produced a DynamicDialog class (in C#) which allows the dialog above to be displayed with the following code (in this case in late bound VB.NET):-

    dlg = new DynamicDialog(4)

    Or with more useful text labels:-

    dlg = new DynamicDialog("From", "Password", "To", "Message", "Confirm")
    dlg.Title = "Send Message"

    Or even more useful perhaps...

    dlg = new DynamicDialog("From", "Password", "To", "Message", "Confirm", "Type")
    dlg.Title = "Send Message"

    dlg.SetControl("Password", new PasswordControl)
    dlg.SetControl("Message", new MemoControl)
    dlg.SetControl("Confirm", new CheckControl)
    dlg.SetControl("Type", new ComboControl("Comment", "Suggestion", "Other"))


    You can retrieve the entered value of any control by “name” or index.  In other words, both of the following lines produce the same result.

    result = dlg(“Message“)
    result = dlg(4)

    You can set default values for controls in a similar way.

    dlg("To") = "Alex Hoffman"
    dlg("Confirm") = True

    All controls in the DynamicDialog implement a custom IDynamicControl interface which abstracts the “result” from different control types.  This provides an extensible method of adding new controls.  Tooltips are also supported.

    Users of Alintex Script can view the public interface by right clicking on the “dynamicDialog.cs” file in Windows Explorer, right-clicking, and choosing “Display Public Script Interface”

    An example script which uses (and includes) dynamicDialog.cs can be downloaded here.

    Once unzipped, you can simply double click on the file (testDialog.psf) to execute the script, or type axwscript testdialog.psf on the command line.  Information on PSF script files is available here.

    Feel free to use or adapt the dynamicDialog.cs code to your needs.


  • Axapta vs Navision

    For those involved in MS Business Solutions, or those just wondering about the difference between two of Microsoft's important business solution products - Axapta and Navision, the following (annotated) post by Gerrit Combrink and Rene on the Microsoft.Public.Axapta newsgroup might be helpful:-


  • What's New in MS CRM 1.2

    A good summary of what's new in Microsoft CRM 1.2 can be found here.

    Additionally, the CRM Outlook client is now written in managed code - C# (rather than JScript in 1.0) and is accordingly much faster.

    S.B. Chatterjee mentions in his weblog that Crystal Reports (now v9) is included rather than SQL Server 2K Reporting Services.  Probably not suprising given that the latter is still in beta.  However, sources have said that the latter will be included in CRM 2.0.

    Update: see this eWeek article for CRM 2.0 information


  • Hiatus

    It's been a while since I last blogged, having been heads down on a number of projects - some interesting - some more mundane.  All, nonetheless, offering lessons to be learnt.

    The holidays provide an opportunity to catch up on (tons of) reading and a bit of blogging.

    Since I last wrote:-

    1. The 2003 PDC has come and gone.

    Although, one could be excused for thinking that Longhorn was actually released at the PDC, knowing the future direction on a range of technologies can help strategically today.  I found that information provided on general architecture, Indigo/BizTalk/WSE/InfoPath, Whidbey, DSI (Dynamic Systems Initiative), SDM (System Definition Model), and the Longhorn Command Shell (MSH - codename Monad) - impact on work I'm currently doing.

    2. A new version of the software that powers this weblog - .Text has been released.

    Great to see easy to consume support for category feeds, and I'm happy that there are separate feeds for MS and non-MS bloggers.  While both groups are important to me, I like the non-MS blogger perspective, and rely on them to let me know about important and useful topics from the MS group.

    4. Alintex Script .NET recorded its 15,000th download.

    5. In Australia, rumors of Prime Minister John Howard being “recalled“ were found to be false.  But not before both Kylie Minogue and the crocodile (from Crocodile Dundee VII) had reportedly agreed to contest the election.

    Happy holidays!