Previous Topic: Frequently Asked QuestionsNext Topic: Acknowledgments


Questions and Answers

Q: When should I back up my group model?

A: You should perform regular backups of your group models on a daily basis. A group model is the central design repository. It is extremely important. If you accidentally destroy a local model, all the work you have done since the last extract from the group model is lost. If the group model is accidentally destroyed, all the work for that group model is lost. It may be possible to recover all or some of the data from a local model (using the XML Import/Export feature) but this is not guaranteed in all cases. For more information, see Backups in the online help.

Q: How often should I update?

A: We recommend that you update your changes to the group model at least once a week, but preferably more often. Frequent updating in a workgroup environment makes your changes available to other developers. More importantly, after changes are updated to the group model, they become part of the central repository and are more secure. Note that extended periods between updates affect the time it takes to do an update; the more work that CA Plex has to do to get through the differences between your local model and the group model, the longer it takes.

Important! Do not wait several weeks between updates.

Q: Why does my function, field, table, or view have two implementation names?

A: You and someone else updated the group model after having generated and built functions and panels or tables or views. Your implementation and file name triples and objects—and those of the other person—were added to the group model without one set replacing the other. If this happens, you must delete the duplicate names.

Note that a group model conflict occurred when the second person tried to update the group model. You can choose not to update at this point. To avoid such conflicts in advance, ensure you frequently update changes, especially after making changes that impact other developers in your workgroup. For more information, see Avoiding and Resolving Conflicts in the online help.

Q: I tried to generate an object but I got an error stating that I must specify an implementation language. What went wrong?

A: If you inherited the object from a pattern library (such as OBASE) make sure that the configuration of your local model is correct. To do this, choose Configuration from the File menu and, in the Model/Library box, select each model in turn. For each one, make sure that the Variant option is not set to Base. Instead, select the appropriate variant for your current work.

Q: What is the difference between levels and versions in group models?

A: A version is a collection of levels in a specified sequence. Assigning work to various levels means that you can keep track of general fixes and customer specific fixes simultaneously. For example, in the application FunkyApp, after Release 1.0 two fixes were made for customer A and customer B, followed by a general release of fixes at Release 1.1. This resulted in four levels: Release 1.0, Customer A fixes, Customer B fixes, and Release 1.1. The following table shows the version and level combinations possible. For more information, see Working with Versions and Levels in the online help.

Version

Levels Include

Description

Release 1.0

Release 1.0

The first generic release of FunkyApp 1.0 for all customers

Customer A 1.0

Release 1.0 Customer A fixes

A FunkyApp 1.0 release specific for customer A

Customer B 1.0

Release 1.0 Customer B fixes

A FunkyApp 1.0 release specific for customer B

Release 1.1

Release 1.0

Release 1.1

Generic FunkyApp 1.1 release for all customers except A and B

Customer A 1.1

Release 1.0

Customer A fixes

Release 1.1

A FunkyApp 1.1 release specific for customer A

Customer B 1.1

Release 1.0

Customer B fixes

Release 1.1

A FunkyApp 1.1, release specific for customer B

Q: I cannot use constants or literal values in action diagrams. Why?

A: It might be faster if you could enter literals anywhere in the code, as you can in most programming languages, so why does CA Plex not permit this? The reason is maintainability. Too many programs in too many languages have literals that are coded into the programs with no explanation as to the significance of the letter or numeric value. As an enterprise development tool, CA Plex was designed to enable applications to be easily maintained by someone other than the original developer. Hence, you are forced to label all literals all the time to make your programs easier to understand.

Q: What are all these +++ meta-operations in library functions?

A: Meta code is used in pattern libraries to interrogate the triples in the model and provide the expected functionality. For example, a field with a triple MyField default MyDefault does not provide any default values without supporting meta code in the action diagram to set that default value. To learn more about meta code, Meta-operations, click the Locate button to see related topics in the Contents tab in the online help. Work on customizing supplied library code by copying and altering the code of others.

Q: When should I abstract my code into a pattern?

