Greetings,
I have been working on adding some extra fields to the nib files per the directions in http://www.bruji.com/forum/viewtopic.php?p=4107 I have added the desired fields into the nib, edited the pedia attributes section, and i edited the RealTitles.strings file, however, none of the data i am entering into the application is being written into my info.xml file.
any thoughts on what i am missing?
thanks!
Adam
Adding new fields
Hi Adam,
New fields can't be added in the current version. The fields are linked via specific outlets in the nib file. What the other post referred to was taking the available fields and renaming the title for that field. For example you would rename the title above Purchased At to Location and you would do the same in the RealTitles.string ("PurchasedAt" = "Location"). So that field would now be named Location for the user however in the XML file it would still be named PurchasedAt. It was taking advantage of the localization feature in the program to rename fields. What you're trying to do is taking the customisation of the Pedia's further. We are working towards that flexibility, however it's going to take us a while. As we want to get everything working smoothly with the new flexible code before we start figuring out a way for each user to extend the fields and get Core Data to accept the changes.
So if you want to attempt the changes with this version to Comicpedia you can rewrite all the fields but you have to keep the same number of fields. Basically re-using the fields that are already there. You can re-size them and move them around, but leave the pediattribute the same and if it was a date field it has to stay a date field, you can't change theatrical release to location as the program expects a date.
New fields can't be added in the current version. The fields are linked via specific outlets in the nib file. What the other post referred to was taking the available fields and renaming the title for that field. For example you would rename the title above Purchased At to Location and you would do the same in the RealTitles.string ("PurchasedAt" = "Location"). So that field would now be named Location for the user however in the XML file it would still be named PurchasedAt. It was taking advantage of the localization feature in the program to rename fields. What you're trying to do is taking the customisation of the Pedia's further. We are working towards that flexibility, however it's going to take us a while. As we want to get everything working smoothly with the new flexible code before we start figuring out a way for each user to extend the fields and get Core Data to accept the changes.
So if you want to attempt the changes with this version to Comicpedia you can rewrite all the fields but you have to keep the same number of fields. Basically re-using the fields that are already there. You can re-size them and move them around, but leave the pediattribute the same and if it was a date field it has to stay a date field, you can't change theatrical release to location as the program expects a date.
It possible to relocate the fields. What happens when you copy/paste or remove and add a new field is that you break the connection between the controller and the field. To re-establish that connection you have to ctrl-drag from the blue box "Controller" icon to the field and then double click on the outlet that you would like to connect it to in the inspector panel. The outlets are named after the fields so they should be easy to identify.
Selecting the controller icon and hitting command-2 and selecting the outlet tab in the inspector and then clicking the different outlets to show the connection will give you a feel for how the controller is connected to each specific field. This is how it knows what field it is and that it exists. Obviously the smart way would be for the program to query each field for what value it represents and to do so for all fields in a window and that is how the future version will work, much more dynamic and less static in the nib.
The OK button does not break for me when moving fields. But that one is the opposite, make sure it's action is connected to the controller "processAddPanel:"; you do this by ctrl-dragging from the button to the controller.
I hope that helps, let me know if you have any other questions.
Selecting the controller icon and hitting command-2 and selecting the outlet tab in the inspector and then clicking the different outlets to show the connection will give you a feel for how the controller is connected to each specific field. This is how it knows what field it is and that it exists. Obviously the smart way would be for the program to query each field for what value it represents and to do so for all fields in a window and that is how the future version will work, much more dynamic and less static in the nib.
The OK button does not break for me when moving fields. But that one is the opposite, make sure it's action is connected to the controller "processAddPanel:"; you do this by ctrl-dragging from the button to the controller.
I hope that helps, let me know if you have any other questions.
As a follow up to the OK button breaking, if you go in click on "Borrowed By", Press delete, save, re/launch bookpedia and then right click an entry, and click on "edit Advanced info" and then just click OK or even Next, neither of the buttons work (for me at least). Also, i can't find the processAddPanel controller - is it under outlets?
Good point about deleting the field, thank you for the clear explanation. What is happening is the connection I was talking about earlier is now disconnected as there is no borrowed field, and when it tries to determine what the value is for the borrowed by it fails. You will see it give an exception in your console log (that you can view with the program of the same name) when it tries to insert an empty object into the dictionary for the borrowed by. So I was wrong earlier about deleting fields, you can move things around but all the connection must exist in the end for all the outlets it expects. If you want to remove a field, it's better to shrink it and and move it out of the way and in the inspector panel (command-1) click the hidden check box, that will make it invisible and be ignored by the UI.