Home » Community » Newbie corner » ArrayMap<String,TabCtrl::Item> - check if String exists..
ArrayMap<String,TabCtrl::Item> - check if String exists.. [message #34354] |
Fri, 18 November 2011 11:07 |
Wolfgang
Messages: 146 Registered: November 2011 Location: Germany
|
Experienced Member |
|
|
Hello,
me again!
I try to create an ArrayMap<String,TabCtrl::Item> and "use" it.
Header file - definition
ArrayMap<String,TabCtrl::Item> tabNames;
IN main.cpp
--- String tabName;
--- TabCtrl tab;
tabNames.Add("first",tab.Add(loginLayout.SizePos(), t_("Login")));
This part "works" (gives no error) but HOW to check if an entry for "first" exists in tabNames?
I already tried tabNames.Find("first") but this returns false even if "first" exists in tabNames.
if (tabNames.Find("first")) PromptOK("OK");
You understand what I mean?
|
|
|
|
|
Re: ArrayMap<String,TabCtrl::Item> - check if String exists.. [message #34359 is a reply to message #34357] |
Fri, 18 November 2011 14:04 |
|
Wolfgang wrote on Fri, 18 November 2011 12:39 | Thank you, I just searched in the ArrayMap and couldn't find a entry.
|
Some of the functionality that is common to more classes is often implemented in base classes. E.g. AString is a base to both String and WString, and AMap is base for ArrayMap and VerctorMap. So when searching for help you usually want to read those too.
Honza
|
|
|
Goto Forum:
Current Time: Sun Apr 28 05:09:57 CEST 2024
Total time taken to generate the page: 0.03553 seconds
|