Here's a version of HelpSystem + ProfStef-Help with syntax highlighting
(works in 1.2 and 1.3):

Gofer it
squeaksource: 'LaurentLSandbox';
 package: 'HelpSystem-Core';
package: 'ProfStef-Help';
load

Torsten, I've added
HelpTopic>>beStyled
HelpTopic>>isStyled

and change
HelpBrowser>>onItemClick

So an HelpTopic can tell if it want syntax highlighting or not. If you're OK
I push in HelpSystem repo.

Cheers,

Laurent Laffont - @lolgzs <http://twitter.com/#!/lolgzs>

Pharo Smalltalk Screencasts: http://www.pharocasts.com/
Blog: http://magaloma.blogspot.com/
Developer group: http://cara74.seasidehosting.st



On Fri, Apr 29, 2011 at 9:03 PM, Pat Maddox <[email protected]> wrote:

> I think a help system for smalltalk absolutely benefits from smalltalk
> syntax highlighting. And any time you're flipping through pages of
> documentation, it's useful to know what page you're on, how many pages are
> left, and to be able to easily flip back and forth between them. "Nothing to
> do with a help system?" I wholeheartedly disagree...
>
> Pat
>
>
> On Apr 29, 2011, at 8:31 AM, Torsten Bergmann wrote:
>
> > Hi,
> >
> > these requirements have nothing to do with a help system
> > and is more oriented towards a "teaching Smalltalk" tool
> > HelpBrowser should stay generic as possible. One addition
> > I can imagine in the future is to use rich text (HTML)
> > instead of plain ASCII, of we find the time to look at
> > Scamper again.
> >
> > However a few notes:
> >  - you can subclass HelpBrowser or implement another tool
> >    "TutorialBrowser" using HelpBrowser as template
> >  - highlighting: PluggableTextMorph is used, see
> >    PluggableTextMorph>>defaultViewerClass which can be
> >    overwritten by subclasses
> >    dont know if PluggableTextMorph supports SH out of the
> >    box after the recent shout refactoring
> >    (I think there is now also SmalltalkEditor)
> >  - a help book is a tree, displaying page numbers makes
> >    more sense for linear tutorials like ProfStef, doesnt it?
> >  - see HelpBrowser>>initWindow to see how the UI is done
> >    again you can overwrite it in subclasses or after
> >    a super call adjust the UI
> >
> > Did you ever try ScriptManager (WorldMenu - Tools - ScriptManager)
> > It has Syntax highl. out of the box and you can save the results
> > in files. Should be easy to extend with buttons if you need too.
> >
> > Bye
> > T.
> >
> >
> >
> >
> >
> >
> >
> >>
> >>> Hi all,
> >>>
> >>> I'm teaching smalltalk to my pupils using a ProfStef-tutorial (
> >>>
> >>
> http://www.lsh-marquartstein.de/schule/unterricht/faecher/informatik/unterrichtsmaterial/info10/smalltalk/MS-info10-ProfStef-MarkusSchlager.mcz/view
> >>> ).
> >>>
> >>> Currently we're using pharo 1.1. In pharo 1.2 ProfStefBrowser obviously
> >> got
> >>> replaced by another HelpBrowser. (What you get with Help->ProfStef
> >>> Tutorials).
> >>>
> >>
> >> Yes I removed ProfStefBrowser because it was not maintained anymore and
> >
> >
> >> didn't have the courage to fix it.
> >>
> >> HelpBrowser was here and interfacing it with ProfStef was almost free
> >> so....
> >>
> >>
> >> I'm missing two things:
> >>>
> >>> - syntax-highlighting: Is there any way, I can activate this easily?
> >>>
> >>
> >> Torsten, is it possible to activate syntax-highlighting  for an
> HelpSystem
> >> book ?
> >
> >>> - navigation-buttons and page-counter (at the moment, my tutorial has
> >> about
> >>> 60 pages): any chance to get these back?
> >>
> >>
> >> I think this may be useful for all HelpSystem books.... Torsten, what do
> >> you
> >> think ?
> >>
> >> Indeed, to create a navigator just evaluate:
> >>
> >> DockingBarMorph new
> >> addMorph: (UITheme builder newButtonFor: ProfStef action: #last label:
> >> '>>'
> >> help: 'Last lesson');
> >> addMorph: (UITheme builder newButtonFor: ProfStef action: #next label:
> >> '>'
> >> help: 'Next lesson');
> >> addMorph:(UITheme builder newButtonFor: ProfStef action: #previous
> label:
> >> '<' help: 'Previous lesson');
> >> addMorph: (UITheme builder newButtonFor: ProfStef action: #first label:
> >> '<<' help: 'First lesson');
> >> addMorph: (UITheme builder newLabel: 'ProfStef navigator');
> >> adhereTo: #top;
> >> color: (Color white alpha: 0.4);
> >> borderWidth: 0;
> >> openInWorld.
> >>
> >> Should be fun to have it in the tutorial :)
> >>
> >> Laurent.
> >>
> >>
> >>
> >>> Markus
> >>>
> >>>
> >
> > --
> > Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
> > belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
> >
>
>
>

Reply via email to