Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - sargasso

Pages: 1 ... 8 9 [10] 11
General Board / C# delegate signature declarations
« on: April 18, 2004, 06:35:56 pm »
How do I model the delegate signature?  By way of example, consider the simulation of an AlarmSensor - I am using a form with a button to simulate the enviromental event say "WindowBroken", on this event a bunch of other thicgs must respond - like say the AudibleAlarm on the house, the phonecall to the monitoring company etc etc.

The problem is this - the signature for the delegate handler must be declared - as in the following code

Code: [Select]
using System.Windows.Forms;

public delegate void MySignalHandler (object Sender, MyEventArgs e);

/// <summary>
/// This is the Alarm Sensor hardware. It monitors the
/// environment for a specific detectable change - in this case
/// it is a click on the button - and raises an event AlarmRing.
/// </summary>
public class SignallerForm : System.Windows.Forms.Form

           // Declare the event that is raised
           public event MySignalHandler WindowBroken;
etc etc            

Now when I reverse engineer this the second line, without any containing classifier is "ignored" on the code import, that is nothing is generated in the model that matches it.

Then (after I have created the pattern I'm trying to create) when I generate a new alarm type, the delegate signature is never declared.

Any ideas on what I'm doing wrong?


p.s. the base code actually works - it correctly simulates a set of alarm sensors and detectors.  But I am having trouble extending what I'm doing as each new sensor class needs code fiddling to reset up the delegate signatures.

(p.p.s.  Yes, alright - its part of the control system for my model train set - dont say a word)

General Board / The Project Tree
« on: April 15, 2004, 05:56:30 pm »
Is there any documentation or help or otherwise around that explains the structure of the project browser tree?

To explain, what I'm looking for is something that details exactly what the parent/child positioning in the tree actually means within EA.

Obviously, I'm not talking about the package/element relationship or about element features (attributes, operations) but more about elements that are dragged to become children of other elements.

Now we are at ver 4.0 these positional issues seem to be a lot more important/relevant than before.  


General Board / State Machines
« on: April 04, 2004, 06:49:58 pm »
How do I associate a state machine diagram with a particular element.  Even more significantly, can I associate it with a specific attribute of that element.
I am sure I have done this before.

Object X of class X-type can be in one of three states (Busy, Waiting, Free), indicated by attribute "Status".
What I am trying to do is map the methods of X to their applicability in the states.

General Board / Stumped! Generalised object creation aka late bind
« on: March 28, 2004, 09:58:41 pm »

In a communication diagram how do you folks show the creation of a late bound object?  

For example:

Dim Repo as object
Set Repo = CreateObject("EA.Repository")

The thing gets even more complex if the object is declared as a global as the creating class then cant even be said to "own" the object.

Once the object exists, associations and collaborations all make sense, e.g.
can be sensibly modelled as a collaboration message between the OpenEAFile button and the object.

But having an association between the "Connection" button and the Repo object and a "CreateMe" message doesn't IMHO make sense as now we have class methods and conceptual methods on the same diagram.


So I'm after a bit of best practice advice.

General Board / Lifecycle visibility
« on: March 25, 2004, 09:57:07 pm »
In a Communications diagram (aka collaboration, aka  robustness) is there any indication of an object lifecycle?

What I mean is, a message between a controller and an entity is (in the example I am talking about) the  constructor in the target entity's classifier. I can indicate this in the message properties form by setting the Control Flow Type: Lifecycle to "New".

What I need is some way to highlight in the communications diagram that the message is the constructor.  Its pretty obvious in the Interaction (aka Sequence) diagram but not in the communications diagram.

Have I turned off an option somewhere?
Is this a UML aberation?
Should I just color the message? (no that doesn't work)
? ? ?


General Board / Multiplicity???
« on: March 24, 2004, 05:33:55 pm »
On the context menu for many diagram elements there is now an menuitem called "Set Mulitplicity".

Does anyone know what its for / where its applicable?


General Board / Download the forum
« on: March 22, 2004, 02:12:27 pm »
 :-/ Weird question of the week entry

Is there a way to download a whole forum on this BB?

I'd like to browse the collected wisdom of the automation/add ins forum off line  but I cant see how I could get it all.


General Board / Abstract class constructors
« on: March 17, 2004, 02:31:08 pm »
Herewith, my entry for "Dumbest question of the Week" 8)

Can an abstract class have a constructor?  What I mean is, even though (to us) an abstract class constructor seems to be a meaningless concept, are there any circumstances where it would not be meaningless.


General Board / Configure and Override Attribute Initialisers
« on: March 17, 2004, 03:30:18 pm »
What does this context menu item do?

I can see it annotates the initial value of an attribute in the diagram, but it doesn't do anything in termns of code generation.  Or am I expecting something that doesn't exist?

Suppose we have two classes "abstractFish" and "RainbowTrout:abstractFish".  abstractFish has an property attribute "CommonName" with an intial value of "Fishy".  RainbowTrout specialises abstractFish, inheriting all operations and properties, but we want to override the "CommonName" property initialiser to "Rainbow Trout".  

The code generator produces:
public abstract class abstractFish {
      private string Genus = "Fishy";
      private string Species = "Fishy";
      private string CommonName = "Fishy";

      public abstractFish(){

public class RainbowTrout : abstractFish {
      public RainbowTrout(){

      public static override string CommonName {
                  return CommonName;
                  CommonName = value;
}//end RainbowTrout

So, what is the "Configure and Override Attribute Initialisers" for, if not to generate code?


p.s. Guess what I'd rather be doing.

General Board / OT: Curious
« on: March 10, 2004, 03:48:44 pm »
My curiosity has got the better of me.

Would you folks that browse and contribute here regularly please fill in your general location on your profiles.  "Somewhere in US MidWest" or "Scott Base Antarctica" is good enough for me.

(Really, Im not trying a marketting exercise or anything - I'm just curious.

B 8)

General Board / No cpp changes reflected
« on: February 10, 2004, 09:18:03 pm »
What are we doing wrong?

We have reverse engineered the system into EA, set the generate code parameters all up as we see they are needed and added a new attribute and a new method to a class.

When we forward gen the code, the new items get into the header file OK but are not reflected in the cpp file.

The only oddity I can see is that the header file has an extension of .hpp instead of .h

Any suggestions?

General Board / Ports on components
« on: February 03, 2004, 07:01:21 pm »
Ambler indicates the use of the "port" modifier on component elements, which seems like a good idea.

EA only seems to allow creation of ports on the class level.  

Since a class stereotyped as a <<component>> can be used instead of the dedicated component element, we can get around the restriction by resorting to that method of describing components.

However, what do you folks think.  Should ports be creatable at the component level?  Is this a feature that should be added to EA?  In addition and in particular, should the port facility be enhanced to  allow the specification of interfaces associated with specific ports?


General Board / Overloading - how to show in component diagrams
« on: February 02, 2004, 08:19:46 pm »
Having a totally senior moment.

How do I show overloaded interfaces in a component diagram?

Class brWindowClass is a component member of OXBrowse.OCX.  i.e. brWindowClass <<resides>> OXBrowse.OCX

brWindowClass has two interfaces "ClientBrowse"  that overload depending on the client technology.  

It is easy to add the two interfaces and annotate the diagram, but there must be a proper way...


General Board / Activity models to Use Cases
« on: January 29, 2004, 05:05:37 pm »
Somewhere there is a paper on using boundary elements in activity diagrams to define use cases.  Does anyone know where I can find it?

General Board / Moving internal requirements
« on: December 17, 2003, 05:46:54 pm »
 :'( One of the analysts has created all the requirements on collaboration diagrams at the Object level instead of against the Classifier!

Is there any easy way we can move all these requirements (dozens and dozens) from the object element to the classifier element?

Pages: 1 ... 8 9 [10] 11