Accessing global variable? - objective-c

I have the following code to login to a web service and store the authentication token:
loginViewController.h
#interface loginViewController : UIViewController<XMLRPCConnectionDelegate>
#property (strong, nonatomic) IBOutlet UITextField *SSO;
#property (weak, nonatomic) IBOutlet UITextField *PASS;
#property (weak, nonatomic) IBOutlet UITextView *LoginError;
#property (nonatomic, retain) NSString *token;
#end
loginViewcontroller.m
#import "loginViewController.h"
#implementation loginViewController
#synthesize SSO;
#synthesize PASS;
#synthesize LoginError;
#synthesize token;
- (IBAction)coreLoginClicked:(id)sender {
NSURL *URL = [NSURL URLWithString: #"https://somesite"];
XMLRPCRequest *request = [[XMLRPCRequest alloc] initWithURL: URL];
XMLRPCConnectionManager *manager = [XMLRPCConnectionManager sharedManager];
[request setMethod:#"systemLogin" withParameters:[NSArray arrayWithObjects: SSO.text, PASS.text, nil]];
[manager spawnConnectionWithXMLRPCRequest: request delegate: self];
NSLog(#"Request body: %#", [request body]);
}
- (void)request: (XMLRPCRequest *)request didReceiveResponse: (XMLRPCResponse *)response {
if (![response faultCode]) {
token = [response object];
[self performSegueWithIdentifier:#"loginSegue" sender:self];
NSLog(#"Response object: %#", [response object]);
}
I have this code in my view controller that is displayed after successful login:
loginViewController* login = [[loginViewController alloc] init];
NSLog(#"Token: %#", login.token);
The value of login.token is nil. What am I doing wrong here? Is this the incorrect way of setting and accessing a global variable?
I was following the tutorial on Objective-C from lynda.com, and this way how they did it.. but maybe I missed something.
Thanks!

You're allocating a new instance, which means it'll be empty. If you want to be able to store objects in a class, you will have to use that instance to get the variables back.

Try accessing token via self:
NSLog(#"Token: %#", self.token);

Your second code bit does this: creates a new instance of the loginVC, and then checks to see if it has a token. You need to instantiate your loginVC, then do your login, and then it will have a value in token. Whatever class/method instantiates the loginVC will then be able to check that instance of loginVC for the token.

Related

Unable to POST to Server using RestKit

I have been trying this for quite sometime now, but I just couldn't be able to post successfully to my server. I have read this, github object mapping overview for the Restkit and, the Gist restKit tutorial.
My Problem
I am trying to post sign in information(nickname,hardwareId,phone model) and get the AccountId from my server. But I am getting this response from the console:
GuessTheImage[6832:70b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<AccountsClass 0x8c5cba0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key AccountInfo.'
What I think is the problem
I believe I am messing up the way I store the data right before the mapping part. But I am not sure where exactly.
The JSON that I am trying post should look like this
{
"DeviceType": "sample string 1",
"HardwareId": "sample string 2",
"NickName": "sample string 3",
"AccountId": 4
}
Overview of the program
I created the variables for mapping in the AccountClass. From loginviewcontroller, I get the device type, hardwareId and nickname after the user clicks login button and assign those variables to the variables in AccountClass and map it POST if afterwards.
AccountClass.h
#import <Foundation/Foundation.h>
#interface AccountsClass : NSObject
#property (nonatomic, strong,retain)NSString *DeviceType;
#property (nonatomic,strong)NSNumber *AccountId;
#property (nonatomic,strong) NSString *NickName;
#property (nonatomic,strong) NSNumber *HardwareId;
#end
LoginViewController.h
#import <UIKit/UIKit.h>
#interface LoginViewController : UIViewController<UITextFieldDelegate>
#property (strong, nonatomic) IBOutlet UITextField *usernameTextField;
#property (strong, nonatomic) IBOutlet UIButton *submitButton;
#property (nonatomic,readonly) NSUUID *identifierForVendor;
#property(nonatomic, readonly, retain) NSString *model;
#property (nonatomic,readonly,retain)NSString *StoreIdentifierForVendor;
#property (nonatomic,readonly,retain)NSString *StoreTheModel;
- (IBAction)submit:(id)sender;
#property (nonatomic,strong)NSString *nickname;
#end
LoginViewController.m
#import "LoginViewController.h"
#import <RestKit/RestKit.h>
#import "AccountsClass.h"
#interface LoginViewController ()
#end
#implementation LoginViewController
#synthesize usernameTextField;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:#selector(dissmissKeyboard)];
[self.view addGestureRecognizer:tap];
[usernameTextField setDelegate:self];
}
-(void)loadPostRequest
{
_StoreIdentifierForVendor = [[[UIDevice currentDevice]identifierForVendor]UUIDString];
_StoreTheModel = [UIDevice currentDevice].model;
_nickname = usernameTextField.text;
AccountsClass *AccountInfo = [[AccountsClass alloc] init];
AccountInfo.NickName = _nickname;
NSNumberFormatter *hardwareIdentification = [[NSNumberFormatter alloc]init];
[hardwareIdentification setNumberStyle:NSNumberFormatterScientificStyle];
NSNumber *hwreID =[hardwareIdentification numberFromString:_StoreIdentifierForVendor];
AccountInfo.HardwareId = hwreID;
AccountInfo.DeviceType =_StoreTheModel;
RKObjectMapping *responseMapping = [RKObjectMapping mappingForClass:[AccountsClass class]];
[responseMapping addAttributeMappingsFromArray:#[#"NickName", #"HardwareId", #"DeviceType",#"AccountId"]];
NSIndexSet *statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful); // Anything in 2xx
RKResponseDescriptor *AccountDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:responseMapping method:RKRequestMethodAny pathPattern:nil keyPath:nil statusCodes:statusCodes];
RKObjectMapping *requestMapping = [RKObjectMapping requestMapping]; // objectClass == NSMutableDictionary
[requestMapping addAttributeMappingsFromArray:#[#"AccountInfo.NickName", #"AccountInfo.HardwareId", #"AccountInfo.DeviceType",#"AccountInfo.AccountId"]];
// For any object of class Article, serialize into an NSMutableDictionary using the given mapping and nest
// under the 'article' key path
RKRequestDescriptor *requestDescriptor = [RKRequestDescriptor requestDescriptorWithMapping:requestMapping objectClass:[AccountInfo class] rootKeyPath:nil method:RKRequestMethodAny];
RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:#"https://picquiz.azurewebsites.net"]];
[manager addRequestDescriptor:requestDescriptor];
[manager addResponseDescriptor:AccountDescriptor];
// POST to create
[manager postObject:AccountInfo path:#"/Accounts" parameters:nil success:nil failure:nil];
}
-(void)dissmissKeyboard
{
[usernameTextField resignFirstResponder];
}
- (IBAction)submit:(id)sender {
[self loadPostRequest];
}
#end
I will appreciate your help.
Your problem appears to be:
[requestMapping addAttributeMappingsFromArray:#[#"AccountInfo.NickName", #"AccountInfo.HardwareId", #"AccountInfo.DeviceType",#"AccountInfo.AccountId"]];
because the data that you are trying to POST doesn't have nested data like that. It looks like it should be:
[requestMapping addAttributeMappingsFromArray:#[#"NickName", #"HardwareId", #"DeviceType",#"AccountId"]];

Why I get this error? At Xcode [duplicate]

This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
I have two error : No visible #interface for ‘UIWebview’
Why I get this error at Xcode. Error is that:No visible #interface for 'UIWebView' declares the selector 'highlightAllOccurencesOfString:' and No visible #interface for 'UIWebView' declares the selector 'removeAllHighlights'. Where are wrong?
WBSecondViewController.h
#import <UIKit/UIKit.h>
#interface WBSecondViewController : UIViewController <UIWebViewDelegate, UIScrollViewDelegate>{}
#property (weak, nonatomic) IBOutlet UIWebView *webView;
#property (weak, nonatomic) IBOutlet UIToolbar *webToolBar;
- (IBAction)searchButtonPressed:(id)sender;
- (IBAction)clearHighlights:(id)sender;
- (NSInteger)highlightAllOccurencesOfString:(NSString*)str;
- (void)removeAllHighlights;
#end
WBSecondViewController.m
#import "WBSecondViewController.h"
#interface WBSecondViewController ()
#end
#implementation WBSecondViewController
-(IBAction)searchButtonPressed:(id)sender{
NSLog(#"highlighttes");
[_webView highlightAllOccurencesOfString:#"不明"];
}
-(IBAction)clearHighlights:(id)sender{
[_webView removeAllHighlights];
}
- (NSInteger)highlightAllOccurencesOfString:(NSString*)str
{
NSString *path = [[NSBundle mainBundle] pathForResource:#"UIWebViewSearch" ofType:#"js"];
NSString *jsCode = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
[_webView stringByEvaluatingJavaScriptFromString:jsCode];
NSString *startSearch = [NSString stringWithFormat:#"uiWebview_HighlightAllOccurencesOfString('%#')",str];
[_webView stringByEvaluatingJavaScriptFromString:startSearch];
NSString *result = [_webView stringByEvaluatingJavaScriptFromString:#"uiWebview_SearchResultCount"];
return [result integerValue];
}
- (void)removeAllHighlights
{
[_webView stringByEvaluatingJavaScriptFromString:#"uiWebview_RemoveAllHighlights()"];
}
#end
These two lines are wrong,
[_webView highlightAllOccurencesOfString:#"不明"];
[_webView removeAllHighlights];
It should be,
[self highlightAllOccurencesOfString:#"不明"];
[self removeAllHighlights];
You are trying to call highlightAllOccurencesOfString and removeAllHighlights which are defined in WBSecondViewController's #interface but on UIWebview objects. Compiler is not able to find it in UIWebView class #interface and hence the error message as No visible #interface for 'UIWebView' declares the selector ...
highlightAllOccurencesOfString and removeAllHighlights are method defined in your WBSecondViewController, while you are attempting to call them on a UIWebView object. Try with this:
-(IBAction)searchButtonPressed:(id)sender{
NSLog(#"highlighttes");
[self highlightAllOccurencesOfString:#"不明"];
}
-(IBAction)clearHighlights:(id)sender{
[self removeAllHighlights];
}
This will at least compile.

An AppDelegate's property is unexpectedly set to null

First of all, I really appreciate your helps.
Well, I use three NSString objects in common in two views. And these view is segued by Embedded NavigationController, I mean I start programming with SingleView.
In AppDelegate.h, I write
#property (weak, nonatomic) NSString *crntURL;
#property (weak, nonatomic) NSString *crntTitle;
#property (weak, nonatomic) NSString *crntHTML;
for delegation.
And in the first view, I have a webview and write
-(void)webViewDidFinishLoad:(UIWebView *)webView
{
AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
NSString *url = [[NSString alloc] initWithString:[myWebView stringByEvaluatingJavaScriptFromString:#"document.URL"]];
NSString *title = [[NSString alloc] initWithString:[myWebView stringByEvaluatingJavaScriptFromString:#"document.title"]];
NSString *html = [[NSString alloc] initWithString:[myWebView stringByEvaluatingJavaScriptFromString:#"document.all[0].outerHTML"]];
appDelegate.crntTitle = nil;
appDelegate.crntTitle = [[NSString alloc] initWithString:title];
appDelegate.crntHTML = nil;
appDelegate.crntHTML = [[NSString alloc] initWithString:html];
appDelegate.crntURL = nil;
appDelegate.crntURL = [[NSString alloc] initWithString:url];
}
Here, when I put NSLog, the expected HTML source code is dumped.
And in the second view(a subclass of UIViewController), I write
- (void)viewDidLoad
{
// Do any additional setup after loading the view.
AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
sourceHTML.text = appDelegate.crntHTML;
NSLog( #"%#", appDelegate.crntHTML );
NSLog( #"%#", appDelegate.crntURL );
NSLog( #"%#", appDelegate.crntTitle );
[super viewDidLoad];
}
and only crntHTML is unexpectedly set to null while crntURL and crntTitle keep values.
Do you have any ideas?
Thank you in advance.
Masaru
You've declared your properties in the app delegate as weak.
Using ARC, an object will be released and set to nil if there's no strong reference to it.
I could imagine you're referencing the title and URL variable from the first view controller, but the HTML variable is only referenced in the second view controller. Once you're ready to show the HTML in the second controller, it has already been released, since the app delegate is not holding on to it.
Try changing the property declarations in the app delegate to strong:
#property (strong, nonatomic) NSString *crntURL;
#property (strong, nonatomic) NSString *crntTitle;
#property (strong, nonatomic) NSString *crntHTML;

NSString being set but appears empty when calling from another class - iOS

I have a small piece of code that sets the NSString (strUsername) of the class Username to the value which is typed into a UITextField and then a button is pressed. This works fine:
UsernameViewController.m
#import <UIKit/UIKit.h>
#import "Username.h"
#interface UsernameViewController : UIViewController
{
Username *username;
__weak IBOutlet UITextField *test;
}
#property (nonatomic, retain)IBOutlet UITextField *txtUsername;
#property (nonatomic, retain) IBOutlet UITextField *test;
-(IBAction)setUsername;
#end
#import "UsernameViewController.h"
#import "Username.h"
#implementation UsernameViewController
#synthesize test=_test;
- (void)viewDidLoad
{
[super viewDidLoad];
username = [[Username alloc] init];
}
-(IBAction)setUsername
{
NSString *inputUsername = self.test.text;
NSLog(#"inputUsername is: %#", inputUsername);
username.strUsername = inputUsername;
NSLog(#"the username.strUsername is now: %#", username.strUsername);
}
My NSLog output shows that the UItextfield input and NSString setter are working:
LocNews1[6699:707] inputUsername is: Harry brown
LocNews1[6699:707] the username.strUsername is now: Harry brown
Now when it hit the back button on this view it return me back to a UITableViewController. I then perform a pull down to refresh action and its called the following method:
TestViewController.m (UITableViewController type)
#import "TestViewController.h"
#import "ViewController.h"
#import "DetailViewController.h"
#import "AppDelegate.h"
#import "NewsArticle.h"
#import "ResultsCustomCell.h"
#import "XMLParser.h"
#implementation TestViewController
//some code
- (void)addItem
{
username = [[Username alloc] init];
// Use XMLparser to check for updated new feeds.
if(username.strUsername != NULL)
{
NSLog(#"ViewController username.strUsername is:%#",username.strUsername);
activeUsername = username.strUsername;
}
else
{
NSLog(#"%#",username.strUsername);
activeUsername = #"";
}
NSString *myLat = [[NSString alloc] initWithFormat:#"%f", locationManager.location.coordinate.latitude];
NSString *mylong = [[NSString alloc] initWithFormat:#"%f", locationManager.location.coordinate.longitude];
XMLParser *parseQuestionnaire = [[XMLParser alloc] init];
NSLog(#"username %#",activeUsername);
newsArticle = [parseQuestionnaire parseXML:myLat:mylong:activeUsername];
[self.tableView reloadData];
[self stopLoading];
}
However this shows the NSLog output as:
LocNews1[6699:707] ViewController username.strUsername is:
As you can see the string has been set in UsernameViewController.m but when I try and call the string back in TestViewController.m is appears to be blank (there is no null in the NSLog, just blank);
What could be causing this?
EDIT: Username.h/m
#import <Foundation/Foundation.h>
#interface Username : NSObject
{
NSString *strUsername;
}
#property (nonatomic, retain) NSString *strUsername;
#end
#import "Username.h"
#implementation Username
#synthesize strUsername;
-(id)init
{
strUsername = [[NSString alloc] init];
return self;
}
#end
Note: Username is declared in both TestViewController.h and UsernameViewController.h like: Username *username;
The username instance variable in that instance of UsernameViewController is completely unrelated to the username instance variable in the instance of TestViewController. You'll need to store the variable in a place that both controllers know about or pass it between them if you want them both to have access. Simply having two variables with the same name doesn't connect them in any way.

Error with loading data without internet connection (Restkit)

After making the rest call through RKObjectManager,it is not loading the objects when i don't have internet connection. I test with domain.local and my WIFI is Off.
I know that i can implement with "reachabilityObserver" but i don't know how can i make this.
My code :
#import "ViewInformationForm.h"
#import <RestKit/RestKit.h>
#interface User : NSObject {
NSNumber* _user_forfait;
NSNumber* _user_client_free;
NSNumber* _user_demande_portabilite;
NSNumber* _user_mail_confirm;
NSNumber* _user_mail_enregistrement_inscrption;
NSNumber* _user_mail_depart_expedition;
NSNumber* _user_mail_arrivee_expedition;
NSNumber* _user_activation;
NSNumber* _user_portabilite;
}
#property (nonatomic, retain) NSNumber* user_forfait;
#property (nonatomic, retain) NSNumber* user_client_free;
#property (nonatomic, retain) NSNumber* user_demande_portabilite;
#property (nonatomic, retain) NSNumber* user_mail_confirm;
#property (nonatomic, retain) NSNumber* user_mail_enregistrement_inscrption;
#property (nonatomic, retain) NSNumber* user_mail_depart_expedition;
#property (nonatomic, retain) NSNumber* user_mail_arrivee_expedition;
#property (nonatomic, retain) NSNumber* user_activation;
#property (nonatomic, retain) NSNumber* user_portabilite;
#end
#implementation User
#synthesize user_forfait = _user_forfait;
#synthesize user_client_free = _user_client_free;
#synthesize user_demande_portabilite = _user_demande_portabilite;
#synthesize user_mail_confirm = _user_mail_confirm;
#synthesize user_mail_enregistrement_inscrption = _user_mail_enregistrement_inscrption;
#synthesize user_mail_depart_expedition = _user_mail_depart_expedition;
#synthesize user_mail_arrivee_expedition = _user_mail_arrivee_expedition;
#synthesize user_activation = _user_activation;
#synthesize user_portabilite = _user_portabilite;
#end
#implementation ViewInformationForm;
#synthesize picker,pickerDate, forfaitNames;
#synthesize forfaitText, TextDateEnregistrement;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)LoadData {
RKObjectMapping* mapping = [RKObjectMapping mappingForClass:[User class]];
[mapping mapKeyPathsToAttributes:
#"data.user_forfait", #"user_forfait",
#"data.user_client_free", #"user_client_free",
#"data.user_demande_portabilite", #"user_demande_portabilite",
#"data.user_mail_confirm", #"user_mail_confirm",
#"data.user_mail_enregistrement_inscrption", #"user_mail_enregistrement_inscrption",
#"data.user_mail_depart_expedition", #"user_mail_depart_expedition",
#"data.user_mail_arrivee_expedition", #"user_mail_arrivee_expedition",
#"data.user_activation", #"user_activation",
#"data.user_portabilite", #"user_portabilite",
nil];
RKObjectManager *objectManager = [RKObjectManager sharedManager];
NSString* urlUID = [NSString stringWithFormat:#"/user/data?uid=%#",uuid];
RKObjectLoader *objectLoader = [objectManager objectLoaderWithResourcePath:urlUID delegate:self];
objectLoader.method = RKRequestMethodGET;
objectLoader.objectMapping = mapping;
[objectLoader send];
}
- (void)objectLoader:(RKObjectLoader*)objectLoader didLoadObjects:(NSArray*)objects {
User* user = [objects objectAtIndex:0];
NSString* info = [NSString stringWithFormat:
#"\n user_forfait : %# \n"
#"user_client_free : %#",[user user_forfait], [user user_client_free]];
NSLog(#"%#",info);
}
- (void)objectLoader:(RKObjectLoader *)objectLoader didFailWithError:(NSError *)error {
RKLogError(#"Load of RKRequest %# failed with error: %#", objectLoader, error);
}
- (void)didReceiveMemoryWarning
{
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
#pragma mark - View lifecycle
/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView
{
}
*/
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad
{
[RKObjectManager objectManagerWithBaseURL:gRKCatalogBaseURL];
[self LoadData];
[super viewDidLoad];
self.forfaitNames = [[NSArray alloc] initWithObjects:
#"-- Sélectionnez un forfait --", #"Forfait 19,99 €", #"Forfait 15,90 €", #"Forfait 2 €",
#"Forfait 0 €", nil];
}
Error :
2012-01-24 09:59:32.120 Free M. Stats[13438:10703] I restkit:RKLog.m:30 RestKit initialized...
2012-01-24 09:59:32.127 Free M. Stats[13438:10703] I restkit.network.reachability:RKReachabilityObserver.m:369 Network availability has been determined for reachability observer <RKReachabilityObserver: 0x8987300 host=0.0.0.0 isReachabilityDetermined=YES isMonitoringLocalWiFi=652464 reachabilityFlags=-R tc----->
2012-01-24 09:59:32.129 Free M. Stats[13438:10703] E restkit.network:RKRequest.m:464 Failed to send request to http://freemobile-stats.local/user/data?uid=b070b4f0a581cf1a16312b7bbb31353c due to unreachable network. Reachability observer = <RKReachabilityObserver: 0x8987300 host=0.0.0.0 isReachabilityDetermined=YES isMonitoringLocalWiFi=652464 reachabilityFlags=-R tc----->
2012-01-24 09:59:32.130 Free M. Stats[13438:10703] E app:ViewInformationForm.m:102 Load of RKRequest <RKObjectLoader: 0x6e69050> failed with error: Error Domain=org.restkit.RestKit.ErrorDomain Code=2 "The client is unable to contact the resource at http://freemobile-stats.local/user/data?uid=b070b4f0a581cf1a16312b7bbb31353c" UserInfo=0x6c99270 {NSLocalizedDescription=The client is unable to contact the resource at http://freemobile-stats.local/user/data?uid=b070b4f0a581cf1a16312b7bbb31353c}
Thank you for your help.
AO.
This is how you register for the reachability notifications in RestKit:
// Register for changes in network availability
NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
[center addObserver:self selector:#selector(reachabilityDidChange:) name:RKReachabilityDidChangeNotification object:nil];
And here you catch the notification:
- (void)reachabilityDidChange:(NSNotification *)notification {
RKReachabilityObserver* observer = (RKReachabilityObserver *) [notification object];
RKReachabilityNetworkStatus status = [observer networkStatus];
if (RKReachabilityNotReachable == status) {
RKLogInfo(#"No network access!");
} else if (RKReachabilityReachableViaWiFi == status) {
RKLogInfo(#"Online via WiFi!");
} else if (RKReachabilityReachableViaWWAN == status) {
RKLogInfo(#"Online via Edge or 3G!");
}
}
You don't even have to register to Restkit reachability notifications system because it is already implemented in the RKRequest method.
So, if no internet connection is detected, your request will fail and this delegate (that you may have already implemented) is called :
- (void)objectLoader:(RKObjectLoader *)objectLoader didFailWithError:(NSError *)error {
// No internet !
}
Beware, this delegate can also be called for others reasons, like when there is an error in the mapping of your data. But for simple cases it should be ok for what you want to do !
Obviously, it won't load data from the Internet if there's no Iternet connection. You may want to try one of the pre-implemented Reachability classes, for example: http://developer.apple.com/library/ios/#samplecode/Reachability/Listings/Classes_Reachability_h.html#//apple_ref/doc/uid/DTS40007324-Classes_Reachability_h-DontLinkElementID_5