Question: regarding use and editing of components

I have used the components palette to build a user interface for a complex data analysis and display task. It involves multiple worksheets running in shared kernel mode. The main worksheet is organized as a 3x2 table, each cell of which uses components to display a set of some 25 related data parameters and controls. A second worksheet contains buttons and plot regions for graphing the columns of various data Matrices associated with the parameter sets. The parameters are stored in databases, and the Matrix data have been generated from the parameter sets as input by a stand-alone Fortran program. A third worksheet contains spreadsheets for examining the data in the Matrices. The various buttons on these Worksheets call the procedures in a library devoted to the interface, which procedures accomplish things like loading parameter or data files, clearing or updating the displayed parameter sets, executing data analyses, etc. Keeping so many components straight in my mind demanded that I adopt a uniform naming scheme, so the generic component names have all been replaced by my mnemonic ones which are derived from the underlying data content of each component. All this is pretty much nothing fancy, just as it MUST be, given what I'm trying to accomplish. Now I want to augment the user interface to include another set of parameters, controls and data Matrices all of which are disjoint from the existing ones. I have attempted two different approaches to the augmentation and have encountered puzzling problems with each. It is turning out to be very time-consuming to try figuring this out experimentally, as I usually find I must do when trying to use unfamiliar Maple features and facilities. Therefore, it would be very helpful if you would please advise me whether my approaches are fundamentally unworkable or whether I have simply not properly executed one or both of them. I have tried to frame my questions at a high level, so that the answers will be independent of any particular Worksheet and the errors it may contain, and for that reason I am not sending my Worksheets as an example. Approach #1: The new set of parameters and controls will only be used when one of the existing sets is not. Thus I hatched the scheme to create a Toggle Button in one table cell to Hide the original set while Show(ing) the new set using the 'visible' property for each component. Then I Hide the original set and use the palette to create the components for the new set, using the same cell of the table. The action for the Set1/Set2 Toggle Button is coded to assure that I can never try to show both sets simultaneously. When this scheme is executed, much but not all of it seems to work. In particular, I can toggle Set1/Set2 with the result that both Sets will be appropriately hidden. However, while Set2 is appropriately shown, Set1 is only partly shown. I have looked with a text editor at the WorksheetName.mw file, and it would seem that the creation of Set2 has somehow overwritten some, but not all of the properties associated with Set1, and that there is a subset of Set1 components which seem to have mixed input from each Set. My experience leads to this question: Is this approach prohibited by the design of the architecture of the component facility? Approach #2: This approach involves moving components on the table layout of the main Worksheet, or to a new Worksheet, using cut and paste. When I cut and paste a component, I can move it, including its actions, but when I move it to a different row/line, the name associated with it gets replaced with a generic label, just as though the component were new. Moreover, other occurrences of the name elsewhere in my code are changed, leading to a difficult problem of being sure to have tracked down and corrected all those, too. I need to move 20-50 related components, and the requirement to track down and redefine all occurrences of each is onerous at best. Is there some secret method for accomplishing this without the problems I've encountered? Trying understand the apparent failure of these approaches has led to a couple other questions. When I looked at my WorksheetName.mw file with a text editor, I was pleasantly surprised to see that I could rather easily understand how the code was organized (very unlike the .mws file format). This seemed to offer me the opportunity to program at this level, either moving components as in Approach #2 or manually creating the code for multiple use of a table cell as in Approach #1. At the very least, I might use the Search/Replace function to rename things much more efficiently than opening multiple component dialogs and manually making the replacements. To ease these tasks, I tried editing the file to make it more readable, adding linebreaks, indenting and adding empty lines, etc. After testing this on part of the file, however, Maple hangs when I try to load my edited file, even before I make any substantive changes to the file. I also tried to export the .mw file as .mpl and .txt files, using the Export facility of the Maple's File menu, thinking I would have better success with one of those formats. However, the resulting files contained only a sequence of comment (#) lines. What are the secret rules that must be observed in the layout of the .mw files? Is there any hope of getting a readable version of a .mw file that will load and execute?
Please Wait...