Changeset 13631


Ignore:
Timestamp:
Apr 16, 2010, 4:03:42 AM (9 years ago)
Author:
plkrueger
Message:

Version 2 of InterfaceProjects?

Location:
trunk/source/contrib/krueger/InterfaceProjects
Files:
120 added
7 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/contrib/krueger/InterfaceProjects/Loan Calc/loan-calc.lisp

    r13390 r13631  
    2828;;; We manually create an instance of SpeechController and specify it as the owner for the NIB file.
    2929
    30 (require :NIB)
    31 (require :date)
    32 (require :decimal)
     30(eval-when (:compile-toplevel :load-toplevel :execute)
     31  (require :nib)
     32  (require :date)
     33  (require :decimal))
    3334
    3435(defpackage :loan-calc
  • trunk/source/contrib/krueger/InterfaceProjects/Menu/menu-utils.lisp

    r13390 r13631  
    2323|#
    2424
    25 (require :selector-utils)
     25(eval-when (:compile-toplevel :load-toplevel :execute)
     26  (require :selector-utils))
    2627
    2728(defpackage :interface-utilities
  • trunk/source/contrib/krueger/InterfaceProjects/PackageView/package-view.lisp

    r13390 r13631  
    2323|#
    2424
    25 (require :NIB)
     25(eval-when (:compile-toplevel :load-toplevel :execute)
     26  (require :nib))
    2627
    2728(defpackage :package-view
  • trunk/source/contrib/krueger/InterfaceProjects/PackageView/packageview.nib/designable.nib

    r13390 r13631  
    99                <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
    1010                        <bool key="EncodedWithXMLCoder">YES</bool>
    11                         <integer value="1" id="9"/>
     11                        <integer value="22"/>
    1212                </object>
    1313                <object class="NSArray" key="IBDocument.PluginDependencies">
     
    585585                                                <reference key="destination" ref="1001"/>
    586586                                        </object>
    587                                         <int key="connectionID">58</int>
     587                                        <int key="connectionID">59</int>
    588588                                </object>
    589589                        </object>
     
    847847                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
    848848                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
    849                                         <string>{{38, 275}, {555, 520}}</string>
    850                                         <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
    851                                         <string>{{38, 275}, {555, 520}}</string>
    852                                         <reference ref="9"/>
     849                                        <string>{{48, 320}, {555, 520}}</string>
     850                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
     851                                        <string>{{48, 320}, {555, 520}}</string>
     852                                        <integer value="1"/>
    853853                                        <string>{196, 240}</string>
    854854                                        <string>{{357, 418}, {480, 270}}</string>
     
    899899                        </object>
    900900                        <nil key="sourceID"/>
    901                         <int key="maxID">58</int>
     901                        <int key="maxID">59</int>
    902902                </object>
    903903                <object class="IBClassDescriber" key="IBDocument.Classes">
  • trunk/source/contrib/krueger/InterfaceProjects/Simple Sum/simplesum.lisp

    r13390 r13631  
    3030;;; field in the window.
    3131
    32 (require :nib)
     32(eval-when (:compile-toplevel :load-toplevel :execute)
     33  (require :nib))
    3334
    3435(defpackage :simplesum
  • trunk/source/contrib/krueger/InterfaceProjects/Speech/speech-controller.lisp

    r13390 r13631  
    2828;;; We manually create an instance of SpeechController and specify it as the owner for the NIB file.
    2929
    30 (require :NIB)
     30(eval-when (:compile-toplevel :load-toplevel :execute)
     31  (require :nib))
    3132
    3233(defpackage :speech-controller
  • trunk/source/contrib/krueger/InterfaceProjects/Utilities/decimal.lisp

    r13390 r13631  
    2323|#
    2424
    25 (require :ns-string-utils)
     25(eval-when (:compile-toplevel :load-toplevel :execute)
     26  (require :ns-string-utils))
    2627
    2728(defpackage :interface-utilities
  • trunk/source/contrib/krueger/InterfaceProjects/Utilities/lisp-doc-controller.lisp

    r13390 r13631  
    2323|#
    2424
    25 (require :menu-utils)
     25(eval-when (:compile-toplevel :load-toplevel :execute)
     26  (require :menu-utils))
    2627
    2728(defpackage :interface-utilities
  • trunk/source/contrib/krueger/InterfaceProjects/Utilities/ns-string-utils.lisp

    r13390 r13631  
    44  (:nicknames :iu)
    55  (:export ns-to-lisp-string lisp-str-to-ns-data ns-data-to-lisp-str
    6            lisp-object-to-ns-data ns-data-to-lisp-object lisp-to-temp-nsstring))
     6           lisp-object-to-ns-data ns-data-to-lisp-object lisp-to-temp-nsstring
     7           nsstring-to-class nsstring-to-func nsstring-to-sym find-func))
    78
    89(in-package :iu)
    910
    1011(defun ns-to-lisp-string (ns-str)
    11   (if (plusp (#/length ns-str))
     12  (if (and (not (eql (%null-ptr) ns-str)) (plusp (#/length ns-str)))
    1213    (%get-cstring (#/cStringUsingEncoding: ns-str #$NSUTF8StringEncoding))
    1314    ""))
     
    3233    (#/stringWithUTF8String: ns:ns-string s)))
    3334
     35(defun nsstring-to-class (ns-str)
     36  (let ((lisp-obj (read-from-string (ns-to-lisp-string ns-str) nil nil))
     37        (classes nil))
     38    (if (consp lisp-obj)
     39      (dolist (obj lisp-obj (nreverse classes))
     40        (push (find-class obj nil) classes))
     41      (find-class lisp-obj nil))))
     42
     43(defun find-func (func-str)
     44  (let* ((sym (read-from-string func-str nil nil)))
     45    (cond ((and (typep sym 'function-name) (fboundp sym))
     46           (symbol-function sym))
     47          ((and (consp sym) (eq (first sym) 'function))
     48           (let ((fsym (second sym)))
     49             (and (typep fsym 'function-name)
     50                  (fboundp fsym)
     51                  (symbol-function fsym)))))))
     52
     53(defun nsstring-to-func (ns-str)
     54  (find-func (ns-to-lisp-string ns-str)))
     55
     56(defun nsstring-to-sym (ns-str)
     57  (let ((sym (read-from-string (ns-to-lisp-string ns-str) nil nil)))
     58    (if (symbolp sym) sym nil)))
     59
    3460(provide :ns-string-utils)
  • trunk/source/contrib/krueger/InterfaceProjects/Utilities/nslog-utils.lisp

    r13390 r13631  
    11;; nslog-utils.lisp
    22
    3 (require :ns-string-utils)
     3(eval-when (:compile-toplevel :load-toplevel :execute)
     4  (require :ns-string-utils))
    45
    56(defpackage :interface-utilities
    67  (:nicknames :iu)
    7   (:export log-rect log-size log-float interleave log-4floats))
     8  (:export ns-log ns-error log-rect log-size log-float interleave log-4floats))
    89
    910(in-package :iu)
     11
     12(defun ns-log (lisp-str)
     13  (#_NSLog (lisp-to-temp-nsstring lisp-str)))
     14
     15(defmacro ns-error (format-string &rest args)
     16  `(progn
     17     (ns-log (format nil ,format-string ,@args))
     18     (error "See console log for information")))
    1019
    1120(defun log-rect (r &optional (log-string ""))
Note: See TracChangeset for help on using the changeset viewer.