Showing posts with label Seaside. Show all posts
Showing posts with label Seaside. Show all posts

Wednesday, November 26, 2014

PaymentFont for Seaside

Project info

The “PaymentFont for Seaside” project is a small Seaside wrapper for the PaymentFont project. FontPayment is a “sleek SVG webfont containing 74 icons of all main payment operators and methods”.

Project location

The project is located on STHub at http://smalltalkhub.com/#!/~UdoSchneider/PaymentFont/

Screenshot

PaymentFont for Seaside Examples Browser

License

PaymentFont is licensed under SIL OFL 1.1. The CSS files are licensed under the MIT License. The Pharo Smalltalk wrapper code is under MIT License.

Installation

Gofer new
    url: 'http://smalltalkhub.com/mc/UdoSchneider/PaymentFont/main';
    package: 'ConfigurationOfPaymentFont';
    load.
((Smalltalk at: #ConfigurationOfPaymentFont) project stableVersion) load.

Run the Demo locally

Start the web server for Seaside - for instance with Zinc evaluate:

ZnZincServerAdaptor startOn: 8080

Now point your browser to http://127.0.0.1:8080/paymentfont

Use in your own application

Necessary Seaside libraries

To add PaymentFont to your Seaside application you just have to add the appropriate seaside file libraries containing the CSS and fonts to your Seaside application.

Depending on the scenario there is a PFDeploymentLibrary and a PFDevelopmentLibrary that you will find in the package PaymentFont-Core in the category PaymentFont-Core-Libraries.

Have a look at the #register method in the PFExamplesHome class for an example.

Use in your code

If the PaymentFont library is registered with your Seaside application you can use the #pfPaymentIcon selectors in your usual rendering methods (like #renderContentOn:):

renderContentOn: html
    html pfPaymentIcon amazon

Packages

  • PaymentFont-Core - package with the core, contains anything you need in an own app
  • PaymentFont-Tests - package with the SUnit tests
  • PaymentFont-Examples - example package for the demo

Testing

The package comes with 74 tests in the package PaymentFont-Tests. Just use the SUnit TestRunner to run them.

Friday, November 16, 2007

My Image Startup script

Following a previous post some people asked me how my Image Startup script looks like. Well - here it is. I run this script in a clean image and it sets all the correct bits and pieces and loads all necessary packages.


Transcript clear.

"Set personal Settings"
(SmalltalkSystem current)
autoFormatMethodSource: true;
showSplashAtStartup: false.
SmalltalkSystem current tipOfTheDayClass
showTipsAtStartup: false.
SmalltalkSystem current
workspaceShellClass variableTips: true.
"Connect STS Repositry"
stsRepositryPath := 'S:\Dolphin Smalltalk X6\STS Repositry'.
StsManager startUpOn: stsRepositryPath.
"Backup Repositry and reorganize"
stsBackupPathStream := ReadWriteStream
on: String new.
stsBackupPathStream
nextPutAll: stsRepositryPath;
nextPutAll: '/Repository.BACKUP_'.
Date today
printOn: stsBackupPathStream
format: 'yyyyMMdd'.
Time now
printOn: stsBackupPathStream
format: 'HHmmss'.
(StsManager current databaseConnection)
createBackupOn: stsBackupPathStream contents;
reorganize.
"Install Restore as this can't be loaded from STS"
Package manager install: 'S:\Dolphin Smalltalk X6\Solutions Software\ReStore120_D6\SSW ReStore MVP.pac'.
"Packages to ignore"
ignorePackageNames := #('US ActiveX' 'US Speedometer Control').
"Find all US Packages to be loaded"
loadPackageNames := ((StsManager
current getAllPackageNames
select:
[:eachPackageName |
eachPackageName beginsWith: 'US'])
reject:
[:eachPackageName |
ignorePackageNames
includes: eachPackageName])
asOrderedCollection.
"Load Packages and Prerequsisites"
[loadPackageNames notEmpty] whileTrue:
[currentPackageName := loadPackageNames
removeFirst.
stsPackage := (StsManager current
getPackageEditionsFor: currentPackageName)
first.
prerequisitePackageNames := (stsPackage
prerequisiteNames reject:
[:each |
(ignorePackageNames includes: each)
or:
[Package manager
includesPackageNamed: each]])
asOrderedCollection.
prerequisitePackageNames isEmpty
ifTrue:
[stsPackage isLoaded
ifFalse: [stsPackage load]]
ifFalse:
[loadPackageNames := loadPackageNames
, prerequisitePackageNames.
loadPackageNames
addLast: currentPackageName]]

Tuesday, November 13, 2007

Finding my way through Seaside/Dolphin

I started to play around with Seaside 2.8 on Dolphin. It seems that there are some dependencies (with my code?) which I am not quit able to trace. When loading the project editions from STS into a clean image everything works ...
However as I'm rebuilding my image daily with a script based on STS package editions I cannot (yet) load project editions manually. I either have to find out how to tackle this dependency problem or extend my script to load the project editions before doing anything else.

... Stay tuned

Getting the STS/Seaside wrapper up to speed

Just started to clean up the dust from a Seaside/STS wrapper I wrote. I stopped working on it when I discovered that uploading files didn't work with the 2.6 Dolphin port. With a working 2.8 port right now it's time to start again.