fixed problem where you couldn't edit when speaker was done
This commit is contained in:
parent
277b97d7a7
commit
06ba9418fc
9 changed files with 2812 additions and 96 deletions
|
@ -12,8 +12,8 @@
|
|||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<integer value="371"/>
|
||||
<integer value="29"/>
|
||||
<integer value="372"/>
|
||||
<integer value="388"/>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
|
@ -3914,7 +3914,7 @@
|
|||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<integer value="1"/>
|
||||
<string>{{525, 802}, {197, 73}}</string>
|
||||
<string>{{353, 1048}, {422, 20}}</string>
|
||||
<string>{{452, 1099}, {422, 20}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<integer value="1"/>
|
||||
<string>{74, 862}</string>
|
||||
|
@ -3939,18 +3939,18 @@
|
|||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<integer value="1"/>
|
||||
<string>{{579, 131}, {500, 371}}</string>
|
||||
<string>{{422, 131}, {500, 371}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{579, 131}, {500, 371}}</string>
|
||||
<string>{{422, 131}, {500, 371}}</string>
|
||||
<integer value="1"/>
|
||||
<string>{{33, 99}, {480, 360}}</string>
|
||||
<string>{3.40282e+38, 3.40282e+38}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{591, 420}, {83, 43}}</string>
|
||||
<string>{{626, 1056}, {83, 43}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{523, 2}, {178, 283}}</string>
|
||||
<string>{{709, 816}, {175, 283}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
|
@ -4092,7 +4092,7 @@
|
|||
</object>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">551</int>
|
||||
<int key="maxID">553</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
|
@ -4101,16 +4101,44 @@
|
|||
<string key="className">SpeakerAppDelegate</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="NSMutableDictionary" key="actions">
|
||||
<string key="NS.key.0">speakAction:</string>
|
||||
<string key="NS.object.0">id</string>
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>seekBack:</string>
|
||||
<string>seekForward:</string>
|
||||
<string>speakAction:</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
<string key="NS.key.0">speakAction:</string>
|
||||
<object class="IBActionInfo" key="NS.object.0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>seekBack:</string>
|
||||
<string>seekForward:</string>
|
||||
<string>speakAction:</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">seekBack:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">seekForward:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">speakAction:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
|
|
|
@ -271,8 +271,8 @@
|
|||
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
|
||||
<array>
|
||||
<array>
|
||||
<integer>3</integer>
|
||||
<integer>1</integer>
|
||||
<integer>14</integer>
|
||||
<integer>9</integer>
|
||||
<integer>0</integer>
|
||||
</array>
|
||||
</array>
|
||||
|
@ -326,7 +326,7 @@
|
|||
<key>_historyCapacity</key>
|
||||
<integer>0</integer>
|
||||
<key>bookmark</key>
|
||||
<string>1FF67C6B1294AEA400CA07A3</string>
|
||||
<string>1FE6FE4C12958D0F0077EC42</string>
|
||||
<key>history</key>
|
||||
<array>
|
||||
<string>1FA38C5E124D2CD6004B8852</string>
|
||||
|
@ -337,7 +337,7 @@
|
|||
<string>1FF67B4B1294919400CA07A3</string>
|
||||
<string>1FF67BEC1294A39500CA07A3</string>
|
||||
<string>1FF67C0B1294A9BE00CA07A3</string>
|
||||
<string>1FF67C0C1294A9BE00CA07A3</string>
|
||||
<string>1FF67C6B1294AEA400CA07A3</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>SplitCount</key>
|
||||
|
@ -395,9 +395,9 @@
|
|||
</array>
|
||||
<key>TableOfContents</key>
|
||||
<array>
|
||||
<string>1FF67B3012948CE400CA07A3</string>
|
||||
<string>1FE6FE4D12958D0F0077EC42</string>
|
||||
<string>1CE0B1FE06471DED0097A5F4</string>
|
||||
<string>1FF67B3112948CE400CA07A3</string>
|
||||
<string>1FE6FE4E12958D0F0077EC42</string>
|
||||
<string>1CE0B20306471E060097A5F4</string>
|
||||
<string>1CE0B20506471E060097A5F4</string>
|
||||
</array>
|
||||
|
@ -535,8 +535,8 @@
|
|||
<integer>5</integer>
|
||||
<key>WindowOrderList</key>
|
||||
<array>
|
||||
<string>1FF67B551294919400CA07A3</string>
|
||||
<string>1FF67B561294919400CA07A3</string>
|
||||
<string>1FE6FE5712958D0F0077EC42</string>
|
||||
<string>1FE6FE5812958D0F0077EC42</string>
|
||||
<string>1CD10A99069EF8BA00B06720</string>
|
||||
<string>1FA38C35124D2426004B8852</string>
|
||||
<string>1C78EAAD065D492600B07095</string>
|
||||
|
@ -620,7 +620,7 @@
|
|||
<key>TableOfContents</key>
|
||||
<array>
|
||||
<string>1FA38C35124D2426004B8852</string>
|
||||
<string>1FF67B3212948CE400CA07A3</string>
|
||||
<string>1FE6FE4F12958D0F0077EC42</string>
|
||||
<string>1CD0528F0623707200166675</string>
|
||||
<string>XCMainBuildResultsModuleGUID</string>
|
||||
</array>
|
||||
|
@ -664,8 +664,8 @@
|
|||
<string>yes</string>
|
||||
<key>sizes</key>
|
||||
<array>
|
||||
<string>{{0, 0}, {316, 198}}</string>
|
||||
<string>{{316, 0}, {378, 198}}</string>
|
||||
<string>{{0, 0}, {316, 201}}</string>
|
||||
<string>{{316, 0}, {378, 201}}</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>VerticalSplitView</key>
|
||||
|
@ -680,8 +680,8 @@
|
|||
<string>yes</string>
|
||||
<key>sizes</key>
|
||||
<array>
|
||||
<string>{{0, 0}, {694, 198}}</string>
|
||||
<string>{{0, 198}, {694, 183}}</string>
|
||||
<string>{{0, 0}, {694, 201}}</string>
|
||||
<string>{{0, 201}, {694, 180}}</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
|
@ -714,7 +714,7 @@
|
|||
<real>148</real>
|
||||
</array>
|
||||
<key>Frame</key>
|
||||
<string>{{316, 0}, {378, 198}}</string>
|
||||
<string>{{316, 0}, {378, 201}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>298 733 694 422 0 0 1920 1178 </string>
|
||||
</dict>
|
||||
|
@ -742,13 +742,13 @@
|
|||
<key>TableOfContents</key>
|
||||
<array>
|
||||
<string>1CD10A99069EF8BA00B06720</string>
|
||||
<string>1FF67B4E1294919400CA07A3</string>
|
||||
<string>1FE6FE5012958D0F0077EC42</string>
|
||||
<string>1C162984064C10D400B95A72</string>
|
||||
<string>1FF67B4F1294919400CA07A3</string>
|
||||
<string>1FF67B501294919400CA07A3</string>
|
||||
<string>1FF67B511294919400CA07A3</string>
|
||||
<string>1FF67B521294919400CA07A3</string>
|
||||
<string>1FF67B531294919400CA07A3</string>
|
||||
<string>1FE6FE5112958D0F0077EC42</string>
|
||||
<string>1FE6FE5212958D0F0077EC42</string>
|
||||
<string>1FE6FE5312958D0F0077EC42</string>
|
||||
<string>1FE6FE5412958D0F0077EC42</string>
|
||||
<string>1FE6FE5512958D0F0077EC42</string>
|
||||
</array>
|
||||
<key>ToolbarConfiguration</key>
|
||||
<string>xcode.toolbar.config.debugV3</string>
|
||||
|
@ -889,7 +889,7 @@
|
|||
<key>Frame</key>
|
||||
<string>{{0, 0}, {650, 209}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>1276 76 650 250 0 0 1920 1178 </string>
|
||||
<string>1270 76 650 250 0 0 1920 1178 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXDebugCLIModule</string>
|
||||
|
@ -912,13 +912,13 @@
|
|||
<key>TableOfContents</key>
|
||||
<array>
|
||||
<string>1C78EAAD065D492600B07095</string>
|
||||
<string>1FF67B541294919400CA07A3</string>
|
||||
<string>1FE6FE5612958D0F0077EC42</string>
|
||||
<string>1C78EAAC065D492600B07095</string>
|
||||
</array>
|
||||
<key>ToolbarConfiguration</key>
|
||||
<string>xcode.toolbar.config.consoleV3</string>
|
||||
<key>WindowString</key>
|
||||
<string>1276 76 650 250 0 0 1920 1178 </string>
|
||||
<string>1270 76 650 250 0 0 1920 1178 </string>
|
||||
<key>WindowToolGUID</key>
|
||||
<string>1C78EAAD065D492600B07095</string>
|
||||
<key>WindowToolIsVisible</key>
|
||||
|
|
|
@ -65,6 +65,16 @@
|
|||
vrLen = 45;
|
||||
vrLoc = 0;
|
||||
};
|
||||
1FE6FE4C12958D0F0077EC42 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 256AC3D90F4B6AC300CF3369 /* SpeakerAppDelegate.m */;
|
||||
name = "SpeakerAppDelegate.m: 104";
|
||||
rLen = 0;
|
||||
rLoc = 3089;
|
||||
rType = 0;
|
||||
vrLen = 1531;
|
||||
vrLoc = 1624;
|
||||
};
|
||||
1FF67B3C12948FDE00CA07A3 /* SpeakerApplication.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {832, 812}}";
|
||||
|
@ -109,7 +119,7 @@
|
|||
);
|
||||
name = "/Users/jeena/Projects/Speaker/Speaker-Info.plist";
|
||||
rLen = 0;
|
||||
rLoc = 9223372036854775807;
|
||||
rLoc = 9223372036854775808;
|
||||
};
|
||||
1FF67B4B1294919400CA07A3 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
|
@ -141,22 +151,12 @@
|
|||
vrLen = 594;
|
||||
vrLoc = 0;
|
||||
};
|
||||
1FF67C0C1294A9BE00CA07A3 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 256AC3D90F4B6AC300CF3369 /* SpeakerAppDelegate.m */;
|
||||
name = "SpeakerAppDelegate.m: 58";
|
||||
rLen = 13;
|
||||
rLoc = 1816;
|
||||
rType = 0;
|
||||
vrLen = 1672;
|
||||
vrLoc = 1375;
|
||||
};
|
||||
1FF67C6B1294AEA400CA07A3 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 256AC3D90F4B6AC300CF3369 /* SpeakerAppDelegate.m */;
|
||||
name = "SpeakerAppDelegate.m: 98";
|
||||
rLen = 0;
|
||||
rLoc = 2838;
|
||||
rLoc = 2658;
|
||||
rType = 0;
|
||||
vrLen = 1528;
|
||||
vrLoc = 1736;
|
||||
|
@ -170,9 +170,9 @@
|
|||
};
|
||||
256AC3D90F4B6AC300CF3369 /* SpeakerAppDelegate.m */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1160, 1710}}";
|
||||
sepNavSelRange = "{2838, 0}";
|
||||
sepNavVisRange = "{1736, 1528}";
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1160, 1695}}";
|
||||
sepNavSelRange = "{3089, 0}";
|
||||
sepNavVisRange = "{1624, 1531}";
|
||||
};
|
||||
};
|
||||
256AC3F00F4B6AF500CF3369 /* Speaker_Prefix.pch */ = {
|
||||
|
@ -216,19 +216,19 @@
|
|||
PBXFileDataSource_Target_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXPerProjectTemplateStateSaveDate = 311725270;
|
||||
PBXWorkspaceStateSaveDate = 311725270;
|
||||
PBXPerProjectTemplateStateSaveDate = 311758342;
|
||||
PBXWorkspaceStateSaveDate = 311758342;
|
||||
};
|
||||
perUserProjectItems = {
|
||||
1FA38C5E124D2CD6004B8852 /* PBXBookmark */ = 1FA38C5E124D2CD6004B8852 /* PBXBookmark */;
|
||||
1FA38CDA124D437D004B8852 /* PBXTextBookmark */ = 1FA38CDA124D437D004B8852 /* PBXTextBookmark */;
|
||||
1FE6FE4C12958D0F0077EC42 /* PBXTextBookmark */ = 1FE6FE4C12958D0F0077EC42 /* PBXTextBookmark */;
|
||||
1FF67B481294919400CA07A3 /* PBXTextBookmark */ = 1FF67B481294919400CA07A3 /* PBXTextBookmark */;
|
||||
1FF67B491294919400CA07A3 /* PBXTextBookmark */ = 1FF67B491294919400CA07A3 /* PBXTextBookmark */;
|
||||
1FF67B4A1294919400CA07A3 /* PlistBookmark */ = 1FF67B4A1294919400CA07A3 /* PlistBookmark */;
|
||||
1FF67B4B1294919400CA07A3 /* PBXTextBookmark */ = 1FF67B4B1294919400CA07A3 /* PBXTextBookmark */;
|
||||
1FF67BEC1294A39500CA07A3 /* PBXTextBookmark */ = 1FF67BEC1294A39500CA07A3 /* PBXTextBookmark */;
|
||||
1FF67C0B1294A9BE00CA07A3 /* PBXTextBookmark */ = 1FF67C0B1294A9BE00CA07A3 /* PBXTextBookmark */;
|
||||
1FF67C0C1294A9BE00CA07A3 /* PBXTextBookmark */ = 1FF67C0C1294A9BE00CA07A3 /* PBXTextBookmark */;
|
||||
1FF67C6B1294AEA400CA07A3 /* PBXTextBookmark */ = 1FF67C6B1294AEA400CA07A3 /* PBXTextBookmark */;
|
||||
};
|
||||
sourceControlManager = 1FA38C37124D2426004B8852 /* Source Control */;
|
||||
|
|
7
Speaker.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
7
Speaker.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:Speaker.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
2578
Speaker.xcodeproj/project.xcworkspace/xcuserdata/jeena.xcuserdatad/UserInterfaceState.xcuserstate
generated
Normal file
2578
Speaker.xcodeproj/project.xcworkspace/xcuserdata/jeena.xcuserdatad/UserInterfaceState.xcuserstate
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,76 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8D1107260486CEB800E47090"
|
||||
BuildableName = "Speaker.app"
|
||||
BlueprintName = "Speaker"
|
||||
ReferencedContainer = "container:Speaker.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
|
||||
displayScaleIsEnabled = "NO"
|
||||
displayScale = "1.00"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug">
|
||||
<BuildableProductRunnable>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8D1107260486CEB800E47090"
|
||||
BuildableName = "Speaker.app"
|
||||
BlueprintName = "Speaker"
|
||||
ReferencedContainer = "container:Speaker.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
displayScaleIsEnabled = "NO"
|
||||
displayScale = "1.00"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release">
|
||||
<BuildableProductRunnable>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8D1107260486CEB800E47090"
|
||||
BuildableName = "Speaker.app"
|
||||
BlueprintName = "Speaker"
|
||||
ReferencedContainer = "container:Speaker.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>SchemeUserState</key>
|
||||
<dict>
|
||||
<key>Speaker.xcscheme</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>SuppressBuildableAutocreation</key>
|
||||
<dict>
|
||||
<key>8D1107260486CEB800E47090</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
|
@ -23,4 +23,7 @@
|
|||
-(IBAction)seekForward:(id)sender;
|
||||
-(IBAction)seekBack:(id)sender;
|
||||
|
||||
-(void)stopSpeaking;
|
||||
-(void)startSpeaking;
|
||||
|
||||
@end
|
||||
|
|
|
@ -40,11 +40,18 @@
|
|||
|
||||
-(IBAction)speakAction:(id)sender {
|
||||
if ([synth isSpeaking]) {
|
||||
[self stopSpeaking];
|
||||
} else {
|
||||
[self startSpeaking];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)stopSpeaking {
|
||||
[synth pauseSpeakingAtBoundary:NSSpeechWordBoundary];
|
||||
[textView setEditable:YES];
|
||||
}
|
||||
|
||||
} else {
|
||||
-(void)startSpeaking {
|
||||
|
||||
[textView setEditable:NO];
|
||||
|
||||
|
@ -56,8 +63,6 @@
|
|||
[textView scrollRangeToVisible:NSMakeRange(0,0)];
|
||||
}
|
||||
|
||||
if (range.length != oldRange.length || range.location != oldRange.location || isNewLocation) {
|
||||
isNewLocation = NO;
|
||||
NSString *wholeText = [[textView textStorage] string];
|
||||
NSString *text = nil;
|
||||
|
||||
|
@ -71,27 +76,19 @@
|
|||
|
||||
oldRange = range;
|
||||
|
||||
} else {
|
||||
|
||||
[synth continueSpeaking];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(IBAction)seekForward:(id)sender {
|
||||
// not working yet
|
||||
/*
|
||||
[self speakAction:self];
|
||||
|
||||
[self stopSpeaking];
|
||||
|
||||
NSRange selected = [textView selectedRange];
|
||||
NSString *wholeText = [[textView textStorage] string];
|
||||
NSRange position = [wholeText rangeOfString:@". " options:NSLiteralSearch range:NSMakeRange(selected.location + 1, [wholeText length] - selected.location - 1)];
|
||||
[textView setSelectedRange:NSMakeRange(position.location + 2, 0)];
|
||||
isNewLocation = YES;
|
||||
NSLog(@"sp %i", [synth isSpeaking]);
|
||||
[self speakAction:self];
|
||||
*/
|
||||
|
||||
[self startSpeaking];
|
||||
}
|
||||
|
||||
-(IBAction)seekBack:(id)sender {
|
||||
|
@ -103,6 +100,11 @@
|
|||
[textView scrollRangeToVisible:range];
|
||||
[textView setSelectedRange:NSMakeRange(range.location, 0)];
|
||||
[textView showFindIndicatorForRange:range];
|
||||
[textView display];
|
||||
}
|
||||
|
||||
- (void)speechSynthesizer:(NSSpeechSynthesizer *)sender didFinishSpeaking:(BOOL)success {
|
||||
[textView setEditable:YES];
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue