Skip to content

Commit

Permalink
Merge pull request supercollider#2373 from jamshark70/topic/hjhHelpUp…
Browse files Browse the repository at this point in the history
…dates

Help updates: String regexp, Quarks.addFolder
  • Loading branch information
gusano authored Oct 4, 2016
2 parents f5d8917 + c9549f1 commit 2159d02
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions HelpSource/Classes/Quarks.schelp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ ARGUMENT:: path
In addition to the default downloaded-quarks
add folders that contain quarks to offer on the menu for installation.
These may be private quarks, cloned working copies or folders where you have manually downloaded quarks.
NOTE:: The argument should be a path to a directory emphasis::containing quark directories::. It should emphasis::not:: be an isolated quark directory by itself. Users are discouraged from scattering quark directories in isolated locations. ::
returns:: this

METHOD:: all
Expand Down
12 changes: 12 additions & 0 deletions HelpSource/Classes/String.schelp
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,20 @@ code::

subsection:: Regular expressions

Note the inversion of the arguments:

List::
## Code::regexp.matchRegexp(stringToSearch)::
## Code::stringToSearch.findRegexp(regexp):: (and similar for code::findAllRegexp:: and code::findRegexpAt::).
::

Code::findRegexp:: follows the pattern established by link::Classes/String#-find::, where the receiver is the string to be searched. Code::matchRegexp:: follows the pattern of link::Reference/matchItem::, where the receiver is the pattern to match and the first argument is the object to be tested. This is a common source of confusion, but it is based on this precedent.

method::matchRegexp
POSIX regular expression matching. Returns true if the receiver (a regular expression pattern) matches the string passed to it. The strong::start:: is an offset where to start searching in the string (default: 0), strong::end:: where to stop.

note::This is code::regexp.matchRegexp(stringToSearch):: and not the other way around! See above: link::Classes/String#Regular expressions::.::

code::
"c".matchRegexp("abcdefg", 2, 5); // true: substring exists
"c".matchRegexp("abcdefg", 4, 5); // false: substring doesn't exist
Expand Down
2 changes: 2 additions & 0 deletions HelpSource/Guides/UsingQuarks.schelp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ Quarks.addFolder("~/supercollider/quarks");

Now each quark inside that folder will appear on the GUI for you to un/install.

If you wish to be able to uninstall local quarks, but still see them in the GUI, it is highly recommended to collect your local quark directories under a single master directory. Then, use link::Classes/Quarks#*addFolder:: to add the master directory. code::addFolder:: does not add individual quark directories.

subsection::Recompile the class library

After installing or uninstalling you need to strong::Language > Recompile Class Library::
Expand Down

0 comments on commit 2159d02

Please sign in to comment.