Random Thoughtfulness

FlowLayoutPanel Bug

  23/12/10 00:16, by scribbly, Categories: Development, Software, VB.Net, ContactFX

The new year is fast approaching and I get this feeling like ContactFX isn't going to get done for NANY 2011 :(

But I'm trying to at least get a cut down version happening.

I've been working on the Address Control (which is admittedly fairly complex, but I thought it's a main field of an address card... surely?), and I thought that the layout code was just about done. But to my shock / horror / anger the control failed to layout correctly in the FlowLayOut Panel!! But only when the preceding control had a FlowBreak applied...

So, off to search the internet for an answer... and very quickly discovered that Yauhen Safrankou had only recently solved the same problem. Well, in fact, the problem was "solved" by LewisG over at Windows Forms General: Flowlayoutpanel flowbreak bug. It creates unwanted empty space.

To quote Yauhen:

It seems the height of the gap is the same as the height of the second control following after the flow break. And the workaround to get rid of the gap is to add an additional panel of zero size just after the flow break.

Quoted from Workaround an old bug in FlowBreak of FlowLayoutPanel (at Friday, 24 December 2010 12:13:13 AM).

The internet is a wonderful thing when it works :D

ContactFX :: Functions

  13/10/10 15:24, by scribbly, Categories: Development, Software, VB.Net, ContactFX

We've all grown up with spreadsheets and the ability to reference other cells and perform functions on other values, and probably rarely think how much that has changed our calculation experience... we just do it now.

So it seemed natural to include those abilities into ContactFX as our relationships are often much more complex than our spreadsheets.

I discussed in this post about field linking: that's the ability to include values from other fields and other contacts (even contacts from other file locations) into the contact data.

Functions add the ability to manipulate the linked data.

Current Functions

Return the upper case initial letter plus a period (".")

{ INITIALISE name.additional }

If the text in the Additional Name field is "perry" the above function will return "P."

{ INITIALISE "some string" }

Will return "S."

Return the upper case of the string.

