Claude31,Thanks for the answer.The app will be local on Mac, reading and showing data on noteook, running only Swift, without PHP.Is it necessary to have a PHP interface to use MySql?Or is there any other database better suited for use with XCode / Swift?
Post
Replies
Boosts
Views
Activity
Tks Claude31,Here a good link about this:ht tps://medium.com/@joseortizcosta/connecting-ios-app-to-mysql-database-with-swift-5-using-protocol-delegation-and-mvc-architectural-259dc32fcc4b
Tanks Claud31
Tanks szymczyk
Tks, eskimo,I'm studing option with PHP.
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.
Tanks Claude31,
The answer for my problem I find here:
https://developer.apple.com/forums/thread/112517?answerId=345249022#345249022.
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.
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.
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.
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
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.
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.
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.