A: Sometimes a pattern is obvious, but the extra effort to make a great, inheritable, customizable pattern is not worth the effort because you may only implement it twice. On the other hand, something that obviously should be a pattern may be difficult to abstract. Often, the answer is that after you implement it once—certainly when learning about abstracting something for the first time—it is then clearer and simpler to work out whether you should abstract it and how you can turn it into a pattern. To know when to abstract becomes easier with experience.

Q: I cannot see my field names in the action diagram debugger. Why?

A: In the C++ build options, select the Force Build Of Selected Objects; then rebuild your functions. If this does not work, delete the entire Obj subdirectory, and then rebuild. For more information, see Generating and Building for Action Diagram Debug in the online help.

Q: How can I simplify parameter mapping?

A: An important technique is the management of field domains. Field domains control how CA Plex automatically maps parameters. When you perform mapping manually, field domains also restrict the list of available fields, which makes it easier to find the one you want. For more information, see Field Domains in the online help.

Another technique is to use default mapping in the Parameter Mapping dialog. Default mapping lets the Action Diagrammer automatically make its best guess when mapping parameters between function calls, saving you from mapping each parameter individually. For more information, see Setting up Default Mapping in the online help.

Q: What is the difference between pre, post, and edit points? Which should I use?

A: Edit points are left over from previous versions of CA Plex. Collection points (the collective name for pre and post points) are an improved place to put your code. The difference is that edit points overwrite each other at the different levels down the inheritance tree (you have to be extremely careful with the nesting), whereas collection points are cooperative and just collect code together in sequence. You can always add code to the bottom of a collection point in any action diagram, regardless of whether it has been used before. Edit points are restricted because if they have been used, you can no longer use the edit point further down the inheritance tree. Therefore, we recommend that you do not use edit points.

So which should be used: post or pre points? Sometimes it is obvious. You want to put code before or after another piece of code in the edit, pre, or post point so you know where to put it. What if it does not matter if the code goes in the pre or post point? Then the code always goes into the post point. If someone inherits from your function and wants to add code, if your code is in a post point they can add code before it (in the pre point) or after it (remember that you can always add code to the end of a collection point, regardless if it has been used higher in the inheritance hierarchy). If you add your code habitually in the pre point, people can only add code after (never before) your code if they are further down the inheritance hierarchy. In conclusion, always use post points unless there is a reason not to. For more information, see Edit Points and Collection Points in the online help.

Q: Which post point do I use?

A: This is perhaps the most difficult issue within CA Plex for the novice. we recommend that you do the following:

  1. Make an educated guess.
  2. Expand the code before and after the post point.
  3. Consider whether this is the correct post point.
  4. Test it and see.
  5. If it does not work, try Step 3 again; then try Steps 1 to 5 again.

Knowing which post point to use is the key to writing CA Plex functions quickly. Look at other functions and determine why the local modifications were added at the particular points that the developer chose. Remember that the class and pattern libraries are based on the use of edit and collection points, so they can be examined for clues. Sometimes it helps to open action diagrams from the libraries, for example examining UISTYLE/EditDetailGrid shows you how to integrate UISTYLE/Detail and UISTYLE/Grid, and how to use UISTYLE/UIBasicShell.

Examining other pieces of code, particularly the libraries, helps to increase your total knowledge of which post point to use and when to use it. This increases your ability as an CA Plex developer.

Q: Why do I have to keep on dragging my line to the edit box at the top of the window?

A: You do not have to do this. You can press the Insert key on the keyboard to enable inline editing. Note that for multiline comments, you must press Ctrl+Enter to enter the line into the action diagram, but for a normal single line of code, just press Enter when you have finished editing.

Q: How do I delete a field or a variable from a function?

A: You can do this in the Model Editor by deleting triples. You cannot just press the Delete key on the Variable Palette. Go to the top line of the function or the Variable Palette (they both show the function name) and press F12. This calls a Model Editor focused on the function. Any fields and variables that may be deleted are listed in the triples. Note that inherited fields and variables are not listed. To delete an inherited field you must delete the triples from the function that specified them higher in the inheritance hierarchy. You cannot delete the fields and variables of library functions. Remember to press F5 (Refresh) to redisplay the variable palette to show that the fields and variables have been deleted.

Q: How can I document and add comments to my code?

A: Use the Comment and Seq constructs frequently. Take AllFusion of the CA Plex long object names to produce meaningful names. Carefully consider the naming of subroutines and edit points and use block narratives where appropriate.

