My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
;; Currency Converter, compare to http://trac.clozure.com/openmcl/wiki/EasyGuiCurrencyConverter
;; http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/02Essence/02Essence.html#//apple_ref/doc/uid/TP40000863-CH3-SW5
;; 02/04/09 Alexander Repenning

(in-package :xlui)


(defmethod CONVERT-CURRENCY-ACTION ((w application-window) (Button button))
(setf (value (view-named w "amount"))
(* (value (view-named w "rate"))
(value (view-named w "dollars")))))


<application-window title="Currency Converter" width="300" height="180">
<column align="stretch" valign="stretch" padding="9">
<row align="stretch" minimize="vertical" valign="bottom">
<label text="Exchange Rate per $1:" align="right" flex="2"/>
<editable-number name="rate" text="1.0" flex="1"/>
</row>
<row align="stretch" minimize="vertical" valign="bottom">
<label text="Dollars to Convert:" align="right" flex="2"/>
<editable-number name="dollars" text="1.0" flex="1"/>
</row>
<row align="stretch" minimize="vertical" valign="bottom">
<label text="Amount in the other Currency:" align="right" flex="2"/>
<editable-number name="amount" text="1.0" flex="1"/>
</row>
<row align="right" valign="bottom" vflex="1">
<button text="Convert" action="convert-currency-action" default-button="true"/>
</row>
</column>
</application-window>

Change log

r7 by alex.repenning on May 26, 2009   Diff
first version: basic XMLisp with scene
graph, picking animation
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 1401 bytes, 32 lines
Powered by Google Project Hosting