Opening help docs with SCTextView

View: New views
10 Messages — Rating Filter:   Alert me  

Opening help docs with SCTextView

by Michael G. Cox :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I just noticed that cmd-d on a string in TextView
opens up the default Help.help 
presumably because the main App hijacks 
all cmd keystrokes.

Would it be a good idea to add a default keyDownAction
to SCTextView like:

(
w = Window.new.front;
t = TextView(w.asView,Rect(10,10, 380,200))
.focus(true)
.string_("SinOsc");
t.keyDownAction = {arg view, char, mod, uni, key;
if (mod == 393475 && uni== 4) {view.string.openHelpFile}
}
)
so that ctl-shift-d will open the help doc of the selected string?

This is mostly with regard to using the Help browser which I dig
except for this missing feature.

Would this be too difficult when accounting for different keyboards/OSs?

I can add it easily enough on my own system, 
but it seems like it might be of value to everyone.

Thanks,

-mgc



Re: Opening help docs with SCTextView

by Scott Wilson-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 21 Apr 2009, at 04:25, Michael Cox wrote:


I just noticed that cmd-d on a string in TextView
opens up the default Help.help 
presumably because the main App hijacks 
all cmd keystrokes.

Nope, at least it shouldn't. It only opens main help if it can't find a file named after the string. The Help browser uses a TextView in fact. This is true for Cocoa at least. Probably should be done for Swing as well on OSX in the browser.

Crossplatform/editor would be a little tricky to account for...

S.



Would it be a good idea to add a default keyDownAction
to SCTextView like:

(
w = Window.new.front;
t = TextView(w.asView,Rect(10,10, 380,200))
.focus(true)
.string_("SinOsc");
t.keyDownAction = {arg view, char, mod, uni, key;
if (mod == 393475 && uni== 4) {view.string.openHelpFile}
}
)
so that ctl-shift-d will open the help doc of the selected string?

This is mostly with regard to using the Help browser which I dig
except for this missing feature.

Would this be too difficult when accounting for different keyboards/OSs?

I can add it easily enough on my own system, 
but it seems like it might be of value to everyone.

Thanks,

-mgc




Re: Opening help docs with SCTextView

by Michael G. Cox :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hmm,

I'm using Cocoa, and cmd-d on SinOsc in the Help browser brings up Help.html.
Cmd-j works fine. 
Weird. Ill try updating. 

mgc

On Apr 21, 2009, at 2:31 AM, Scott Wilson wrote:


On 21 Apr 2009, at 04:25, Michael Cox wrote:


I just noticed that cmd-d on a string in TextView
opens up the default Help.help 
presumably because the main App hijacks 
all cmd keystrokes.

Nope, at least it shouldn't. It only opens main help if it can't find a file named after the string. The Help browser uses a TextView in fact. This is true for Cocoa at least. Probably should be done for Swing as well on OSX in the browser.

Crossplatform/editor would be a little tricky to account for...

S.



Would it be a good idea to add a default keyDownAction
to SCTextView like:

(
w = Window.new.front;
t = TextView(w.asView,Rect(10,10, 380,200))
.focus(true)
.string_("SinOsc");
t.keyDownAction = {arg view, char, mod, uni, key;
if (mod == 393475 && uni== 4) {view.string.openHelpFile}
}
)
so that ctl-shift-d will open the help doc of the selected string?

This is mostly with regard to using the Help browser which I dig
except for this missing feature.

Would this be too difficult when accounting for different keyboards/OSs?

I can add it easily enough on my own system, 
but it seems like it might be of value to everyone.

Thanks,

-mgc





Re: Opening help docs with SCTextView

by Michael G. Cox :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just tried it on another machine with v.3.3RC
and the same problem occurs.
Cmd-d on any class in the Help browser brings up the main help.

-mgc

On Tue, Apr 21, 2009 at 3:51 AM, Michael Cox <michael.gardner.cox@...> wrote:
hmm,

I'm using Cocoa, and cmd-d on SinOsc in the Help browser brings up Help.html.
Cmd-j works fine. 
Weird. Ill try updating. 

mgc

On Apr 21, 2009, at 2:31 AM, Scott Wilson wrote:


On 21 Apr 2009, at 04:25, Michael Cox wrote:


I just noticed that cmd-d on a string in TextView
opens up the default Help.help 
presumably because the main App hijacks 
all cmd keystrokes.

