Using Artefact PDF library in Squeak

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Using Artefact PDF library in Squeak

Tapple Gao
Hi all.

I put three packages in the inbox that allow all the demos from the Artefact pdf library to run in squeak:
Kernel-mtf.924.mcz
KernelTests-mtf.294.mcz
Collections-mtf.625.mcz

They add 3 methods:
Number >> round:
Collection >> asDictionary
Collection >> max:

I still have commit access to the Trunk from ages ago, but I have been away from squeak so long I thought I’d put them in the inbox and submit them for review
Reply | Threaded
Open this post in threaded view
|

Re: Using Artefact PDF library in Squeak

Levente Uzonyi-2
I've ported it to Squeak[1] about a year ago, but I haven't found the need
for any of these methods. Maybe they added them after I forked it.

Levente

[1] http://leves.web.elte.hu/squeak/Artefact/

On Sat, 2 May 2015, Tapple Gao wrote:

> Hi all.
>
> I put three packages in the inbox that allow all the demos from the Artefact pdf library to run in squeak:
> Kernel-mtf.924.mcz
> KernelTests-mtf.294.mcz
> Collections-mtf.625.mcz
>
> They add 3 methods:
> Number >> round:
> Collection >> asDictionary
> Collection >> max:
>
> I still have commit access to the Trunk from ages ago, but I have been away from squeak so long I thought I’d put them in the inbox and submit them for review
>

Reply | Threaded
Open this post in threaded view
|

Re: Using Artefact PDF library in Squeak

Levente Uzonyi-2
<rant>
I remember #asDictionary now. This is what happens when you don't want
caseOf: and caseOf:otherwise: be in your language:

  ^PDFDataSymbol symbol: ({ #singlePage->'SinglePage' . #continuousPages->'OneColumn' . #twoPages->'TwoColumnLeft' } asDictionary at: self displayLayout).

Or this:

  ^ ({(#bottomRight -> [ self to ]).
  (#bottomLeft -> [ self from x @ self to y ]).
  (#topRight -> [ self to x @ self from y ]).
  (#topLeft -> [ self from x @ self from y ])} asDictionary at: self orientation) value

Etc.
</rant>

Levente

On Sat, 2 May 2015, Levente Uzonyi wrote:

> I've ported it to Squeak[1] about a year ago, but I haven't found the need
> for any of these methods. Maybe they added them after I forked it.
>
> Levente
>
> [1] http://leves.web.elte.hu/squeak/Artefact/
>
> On Sat, 2 May 2015, Tapple Gao wrote:
>
>> Hi all.
>>
>> I put three packages in the inbox that allow all the demos from the
>> Artefact pdf library to run in squeak:
>> Kernel-mtf.924.mcz
>> KernelTests-mtf.294.mcz
>> Collections-mtf.625.mcz
>>
>> They add 3 methods:
>> Number >> round:
>> Collection >> asDictionary
>> Collection >> max:
>>
>> I still have commit access to the Trunk from ages ago, but I have been away
>> from squeak so long I thought I’d put them in the inbox and submit them for
>> review
>

Reply | Threaded
Open this post in threaded view
|

Re: Using Artefact PDF library in Squeak

Stephan Eggermont-3
On 02/05/15 21:40, Levente Uzonyi wrote:
> <rant>
> I remember #asDictionary now. This is what happens when you don't want
> caseOf: and caseOf:otherwise: be in your language:
>
>      ^PDFDataSymbol symbol: ({ #singlePage->'SinglePage' .
> #continuousPages->'OneColumn' . #twoPages->'TwoColumnLeft' }
> asDictionary at: self displayLayout).

That is ugly, I concur. What concrete action do you propose?

Stephan




Reply | Threaded
Open this post in threaded view
|

Re: Using Artefact PDF library in Squeak

Levente Uzonyi-2
On Mon, 4 May 2015, Stephan Eggermont wrote:

> On 02/05/15 21:40, Levente Uzonyi wrote:
>> <rant>
>> I remember #asDictionary now. This is what happens when you don't want
>> caseOf: and caseOf:otherwise: be in your language:
>>
>>      ^PDFDataSymbol symbol: ({ #singlePage->'SinglePage' .
>> #continuousPages->'OneColumn' . #twoPages->'TwoColumnLeft' }
>> asDictionary at: self displayLayout).
>
> That is ugly, I concur. What concrete action do you propose?

I've rewritten these to #caseOf: statements in my Squeak port[1].

Levente

[1] http://leves.web.elte.hu/squeak/Artefact/

>
> Stephan
>
>
>
>
>