![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Function causes Exception_access_Violation Topic Summary: Function is successful but causes violation Created On: 23-Sep-2008 20:29 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi All,
Previously I had a DBE being populated by a fixed string in the form string plat[] = {"A","B","etc"}. This was working fine for various DBE populations. Unfortunately, the range of selectable values within the choice DBE needs to be dynamic therefore I have written a script attached below to extract the enumeratations of the data type in question and populate the DBE choice accordingly. After much experimentation this works and the choice DBE is populated with the enumerations of the required attribute. The problem is that even though the dxl seems to be doing its job, every time the function is called, an exception access violation is triggered with a diagnostic log. Been pulling hair out for two days. Can anyone point me in the right direction. I need to do a similar function for several other attributes so this is becoming a real issue. Thanks in advance Mark ------------------------- mark_williamson@synthesys.co.uk http://www.synthesys.co.uk ---------------------------------------- |
|
![]() |
|
![]() |
|
I don't see plat defined anywhere in the code. What is the data type/size of the plat[]....? You cannot exceed the defined size.
If you are trying to populate a DBE with dynamic data, don't populate an array. Insert the data into the DBE itself. Edited: 23-Sep-2008 at 21:44 by Douglas Zawacki |
|
![]() |
|
![]() |
|
Yet another example of Autodeclare messing someone up.
Sounds like you need to get the number of enumerations in the attribute, IIRC its 'size', and declare string plat[Size]. - Louie |
|
![]() |
|
![]() |
|
Douglas and Louie,
There are currently only 4 enumerations of the attribute type in question and I have declared string plat[100] = {}. Have just tried initialising with plat[4] and the exception is cleared. I need to figure out how to dynamically initialise the array or as Douglas has suggested populate the DBE directly. As a DXL newbie I was under the impression that the DBE values had to specified from within an array. Many thanks Mark ------------------------- mark_williamson@synthesys.co.uk http://www.synthesys.co.uk ---------------------------------------- |
|
![]() |
|
![]() |
|
Hi Mark,
your problem can be solved a little bit easier ![]() See attched code for example. Be carefull with using local string arrays for initializtion of DBEs. I mostly use empty parameters of creation of DBE, then "realize" the dialog box and then fill it with values. That will support an easier way for updating the dialog. Hope that helps you. Greetings Reik ------------------------- Evosoft GmbH for Siemens Industry Sector Berlin, Germany |
|
![]() |
|
![]() |
|
Hi Reik,
Thanks a lot for your posting. I have spent all morning reviewing your code snippet and think I understand how it works. I have rehashed my dxl to implement the method and it seems to be working ok. Unfortunately the tentacles are spreading and each script seems to generate more. Thanks Mark ------------------------- mark_williamson@synthesys.co.uk http://www.synthesys.co.uk ---------------------------------------- |
|
![]() |
|
![]() |
|
Mark,
Not sure what you mean about the tentacles ![]() |
|
![]() |
|
![]() |
|
Hi Douglas,
Thanks for the snippet. I have managed to get the choice DBE dynamically populated from the enumerated data type. What I meant by "tentacles" was that the more dxl I write, the more I realise how much there is to learn. I do not find the DXL reference manual particularly helpful in many cases and there does not seem to be any alternative manuals or guides available. Thanks Mark ------------------------- mark_williamson@synthesys.co.uk http://www.synthesys.co.uk ---------------------------------------- |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Function causes Exception_access_Violation
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.