{ UCASE 1#name.family }

If the text in the Family Name field of Contact #1 is "mowbray" the above function will return "MOWBRAY"

{ UCASE "thiS Is a MiXeD sTrInG" }

This will return "THIS IS A MIXED STRING"

This is a conditional join: if the object being joined is non-blank then it is joined to the previous joined result with the constant.

{ JOIN ', ' [ "me" , name.additional , { UCASE name.additional(2) } ] }

If the text in the first Additional Name is "myself" and the text in the second Additional Name field is "i" then the above function will return "me, myself, I"

{ JOIN ' :: ' [ "me" , "" , "you" ] }

Will return "me :: you".

Well, like a ternary... if the Object is blank then the constant is returned otherwise the Object is returned.

{ name.additional ?? 'Additional Name is empty' }

If the Additional Name field is empty then the above function will return the constant "Additional Name is empty".

{ "" ?? 'Empty String' }

Will return "Empty String".

Conditional Pad
Pad the string with a constant if the string is not blank.

{ 'Mr. ' && name.family}

If the text in the Family Name field is empty the above function will return an empty string "".

If the Family Name field has the text "Mowbray" the above function will return "Mr. Mowbray"

{ name.family && ' esq.'}

If the text in the Family Name field is empty the above function will return an empty string "".

If the Family Name field has the text "Mowbray" the above function will return "Mowbray esq."

A real life example

{ { JOIN ' ' [ name.given , { INITIALISE name.additional } , { UCASE name.family } ] } ?? 'New Entry' }" />

When entered into the displayName field:

  • Given Name = "Perry"
  • Additional Name = ""
  • Family Name = "Mowbray"

Display Name will display: "Perry MOWBRAY"


  • Given Name = "Sandra"
  • Additional Name = "Jane"
  • Family Name = "Mowbray"

Display Name = "Sandra J. MOWBRAY"

Some other files that you can play with have been posted over on DonationCoder.

1 comment »

ContactFX :: Field Linking

  30/09/10 01:16, by scribbly, Categories: Development, Software, VB.Net, FARR, ContactFX

One of the main (if not neat) features that's driven ContactFX is the ability to enter data once and be able to link to it from other records: thus saving time when making changes.

There will be two methods of linking or rehashing contact data:

  1. Field Source
  2. Link Fields

I'll leave Link Fields for another time and concentrate on Field Source for now...

ContactFX allows you to use the field value of another field, either from the same contact or a different contact (and eventually even a different addressbook) to the field being edited. The Contact / Field is specified using a source string.

To demonstrate the functionality I've set up two fictitious contacts, Sandi and Perry. The data from Sandi's record being displayed on Perry's record. Sandi's record has been set up with Given, Additional and Family names, I've added an extra Additional name and changed the label to Maiden Name:

Perry's record has his own Given and Family names plus links to Sandi's Formatted Name, middle name and her maiden name:

Links can be created by using the Link Effect when dragging and dropping:

...or by typing directly into the Field's text box (link source must be prefaced with an equals character "="). Once links are created they will update automatically when the contact is opened or manually using the Refresh button on the menu. Source links can reference fields that are themselves referencing other fields, and so on...

Sandi's Formatted Name demonstrates linking to the same contact's fields:

Link references can be in the form:

  • ContactID#FieldID
  • ContactID#FieldName
  • ContactID#FieldName( index )
  • ContactGUID can be used instead if ContactID

When dragging and dropping ContactID & ControlID are used:

The "wife's middle name" field demonstrates a typed-in link in ContactGUID#FieldName format:

The "Sandi's Maiden name" field demonstrates using the FieldName() format. Because multiple "Additional Name" fields were used, this format gives the ability to reference a particular field.

Note that the label on that field linked to Sandi's dislayname:

ContactFX does simple error checking on the source string and highlights the first problem area. The following example shows a misspelt function name:

ContactFX :: Snippet for Comment

  18/08/10 00:18, by scribbly, Categories: Development, Software, VB.Net, ContactFX

I've released a "Snippet for Comment" over on DonationCoder to get some feedback of the directions the project is taking: NANY 2011 Teaser: ContactFX (NANY calls them Teasers).

To run the application just download, unzip and run... the application should perform properly in portable mode.

At the moment all you can do is:

  • Addressbook
    • Create a new contact
      • Add fields to the Contact by dragging from the Control Pallet
        • Edit the fields
          • Add values
          • Edit labels (via context menu)
            • Set width
            • Set layout (fill width | add linebreak )
            • save it back to the addressbook
    • Open thus created contacts to view or edit
  • Settings
    • Change the few settings that are currently available (more will come)
  • About
    • Show the About window
    • Follow some of the links &#59;)

ContactFX is designed to be flexible by the user, with as few "rules" about how to set out any Contact. So although I've designated some suitable uses for the various parts of the Contact window, they wont be enforced in any way: each Contact's layout could be unique if that's what you wanted. Hopefully it'll become clearer when I've got a bit more functionality implemented, but I hope you get the idea.

I'm keen for comments and suggestion! B)

TimeZone Updated to 1.4.1

  28/07/10 22:04, by scribbly, Categories: Development, Software, FARR, TimeZone

This is a small fix for the bugs that I unfortunately introduced in 1.4.0.

There had been some discussion over at DonationCoder.com, but it's taken me a little while to get to it.

I'm hoping that 1.4.1 fixes both the recent bugs: it seems to on my machine, so fingers crossed!

One bug was the codepage of the javascript file was accidentally set to UTC-8 and XP disliked that.

Download here: TimeZone Website

Leave comments here or discuss over at DonationCoder.com.

:: Next >>

June 2017
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Scribbly is derived from the common name of one of the 10 Eucalypts that have insect trails (scribbles) in the bark. Eucalyptus haemastoma is a dominant species where I live and is commonly known as "Scribbly Gum".

The scribbles on the bark of these magnificent trees often reminded me of the journey of many of my projects: somewhat random, but beautiful in the end.


  XML Feeds

powered by b2evolution

©2017 by Perry MOWBRAY

Contact | Help | b2evolution skin by Asevo | blogging tool | hosting reviews | fp