[Q][Connectors] Locking ends?
German Morales
germanmorales at delta-sys.com
Sun Jul 13 16:45:25 UTC 2003
It seems that Ned Konz wrote:
>> I took that approach, doing a quick hack that seems to work.
>> I modified #mouseDownInConnected: this way:
> [snip]
>
> I did the same thing, more or less, but added a check on the attached
> morph as well.
It can be nil, right?
> The NCConstraintMorph can have an arbitrary number of inputs. However,
> no one has ever used it that way, and in NCLineEndConstraintMorph I've
> defined #input as "inputs first", and that's used a lot in the code.
Ok, I've fixed it.
I've noticed the existance of #firstInput, which does more or less the
same, but has no senders (in my image).
#firstInput uses "self inputs", which removes nil entries, while #input
uses the instance variable "inputs" directly, resulting in the possibility
of a nil response.
Nils are only possible given that this is a WeakArray or there is another
possibility?
>> One thing I don't like is to check for the index (1 or 2)...
>> perhaps two methods would be more Smalltalk-like ;-)
>
> Maybe. I'll think about doing this, and trying to maintain backwards
> compatibility. Part of the problem is that I haven't found good names
> for the different ends yet.
From/To, Source/Target, Start/Finish?
I suppose the problem is because those names give the idea of a directed
graph, which is not always the case.
Have a nice day,
German Morales
More information about the Squeak-dev
mailing list
|