Functional document preparation for xcode - ios

I have to prepare functional documentation for objective-c class methods like below example.
/*!
#function getEmployeeDetails
#abstract getEmployeeDetails
#discussion This function will fetch employee details based on employee id
#param strEmpId
employee unique id
#result an Array of Employee
*/
-(void)getEmployeeDetails :(nsstring *)strEmpId{
}
I referred to HeaderDoc User Guide in the below link and got idea how to prepare manually
Is there any short cut keys for functional documents?

You can use VVDocumenter :
Writing document is so important for developing, but it is really
painful with Xcode. Think about how much time you are wasting in
pressing '*' or '/', and typing the parameters again and again. Now,
you can find the method (or any code) you want to document to, and
type in ///, the document will be generated for you and all params and
return will be extracted into a Javadoc style, which is compatible
with appledoc, Doxygen and HeaderDoc. You can just fill the inline
placeholder tokens to finish your document.
After running the project with Xcode, in any project, you can generate the documentation by typing "///" (you can change this string in the settings) :

Related

Typo3 Translations in Extbase not working with inline relations

i created an extension which uses a main controller which could add inline relations.
I`m using Typo3 11.
If I translate the relations, but not the main Entry, also the language of the already translated relation is the default one.
It doesnt matter, if i set the language to "all", the result is still the same.
I really have to translate the main entry to the other language althought its not necessary.
Is there a way to resolve this issue?
There is a simple rule of thumb: Only use language "all" for parent elements that contain only child elements which should be visible in "all" languages too.
As soon as there should be translated children, you should translate the parent element first and usually pick "connected mode", which will give the default language the lead over the target language behaviour.
If there are differences between the number of different child elements and/or there are child elements in a target language, which don't exist in the default language, you should go for "free mode" translations instead.
So actually there is no "although its not necessary" in your case.
I dont know the reason why, but if I integrated a "foreach" over my "missingTranslationArray" inline IRRE, at the top of my Template the translation is shown.
It doesnt matter that the foreach doesn't make sense inside my template, but now the missing translations are shown.
<f:for each="{myMissingTranslations}" as="myMissingTranslation"></f:for>
For me that helps, but i have no answer why its necessary.
For all who have the same problem, now I`ve got a solution.
Rewrite the "showAction" inside the controller like:
From:
/**
* action show
*
* #param \VENDOR\myExtension\Domain\Model\controller $controller
* #return void
*/
public function showAction(\VENDOR\myExtension\Domain\Model\controller $controller)
{
To:
/**
* action show
*
* #return void
*/
public function showAction()
{
And submit just the "uid". Inside the controller use the "findbyuid" repository for the entry.
$id = $this->request->getArguments('entry');
$entry = $this->entryRepository->findByUid($id['entry']);
$this->view->assign('entries', $entry);
The empty repository for each inside the template is also necessary. For that renders every repository inside every single action.
i.e.:
<f:for each="{myRelation1}" as="myRelation1"></f:for>
<f:for each="{myRelation2}" as="myRelation2"></f:for>

How to build structured realtime firebase database for iOS, swift?

I am currently setting up my realtime firebase database to my iOS application.
It is my first time trying to structure user data in a firebase database, and I am really, really struggling with understanding a few key things.
A bit of context to my application's database needs:
When a new user is created, the attributes assigned directly to the user are:
Age
Email
Username
Nationality
Later on, the user needs the option of creating personal diaries!
Each of these diaries being arrays/lists of objects... Where each object in a diary furthermore holds a few attributes in a list/array.
After reading everything I could find anywhere, I picture my database something like this:
I am terribly sorry if it becomes too specific - I will try to make the question as open as possible:
My question is:
How to create the different "children" programmatically and how to find the keys leading back to them, so I can refer to them at other times again? (when editing an attribute in a child).
A few methods I have tried:
setValue([ArrayOfObjects]) --> This creates the desired array, but I can't seem to find e.g. index 3 in this array, to allow user to change his/her email later on.
childByAutoID() --> This as well creates my array, but gives several other problems: User can only store one diary, still can't find the paths to specific indexes...
setValue(), andPriority() --> Can't seem to make the priority function. (Is this function also outdated??)
And a few more...
If anyone can tell me how to achieve just the first few steps in setting up my database structure, I will be forever grateful - I have spent literally all day on it and I am not moving forward ...
Or, at least tell me, if I am on the right track regarding my desired setup of the database. Is it flat enough? Is there a smarter way to store all these user created lists?
Thank you so much! :-)
I don't know Swift so my examples are in Dart but the methods are similar I believe.
First off, I would split the Users node into two. One to hold the user data, which is normally pretty static, and the other to hold the diaries. You would use the same uid key as reference to both. This way you have less nesting to worry about and therefore it is much easier to CRUD the data. If you are using Firebase to authenticate your users then I would use the unique key that Firebase creates for each user as the keys for these two nodes.
Then...
To create a user data node record the Dart code would be something like:
referenceUserData.child(<authenticated user id>).set({
"age": <age value>,
"email": <email value>,
"name": <name value>,
});
To create a user diary node object record the Dart code would be something like:
referenceUserData.child(<authenticated user id>).child(<diary key>).child(<diary object key>).set({
"object info value 1": <object value>,
"object info value 2": <object value>,
"object info value 3": <object value>,
});
You could also create all the object records at once by writing them as a List (array) using .set().
You also need to decide what your diary key should be. You could use Firebase to generate a unique key by using .push().set().
To read eg. the user data then your call could be:
referenceUserData
.child(<authenticated user id>)
.once()
.then(
(DataSnapshot snapshot) {
print(snapshot.key);
if (snapshot.value != null) {
print(snapshot.value);
<code to process your snapshot value>
}
};
BTW, 'priority' is legacy from the early days of Firebase RTDB so I wouldn't try to use it.

ExtJs6: Ext.ComponentQuery.query('#autogenerated_id') returns an empty array if the component has an itemId

I have some ExtJs component.
I set itemId for it, but id is autogenerated.
Now Ext.getCmp('autogenerated-id') returns my component.
But Ext.ComponentQuery.query('#autogenerated-id') returns an empty array.
But:
Ext.ComponentQuery.query('[id=assets-information-form-1918]') again returns my component. :)
I use ExtJs 6.5.3 classic.
It seems like itemId config property hides autogenerated id from Ext.ComponentQuery, so they become mutually exclusive.
I don't need other means for search or advice to set id for the component, to write letter to Sencha support or to write post on their forum.
I need:
Means to force my Ext.ComponentQuery.query('#autogenerated-id') to
find the Component for which getId() returns 'autogenerated-id'.
If it is not possible by design, I need a link to some documentation
describing this behavior, a link to some bug report, or a filename and line number in ExtJs sources + a little snippet copy/paste from there.
From the documentation
Summary Provides searching of Components within Ext.ComponentManager
(globally) or a specific Ext.container.Container on the document with
a similar syntax to a CSS selector. Returns Array of matching
Components, or empty Array.
Ext.ComonpentQuery.query('#itemId') returns and array. Your cold above is using the auto-generated id of the component. The # indicates to query based on the component itemId and not the component id.
Try
Ext.ComponentQuery.query('assets-information-form-1918');
which will return an array, as noted in the documentation.
Ext.getCmp()
This is shorthand reference to Ext.ComponentManager#get. Looks up an
existing Ext.Component by id
Therefore it returns the component object.
Ext.ComponentQuery.query('#itemId')[0] would return the first object in the array.
Ext.ComponentQuery is the Sencha preferred method because it is more powerful when used as it does return an array so you an also query items by xtype and other attributes.

Link to external URL documentation from doxygen-style Objective-C comments

I want to write something similar to this:
/**
Post a review. (For every place belongs only one review. If it was already written, the previous one will be overwritten.)
#param placeId Place identifier
#param rating Rating 0-5 for the place
#param review The text the user entered for review
#param callback Gets called either when the network request succeeds or when fails for some reason. The `success` parameter indicates this. If success is true, the contents of the `data` parameter of the response is given back as the `response` parameter. If the request fails, then only the `error` parameter is filled. You can find the details in this object.
#see http://example.com/api/v1/doc/service/review/saveReview?pkey=t75jg-5uGse-qIo
*/
- (void)saveReviewFor:(NSNumber *)placeId rating:(NSUInteger)rating review:(NSString *)review callback:(VMNetworkCallback)callback;
The problem is, that the link at the #see tag is not clickable in Xcode help bubbles:
Is it possible to have a clickable documentation link in this view? What syntax shall I use?
Yes it is possible to do so,
Change your #see tag to be as follow:
#see <http://example.com/api/v1/doc/service/review/saveReview?pkey=t75jg-5uGse-qIo>
For more information you can read the relevant section at Doxygen Documentation
Markdown support -> Automatic Linking

What happened to the hrplimittablerelationship table in ax-2012-r2?

Any advice on how I can replace the following code from AX 2009?
display amount mrpg_limit()
{
return HRPLimitTableRelationship::find("Spending", emplTable_1.PartyId).LimitValue;
}
The HRPLimittableRelationship table was moved to multiple tables
HRPApprovedLimit
HRPApprovedLimitAmount
If you want more details about the process of how this was changed, look at the data upgrade scripts on msdn: http://msdn.microsoft.com/EN-US/library/jj737032.aspx
This TechNet article describes the actual creation of signing limits, in case you need it for testing.
http://technet.microsoft.com/en-us/library/hh271654.aspx
Taking a shot in the dark on getting the information you wanted, there is a class called PurchReqDocument with a static method of spendingLimitStatic, where you supply the worker recid and currency code.

Resources