[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sc-dev] Cross-platform IDE things: "Document" as the home of IDE awareness
- To: "SuperCollider developers list" <sc-dev@xxxxxxxxxxxxxxxx>
- Subject: [sc-dev] Cross-platform IDE things: "Document" as the home of IDE awareness
- From: "Dan Stowell" <danstowell@xxxxxxxxx>
- Date: Fri, 26 Dec 2008 21:06:37 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=XrSoFvo+CDSbWJ65MQ2FcSPkrxHXOw2E/pZ6otOsg6M=; b=u9+Qj1A3SEgqH401W2jflDpElg02b5loYnjdjq6kZ+lZsqolQehPQMlhuppXTUgm9J P96KzPOtljh+JWIQfeb64k7hiHRrdGri5D9Gh6xmn3NZQCfHSkMmC6pSWV34y5ZUdvtK AEPer8Qcu4RdEDNFsqpIQ3seBpmsupaS3I1eg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=rI9MP0IPREx93gKvMfRVrh1RzCqt2nBTlhO4LPgIJ1GY38MR7+t1JrZU/uF4oE+Ob9 wH25tjYDGXp9UWvxB7IiXWVXRNeJ8/Q7Wvj12CN5clJuV6S9XU/hpUPlQhAjgUUpBi2G TjTnb6Xa9P2BMCzN1z/2DcZGevsNANbkojlGs=
- List-id: SuperCollider developers mailing list <sc-devel.create.ucsb.edu>
- Reply-to: sc-dev@xxxxxxxxxxxxxxxx
- Sender: owner-sc-dev@xxxxxxxxxxxxxxxx
Hi -
There's been some discussion about cross-platform-ness. Specifically,
the primary home for crossplatform awareness is the Platform class
(osx/windows/linux) but there's been some concern because now the
choice of IDE (cocoa/emacs/vim/eclipse/psyco) is more and more
independent of platform choice. Someone suggested we should create a
new "IDE" class or some such, to encapsulate this knowledge.
I just noticed that Document already is the home of IDE awareness.
Document.implementationClass tells us if we're using CocoaDocument or
ScelDocument. I've added a rudimentary PsycolliderDocument class. We
could create an EclipseDocument class and a VimDocument class
(eventually, these classes will do useful things).
So we could make the Document class do similar things as the Platform
class, e.g. the rather nice Platform:case functionality. At its most
basic this would look like...
*case { | ... cases |
^implementationClass.name.switch(*cases)
}
...and would give us a syntax like...
Document.case(
\CocoaDocument, { "I like SuperCollider.app best".postln },
\ScelDocument, { "I like emacs best".postln }
);
...but that syntax is a little graceless, so maybe better would be to
add a class variable "ide" to each Document subclass with a nicer
value such as \cocoa, \emacs, \psycollider, \eclipse. The syntax would
look more like
Document.case(
\cocoa, { "I like SuperCollider.app best".postln },
\emacs, { "I like emacs best".postln },
\eclipse, { "Real coders use eclipse".postln }
);
There are a couple of things in the class library that already need to
account for choice of IDE. This would streamline that business IMHO.
I propose to commit this added functionality to Document and subclasses.
Let me know if there's something I haven't accounted for... (I bet there is...)
Dan
--
http://www.mcld.co.uk
_______________________________________________
sc-dev mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/