Great!Thanks again.
Post
Replies
Boosts
Views
Activity
Hello Claude31:Thanks.I am thinking of another solution that may have an advantage. That is, Since I loaded all the records I want to use into a temporary Entity, I can delete the record that was fetched. (This entity is refreshed each time the user changes certain predicates).However, I would like to create the dictionary as you suggested, but I've not created one before manually (I've used in Core Data to find UNIQUE records, but core data does the work).Could you provide a sample code?(I'll accept the last suggestion as the correct answer.)
Hello Claude31:In my app, the user gains points by providing correct answers to questions presented. I don't want the user to Game the system by continuously saving a correct answer to increase his score. So if the question was fetched earlier, and is saved again, the user will get no points the second or third time around. So in my logic, I have to code that if the same question (by looking at the Qiestion ID) is saved, the value will be 0 points.
SOLVEDwith the following line added: let enteredString = inputTextField.stringValue
print("Entered Group Name is = \"\(enteredString)\"")
I solved the problem by editing the code as follows:var window: NSWindow?
func checkGroupName() {
let alert = NSAlert()
alert.messageText = "Please enter your group name"
alert.addButton(withTitle: "Save")
alert.addButton(withTitle: "Cancel")
let inputTextField = NSTextField(frame: NSRect(x: 0, y: 0, width: 300, height: 24))
inputTextField.placeholderString = "Enter group name"
alert.accessoryView = inputTextField
alert.runModal()
}
After some experimenting,I found that making the segues "show" instead of "modal" I can open all the windows initially and still access the Main Window.However, When I close the Main Window with the close red x, and reopen it, I can launch all the windows but after launching them I have to close it to use the windows.
Hello:As I was reviewing everything before submission I ran into an inexplicable problem:When I Close the Main Window by clicking the red x and reopen it, then I load another window from a link on the main window and try to load another window, The Main window becomes unusable. I have to close it then reopen it to click on the links. Then when I open another window, the previous window I opened becomes unusable until I close the Main Window.To have access to more that one window at a time I have to close the Main Window.Have you seen anythink like this?
Hello Claude:I found a way to open the window after it was closed (with the red x button) using a modal storyboard segue from the menu link. To quit after it was hooked up this way I had to use an @IBOutlet as follows:@IBActionfunc closeApplication(_ sender: NSMenuItem) {
NSApplication.shared.terminate(AppDelegate.closeApplication)
print("Stop the App")
}Without that it wouldn't close.Thanks for your great help during this difficult journey. That was the last hurdle to jump over.
Hello Claude:I do have a storyboard. I am still trying to resolve the issue of restoring a window after it has been closed. The effort here is to hide the window when the user clicks close so that the window can be restored.Frankly I am now at my wits end!
I got rid of the error in the last post but the one with the links is still saying it is being moderated.
Hello Claude:I posted the links but it is saying Reply is "Currently is being moderated". So I assume you cant see it.In the meantime I am trying to follow-up with some log responses. The following says:Launch Main Window[76488:14123793] [Nib Loading] Failed to connect (reopenMainWindow) outlet from (Launch_Main_Window.AppDelegate) to (NSMenuItem): missing setter or instance variableDoes this say anything to you about what is going on?
I suppose the code in your previous reply is the code i need to implement in App delegate to test if the Main Window is still open?
I have not been able to finsd a workable posting or in Swift to test to see if a window still exists.Some code will be helpful.Thanks
These are my submissions:https://iosapps-ssl.itunes.apple.com/itunes-assets/Purple123/v4/39/1c/b8/391cb82c-b5fa-4a7f-8220-54c33576d39d/pr_source.mov?accessKey=1585328821_8729793728411511591_1xNJXkX1G%2FmjaNNVpbDBMw466xlyQydosNYY9DmejpPbq7Gl0s4v2mu91MtU%2F1vvP8zPyNYl5I01N7vCogj9qloBC5ql%2FgSjTJfhp3u1MdMDizp7WKzlW%2FjC3%2B%2FOZFunAVN%2FQXrijKdzlA4s68jRd%2Fqdhb6KXAxz7d8oxnkEyZA%3Dhttps://iosapps-ssl.itunes.apple.com/itunes-assets/Purple123/v4/69/e1/a4/69e1a4d1-485c-ec5b-431b-3dfa2c289e06/pr_source.mov?accessKey=1585328693_6774048596524576913_gDbnQ4hrND1PO3F41EIdx75Og08bLabZjawQ9HCoq9gntEf55jmPTGAr%2BGa6MQYJY4PVwV%2FcmR3GEEMXDRiln8laKABEP1xPjytEoEyFBggM3l3Qx9ztdN66MoNZKGs20jTcrNz3Vj%2BiLpYEg4RArX4y9QLVElndtK5DEmH985k%3DThis is App Store Connect Response:https://iosapps-ssl.itunes.apple.com/itunes-assets/Purple123/v4/a0/7c/f7/a07cf768-51d6-c96f-a2e3-45c3d55acf36/attachment-5519739611888168270ScreenRecording2020-03-23at11.03.32AM.mov?accessKey=1585328821_7277767811727815517_fxt6nWlGSWWJEz3h4xq%2Fl%2FdYsWs%2B5kuItEKyy%2Fr7ArIgVMldBW17zFmge1u%2BSx%2FECeTh8ir0T2iexJgL4hNqmImOQt7nOeyZmFIt4TWHBM40T3d4KwQJ9jpsc3AMJO4mF%2B5rpxLRhh6m%2BghqwihIJZ1s6ZQsgnrA3napOKQyoxVn%2Fjw7Q4AoA8%2BIX5KDwnzaYfQHYp1ZeB%2FGQB38EDyTHR0mGu%2FEdOUGVrK7rcBItTk%3D
Hello janabanana:Despite the App Store Review comments I shared with Claude31, I still need to solve the problem of getting a menu item to re-open after I click the red x. I included a menu item in the window menu called "Re-Open Main Mindow" but when the window is closed with the red x that item becomes disabled in the menu. The item was connected to First Responder "openWindow" and by an @IBOutlet in AppDelegate Class.