Post

Replies

Boosts

Views

Activity

Change text in NSScrollView
Hello, I need to change the text of an NSScrollView at run time, but the command below is not working: ScrViwRegras.documentView?.insertText (rules.retornaTextoRegras()) Where Rules is a struct that has the returnTextoRegras() method that returns the new text. Has anyone had this problem? Xcode 15.0.1 in MacBook Air not iOS), Swift 5, Hugs
0
0
340
Dec ’23
Callback for object between NSViewController
Hi, This question is similar to a previous post (Return values for NSViewController) but the difference now is that the return from VC2 to VC1 is an object. Problem description: The NSViewController VC1 activates the NSViewController VC2 using the segue and passes by delegate an OBJ object of a class instantiated in VC1. VC2 changes the values of OBJ properties, and calls dismiss to return focus to VC1. How to make VC1 be notified immediately when VC2 closes? Obs. I created a method in VC1 triggered by a button that confirms that the values of the OBJ properties were really changed.
0
0
351
Mar ’23
Passing object between NSViewController
Hi, I have a P1 protocol, whose methods and properties are implemented by the C1 class. In NSViewController VC1, object OBJ1 of class C1 is instantiated. VC1 loads a new NSViewController VC2 through the segue, which needs access to the OBJ1 object. What is the best method to make VC2 see the object OBJ1, being able to modify it and return it to VC1? Thanks.
11
0
1.1k
Mar ’23
Return values for NSViewController
Hi, I have two NSViewController, VC1 and VC2. VC1 activates VC2 using segue and sends a struc object that will be used in VC2 to execute a process, fills in other data in the received object that should be visible in VC1. To terminate VC2 do vc2.dimiss. How do I know that focus has returned to VC1? Which method is executed on VC1 on return? Thanks.
2
0
513
Mar ’23
App macOS Core Data and Swift
Hi, I'm creating an app for MacOs, not iOS, using Core Data. The data model is already done, with all tables and relationships defined. Now I need to do two things: How to remove that “+” that appears in the upper right corner of the application; How to build the menu, so that you can place calls to the features I need in it; Include records in each different table; Perform queries on tables All examples I found speak to change the AppDelegate.swift file, however the created app does not have this file, as it was created following the example of the link https://developer.apple.com/documentation/coredata/creating_a_core_data_model. Can someone tell me where to find a good example of an app with Core Data, Menu and CRUD operations, using Swift? Thanks P.S .: Sorry for my English
3
0
672
May ’21
Swift 5.1 + MySql + macOS
Hello to all,I am creating a macOS XCode app using Swift 5.1 which should run locally on Mac. I already have a MySql database with data from a Java application.How can I make the connection and access the data through XCode application?I saw several articles but all talk about app running in a web environment. In my case it is a local app.Thanks.
10
0
8.2k
Dec ’19