jostM | 2 Aug 2008 17:10
Picon
Favicon

exponential notation standard

I am continuing to work on an sprintf style fformat method (I have the
parsing worked out already),
but I noticed we have no method (AFAIK) which prints the "exponential
notation" of a number (which is one of the conversions I need)

We would need an SC Standard as to how such numbers are represented as a
string:

e.g.:

in Javascript it should be like this:

var num = new Number(10000);
num.toExponential(3);

and would give you

1.0e+4

is this notation OK for SC, can we adopt this, or is there already a
notation of this sort?

jostM

_______________________________________________
sc-dev mailing list

info (subscribe and unsubscribe): http://swiki.hfbk-hamburg.de:8888/MusicTechnology/880
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/
(Continue reading)

James Harkins | 3 Aug 2008 04:56
Picon

Re: Re: [Sc-devel] Adding specs to synthdefs?

I haven't committed synthdef specs yet because I wanted to work on SoundFile to avoid rewriting the diskIn synthdefs on every startup. Here is a patch. The synthdef for the number of channels is built on demand only (the way it really should be done... I'm with felix that creating system synthdefs is kind of a lazy way out [and I'm well aware a few places in my lib still do this -- next on my list to fix but not tonight]).

Also there was a bug in the setwatchers function in the event that SoundFile:cue returns. The reference to ~id[0] would fail because the OSC responder function doesn't activate inside the soundfile event.

OK? Comments/issues? I tested by calling .play on a soundfile and it works peachily.

hjh

Index: SoundFile.sc
===================================================================
--- SoundFile.sc        (revision 7706)
+++ SoundFile.sc        (working copy)
<at> <at> -269,17 +269,17 <at> <at>
                ^outFile
        }
 