Nope, at least it shouldn't. It only opens main help if it can't find a file named after the string. The Help browser uses a TextView in fact. This is true for Cocoa at least. Probably should be done for Swing as well on OSX in the browser.

Crossplatform/editor would be a little tricky to account for...

S.



Would it be a good idea to add a default keyDownAction
to SCTextView like:

(
w = Window.new.front;
t = TextView(w.asView,Rect(10,10, 380,200))
.focus(true)
.string_("SinOsc");
t.keyDownAction = {arg view, char, mod, uni, key;
if (mod == 393475 && uni== 4) {view.string.openHelpFile}
}
)
so that ctl-shift-d will open the help doc of the selected string?

This is mostly with regard to using the Help browser which I dig
except for this missing feature.

Would this be too difficult when accounting for different keyboards/OSs?

I can add it easily enough on my own system, 
but it seems like it might be of value to everyone.

Thanks,

-mgc






Re: Opening help docs with SCTextView

by Dan Stowell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Doesn't happen for me - Cmd-D on the text "SinOsc" in the text window
of the help gui brings up the SinOsc helpfile. I'm on ppc, OSX
10.4.11. What os are you on?

Dan

2009/4/22, michael cox <michael.gardner.cox@...>:

> Just tried it on another machine with v.3.3RC
> and the same problem occurs.
> Cmd-d on any class in the Help browser brings up the main help.
>
> -mgc
>
>
> On Tue, Apr 21, 2009 at 3:51 AM, Michael Cox
> <michael.gardner.cox@...> wrote:
>
> >
> > hmm,
> >
> >
> > I'm using Cocoa, and cmd-d on SinOsc in the Help browser brings up
> Help.html.
> > Cmd-j works fine.
> > Weird. Ill try updating.
> >
> >
> > mgc
> >
> >
> >
> >
> >
> >
> >
> > On Apr 21, 2009, at 2:31 AM, Scott Wilson wrote:
> >
> >
> >
> >
> >
> > On 21 Apr 2009, at 04:25, Michael Cox wrote:
> >
> >
> >
> >
> > I just noticed that cmd-d on a string in TextView
> > opens up the default Help.help
> > presumably because the main App hijacks
> > all cmd keystrokes.
> >
> > Nope, at least it shouldn't. It only opens main help if it can't find a
> file named after the string. The Help browser uses a TextView in fact. This
> is true for Cocoa at least. Probably should be done for Swing as well on OSX
> in the browser.
> >
> >
> > Crossplatform/editor would be a little tricky to account for...
> >
> >
> > S.
> >
> >
> >
> >
> >
> >
> >
> >
> > Would it be a good idea to add a default keyDownAction
> > to SCTextView like:
> >
> >
> >
> >
> > (
> > w = Window.new.front;
> > t = TextView(w.asView,Rect(10,10, 380,200))
> > .focus(true)
> > .string_("SinOsc");
> > t.keyDownAction = {arg view, char, mod, uni, key;
> > if (mod == 393475 && uni== 4) {view.string.openHelpFile}
> > }
> > )
> > so that ctl-shift-d will open the help doc of the selected string?
> >
> >
> > This is mostly with regard to using the Help browser which I dig
> > except for this missing feature.
> >
> >
> > Would this be too difficult when accounting for different keyboards/OSs?
> >
> >
> > I can add it easily enough on my own system,
> > but it seems like it might be of value to everyone.
> >
> >
> > Thanks,
> >
> >
> > -mgc
> >
> >
> >
> >
> >
> >
>
>


--
http://www.mcld.co.uk

_______________________________________________
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/

Re: Opening help docs with SCTextView

by Michael G. Cox :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OSX 10.5.4,
intel

Is anyone else having this same problem?

mgc


On Tue, Apr 21, 2009 at 11:21 PM, Dan Stowell <danstowell@...> wrote:
Doesn't happen for me - Cmd-D on the text "SinOsc" in the text window
of the help gui brings up the SinOsc helpfile. I'm on ppc, OSX
10.4.11. What os are you on?

Dan

