Discussion:
Document Customization
magicwindow
2014-10-20 02:10:15 UTC
Permalink
Hello List,

I've been wanting to customize my SuperCollider through the startup file
(change background color, font, etc.). Im using SC 3.6.6. Certain code in
the startup file is receptive (for example "s.makeWindow;"), however, i get
errors whenever i use code posted on the list in regards to the background
of the Document class. In-fact, i can't even use any of the examples in the
actual help documentation for the Document class. ex:

(
a = Document("background", "'hardly see anything");
a.background_(Color.blue(alpha:0.8)); // notice that alpha controls the
window transparency
)


gives me



ERROR: Message 'new' not understood.
RECEIVER:
nil
ARGS:
Instance of String { (0x10fa5fb98, gc=38, fmt=07, flg=10, set=02)
indexed slots [10]
0 : b
1 : a
2 : c
3 : k
4 : g
5 : r
6 : o
7 : u
8 : n
9 : d
}
Instance of String { (0x10fa5f8c8, gc=38, fmt=07, flg=10, set=02)
indexed slots [20]
0 : '
1 : h
2 : a
3 : r
4 : d
5 : l
6 : y
7 :
8 : s
9 : e
10 : e
11 :
12 : a
13 : n
14 : y
15 : t
16 : h
17 : i
18 : n
19 : g
}
false
CALL STACK:
DoesNotUnderstandError:reportError 0x10e8f4608
arg this = <instance of DoesNotUnderstandError>
Nil:handleError 0x10e79f278
arg this = nil
arg error = <instance of DoesNotUnderstandError>
Thread:handleError 0x10e9bfb28
arg this = <instance of Thread>
arg error = <instance of DoesNotUnderstandError>
Object:throw 0x10edc9a48
arg this = <instance of DoesNotUnderstandError>
Object:doesNotUnderstand 0x10e935098
arg this = nil
arg selector = 'new'
arg args = [*3]
Meta_Document:new 0x11389a4c8
arg this = <instance of Meta_Document>
arg title = "background"
arg string = "'hardly see anything"
arg makeListener = false
arg envir = nil
var doc = nil
var env = <instance of Environment>
< closed FunctionDef > (no arguments or variables)
Interpreter:interpretPrintCmdLine 0x113859008
arg this = <instance of Interpreter>
var res = nil
var func = <instance of Function>
var code = "(
a = Document("background",..."
var doc = nil
var ideClass = <instance of Meta_ScIDE>
Process:interpretPrintCmdLine 0x10f046548
arg this = <instance of Main>
^^ The preceding error dump is for ERROR: Message 'new' not understood.
RECEIVER: nil

and attempting to change the font through this code,

(
Document.current.font_(Font("Impact", 14),
    Document.current.selectedRangeLocation + 12,
    18);
)

gives me this,

ERROR: Message 'selectedRangeLocation' not understood.
RECEIVER:
nil
ARGS:
CALL STACK:
DoesNotUnderstandError:reportError 0x10e722c98
arg this = <instance of DoesNotUnderstandError>
Nil:handleError 0x10f7e06b8
arg this = nil
arg error = <instance of DoesNotUnderstandError>
Thread:handleError 0x10af82948
arg this = <instance of Thread>
arg error = <instance of DoesNotUnderstandError>
Object:throw 0x10f7e1058
arg this = <instance of DoesNotUnderstandError>
Object:doesNotUnderstand 0x10f7e0ef8
arg this = nil
arg selector = 'selectedRangeLocation'
arg args = [*0]
< closed FunctionDef > (no arguments or variables)
Interpreter:interpretPrintCmdLine 0x10ee0f468
arg this = <instance of Interpreter>
var res = nil
var func = <instance of Function>
var code = "(
Document.current.font_(Fon..."
var doc = nil
var ideClass = <instance of Meta_ScIDE>
Process:interpretPrintCmdLine 0x10eab3378
arg this = <instance of Main>
^^ The preceding error dump is for ERROR: Message 'selectedRangeLocation'
not understood.
RECEIVER: nil


Any advice? I'd love to get this to work.





--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/Document-Customization-tp7614104.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
magicwindow
2014-10-20 02:39:02 UTC
Permalink
Also to tack on, using this code

{
Document.listener.background= Color.red; //maybe a special colour
for post window
Document.initAction= {|doc|
doc.background_(Color.grey(0.1, 0.9));
doc.bounds_(Rect(0, 119, 1280, 659));
doc.selectedBackground_(Color(0.4, 0.05, 0.18));
};
}.defer(0.1);

(found here:
http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/Changing-the-background-color-of-all-documents-using-startup-file-td7286688.html)

in the startup gives this error,

ERROR: Message 'background_' not understood.
RECEIVER:
nil
ARGS:
Instance of Color { (0x10d6fb4e8, gc=D8, fmt=00, flg=00, set=02)
instance variables [4]
red : Float 1.000000 00000000 3FF00000
green : Float 0.000000 00000000 00000000
blue : Float 0.000000 00000000 00000000
alpha : Float 1.000000 00000000 3FF00000
}

PROTECTED CALL STACK:
Meta_MethodError:new 0x10cca8000
arg this = DoesNotUnderstandError
arg what = nil
arg receiver = nil
Meta_DoesNotUnderstandError:new 0x10cca9fc0
arg this = DoesNotUnderstandError
arg receiver = nil
arg selector = background_
arg args = [ Color(1.0) ]
Object:doesNotUnderstand 0x10acc7a00
arg this = nil
arg selector = background_
arg args = nil
a FunctionDef 0x10ae6dc48
sourceCode = "{
Document.listener.background= Color.red; //maybe a special colour
for post window
Document.initAction= {|doc|
doc.background_(Color.grey(0.1, 0.9));
doc.bounds_(Rect(0, 119, 1280, 659));
doc.selectedBackground_(Color(0.4, 0.05, 0.18));
};
}"
a FunctionDef 0x10c093cc0
sourceCode = "<an open Function>"
a FunctionDef 0x10b281b40
sourceCode = "<an open Function>"
Function:prTry 0x10c0980c0
arg this = a Function
var result = nil
var thread = a Thread
var next = nil
var wasInProtectedFunc = false

CALL STACK:
DoesNotUnderstandError:reportError 0x10d9b2fd8
arg this = <instance of DoesNotUnderstandError>
< closed FunctionDef > 0x10d9a98a8
arg error = <instance of DoesNotUnderstandError>
Integer:forBy 0x10dbcc0a8
arg this = 0
arg endval = 2
arg stepval = 2
arg function = <instance of Function>
var i = 2
var j = 1
SequenceableCollection:pairsDo 0x10ae28eb8
arg this = [*4]
arg function = <instance of Function>
Scheduler:seconds_ 0x10d9b0f48
arg this = <instance of Scheduler>
arg newSeconds = 7.832843571
Meta_AppClock:tick 0x10d9acce8
arg this = <instance of Meta_AppClock>
var saveClock = <instance of Meta_SystemClock>
Process:tick 0x10d9ade88
arg this = <instance of Main>
^^ The preceding error dump is for ERROR: Message 'background_' not
understood.
RECEIVER: nil



--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/Document-Customization-tp7614104p7614106.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/

Loading...