-       *initClass {
-               StartUp.add {
-                       (1..16).do { | i |
-                               SynthDef("diskIn" ++ i, { | out, amp = 1, bufnum, sustain, ar = 0, dr = 0.01 gate = 1 |
-                                       Out.ar(out, DiskIn.ar(i, bufnum) 
-                                       * Linen.kr(gate, ar, 1, dr, 2)
-                                       * EnvGen.kr(Env.linen(ar, sustain - ar - dr max: 0 ,dr),1, doneAction: 2) * amp)
-                               }).store
-                       }
-               };
-       }
+//     *initClass {
+//             StartUp.add {
+//                     (1..16).do { | i |
+//                             SynthDef("diskIn" ++ i, { | out, amp = 1, bufnum, sustain, ar = 0, dr = 0.01 gate = 1 |
+//                                     Out.ar(out, DiskIn.ar(i, bufnum) 
+//                                     * Linen.kr(gate, ar, 1, dr, 2)
+//                                     * EnvGen.kr(Env.linen(ar, sustain - ar - dr max: 0 ,dr),1, doneAction: 2) * amp)
+//                             }).store
+//                     }
+//             };
+//     }
 
        info { | path |
                var flag = this.openRead;
<at> <at> -299,41 +299,53 <at> <at>
        }
 
        cue { | ev, playNow = false |
-               var server, packet;
+               var server, packet, defname = "diskIn" ++ numChannels, condition;
                ev = ev ? ();
                if (this.numFrames == 0) { this.info };
-               ev.use {
-                       ~instrument = ~instrument ??    {"diskIn" ++ numChannels };
-                       ev.synth;
-                       server = ~server ?? { Server.default};
-                       ~bufnum =  server.bufferAllocator.alloc(1);
-                       ~bufferSize = 0x10000;
-                       ~firstFrame = ~firstFrame ? 0;
-                       ~lastFrame = ~lastFrame ? numFrames;
-                       ~sustain = (~lastFrame - ~firstFrame)/(server.options.sampleRate ? 44100);
-                       ~close = { | ev |
-                                       server.bufferAllocator.free(ev[\bufnum]);
-                                       server.sendBundle(server.latency, ["/b_close", ev[\bufnum]], ["/b_free", ev[\bufnum] ]  )
+               fork {
+                       ev.use {
+                               server = ~server ?? { Server.default};
+                               if(~instrument.isNil) {
+                                       SynthDef(defname, { | out, amp = 1, bufnum, sustain, ar = 0, dr = 0.01 gate = 1 |
+                                               Out.ar(out, DiskIn.ar(numChannels, bufnum) 
+                                               * Linen.kr(gate, ar, 1, dr, 2)
+                                               * EnvGen.kr(Env.linen(ar, sustain - ar - dr max: 0 ,dr),1, doneAction: 2) * amp)
+                                       }).memStore;
+                                       ~instrument = defname;
+                                       condition = Condition.new;
+                                       server.sync(condition);
+                               };
+                               ev.synth;       // set up as a synth event (see Event)
+                               ~bufnum =  server.bufferAllocator.alloc(1);
+                               ~bufferSize = 0x10000;
+                               ~firstFrame = ~firstFrame ? 0;
+                               ~lastFrame = ~lastFrame ? numFrames;
+                               ~sustain = (~lastFrame - ~firstFrame)/(server.options.sampleRate ? 44100);
+                               ~close = { | ev |
+                                               server.bufferAllocator.free(ev[\bufnum]);
+                                               server.sendBundle(server.latency, ["/b_close", ev[\bufnum]],
+                                                       ["/b_free", ev[\bufnum] ]  )
+                               };
+                               ~setwatchers = { |ev|
+                                       OSCpathResponder(server.addr, ["/n_end", ev[\id][0]], 
+                                       { | time, resp, msg |
+                                               server.sendBundle(server.latency, ["/b_close", ev[\bufnum]], 
+                                               ["/b_read", ev[\bufnum], path, ev[\firstFrame], ev[\bufferSize], 0, 1]);
+                                               resp.remove;
+                                       } 
+                                       ).add;
+                               };
+                               if (playNow) {
+                                       packet = server.makeBundle(false, {ev.play})[0];    
+                                               // makeBundle creates an array of messages
+                                               // need one message, take the first
+                               } {
+                                       packet = [];
+                               };
+                               server.sendBundle(server.latency,["/b_alloc", ~bufnum, ~bufferSize, numChannels,
+                                                       ["/b_read", ~bufnum, path, ~firstFrame, ~bufferSize, 0, 1, packet]
+                                               ]);
                        };
-                       ~setwatchers = {
-                               OSCpathResponder(server.addr, ["/n_end", ~id[0]], 
-                               { | time, resp, msg |
-                                       server.sendBundle(server.latency, ["/b_close", ev[\bufnum]], 
-                                       ["/b_read", ev[\bufnum], path, ev[\firstFrame], ev[\bufferSize], 0, 1]);
-                                       resp.remove;
-                               } 
-                               ).add;
-                       };
-                       if (playNow) {
-                               packet = server.makeBundle(false, {ev.play})[0];    
-                                       // makeBundle creates an array of messages
-                                       // need one message, take the first
-                       } {
-                               packet = [];
-                       };
-                       server.sendBundle(server.latency,["/b_alloc", ~bufnum, ~bufferSize, numChannels,
-                                               ["/b_read", ~bufnum, path, ~firstFrame, ~bufferSize, 0, 1, packet]
-                                       ]);
                };
                ^ev;
        }



: H. James Harkins

: jamshark70-n2XjBy9Frl0FLkkUnhLBSV6hYfS7NtTn@public.gmane.org

: http://www.dewdrop-world.net

.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:


"Come said the Muse,

Sing me a song no poet has yet chanted,

Sing me the universal."  -- Whitman


Sciss | 3 Aug 2008 19:04
Picon
Gravatar

Help.gui browser

hi,

i want to commit some changes to the Help.gui browser:

- there is a swallowed character in the user extensions path, e.g. it  
appears as "ibrary" "Application Support "SuperCollider" etc.,  
instead of "Library" "Application Support" ...

- i have added a linkAction to JSCTextView that is going to be used  
to navigate through the help files (this is totally transparent with  
CocoaGUI, as in that case, the linkAction is not used and instead  
Document.open will open the new help as before)

- i have added two small "<" and ">" history buttons that allow you  
to go back and forth through the history of (J)SCTextView changes.  
this works both with CocoaGUI and SwingGUI

there is some more issues that i can't track down right now but that  
i will try to fix: the help files in the user extensions path  
currently do not open (at least on my system). Also they don't  
properly appear in the list. For example:

	UserExtensions -> Library -> Application Support -> BEQSuiteUGens ->  
BEQSuite

appears but clicking on it doesn't open the help file. also symbolic  
links to not work unfortunately, so i've got

	UserExtensions -> Library -> Application Support -> SwingOSC

but that has only one leave named "SwingOSC" instead of the help  
files themselves.

is o.k. to commit the above changes?

ciao, -sciss-


_______________________________________________
sc-dev mailing list

info (subscribe and unsubscribe): http://swiki.hfbk-hamburg.de:8888/MusicTechnology/880
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/

Scott Wilson | 4 Aug 2008 10:04
Picon
Picon

release error suppression Re: [sc-users] Annoying error message: FAILURE /set Object not found

Moving to dev...

I'm assuming this is a SwingOSC thing based on the message?

It reminded me however that the reason the scsynth error suppression  
messages came about originally was because people want to suppress  
node not found messages when calling release or free on nodes that had  
already been automatically freed.

So should we make Node:release and Node:free bundles and do this? Or  
have a flag in Node to turn this on or off?

S.

On 3 Aug 2008, at 17:54, Leo Auri wrote:

>
> Hi List,
>
> Is there a way of avoiding the post window getting filled up with  
> messages
> like this?
>
> FAILURE /set Object not found : 1014
>
> It happens, for example, after I plot something, then close the plot  
> window.
>
> Cheers
> -- 
> View this message in context: http://www.nabble.com/Annoying-error-message%3A-FAILURE--set-Object-not-found-tp18800274p18800274.html
> Sent from the Supercollider - User mailing list archive at Nabble.com.
>
>
> _______________________________________________
> sc-users mailing list
>
> info (subscribe and unsubscribe): http://swiki.hfbk-hamburg.de:8888/MusicTechnology/880
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/

_______________________________________________
sc-dev mailing list

info (subscribe and unsubscribe): http://swiki.hfbk-hamburg.de:8888/MusicTechnology/880
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/

thor | 4 Aug 2008 11:18
Picon

Re: Pen primitives additions


Hi all

I've started using Charles' Pen primitive additions in my own  
instruments and tools
and they are really great. It is amazing what a simple shadow (for  
example) can do
for the interface design, resulting in better usability-design.

I'm wondering if I could commit his additions today?

thor

_______________________________________________
sc-dev mailing list

info (subscribe and unsubscribe): http://swiki.hfbk-hamburg.de:8888/MusicTechnology/880
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/

LFSaw | 4 Aug 2008 11:28
Picon
Favicon
Gravatar

Re: Help.gui browser

I would love to see them :-)

Till

On 03.08.2008, at 19:04, Sciss wrote:

> hi,
>
> i want to commit some changes to the Help.gui browser:
>
> - there is a swallowed character in the user extensions path, e.g.  
> it appears as "ibrary" "Application Support "SuperCollider" etc.,  
> instead of "Library" "Application Support" ...
>
> - i have added a linkAction to JSCTextView that is going to be used  
> to navigate through the help files (this is totally transparent with  
> CocoaGUI, as in that case, the linkAction is not used and instead  
> Document.open will open the new help as before)
>
> - i have added two small "<" and ">" history buttons that allow you  
> to go back and forth through the history of (J)SCTextView changes.  
> this works both with CocoaGUI and SwingGUI
>
> there is some more issues that i can't track down right now but that  
> i will try to fix: the help files in the user extensions path  
> currently do not open (at least on my system). Also they don't  
> properly appear in the list. For example:
>
> 	UserExtensions -> Library -> Application Support -> BEQSuiteUGens - 
> > BEQSuite
>
> appears but clicking on it doesn't open the help file. also symbolic  
> links to not work unfortunately, so i've got
>
> 	UserExtensions -> Library -> Application Support -> SwingOSC

That's really a problem, symlinks are the only links that work for  
compilation stuff (classes and class structures, on OSX), whereas  
documentational stuff require these nifty aliases (on OSX). But AFAIK  
this problem does not originate in the help file browser.

>
>
> but that has only one leave named "SwingOSC" instead of the help  
> files themselves.
>
> is o.k. to commit the above changes?
>
> ciao, -sciss-
>
>
>
> _______________________________________________
> sc-dev mailing list
>
> info (subscribe and unsubscribe): http://swiki.hfbk-hamburg.de:8888/MusicTechnology/880
> archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
> search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/

_______________________________________________
sc-dev mailing list

info (subscribe and unsubscribe): http://swiki.hfbk-hamburg.de:8888/MusicTechnology/880
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/

Sciss | 4 Aug 2008 11:41
Picon
Gravatar

Re: Help.gui browser

ok, i will commit (it should not break anything, just fixes the  
mentioned issues). the problem i had with my swingOSC help was a  
recursive alias, after i removed it and made a proper symlink, it  
worked.

ciao, -sciss-


Am 04.08.2008 um 11:28 schrieb LFSaw:

> I would love to see them :-)
>
> Till
>
> On 03.08.2008, at 19:04, Sciss wrote:
>
>> hi,
>>
>> i want to commit some changes to the Help.gui browser:
>>
>> - there is a swallowed character in the user extensions path, e.g.  
>> it appears as "ibrary" "Application Support "SuperCollider" etc.,  
>> instead of "Library" "Application Support" ...
>>
>> - i have added a linkAction to JSCTextView that is going to be  
>> used to navigate through the help files (this is totally  
>> transparent with CocoaGUI, as in that case, the linkAction is not  
>> used and instead Document.open will open the new help as before)
>>
>> - i have added two small "<" and ">" history buttons that allow  
>> you to go back and forth through the history of (J)SCTextView  
>> changes. this works both with CocoaGUI and SwingGUI
>>
>> there is some more issues that i can't track down right now but  
>> that i will try to fix: the help files in the user extensions path  
>> currently do not open (at least on my system). Also they don't  
>> properly appear in the list. For example:
>>
>> 	UserExtensions -> Library -> Application Support -> BEQSuiteUGens  
>> -> BEQSuite
>>
>> appears but clicking on it doesn't open the help file. also  
>> symbolic links to not work unfortunately, so i've got
>>
>> 	UserExtensions -> Library -> Application Support -> SwingOSC
>
> That's really a problem, symlinks are the only links that work for  
> compilation stuff (classes and class structures, on OSX), whereas  
> documentational stuff require these nifty aliases (on OSX). But  
> AFAIK this problem does not originate in the help file browser.
>
>>
>>
>> but that has only one leave named "SwingOSC" instead of the help  
>> files themselves.
>>
>> is o.k. to commit the above changes?
>>
>> ciao, -sciss-
>>
>>
>>
>> _______________________________________________
>> sc-dev mailing list
>>
>> info (subscribe and unsubscribe): http://swiki.hfbk-hamburg.de: 
>> 8888/MusicTechnology/880
>> archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
>> search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/
>
>
> _______________________________________________
> sc-dev mailing list
>
> info (subscribe and unsubscribe): http://swiki.hfbk-hamburg.de:8888/ 
> MusicTechnology/880
> archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
> search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/

