Posts

Post marked as solved
2 Replies
281 Views
I'm wanting to know the proper way to throw a dialog up while my app is loading (Core Data / Migration). It would be something similar to a Startup Screen. I've seen nothing online about doing this except for iOS. I don't want my users sitting there for 15 seconds wondering if they should Force-Quit. I'd like to throw a popup dialog that simply says "Hang on...". Is this an accepted technique, or do I need to do all my data loading after the app has finished loading its first view? Just not sure what's proper.
Posted
by kkirkhoff.
Last updated
.
Post marked as solved
8 Replies
1.8k Views
I understand the concept of DispatchQueues, but have only used them once, so I am probably in need of enlightenment because I'm definitely missing something. I have a MacOS program that has a SplitView that swaps out views/pages.I have the following code block in a function: DispatchQueue.global(qos: .userInitiated).async { . . .}When the program begins, and the view with the DispatchQueue code is the initial view, the block is executed.If I go to that page from another view, the block is ignored...and boom!The purpose of using the DispatchQueue is to provide graphical feedback while my program is loading data. I'm not a fan of the spinning beachball.(I'm happy to provide more information, but I thought there may be an obvious reason without overloading everyone)Thanks for any suggestions or insight.
Posted
by kkirkhoff.
Last updated
.
Post marked as solved
4 Replies
299 Views
I'm not sure if I'm violating a rule here because I'm wanting opinions as opposed to a specific answer.I have a MacOS application whose content does not change location or adjust shape. So, in IB, nearly every item I put in a view will be constrained Left and Top, and Width and Height. So if someone enlarges or shrinks the window size, everything inside stays put.Recently, I'm noticing that if I add items to an existing view, if I move them around before setting constraints, this results in part of my original content being drastically moved around the view (like 50 pixels). In some cases my window size will enlarge by 200. It's obvious I'm either doing something wrong or I'm not understanding how IB/Storyboards/AutoLayout/Constraints work.But my question is, given how I want to layout my window contents, is the way I do it the best way to achieve my desired result? Constraints top, left, width, height. Maybe using Stacks instead?
Posted
by kkirkhoff.
Last updated
.
Post marked as solved
5 Replies
334 Views
What is the best/accepted way to relay the changing status to a user?Dialog?TextField inside the window?I have a function that reads and processes a bunch of user data.I want to show the status of the process, not just show an Activity Indicator.Depending on the amount of data a user has accumulated, the process could take 20 seconds.Here is my function (in general)@IBOutlet weak var statusMessageLabel: NSTextField! func ProcessData() { statusText.stringValue = “Message 1” read_data1() statusText.stringValue = “Message 2” read_data2() statusText.stringValue = “Message 3” check_for_stuff() statusText.stringValue = “Message 4” check_for_stuff2() statusText.stringValue = "Done" }As expected, the only thing shown is "Done".I need the UI to update before the function is complete, but I don’t think that’s possible.
Posted
by kkirkhoff.
Last updated
.