Author Topic: Inactive Model/Layout Tab after Modal Application  (Read 4328 times)

0 Members and 1 Guest are viewing this topic.

wannabe

  • Guest
Inactive Model/Layout Tab after Modal Application
« on: June 25, 2009, 03:51:38 AM »
Not sure where to look in my code. But every time I use one of my modal form-based applications I cannot click the model or layout tabs with any functional success.

Typing Tilemode is the workaround, but I'd rather not have to ensure other users have to do this as well.

Are there any known causes for this?

Cheers

EDIT: Further information; I am calling it using the Application.ShowmodalDialog() method.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8662
  • AKA Daniel
Re: Inactive Model/Layout Tab after Modal Application
« Reply #1 on: June 25, 2009, 05:13:28 AM »
That's how modal is supposed to act, you should try using modeless. Don't forget to lock the document

wannabe

  • Guest
Re: Inactive Model/Layout Tab after Modal Application
« Reply #2 on: June 25, 2009, 05:28:39 AM »
Upon closure of my form is when the problem happens. Every other command and button is fine, just the two tabs. Even when the modal is long gone into the sands of time :-)

I don't think adding a Document Lock would work here? Reckon I should give it a bash anyway?

That's how modal is supposed to act, you should try using modeless. Don't forget to lock the document


Glenn R

  • Guest
Re: Inactive Model/Layout Tab after Modal Application
« Reply #3 on: June 25, 2009, 05:55:29 AM »
Is your modal form being displayed by a command you've registered?

Glenn R

  • Guest
Re: Inactive Model/Layout Tab after Modal Application
« Reply #4 on: June 25, 2009, 05:57:39 AM »
Also, without the usual info, as usual people will be guessing:

Code example (preferably one that can be run)
Acad version
.NET version
Framework version
Visual Studio version
etc.

:D

wannabe

  • Guest
Re: Inactive Model/Layout Tab after Modal Application
« Reply #5 on: June 25, 2009, 07:14:03 AM »
Also, without the usual info, as usual people will be guessing:

Code example (preferably one that can be run)
Acad version
.NET version
Framework version
Visual Studio version
etc.

:D


this code was targetting .NET 2.0. Rest of the details as per my sig.

The code is fairly bulky, and I don't know what area could be causing the problem. But I'll post up later. I was just asking if there were any known issues tbh.

Nick

Glenn R

  • Guest
Re: Inactive Model/Layout Tab after Modal Application
« Reply #6 on: June 25, 2009, 07:28:45 AM »
It sounds like you document is locked up. Do you have any document locks anywhere and are they always being released?

wannabe

  • Guest
Re: Inactive Model/Layout Tab after Modal Application
« Reply #7 on: June 25, 2009, 10:15:34 AM »
To be honest, I don't use document lock when using a modal form; I don't this was part of the methodology used in the .NET labs (apologies if I'm wrong).

I'll scan the code tonight and post up some portions that look dubious.

Cheers

wannabe

  • Guest
Re: Inactive Model/Layout Tab after Modal Application
« Reply #8 on: June 25, 2009, 10:40:29 AM »
It is quite strange, though. Every other button works and clicking the tiles or typing tilemode also achieves the same functionality as pressing the tab.

So this is isolated to the tabs. Would that be indicative of a document lock?

One thing I can think of is that the command will only add points to model space.

wannabe

  • Guest
Re: Inactive Model/Layout Tab after Modal Application
« Reply #9 on: June 26, 2009, 03:08:53 AM »
The problem was that I wasn't actually using the Application.ShowModalDialog(). Please forgive me, it was one of my first projects.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Inactive Model/Layout Tab after Modal Application
« Reply #10 on: June 26, 2009, 03:46:15 AM »
The problem was that I wasn't actually using the Application.ShowModalDialog(). Please forgive me, it was one of my first projects.

That Sir, Is the very reason it's better to post your code :)
... someone would have noticed the Show Dialog call 


/// kdub
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

wannabe

  • Guest
Re: Inactive Model/Layout Tab after Modal Application
« Reply #11 on: June 26, 2009, 08:53:31 AM »
touche

Glenn R

  • Guest
Re: Inactive Model/Layout Tab after Modal Application
« Reply #12 on: June 26, 2009, 10:02:06 AM »
I told you so  :-P seems appropriate me thinks.