[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sc-dev] [commit] wiki functionality extended
in order to make it possible to have local wiki links, I've changed
the primitive:
prTextWindow_SelectUnderlinedText
to include parentheses just as it does with square brackets.
// include square brackets in selection
start = underlineRange.location - 1;
end = underlineRange.location + underlineRange.length;
if (start >= 0 && [string characterAtIndex:
start] == '['
&& end < (int)limitRange.length &&
[string characterAtIndex: end] == ']') {
underlineRange.location --;
underlineRange.length += 2;
}
// include parentheses in selection
if (start >= 0 && [string characterAtIndex:
start] == '('
&& end < (int)limitRange.length &&
[string characterAtIndex: end] == ')') {
underlineRange.location --;
underlineRange.length += 2;
}
/////////////////////////////////////////////////////////////
I've added the possibility to create wiki page links within any
current directory, so that it can be used to link documents locally
without having to add them to the global wiki. This is useful e.g.
for tutorials that do not need to be placed in the Help folder to
work.
a wiki word in parentheses (instead of square brackets) links only in
the directory of the current document. You'll need to recompile
sclang (or wait for a build from wesleyan), because there is a small
change in a primitive.
//////////////////GLOBAL//////////////////////////////////////////////
// open helpfile as usual:
[Function] [SinOsc] [Class]
// create new page in wiki as usual:
newPage
// create new page in a new subdirectory in wiki as usual (doubleclick):
subdir/newPage
//////////////////LOCAL//////////////////////////////////////////////
// create new LOCAL page, in the directory of this document here
(newPage)
// run the script in the local directory:
(*runMe)
// look somethig up in a local subdirectory:
(dir/page)
// create a new page in a local subdirectory:
(dir/page2)
// run the script in the local subdirectory:
(*dir/runMe2)
// create a page in a new subdirectory (doubleclick):
(dir2/myPage)
--
.