_______________________________________________
sc-dev mailing list

info (subscribe and unsubscribe): http://swiki.hfbk-hamburg.de:8888/MusicTechnology/880
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/

sciss | 4 Aug 2008 11:57
Picon

SF.net SVN: supercollider:[7707] trunk/build/SCClassLibrary/Common/Files/ Help.sc

Revision: 7707
          http://supercollider.svn.sourceforge.net/supercollider/?rev=7707&view=rev
Author:   sciss
Date:     2008-08-04 09:57:05 +0000 (Mon, 04 Aug 2008)

Log Message:
-----------
Help.gui browser: fixes problems with user extensions dir and 5-column directories. adds history
backward/forward buttons. Uses JSCTextView's linkAction (if present) to follow links in the HTML
document (does not affect CocoaGUI behaviour).

Modified Paths:
--------------
    trunk/build/SCClassLibrary/Common/Files/Help.sc

Modified: trunk/build/SCClassLibrary/Common/Files/Help.sc
===================================================================
--- trunk/build/SCClassLibrary/Common/Files/Help.sc	2008-07-28 15:41:58 UTC (rev 7706)
+++ trunk/build/SCClassLibrary/Common/Files/Help.sc	2008-08-04 09:57:05 UTC (rev 7707)
 <at>  <at>  -85,7 +85,7  <at>  <at> 

 		helpRootLen = (helppath.standardizePath).size + 1;
 		subfileslist.keysValuesDo({ |classsym, path|
-					
+
 			if ( helppath == Platform.helpDir,
 				{
 					subc = path[helpRootLen..].split($/);
 <at>  <at>  -100,7 +100,7  <at>  <at> 
 						});
 					if ( helppath == Platform.userExtensionDir,
 						{
-							helpRootLen = "~/".absolutePath.size + 1;
+							helpRootLen = "~/".absolutePath.size; // + 1;
 							subc = path[helpRootLen..].split($/);
 							subc = [ "UserExtensions" ] ++ subc;
 							// check for common superfluous names that may confuse the categorisation;
 <at>  <at>  -185,16 +185,16  <at>  <at> 

 
 *gui { |sysext=true,userext=true|
-	var classes, win, lists, listviews, numcols=5, selecteditem, node, newlist, curkey, selectednodes,
scrollView, compView, textView, buttonView, classButt, browseButt, isClass;
+	var classes, win, lists, listviews, numcols=5, selecteditem, node, newlist, curkey, selectednodes,
scrollView, compView, textView, /* buttonView, */ classButt, browseButt, bwdButt, fwdButt, isClass,
history = [], historyIdx = 0, fBwdFwd, fHistoryDo, fHistoryMove;
 	
 	// Call to ensure the tree has been built
 	this.tree( sysext, userext );
 	
 	// Now for a GUI
-	win = GUI.window.new("Help browser", Rect(128, 264, 1040, 560)); // SCWindow
-	scrollView = GUI.scrollView.new(win, Rect(5, 0, 405, 525)).hasBorder_(true);
-	compView = GUI.compositeView.new(scrollView, Rect(0, 0, numcols * 200, 480));
-	textView = GUI.textView.new(win, Rect(415, 0, 620, 550))
+	win = GUI.window.new("Help browser", Rect(128, 264, 1040, 564)); // SCWindow
+	scrollView = GUI.scrollView.new(win, Rect(5, 0, 405, 529)).hasBorder_(true);
+	compView = GUI.compositeView.new(scrollView, Rect(0, 0, numcols * 200, 504));
+	textView = GUI.textView.new(win, Rect(415, 0, 620, 554))
 		.hasVerticalScroller_(true)
 		.hasHorizontalScroller_(true)
 		.autohidesScrollers_(false)
 <at>  <at>  -203,6 +203,49  <at>  <at> 
 		
 	textView.bounds = textView.bounds; // hack to fix origin on first load
 	
+	// updates the history arrow buttons
+	fBwdFwd = {
+		bwdButt.enabled = historyIdx > 0;
+		fwdButt.enabled = historyIdx < (history.size -	1);
+	};
+	
+	// cuts the redo history, adds and performs a new text open action
+	fHistoryDo = { arg selector, argum;
+		history		= history.copyFromStart( historyIdx ).add([ selector, argum ]);
+		historyIdx	= history.size - 1;
+		textView.perform( selector, argum );
+		fBwdFwd.value;
+	};
+	
+	// moves relatively in the history, and performs text open action
+	fHistoryMove = { arg incr; var entry;
+		historyIdx	= historyIdx + incr;
+		entry		= history[ historyIdx ];
+		textView.perform( entry[ 0 ], entry[ 1 ]);
+		fBwdFwd.value;
+	};
+	
+	// SCTextView will open a new Document when clicking on a link.
+	// JSCTextView instead will fire a linkAction that is used here
+	// to follow the link.
+	if( textView.respondsTo( \linkAction ), {
+		textView
+			.editable_( false )
+			.canFocus_( true )
+			.linkAction_({ arg view, state, url, descr; var path;
+				if( state === \activated, {
+					if( url.notEmpty, {
+						fHistoryDo.value( \openURL, url );
+					}, {\xCAif( descr.beginsWith( "SC://" ), {
+						path = fileslist.at( descr.copyToEnd( 5 ).asSymbol );
+						if( path.notNil, {
+							fHistoryDo.value( \open, path );
+						});
+					})});
+				});
+			});
+	});
+	
 	lists = Array.newClear(numcols);
 	lists[0] = tree.keys(Array).collect(_.asString).sort;
 	selectednodes = Array.newClear(numcols);
 <at>  <at>  -216,48 +259,56  <at>  <at> 
 		});
 		view
 		.resize_(4)
-		.action_({ |lv|
+		.action_({ arg lv; var lv2;
 			if( lv.value.notNil, {
 				// We've clicked on a category or on a class
+						
 				if(lv.items.size != 0, { 
+					lv2 = if( index < (listviews.size - 1), {\xCAlistviews[ index + 1 ]});
+					
 					selecteditem = lists[index][lv.value];
-					if(listviews[index+1].isNil.not, {
+					if( lv2.notNil, {
 						// Clear the GUI for the subsequent panels
 						listviews[index+1..].do({ arg lv; lv.items=#[];
 							if( lv.respondsTo( \allowsDeselection ), { lv.value = nil })});
+					});
+
+					// Get the current node, from the parent node
+					node = try { if(index==0, tree, {selectednodes[index-1]})[selecteditem] };
+					curkey = selecteditem;
+					selectednodes[index] = node;
+					
+					if(node.isNil, {
+						// We have a "leaf" (class or helpdoc), since no keys found
 						
-						// Get the current node, from the parent node
-						node = if(index==0, tree, {selectednodes[index-1]})[selecteditem];
-						curkey = selecteditem;
-						selectednodes[index] = node;
+						if( (index + 1 < lists.size), { lists[index+1] = #[] });
+
+						{
+							fHistoryDo.value( \open, fileslist.at( selecteditem.asSymbol ) ? fileslist.at( \Help ));
+						}.defer( 0.001 );
+						isClass = selecteditem.asSymbol.asClass.notNil;							classButt.enabled_(isClass);
+						browseButt.enabled_(isClass);
+						// The "selectednodes" entry for the leaf, is the path to the helpfile (or "")
+						selectednodes[index] = try { if(index==0, {tree}, {selectednodes[index-1]})
+									[curkey.asSymbol.asClass ? curkey.asSymbol]};
 						
-						if(node.isNil, {
-							// We have a "leaf" (class or helpdoc), since no keys found
-							
-							lists[index+1] = #[];
-
-							{textView.open(fileslist.at( selecteditem.asSymbol) ? fileslist.at(\Help))}.defer(0.001);
-							isClass = selecteditem.asSymbol.asClass.notNil;							classButt.enabled_(isClass);
-							browseButt.enabled_(isClass);
-							// The "selectednodes" entry for the leaf, is the path to the helpfile (or "")
-							selectednodes[index] = if(index==0, {tree}, {selectednodes[index-1]})
-										[curkey.asSymbol.asClass ? curkey.asSymbol];
-							
-							
-						}, {
-							// We have a category on our hands
-							lists[index+1] = node.keys(Array).collect(_.asString).sort({|a,b| 
-								a[0]==$[ || (b[0]!=$[ && (a <= b))
-								});
-							listviews[index+1].items = lists[index+1];
-							
+						
+					}, {
+						// We have a category on our hands
+						if( lv2.notNil, {
+							lists[ index + 1 ] = node.keys(Array).collect(_.asString).sort({|a,b| 
+								a[0]==$[ /* ] */ || (b[0]!=$[ /* ] */ && (a <= b))
+							});
+							lv2.items = lists[index+1];
 						});
 						
-						listviews[index+1].value = 1;
-						listviews[index+1].valueAction_(0);
-						
-						selectednodes[index+2 ..] = nil; // Clear out the now-unselected
 					});
+					
+					if( (index + 1) < listviews.size, {
+						listviews[index+1].value = if( listviews[index+1].respondsTo( \allowsDeselection ).not, 1 );
+						listviews[index+1].valueAction_( 0 );
+					});
+					selectednodes[index+2 ..] = nil; // Clear out the now-unselected
 				});
 			});
 		});
 <at>  <at>  -268,12 +319,21  <at>  <at> 
 	// Add keyboard navigation between columns
 	listviews.do({ |lv, index| // SCView
 		lv.keyDownAction_({|view,char,modifiers,unicode,keycode|
-			var nowFocused;
+			var nowFocused, lv2;
 			nowFocused = lv;
-			switch(unicode, 
-			63234, { if(index != 0, { listviews[index-1].focus; nowFocused =listviews[index-1] }) }, 
-			63235, { if(index != (listviews.size-1) and:{listviews[index+1].items.notNil}, 
-							{ try{ listviews[index+1].value_(-1).valueAction_(0).focus; nowFocused
=listviews[index+1] } }) },
+			switch(unicode,
+			// cursor left
+			63234, { if(index > 0, { lv2 = listviews[ index - 1 ]; lv2.focus; nowFocused = lv2 })
+			}, 
+			// cursor right
+			63235, { if( index < (listviews.size - 1) and: { listviews[ index + 1 ].items.notNil }, {
+						lv2 = listviews[ index + 1 ];
+						try {
+							lv2.value_( if( lv2.respondsTo( \allowsDeselection ).not, - 1 )).valueAction_( 0 ).focus;
+							nowFocused = lv2;
+						}
+				   })
+			},
 			13, { // Hit RETURN to open source or helpfile
 				// The class name, or helpfile name we're after

 <at>  <at>  -296,31 +356,46  <at>  <at> 
 				scrollView.visibleOrigin_(Point(lv.bounds.left - 5, 0));
 			});	
 			if(clickCount == 2, {	
-				if(lv.value.notNil and: {if(index==0, tree,
{selectednodes[index-1]})[lists[index][lv.value]].isNil}, {
+				if(lv.value.notNil and: { try { if(index==0, tree,
{selectednodes[index-1]})[lists[index][lv.value]] }.isNil}, {
 					{ selecteditem.openHelpFile }.defer;
 				});
 			});
 		});
 	});
 	
-	buttonView = GUI.hLayoutView.new(win, Rect(5, 530, 405, 20));
-	GUI.button.new(buttonView, Rect(0,0,125, 20))
+//	buttonView = GUI.hLayoutView.new(win, Rect(5, 530, 405, 20));
+	GUI.button.new( win, Rect( 5, 534, 110, 20 ))
 		.states_([["Open Help File", Color.black, Color.clear]])
 		.action_({{ selecteditem.openHelpFile }.defer;});
-	classButt = GUI.button.new(buttonView, Rect(0,0,125, 20))
+	classButt = GUI.button.new( win, Rect( 119, 534, 110, 20 ))
 		.states_([["Open Class File", Color.black, Color.clear]])
 		.action_({ 
 			if(selecteditem.asSymbol.asClass.notNil, {
 				{selecteditem.asSymbol.asClass.openCodeFile }.defer;
 			});
 		});
-	browseButt = GUI.button.new(buttonView, Rect(0,0,125, 20))
+	browseButt = GUI.button.new( win, Rect( 233, 534, 110, 20 ))
 		.states_([["Browse Class", Color.black, Color.clear]])
 		.action_({ 
 			if(selecteditem.asSymbol.asClass.notNil, {
 				{selecteditem.asSymbol.asClass.browse }.defer;
 			});
 		});
+	bwdButt = GUI.button.new( win, Rect( 347, 534, 30, 20 ))
+		.states_([[ "<" ]])
+		.action_({
+			if( historyIdx > 0, {
+				fHistoryMove.value( -1 );
+			});
+		});
+	fwdButt = GUI.button.new( win, Rect( 380, 534, 30, 20 ))
+		.states_([[ ">" ]])
+		.action_({
+			if( historyIdx < (history.size - 1), {
+				fHistoryMove.value( 1 );
+			});
+		});
+	fBwdFwd.value;
 	
 	win.front;
 	listviews[0].focus;

This was sent by the SourceForge.net collaborative development platform, the world's largest Open
Source development site.

_______________________________________________
sc-dev mailing list

info (subscribe and unsubscribe): http://swiki.hfbk-hamburg.de:8888/MusicTechnology/880
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/

sciss | 4 Aug 2008 12:00
Picon

SF.net SVN: supercollider:[7708] trunk/build/SCClassLibrary/Common/Files/ Help.sc

Revision: 7708
          http://supercollider.svn.sourceforge.net/supercollider/?rev=7708&view=rev
Author:   sciss
Date:     2008-08-04 10:00:25 +0000 (Mon, 04 Aug 2008)

Log Message:
-----------
(removing ugly non-breaking white spaces)

Modified Paths:
--------------
    trunk/build/SCClassLibrary/Common/Files/Help.sc

Modified: trunk/build/SCClassLibrary/Common/Files/Help.sc
===================================================================
--- trunk/build/SCClassLibrary/Common/Files/Help.sc	2008-08-04 09:57:05 UTC (rev 7707)
+++ trunk/build/SCClassLibrary/Common/Files/Help.sc	2008-08-04 10:00:25 UTC (rev 7708)
 <at>  <at>  -236,7 +236,7  <at>  <at> 
 				if( state === \activated, {
 					if( url.notEmpty, {
 						fHistoryDo.value( \openURL, url );
-					}, {\xCAif( descr.beginsWith( "SC://" ), {
+					}, { if( descr.beginsWith( "SC://" ), {
 						path = fileslist.at( descr.copyToEnd( 5 ).asSymbol );
 						if( path.notNil, {
 							fHistoryDo.value( \open, path );
 <at>  <at>  -264,7 +264,7  <at>  <at> 
 				// We've clicked on a category or on a class
 						
 				if(lv.items.size != 0, { 
-					lv2 = if( index < (listviews.size - 1), {\xCAlistviews[ index + 1 ]});
+					lv2 = if( index < (listviews.size - 1), { listviews[ index + 1 ]});
 					
 					selecteditem = lists[index][lv.value];
 					if( lv2.notNil, {

This was sent by the SourceForge.net collaborative development platform, the world's largest Open
Source development site.

_______________________________________________
sc-dev mailing list

info (subscribe and unsubscribe): http://swiki.hfbk-hamburg.de:8888/MusicTechnology/880
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/

Scott Wilson | 4 Aug 2008 12:23
Picon
Picon

Re: Help.gui browser


On 4 Aug 2008, at 10:28, LFSaw wrote:

> I would love to see them :-)
>
> Till
>
> On 03.08.2008, at 19:04, Sciss wrote:
>
>> hi,
>>
>> i want to commit some changes to the Help.gui browser:
>>
>> - there is a swallowed character in the user extensions path, e.g.  
>> it appears as "ibrary" "Application Support "SuperCollider" etc.,  
>> instead of "Library" "Application Support" ...
>>
>> - i have added a linkAction to JSCTextView that is going to be used  
>> to navigate through the help files (this is totally transparent  
>> with CocoaGUI, as in that case, the linkAction is not used and  
>> instead Document.open will open the new help as before)
>>
>> - i have added two small "<" and ">" history buttons that allow you  
>> to go back and forth through the history of (J)SCTextView changes.  
>> this works both with CocoaGUI and SwingGUI
>>
>> there is some more issues that i can't track down right now but  
>> that i will try to fix: the help files in the user extensions path  
>> currently do not open (at least on my system). Also they don't  
>> properly appear in the list. For example:
>>
>> 	UserExtensions -> Library -> Application Support -> BEQSuiteUGens - 
>> > BEQSuite
>>
>> appears but clicking on it doesn't open the help file. also  
>> symbolic links to not work unfortunately, so i've got
>>
>> 	UserExtensions -> Library -> Application Support -> SwingOSC
>
> That's really a problem, symlinks are the only links that work for  
> compilation stuff (classes and class structures, on OSX), whereas  
> documentational stuff require these nifty aliases (on OSX). But  
> AFAIK this problem does not originate in the help file browser.

Symlinks do work AFAIK. I just tested it and seems to be fine. Is  
there a particular case you have a problem with?

I believe it would be a bit of a pain to get Mac aliases working for  
classes, etc., as believe they're not generally supported in the Unix  
layer.

S.

_______________________________________________
sc-dev mailing list

info (subscribe and unsubscribe): http://swiki.hfbk-hamburg.de:8888/MusicTechnology/880
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/


Gmane