2009/4/22, michael cox <michael.gardner.cox@...>:
> Just tried it on another machine with v.3.3RC
> and the same problem occurs.
> Cmd-d on any class in the Help browser brings up the main help.
>
> -mgc
>
>
> On Tue, Apr 21, 2009 at 3:51 AM, Michael Cox
> <michael.gardner.cox@...> wrote:
>
> >
> > hmm,
> >
> >
> > I'm using Cocoa, and cmd-d on SinOsc in the Help browser brings up
> Help.html.
> > Cmd-j works fine.
> > Weird. Ill try updating.
> >
> >
> > mgc
> >
> >
> >
> >
> >
> >
> >
> > On Apr 21, 2009, at 2:31 AM, Scott Wilson wrote:
> >
> >
> >
> >
> >
> > On 21 Apr 2009, at 04:25, Michael Cox wrote:
> >
> >
> >
> >
> > I just noticed that cmd-d on a string in TextView
> > opens up the default Help.help
> > presumably because the main App hijacks
> > all cmd keystrokes.
> >
> > Nope, at least it shouldn't. It only opens main help if it can't find a
> file named after the string. The Help browser uses a TextView in fact. This
> is true for Cocoa at least. Probably should be done for Swing as well on OSX
> in the browser.
> >
> >
> > Crossplatform/editor would be a little tricky to account for...
> >
> >
> > S.
> >
> >
> >
> >
> >
> >
> >
> >
> > Would it be a good idea to add a default keyDownAction
> > to SCTextView like:
> >
> >
> >
> >
> > (
> > w = Window.new.front;
> > t = TextView(w.asView,Rect(10,10, 380,200))
> > .focus(true)
> > .string_("SinOsc");
> > t.keyDownAction = {arg view, char, mod, uni, key;
> > if (mod == 393475 && uni== 4) {view.string.openHelpFile}
> > }
> > )
> > so that ctl-shift-d will open the help doc of the selected string?
> >
> >
> > This is mostly with regard to using the Help browser which I dig
> > except for this missing feature.
> >
> >
> > Would this be too difficult when accounting for different keyboards/OSs?
> >
> >
> > I can add it easily enough on my own system,
> > but it seems like it might be of value to everyone.
> >
> >
> > Thanks,
> >
> >
> > -mgc
> >
> >
> >
> >
> >
> >
>
>


--
http://www.mcld.co.uk

_______________________________________________
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/


Re: Opening help docs with SCTextView

by Scott Wilson-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

But it does work in a normal document?

On 22 Apr 2009, at 01:23, michael cox wrote:

Just tried it on another machine with v.3.3RC
and the same problem occurs.
Cmd-d on any class in the Help browser brings up the main help.

-mgc

On Tue, Apr 21, 2009 at 3:51 AM, Michael Cox <michael.gardner.cox@...> wrote:
hmm,

I'm using Cocoa, and cmd-d on SinOsc in the Help browser brings up Help.html.
Cmd-j works fine. 
Weird. Ill try updating. 

mgc

On Apr 21, 2009, at 2:31 AM, Scott Wilson wrote:


On 21 Apr 2009, at 04:25, Michael Cox wrote:


I just noticed that cmd-d on a string in TextView
opens up the default Help.help 
presumably because the main App hijacks 
all cmd keystrokes.

Nope, at least it shouldn't. It only opens main help if it can't find a file named after the string. The Help browser uses a TextView in fact. This is true for Cocoa at least. Probably should be done for Swing as well on OSX in the browser.

Crossplatform/editor would be a little tricky to account for...

S.



Would it be a good idea to add a default keyDownAction
to SCTextView like:

(
w = Window.new.front;
t = TextView(w.asView,Rect(10,10, 380,200))
.focus(true)
.string_("SinOsc");
t.keyDownAction = {arg view, char, mod, uni, key;
if (mod == 393475 && uni== 4) {view.string.openHelpFile}
}
)
so that ctl-shift-d will open the help doc of the selected string?

This is mostly with regard to using the Help browser which I dig
except for this missing feature.

Would this be too difficult when accounting for different keyboards/OSs?

I can add it easily enough on my own system, 
but it seems like it might be of value to everyone.

Thanks,

-mgc







Re: Opening help docs with SCTextView

by Michael G. Cox :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes,  it works in a normal doc, and like I said, 
cmd-j and cmd-y seem to work fine.

mgc

On Apr 22, 2009, at 12:07 AM, Scott Wilson wrote:

But it does work in a normal document?

