diff options
| -rw-r--r-- | Word Count/AppDelegate.applescript | 3 | ||||
| -rw-r--r-- | Word Count/Base.lproj/MainMenu.xib | 22 | 
2 files changed, 19 insertions, 6 deletions
| diff --git a/Word Count/AppDelegate.applescript b/Word Count/AppDelegate.applescript index 38a3c2e..8cc0d1e 100644 --- a/Word Count/AppDelegate.applescript +++ b/Word Count/AppDelegate.applescript @@ -11,6 +11,7 @@ script AppDelegate  	-- IBOutlets  	property theWindow : missing value +    property fileName : missing value  	property theCharacters : missing value  	property theWords : missing value  	property theParagraphs : missing value @@ -19,11 +20,13 @@ script AppDelegate  		tell application "TextEdit"  			set top_document to document 1 +            set l_name to name of top_document  			set l_chars to count characters of top_document  			set l_words to count words of top_document  			set l_paragraphs to count paragraphs of top_document  		end tell +        fileName's setStringValue_(l_name)  		theCharacters's setStringValue_(l_chars)  		theWords's setStringValue_(l_words)  		theParagraphs's setStringValue_(l_paragraphs) diff --git a/Word Count/Base.lproj/MainMenu.xib b/Word Count/Base.lproj/MainMenu.xib index d2e0eaa..1ea049b 100644 --- a/Word Count/Base.lproj/MainMenu.xib +++ b/Word Count/Base.lproj/MainMenu.xib @@ -15,6 +15,7 @@          <customObject id="-3" userLabel="Application" customClass="NSObject"/>          <customObject id="Voe-Tx-rLC" customClass="AppDelegate">              <connections> +                <outlet property="fileName" destination="TKV-uc-hsD" id="IDN-BP-9fB"/>                  <outlet property="theCharacters" destination="ui1-8F-1Zd" id="E9n-Tu-7Mr"/>                  <outlet property="theParagraphs" destination="nG7-aL-qge" id="X57-qu-KaS"/>                  <outlet property="theWindow" destination="QvC-M9-y7g" id="gIp-Ho-8D9"/> @@ -686,10 +687,10 @@          <window title="Word Count" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" releasedWhenClosed="NO" showsToolbarButton="NO" animationBehavior="default" id="QvC-M9-y7g">              <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>              <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/> -            <rect key="contentRect" x="335" y="390" width="422" height="140"/> +            <rect key="contentRect" x="335" y="390" width="422" height="169"/>              <rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>              <view key="contentView" id="EiT-Mj-1SZ"> -                <rect key="frame" x="0.0" y="0.0" width="422" height="140"/> +                <rect key="frame" x="0.0" y="0.0" width="422" height="169"/>                  <autoresizingMask key="autoresizingMask"/>                  <subviews>                      <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="aet-G8-a9m"> @@ -742,6 +743,15 @@ DQ                              <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>                          </textFieldCell>                      </textField> +                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ASh-HP-psD"> +                        <rect key="frame" x="218" y="77" width="190" height="17"/> +                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> +                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="0" id="AoQ-xT-T2i"> +                            <font key="font" metaFont="system"/> +                            <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> +                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> +                        </textFieldCell> +                    </textField>                      <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nG7-aL-qge">                          <rect key="frame" x="218" y="50" width="190" height="17"/>                          <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> @@ -751,10 +761,10 @@ DQ                              <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>                          </textFieldCell>                      </textField> -                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ASh-HP-psD"> -                        <rect key="frame" x="218" y="77" width="190" height="17"/> +                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="TKV-uc-hsD"> +                        <rect key="frame" x="179" y="132" width="64" height="17"/>                          <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> -                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="0" id="AoQ-xT-T2i"> +                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="File Name" id="hFR-FN-MSp">                              <font key="font" metaFont="system"/>                              <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>                              <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> @@ -762,7 +772,7 @@ DQ                      </textField>                  </subviews>              </view> -            <point key="canvasLocation" x="161" y="-216"/> +            <point key="canvasLocation" x="161" y="-230.5"/>          </window>      </objects>  </document> | 
