Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
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
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 2-May-2007 08:06
User is offline View Users Profile Print this message


Martin Erdelen

Posts: 15
Joined: 14-Aug-2006

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
Report this to a Moderator Report this to a Moderator
 2-May-2007 08:58
User is offline View Users Profile Print this message


Peter Albert

Posts: 232
Joined: 30-Dec-2005

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
Report this to a Moderator Report this to a Moderator
 2-May-2007 08:58
User is offline View Users Profile Print this message


John Stout

Posts: 1
Joined: 7-Mar-2003

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
Report this to a Moderator Report this to a Moderator
 2-May-2007 09:40
User is offline View Users Profile Print this message


Martin Erdelen

Posts: 15
Joined: 14-Aug-2006

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
Report this to a Moderator Report this to a Moderator
 2-May-2007 09:44
User is offline View Users Profile Print this message


Pekka Mäkinen

Posts: 276
Joined: 18-Mar-2004

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/
Report this to a Moderator Report this to a Moderator
 3-May-2007 06:43
User is offline View Users Profile Print this message


Martin Erdelen

Posts: 15
Joined: 14-Aug-2006

quote:

Originally posted by: Pekka Mäkinen
...Programming, n: A pastime similar to banging one's head against a wall, but with fewer opportunities for reward.


Yes indeed 

Thanks for the "realize" hint, Pekka!

Cheers,
Martin
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.