On 22 Apr 2009, at 01:23, michael cox wrote:

Just tried it on another machine with v.3.3RC
and the same problem occurs.
Cmd-d on any class in the Help browser brings up the main help.

-mgc

On Tue, Apr 21, 2009 at 3:51 AM, Michael Cox <michael.gardner.cox@...> wrote:
hmm,

I'm using Cocoa, and cmd-d on SinOsc in the Help browser brings up Help.html.
Cmd-j works fine. 
Weird. Ill try updating. 

mgc

On Apr 21, 2009, at 2:31 AM, Scott Wilson wrote:


On 21 Apr 2009, at 04:25, Michael Cox wrote:


I just noticed that cmd-d on a string in TextView
opens up the default Help.help 
presumably because the main App hijacks 
all cmd keystrokes.

Nope, at least it shouldn't. It only opens main help if it can't find a file named after the string. The Help browser uses a TextView in fact. This is true for Cocoa at least. Probably should be done for Swing as well on OSX in the browser.

Crossplatform/editor would be a little tricky to account for...

S.



Would it be a good idea to add a default keyDownAction
to SCTextView like:

(
w = Window.new.front;
t = TextView(w.asView,Rect(10,10, 380,200))
.focus(true)
.string_("SinOsc");
t.keyDownAction = {arg view, char, mod, uni, key;
if (mod == 393475 && uni== 4) {view.string.openHelpFile}
}
)
so that ctl-shift-d will open the help doc of the selected string?

This is mostly with regard to using the Help browser which I dig
except for this missing feature.

Would this be too difficult when accounting for different keyboards/OSs?

I can add it easily enough on my own system, 
but it seems like it might be of value to everyone.

Thanks,

-mgc








Re: Opening help docs with SCTextView

by Scott Wilson-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Okay, I just tried it with the last RC and for whatever reason that does seem to be the case, but it's fine with latest svn.

There should be a new RC tonight, so try with that and report back.

S.

On 22 Apr 2009, at 08:20, Michael Cox wrote:

Yes,  it works in a normal doc, and like I said, 
cmd-j and cmd-y seem to work fine.

mgc

On Apr 22, 2009, at 12:07 AM, Scott Wilson wrote:

But it does work in a normal document?

On 22 Apr 2009, at 01:23, michael cox wrote:

Just tried it on another machine with v.3.3RC
and the same problem occurs.
Cmd-d on any class in the Help browser brings up the main help.

-mgc

On Tue, Apr 21, 2009 at 3:51 AM, Michael Cox <michael.gardner.cox@...> wrote:
hmm,

I'm using Cocoa, and cmd-d on SinOsc in the Help browser brings up Help.html.
Cmd-j works fine. 
Weird. Ill try updating. 

mgc

On Apr 21, 2009, at 2:31 AM, Scott Wilson wrote:


On 21 Apr 2009, at 04:25, Michael Cox wrote:


I just noticed that cmd-d on a string in TextView
opens up the default Help.help 
presumably because the main App hijacks 
all cmd keystrokes.

Nope, at least it shouldn't. It only opens main help if it can't find a file named after the string. The Help browser uses a TextView in fact. This is true for Cocoa at least. Probably should be done for Swing as well on OSX in the browser.

Crossplatform/editor would be a little tricky to account for...

S.



Would it be a good idea to add a default keyDownAction
to SCTextView like:

(
w = Window.new.front;
t = TextView(w.asView,Rect(10,10, 380,200))
.focus(true)
.string_("SinOsc");
t.keyDownAction = {arg view, char, mod, uni, key;
if (mod == 393475 && uni== 4) {view.string.openHelpFile}
}
)
so that ctl-shift-d will open the help doc of the selected string?

This is mostly with regard to using the Help browser which I dig
except for this missing feature.

Would this be too difficult when accounting for different keyboards/OSs?

I can add it easily enough on my own system, 
but it seems like it might be of value to everyone.

Thanks,

-mgc









Re: Opening help docs with SCTextView

by Michael G. Cox :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Scott,

much appreciated,

mgc

On Apr 22, 2009, at 1:58 AM, Scott Wilson wrote:

> Okay, I just tried it with the last RC and for whatever reason that  
> does seem to be the case, but it's fine with latest svn.
>
> There should be a new RC tonight, so try with that and report back.
>
> S.

_______________________________________________
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/