×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

MDI window Error

MDI window Error

MDI window Error

(OP)
Hi
I have an old application depending on Menu Bar, now I changed the menu bar items to buttons, the problem that when I call any screen I get MDI window error, before when I had this problem I used to unflag the MDI checkbox in the called window and it is ok, but this application had more than 90 procdures and it is hard to change them all.

any suggessions is highly appreciated.

Thank you
  

RE: MDI window Error

Hi!

That's because you have NOT TICKED the "Initiate Thread" option. Windows with the MDI Child attribute MUST be opened in a separate thread from the Frame.

Regards
 

RE: MDI window Error

(OP)
Hello ,
Actually I created a template to create the screen buttons for me.

the code part is:
! tried first time

CODE

      CASE ACCEPTED()
           OF %Control
              START(%ButtonProcedure, 25000)

! tried second time

CODE

      CASE ACCEPTED()
           OF %Control
              %ButtonProcedure()


but both have the same result with the same error.

thank you

 

RE: MDI window Error

Hi!

You mean buttons from Menu Items ???

The template is incorrect - it should be ::

#AT.....

CASE ACCEPTED()
#FOR(%Control),WHERE(%ControlType='BUTTON')
OF %Control
  START(%ButtonProcedure, 25000)
#ENDFOR
END

#ENDAT

Post your full template code for a more apt reply/correction.

Regards

RE: MDI window Error

(OP)
I know my dear and my full template is working fine (thaks to your answer in my other thread), I didnt write the full tempalte here beecause it is long that it contains defining the screen and running it,I just wrote the part which concerns the calling of the procedure.
the new screen buttons respond to the press and call the procedure ,but in all cases Iam getting "unable to open MDI window....".
whe I go to the called procedure and reset the MDI flag , it works fine , but this application had more than 90 procdures and it is hard to change them all.

Thsnk you again
 

RE: MDI window Error

Hi!

Quote:


the new screen buttons respond to the press and call the procedure ,but in all cases Iam getting "unable to open MDI window....".

And the generated code in the frame is START(MyProc, 25000) ???

And is the main window of the procedure the FIRST window to be opened in the procedure ???

If yes to both - very weird !!!

Regards
 

RE: MDI window Error

(OP)
Thank you Shanker, everything is clear now and I knew what was the problem.
My template creates a screen that is called by a button in the frame (just for testing).

now I separated that window and put it as first procedure in the application and everything is fine.

Thank you so much for the explanation.

Regards
 

RE: MDI window Error

(OP)
Dear Shanker,
Sorry I complecated the issue to much.

My case is simple if you can help me:

My apllication starts with Frame. I want now to start it with a Normal window with buttons instead of the menu bar.

Now my Screen is ready with all buttons and their procedure calls but the remaining problem is the MDI error . and I dont want to change remove MDI flag from all procedures because they are so many.

THank you in advance
 

RE: MDI window Error

Hi!

Let's assume that the MENU procedure is a standard Window procedure called MainMenu which has buttons to load the procedures. If these buttons are defined at design time, it is straight forward to use the template prompt to call a procedure with the "Initiate Thread" ticked. If you are using some template to create the Buttons, then you need to make sure the template generates the START(...) command line to load the procedure. ONCE A START IS CALLED, THE FIRST AND MAIN WINDOWS USED IN THAT PROCEDURE MUST BE A MDI CHILD WINDOW. If you are calling another window AFTER loading the main window, that window may be MDI or not although it is ideal that all windows are set as MDI Child unless you have good enough reason for not doing so.

If the above does not clarify the issue for you to solve the problem, you need to send me the generated source for the Menu procedure and the Called procedure to help you further. My e-mail is  -  j s h a n k a r  AT  e i m  DOT  a e.

Regards
 

RE: MDI window Error

(OP)
Thank you for the help Shankar,
I think it is better to export to TXA file and reset the MDI flag and Import it again to obtain the exact idea I need .

Thank you again

Regards
 

RE: MDI window Error

Hi!

Did you get the C6 APP I sent?

Regards
 

RE: MDI window Error

(OP)
Yes and I tested it , the idea is nice
thank you
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close