[plt-scheme] overriding insert in text%
Probably you don't really want to override insert, but would be happy
with on-insert, after-insert, or can-insert?
Robby
At Thu, 23 Oct 2003 18:05:03 -0400, Ethan Aubin wrote:
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> Hi, I'm trying to make a subclass of text%, but am running into
> problems overriding the insert method(s). There are 8 variants of the
> insert method w/ different signatures mentioned in the documentation
> and I'd like to override more than one.
>
> I could define insert with an opt-lambda and then look at the type of
> arguments to call specialized helper functions. This isn't too hard
> (there's enough information in the arguments of the particular methods
> I want to overload to disambiguate which method is intended), but it
> feels odd to me (I'd have to write a custom dispatch for every
> function w/ adhoc polymorphism which I overload). Has anyone come up
> w/ a nice solution to situation, or is there an idiomatic way to do
> this I haven't figured out? Thanks, -- ethan.aubin at pobox.com
>