NBHelp in Squeak (Re: [squeak-dev] Re: Why FFI is not included
with latest squeak ?)
H. Hirzel
hannes.hirzel at gmail.com
Sat Aug 25 21:12:19 UTC 2012
Igor,
Below are the instructions for loading PetitParser manually. NBHelp
needs PetitParser.
The Monticello configuration needs to be adapted so that it works fine
for Squeak as well.
I don't know how to do that.
Attached is the changeSet for the two font fixes.
Note: The instructions are in Markdown notation as the NBHelp pages.
To view the text formatted you might want to use
http://www.showdown.im/ ; for a guide on markdown see for example
http://johnmacfarlane.net/pandoc/
--Hannes
How to load NBHelp in Squeak 4.3
================================
Load Pharo compatibility package for Squeak
-------------------------------------------
Load
[PharoCompatibility](http://www.squeaksource.com/PharoCompatibility)
by Frank Shearar
This package contains as the only method
Symbol>>isBinary
^ self precedence = 2.
Load Metacello manually
-------------------------------------------
Added the following repository
MCHttpRepository
location: 'http://seaside.gemstone.com/ss/metacello'
user: ''
password: ''
Manually load
ConfigurationOfMetacello-pmm.717
Author: pmm Time: 25 August 2012, 10:32:34 am
Then do
ConfigurationOfMetacello loadLatestVersion
Load PetitParser manually
-------------------------------------------
Open Monticello browser and add repository
MCHttpRepository
location: 'http://source.lukas-renggli.ch/petit'
user: ''
password: ''
load configuration
Name: ConfigurationOfPetitParser-TudorGirba.26
Author: TudorGirba Time: 4 March 2012, 8:22:38 pm
execute
ConfigurationOfPetitParser loadMinimal
Load NBHelp (NativeBoost) manually
-------------------------------------------
In the Monticello browser add the following http repository
MCHttpRepository
location: 'http://www.squeaksource.com/NativeBoost'
user: ''
password: ''
Load NativeBoost help
Name: NativeBoost-Help-IgorStasenko.4
Author: IgorStasenko
Time: 21 August 2012, 10:15:43 pm
Add two font fixes for Squeak 4.3
-------------------------------------------
NBHelperStyler>>
headingStyle: level
| size font fontNo |
(Smalltalk includesKey: #LogicalFont)
ifTrue: ["for Pharo"
size := self defaultFont pointSize.
size := size
* (#(2.0 1.5 1.4 1.25 1.0 ) at: level).
font := LogicalFont familyName: self defaultFont familyName pointSize: size]
ifFalse: ["for Squeak"
fontNo := #(3 2 1 1 1) at: level.
font := (TextStyle default fontAt: fontNo) ].
^ TextFontReference toFont: font
==========================
And the following method
NBHelperStyler>>
codeStyle
| codeFont |
(Smalltalk includesKey: #LogicalFont)
ifTrue: ["for Pharo" codeFont := StandardFonts codeFont.]
ifFalse: ["for Squeak" codeFont := (TextConstants at:
#DefaultFixedTextStyle) fonts at: 1].
^ { TextFontReference toFont: codeFont.
TextEmphasis bold.
TextColor color: self codeColor }
(attached in the changeSet)
............................................................................................................................................
On 8/25/12, Igor Stasenko <siguctua at gmail.com> wrote:
> On 25 August 2012 16:16, H. Hirzel <hannes.hirzel at gmail.com> wrote:
>> I got it working the way Igor intended it it. With PetitParser and
>> Markdown syntax in the help files.
>>
>> If somebody is interested I can post the instructions how to do it....
>>
> just send me the changeset and i will integrate it with package.
>
>> --Hannes
>>
>> On 8/22/12, Igor Stasenko <siguctua at gmail.com> wrote:
>>> On 22 August 2012 03:05, Levente Uzonyi <leves at elte.hu> wrote:
>>>> On Wed, 22 Aug 2012, Igor Stasenko wrote:
>>>>
>>>>> On 22 August 2012 02:11, Levente Uzonyi <leves at elte.hu> wrote:
>>>>>>
>>>>>> On Wed, 22 Aug 2012, Igor Stasenko wrote:
>>>>>>
>>>>>>> On 22 August 2012 00:04, Levente Uzonyi <leves at elte.hu> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> On Tue, 21 Aug 2012, Igor Stasenko wrote:
>>>>>>>>
>>>>>>>>> On 21 August 2012 23:20, dimitris chloupis <thekilon at yahoo.co.uk>
>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Ah thank you , I had version 1 and now version 4 is installed
>>>>>>>>>> together
>>>>>>>>>> with
>>>>>>>>>> all dependencies. Any idea how I use NB-help ?
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> i don't know how you can do it in squeak image, in pharo image
>>>>>>>>> just
>>>>>>>>> open help browser
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> It uses too many "pharoisms", so it won't work in Squeak out of the
>>>>>>>> box:
>>>>>>>> - Gofer
>>>>>>>> - LogicalFont
>>>>>>>> - StandardFonts
>>>>>>>> - pragma-based "registration" for HelpSystem
>>>>>>>>
>>>>>>>> The first can be loaded, the lines containing the next two can be
>>>>>>>> replaced
>>>>>>>> with "TextStyle defaultFont" and then you can open the HelpBrowser
>>>>>>>> with:
>>>>>>>> HelpBrowser openOn: NBHelp asHelpTopic.
>>>>>>>>
>>>>>>>> Btw, green text for source code doesn't look very nice and it would
>>>>>>>> be
>>>>>>>> better to use the Metacello API to load PP.
>>>>>>>>
>>>>>>>
>>>>>>> I never tried it on squeak, so sure thing it may not work.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Sure.
>>>>>>
>>>>>>
>>>>>>> I have two questions:
>>>>>>> - why LogicalFont considered pharoism?
>>>>>>> (StandardFonts is, but LogicalFont?)
>>>>>>
>>>>>>
>>>>>>
>>>>>> Because it doesn't exist in Squeak.
>>>>>>
>>>>>>
>>>>>>> and
>>>>>>> - what is the metacello API you mentioned. I don't know much about
>>>>>>> metacello beyond the way how to create and manage own configs. Any
>>>>>>> pointers?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> https://github.com/dalehenrich/metacello-work/blob/master/docs/MetacelloUserGuide.md
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> how i can use it, if metacello is not installed by default in image?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2012-August/165199.html
>>>>>>
>>>>>>
>>>>>>> (well, of course, by all logic people will load NB anyways, so i can
>>>>>>> safely assume it already in image)
>>>>>>
>>>>>>
>>>>>>
>>>>>> Um, a few mails before you wrote that NBHelp can be loaded without
>>>>>> NB,
>>>>>> so
>>>>>> that was what I did. :)
>>>>>>
>>>>> So, i repeating my question, how you can use Metacello API to load
>>>>> something, if it not in image?
>>>>
>>>>
>>>> You can't. But the idea is that it will be present in all base images.
>>>>
>>> Yeah.. i would wellcome that.
>>> So it can wait till this become true :)
>>> Thanks, Levente.
>>>
>>>>
>>>> Levente
>>>>
>>>>
>>>>>
>>>>>>
>>>>>> Levente
>>>>>>
>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> Levente
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best regards,
>>>>>>> Igor Stasenko.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best regards,
>>>>> Igor Stasenko.
>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Igor Stasenko.
>>>
>>>
>>
>>
>>
>
>
>
> --
> Best regards,
> Igor Stasenko.
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NBHelpFixesForSqueak4.3.1.cs
Type: application/octet-stream
Size: 1002 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20120825/2ccbc200/NBHelpFixesForSqueak4.3.1.obj
More information about the Squeak-dev
mailing list
|