swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setGraphWindowGeometryRecordName:


From: Ken Cline
Subject: Re: setGraphWindowGeometryRecordName:
Date: Mon, 5 Jan 1998 21:22:28 -0500 (EST)

On Mon, 5 Jan 1998, Marcus G. Daniels wrote:

> The convention I used was simple, but perhaps too simple.  If a class
> had to pass the information through to a tkobjc feature, I added an
> identifier to discriminate it from the classes that actually were
> GUI primitives.  The reason for this was that some users of geometry
> archiving might be composite and have several different primitives
> that would require unique names.
> 
> In the case of EZGraph, there was just the one GUI component, so the
> rename is rather confusing.  Since I think it's unlikely that a EZGraph
> would ever have different independent frames, I'll heed your
> suggestion and change the name.
> 
> The only other case, setControlPanelGeometryRecordName (in
> ActionCache) I'm leaving it because in the future an ActionCache may
> have other panels associated with it.

I wonder if it wouldn't be possible to write a single method
that would support the `setWindowGeometryRecordName' for any
number of primitives.  This method could exist in some
fictional GUIComposite class and any subclass would get the
`setWindowGeometryRecordName' functionality for "free". 

Then the GUIComposite class could be inserted suitably high
in the class hierarchy to allow Probes, EZBins, EZGraphs,
ControlPanels, etc. to inherit the method.

I'm thinking you could have some method like:

- setWindowGeometryRecordName: (const char *)recordName
                 forComponent: (const char *)componentName {
  id component;

  component = [ self lookupIvarNamed: componentName ];

  if ( component == NULL ) {
     raiseEvent( ... );
     return self;
  }

  if ( [component isKindOf: [ArchivedGeometryWidget getClass] == FALSE ) {
     raiseEvent( ... );
     return self;
  }

  [ component setWindowGeometryRecordName: recordName ];

  return self;
}

Could the `lookupIvarNamed' method possibly be implemented
like the VarProbe mechanism?

Do you think it would be possible to write such a method and
if you could, would you want to?  Drawbacks?

Back to the more mundane...

Ken.


_________________________________________________________
Ken Cline                             address@hidden
SAIC                                 VOICE (410) 571-0413
Annapolis, MD                          FAX (301) 261-8427



                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]