Q: How can I indicate that a field is supposed to be a dual (call by reference) parameter?

A: Change the triple in the Model Editor from MyFunction input MyField to MyFunction dual MyField. You cannot do this from the Action Diagrammer.

Q: I changed the size of a Windows panel in the Panel Designer but at run time the size did not change. Why?

A: The Save Placement property of the panel is probably set to Yes and the previous size is probably still saved in the application .ini file. To see the change, delete the entry in the .ini file (or rebuild it using the Create Exe command) or set Save Placement to No.

Q: My button on the panel does not do anything, even though the code is there. Why?

A: The physical event in the panel has most likely not been mapped to the CA Plex logical event. A physical panel event is the result of somebody clicking, dragging, pressing, double-clicking, or selecting something on the panel. For example, pressing a button or selecting a menu item or entering text are all regarded as physical events, because they occur visibly on your computer screen.

The other events in CA Plex are logical events. Logical events only happen within CA Plex. They are not visible to you. Instead CA Plex lets you tie a physical event (clicking) to a logical event. The action diagram, and in particular the events handler, can respond only to logical events.

If you right-click the button (when it is selected) in the Panel Designer and choose Event Mappings, you can see the Event Mappings dialog. Click Pressed in the list box on the left (Physical event) and check that the list box on the right (Logical event) has the corresponding event selected in blue (for example, MyButtonPressed). If it is not selected in blue, select it before clicking OK to close the dialog. Switch back to the action diagram—pressing F11 switches you quickly between a function and its panel—and press F5 to refresh. Find the event code (an Event: Event MyButtonPressed construct in the Events Handler construct), which should now be executed when you press the button.

If you want to check which physical events are mapped to which logical events, look in the Events folder in the Panel Palette in the Panel Designer. If a logical event has one or more physical events assigned to it, it can be expanded and the physical event or events are displayed.

Q: Why does the MDI parent not respond to common events triggered in the MDI children?

A: The Menu ID properties of the menu items are most likely not set. Open the MenuShell panel of MyMDI in the Panel Designer, and expand the Menu bar folder in the Panel Palette. Find the menu items that are intended to be duplicated across all of the children but responded to by the parent, and ensure that they have a MenuId property of a number. Do not use the numbers 1 to 500, 54016, or 54107.

Q: I have Menu IDs, but my MDI child panel does not trigger MDI panel events. Why?

A: All MDI child panels and the MDI parent panel inherit from the common MenuShell panel, so do not expect the child functions to pick up the Menu ID property numbers you have set until you recompile them. When you recompile the children, the individual panels will know the Menu ID numbers and be able to pass them to the parent. Remember to recompile the MDI parent because it needs to know the Menu ID numbers.

Q: How do I delete a menu item?

A: Press the Delete key. There is no selection to delete a menu item from the right button pop-up context menu.

Q: I cannot see the new values I have entered for my status fields. Why?

A: If you add values to a field in the Model Editor and then go into a panel, these new values are not shown on the field. In the Panel Designer, just select the field and choose Refresh Values from the pop-up menu. The values are refreshed to match the triples in the Model Editor.

Q: Is there a way to see the full text of a message in the Message Log?

A: Yes, right-click the message.

Q: I cannot see the changes I have made reflected in other windows. Why?

A: Click the Refresh button (F5) to see your changes. In some cases, you may need to close both a panel and its related action diagram (answering Yes when prompted to save changes), and reopen them to see changes.

Q: I added a triple in the Model Editor but now I cannot find it. What happened?

A: There are a number of factors that determine which particular triples get displayed in the Model Editor. Make sure that you check each one. For more information, see Understanding the Model Editor Display in the online help. In addition note the following:

Q: Why does CA Plex permit me to enter incomplete or illogical data?

A: While CA Plex enforces correct syntax, it does not enforce consistency or completeness until you generate. Thus, the model could not contain the triple Credit limit length Customer, but it could contain both Credit limit length 6 and Credit limit length 7. CA Plex does this for the following reasons:

Q: There is no list of target object types available in the Model Editor. Why?

A: The target object type on the Entry Bar is not capable of input because its value is always determined by the verb that you select.