MessageForm.ShowMessage


Author
Message
Geoff Hirst
Geoff Hirst
StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)
Group: Forum Members
Posts: 123, Visits: 3.5K
Chaps,

Periodically I get the following exception

System.NullReferenceException: Object reference not set to an instance of an object.
   at MicroFour.StrataFrame.Messaging.MessageForm.ShowMessage(String MessageText)
   at SFB.Alarm64.Alarm64_CustomerMF.EditInstallation()

I use Messageform a lot, as it's a lot more aesthetically pleasant than Messagebox. This isn't specific to 1.6.7 as I have experienced it quite a bit over the last few versions.

Is there anyone else getting this at all?

thanks

Geoff

Replies
Geoff Hirst
Geoff Hirst
StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)
Group: Forum Members
Posts: 123, Visits: 3.5K
Hi Trent,

After your last post, I did some digging as I kind of expected the issue I had with this to be related to my obfuscator. I now blame that first for everything that I can't blame myself for Smile

One of the areas I got this exception was really easy to test, so I substituted the Messageform.showmessage for the old Messagebox.show. Did my build and then did my obfuscation, and then ran it. Amazingly, it didn't throw an exception, it displayed the message correctly.

So, I then decided to go back to the single form of messageform.showmessage and repeated the same as above. Amazingly, the exception re-occurred.

So, then I decided to change the signature of the messageform.showmessage to this

MessageForm.ShowMessage("Telephone Action is a new feature - Coming soon. Quarter 4 2008.", "Alarm64", "COMINGSOON", MessageFunction.OK, MessagingIcon.Information, MessagingSounds.None)

Did the build and the obfuscate. Then ran....Tada! it works like a dream.

So, not sure what to say really. All I can say is that the single message form of showmessage doesn't always work, for me at least anyhow.

best regards

Geoff


Ivan George Borges
Ivan George Borges
Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Geoff.

Not saying that you must to, but have you tried using the Message Editor to build your messages? You can use the editor to build them, and test while in the editor to see how they will look like. Not to say that if you use the same message in many different places in your app, you will have a single place to maintain it. After that, you just use the ShowMessageByKey() method to show it.

If you already do all this and I am talking too much, I appologize. BigGrin

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
I am not sure what you are fighting here because we too use the MessageForm in StrataFrame, DDT, as well as our medical software and many parts of each of these are obfuscated and we have never had an issue (once we get the project setup Smile).  I would have to have more details and a sample solution that reproduces the behaviors before I could give any suggestions.  But this sounds more to do with obfuscation settings than anything else.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search