Author Topic: FormMain designer view  (Read 2781 times)

KommerszUnicum

  • Newbie
  • *
  • Posts: 8
FormMain designer view
« on: August 02, 2012, 03:07:30 AM »
Hello,

The FormMain contains an Exception when I'd like to view it in the designed. I've found the null reference issue and eliminated the exception, but it seem that the Form is not perfect in design view.

Is this the original design view or it is still need to be fixed? (It does not display the strips (menu, toolbar, statusbar).



KU

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: FormMain designer view
« Reply #1 on: August 02, 2012, 08:03:40 AM »
Yes, I have been trying to fix the designer view for FormMain, and FormColors as well, as it will not display my custom controls. I see that you have it working partially, how did you manage to fix this?

Where is the null reference issue?
Then I can continue to fix the problem, as there is an issue with displaying TextWindow as well in FormColors.

Thanks
The IceChat God

KommerszUnicum

  • Newbie
  • *
  • Posts: 8
Re: FormMain designer view
« Reply #2 on: August 02, 2012, 12:31:06 PM »
The exception source was IceTabControl.cs.

When the designer parse the code it can not find the "FormMain.Instance.IceChatPlugins", because FormMain.Instance only get non-null value during run-time.

So I modified the if statement here to handle null reference exception on design mode:

Code: [Select]
if (FormMain.Instance.IceChatPlugins != null)
{
...
}

To this:

Code: [Select]
if (FormMain.Instance != null && FormMain.Instance.IceChatPlugins != null)
{
...
}

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: FormMain designer view
« Reply #3 on: August 02, 2012, 04:10:08 PM »
Wow, I can't believe I miss such a simple thing.

This could probably be the same problem with the other user controls as well, I will have a look.
Looks like there could be a code update soon, if this finally fixes the issue.
The IceChat God