![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Constrained placement --> Access Violation Topic Summary: Why does this minimalistic script crash? Created On: 2-May-2007 08:06 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Greetings,
the attached minimalistic code (to try out constrained placement) crashes at runtime with an Access Violation exception. Even when pared down to just one label to be placed within a frame. Without the placement statement, all is well. I have studied the DXL Help examples, and also those found here on the forum, but still can't find the reason. What am I overlooking? Thanks for any hints. Cheers, Martin Edited: 2-May-2007 at 08:10 by Martin Erdelen |
|
![]() |
|
![]() |
|
The script crashes because you create the label before the frame, although the placement occurs afterwards. Just replace the two lines, and all is fine.
Cheers, Peter |
|
![]() |
|
![]() |
|
Hi there,
I think your problem is that you have to create the frame before the label - i.e the frame statement has to appear before the label statement. The attached code works in my setup. regards, John |
|
![]() |
|
![]() |
|
Aaargh -- simple like that -- and I was in fact aware of this sequencing issue, and have read about three dozen times the relevant Help note which says (my bold):
"Note: You must place dialog box elements in the order they are defined. In the following examples, mylist must be declared before otherList , and theFrame must be declared before theTab for the placement to work. "I paid attention to the term "declared" and so took great pains to get the sequence of the declarations right (line 1 to 3 in the code). But didn't realize that equal heed needs to be paid to the definitions later on... Bonus Question (don't answer it): Was that now me being thick, or the Help text being ambiguous? ![]() Many thanks to Peter and John for replying so promptly, before this issue could ruin my day! Cheers, Martin |
|
![]() |
|
![]() |
|
Or another way of getting the same result is to include a "realize theBox" after the placement command, this way the order of definitions and placements does not matter.
Programming, n: A pastime similar to banging one's head against a wall, but with fewer opportunities for reward. ------------------------- Pekka.Makinen@softqa.fi SoftQA Oy -http://www.softqa.fi/ |
|
![]() |
|
![]() |
|
quote: Yes indeed ![]() Thanks for the "realize" hint, Pekka! Cheers, Martin |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Constrained placement --> Access Violation
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.