Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MmBaseForm.AddFormTitleDescription problem
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
MmBaseForm.AddFormTitleDescription problem
Divers
Thread ID:
00979738
Message ID:
00979738
Vues:
48
Kevin,

I have a problem with the way mmBaseForm.AddFormTitleDescription() works.

When the user retrieves data the navigation grid is populated with rows each of which contains values in the column(s) to form the required description. Each time the user navigates to a new row NavigateData calls AddFormTitleDescription() appends the description to the original form caption.

When the user creates a new row there is no value for the description (at least on my forms.) Because AddFormTitleDescription() only changes the form.text if a description is passed the caption does not change and it appears to the user that they have blanked an existing row and are now updating it.

public virtual void AddFormTitleDescription(string description)
{
if (!OakLeaf.MM.Main.mmString.Empty(description))
{
this.AppendText(" - " + description);
}
}

I have programmed a kludge to get around this because of the way AppendText() updates base.text and not this.text. I a private OriginalCaption to my mmBusinessForm override class ABusinessForm.

I then overrode AddFormTitleDescription()

Public Overrides Sub AddFormTitleDescription(ByVal description As String)
' Capture the original form.text as OriginalCaption.
If Me.OriginalCaption = "" Then
Me.OriginalCaption = Me.Text
End If

If OakLeaf.MM.Main.mmString.Empty(description) Then
Me.AppendText("")
Else
Me.AppendText(" - " + description)
End If
End Sub

and AppendText()

Public Overrides Sub AppendText(ByVal text As String)
Dim OriginalText As String

' Empty test excluded to avoid localization error.
If mmAppBase.IsRunning AndAlso mmAppBase.Localize Then
OriginalText = mmAppBase.MessageMgr.GetMessage(Me.OriginalCaption, Me.CurrentLanguage)
Else
OriginalText = Me.OriginalCaption
End If

Me.Text = OriginalText & text
End Sub

This is working for me now but I'm hoping that you will fix this in the framework.

Thanks,
Max...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform