Post

Replies

Boosts

Views

Activity

Reply to Dynamic e random matrix
Claude31, Exactly. In the application, the user will answer some questions and according to their answer, a certain column X row will be filled with information. Like this: The cell (col X row) to be filled depends on the user's response The content will be text, a string. You can restart the app at any time, when previously used cells must be cleaned.
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’24
Reply to Xcode X Switt X SQLite
Hi AndyJJ, Thanks for the tips, after corrections the error messages disappeared. However, the command while fmResultSet!.next() != nil It always returns True, so the loop ends up giving an error when finding one of the columns of the ResultSet where I check if it is different from nil. To work around, I now check if the PkLivro field is equal to zero then I break the loop. Thanks.
Topic: Programming Languages SubTopic: Swift Tags:
May ’23
Reply to Passing object between NSViewController
Hi Claude31, The code behavior is completely strange. I did the debbug, and the code inside the button's Action is simply not executed, that's why it doesn't show the changed values assigned to the properties, although VCCampos is called. So when loading VCCampos it takes the original creation of objClasseCampos
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’23
Reply to Passing object between NSViewController
The solution of removing line 71 makes the application a single record! The application must be able to send different information to the second viewcontroller. There will be a field for each of the variables, allowing the user to fill in each of the variables in the class with whatever values they want. That is, it must be able to generate instances of the class with information that will be on the screen.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’23
Reply to Passing object between NSViewController
Hi, This thread uses the protocol implementation performed by NSViewController, which was the previous situation I posted (already resolved). Now the implementation of the protocol is done in a class, as described below. This is just a study to understand how to pass an instantiated object of a class between two NSViewControllers. Here is the Protocol. Here is the definition of the class that implements the protocol. Here is the definition of the first NSViewController . Here is the definition of the second NSViewController. In the first viewcontroller, on line 22, the class object is declared and instantiated, with default parameters. In the button's code on line 71, the object is instantiated with the values to be passed to the second viewcontroller, called on line 85, with the object's delegate. However, the values that arrive at the second viewcontroller are those declared on line 22. Thanks.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’23
Reply to Dynamic e random matrix
Claude31, Exactly. In the application, the user will answer some questions and according to their answer, a certain column X row will be filled with information. Like this: The cell (col X row) to be filled depends on the user's response The content will be text, a string. You can restart the app at any time, when previously used cells must be cleaned.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to Xcode X Switt X SQLite
Hi AndyJJ, Thanks for the tips, after corrections the error messages disappeared. However, the command while fmResultSet!.next() != nil It always returns True, so the loop ends up giving an error when finding one of the columns of the ResultSet where I check if it is different from nil. To work around, I now check if the PkLivro field is equal to zero then I break the loop. Thanks.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’23
Reply to Passing object between NSViewController
Hi Claude32, Sorted out. Both segues were pointed at the buttons as the first one I made was working like that. So I made the second one the same way. Now I switched the direct connection to the VC of the two buttons and everything works as I need. Thanks.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to Passing object between NSViewController
Hi Claude31, The code behavior is completely strange. I did the debbug, and the code inside the button's Action is simply not executed, that's why it doesn't show the changed values assigned to the properties, although VCCampos is called. So when loading VCCampos it takes the original creation of objClasseCampos
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to Passing object between NSViewController
I forgot to say, but I had already done the test of removing the var from line 71, the result is always the same: it only shows the values declared in the instance created on line 22.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to Passing object between NSViewController
The solution of removing line 71 makes the application a single record! The application must be able to send different information to the second viewcontroller. There will be a field for each of the variables, allowing the user to fill in each of the variables in the class with whatever values they want. That is, it must be able to generate instances of the class with information that will be on the screen.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to Passing object between NSViewController
Hi, This thread uses the protocol implementation performed by NSViewController, which was the previous situation I posted (already resolved). Now the implementation of the protocol is done in a class, as described below. This is just a study to understand how to pass an instantiated object of a class between two NSViewControllers. Here is the Protocol. Here is the definition of the class that implements the protocol. Here is the definition of the first NSViewController . Here is the definition of the second NSViewController. In the first viewcontroller, on line 22, the class object is declared and instantiated, with default parameters. In the button's code on line 71, the object is instantiated with the values to be passed to the second viewcontroller, called on line 85, with the object's delegate. However, the values that arrive at the second viewcontroller are those declared on line 22. Thanks.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to Return values for NSViewController
Tanks Claude31, The answer for my problem I find here: https://developer.apple.com/forums/thread/112517?answerId=345249022#345249022.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to App macOS Core Data and Swift
Hi, This is the image of the app. Image Image of the home screen of the application - https://developer.apple.com/forums/content/attachment/fd203355-f7b2-452e-9e71-1f9f141a3a56 The menu will be placed on the top bar.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’21