Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

Don't hit the keys so hard, it hurts.


programming / comp.lang.smalltalk.dolphin / Class extension in Dolphin

SubjectAuthor
* Class extension in DolphinVince Refiti
`* Re: Class extension in DolphinJohn Aspinall
 `- Re: Class extension in DolphinVince Refiti

1
Subject: Class extension in Dolphin
From: Vince Refiti
Newsgroups: comp.lang.smalltalk.dolphin
Date: Mon, 16 Mar 2020 04:52 UTC
X-Received: by 2002:a05:6214:1414:: with SMTP id n20mr23308691qvx.160.1584334380453;
Sun, 15 Mar 2020 21:53:00 -0700 (PDT)
X-Received: by 2002:a25:7189:: with SMTP id m131mr35562820ybc.344.1584334380057;
Sun, 15 Mar 2020 21:53:00 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Sun, 15 Mar 2020 21:52:59 -0700 (PDT)
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=59.167.168.68; posting-account=5_w1_goAAAB1Y5P4_YBwBlB76XHrI38U
NNTP-Posting-Host: 59.167.168.68
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <41751a1a-87e8-4021-98b0-f0f9305c19ee@googlegroups.com>
Subject: Class extension in Dolphin
From: vin...@gmail.com (Vince Refiti)
Injection-Date: Mon, 16 Mar 2020 04:53:00 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 5
View all headers
How do I add class extensions in Dolphin? I.e., modifying a package-specific version of a base class such as 'String' without modifying the original base version. I see them around the Dolphin codebase (i.e., Object, String, Behaviour) but I cannot find a way of creating them.

Vince


Subject: Re: Class extension in Dolphin
From: John Aspinall
Newsgroups: comp.lang.smalltalk.dolphin
Date: Mon, 16 Mar 2020 08:32 UTC
References: 1
X-Received: by 2002:ac8:19ee:: with SMTP id s43mr24612625qtk.306.1584347542572;
Mon, 16 Mar 2020 01:32:22 -0700 (PDT)
X-Received: by 2002:a25:4cf:: with SMTP id 198mr34503094ybe.28.1584347542347;
Mon, 16 Mar 2020 01:32:22 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Mon, 16 Mar 2020 01:32:22 -0700 (PDT)
In-Reply-To: <41751a1a-87e8-4021-98b0-f0f9305c19ee@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=85.203.78.110; posting-account=OQ6sIwoAAAC1iWrFEUhdmRsgEkeDOgOm
NNTP-Posting-Host: 85.203.78.110
References: <41751a1a-87e8-4021-98b0-f0f9305c19ee@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f91bb1a8-6f3d-4238-92f2-eaa437686808@googlegroups.com>
Subject: Re: Class extension in Dolphin
From: john.asp...@gmail.com (John Aspinall)
Injection-Date: Mon, 16 Mar 2020 08:32:22 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
View all headers
Hi Vince,

In the Package Manager or a System Browser, right-click your package and select "Set as Default Package". Then in a Class Hierarchy Browser find the class you want to extend and create a new method. When you save your method it should be in your selected package. Don't forget to de-select "Set as Default Package" afterwards or all new methods will be created in your package.

Once the extended class is visible in your package you can create additional extension methods directly in that class in a System Browser on your package.

You can also just create methods directly in a class then move them to your own package using the "Package..." command in the method list context menu.. However this marks the owning package of the class as dirty/changed.

Hope this helps,

John


On Monday, March 16, 2020 at 4:53:00 AM UTC, Vince Refiti wrote:
How do I add class extensions in Dolphin? I.e., modifying a package-specific version of a base class such as 'String' without modifying the original base version. I see them around the Dolphin codebase (i.e., Object, String, Behaviour) but I cannot find a way of creating them.

Vince



Subject: Re: Class extension in Dolphin
From: Vince Refiti
Newsgroups: comp.lang.smalltalk.dolphin
Date: Tue, 17 Mar 2020 01:41 UTC
References: 1 2
X-Received: by 2002:a05:6214:1351:: with SMTP id b17mr2722660qvw.251.1584409312182;
Mon, 16 Mar 2020 18:41:52 -0700 (PDT)
X-Received: by 2002:a25:9005:: with SMTP id s5mr4111882ybl.143.1584409311823;
Mon, 16 Mar 2020 18:41:51 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Mon, 16 Mar 2020 18:41:51 -0700 (PDT)
In-Reply-To: <f91bb1a8-6f3d-4238-92f2-eaa437686808@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=59.167.168.68; posting-account=5_w1_goAAAB1Y5P4_YBwBlB76XHrI38U
NNTP-Posting-Host: 59.167.168.68
References: <41751a1a-87e8-4021-98b0-f0f9305c19ee@googlegroups.com> <f91bb1a8-6f3d-4238-92f2-eaa437686808@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <42502e53-a47a-4dd6-a46d-043bd4c9c8a9@googlegroups.com>
Subject: Re: Class extension in Dolphin
From: vin...@gmail.com (Vince Refiti)
Injection-Date: Tue, 17 Mar 2020 01:41:52 +0000
Content-Type: text/plain; charset="UTF-8"
View all headers
Thank you very much again John. That worked.

I actually stumbled on it earlier but I thought it was some kind of bug as it caused circular references in packages dependencies I was working on. Now I know why.

Vince


1
rocksolid light 0.7.2
clearneti2ptor