×
Namespaces

Variants
Actions
(Difference between revisions)

Avoid reserved IDs in Symbian resource file enumerations (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search
hamishwillee (Talk | contribs)
m (Hamishwillee - Adding missing translation link)
hamishwillee (Talk | contribs)
m (Hamishwillee - Bot update - Fix ArticleMetaData and minor updates)
Line 2: Line 2:
 
[[Category:Symbian C++]]
 
[[Category:Symbian C++]]
 
[[Category:UI]]
 
[[Category:UI]]
__NOTOC__
+
{{ArticleMetaData <!-- v1.2 -->
__NOEDITSECTION__
+
{{KBKI}}
+
{{ArticleMetaData
+
|id=TSS000199
+
|platform= S60 (all)
+
|devices=
+
|category=Symbian C++
+
|subcategory=UI, UI Components
+
|creationdate=April 7, 2005, updated October 14, 2008
+
|keywords=
+
 
+
 
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) -->
 
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) -->
 
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
 
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
|sdk=<!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) -->
+
|devices= <!-- Devices tested against - e.g. ''devices=Nokia 6131 NFC, Nokia C7-00'') -->
|devicecompatability=<!-- Compatible devices (e.g.: All* (must have GPS) ) -->
+
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) -->
|signing=<!-- Empty or one of Self-Signed, DevCert, Manufacturer -->
+
|platform= S60 (all)
|capabilities=<!-- Capabilities required (e.g. Location, NetworkServices.) -->
+
|devicecompatability= <!-- Compatible devices (e.g.: All* (must have GPS) ) -->
|author=[[User:Technical writer 1]]
+
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
 +
|signing= <!-- Empty or one of Self-Signed, DevCert, Manufacturer -->
 +
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
 +
|keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase -->
 +
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 +
|translated-by= <!-- [[User:XXXX]] -->
 +
|translated-from-title= <!-- Title only -->
 +
|translated-from-id= <!-- Id of translated revision -->
 +
|review-by= <!-- After re-review: [[User:username]] -->
 +
|review-timestamp= <!-- After re-review: YYYYMMDD -->
 +
|update-by= <!-- After significant update: [[User:username]]-->
 +
|update-timestamp= <!-- After significant update: YYYYMMDD -->
 +
|creationdate= April 7, 2005, updated October 14, 2008
 +
|author= [[User:Technical writer 1]]
 +
<!-- The following are not in current metadata -->
 +
|subcategory= UI, UI Components
 +
|id= TSS000199
 
}}
 
}}
  
Line 36: Line 41:
 
==Solution==
 
==Solution==
  
Always use a non-zero value for MENU_ITEM command IDs, because 0 is reserved for the <tt>EEikCmdCanceled</tt> command.
+
Always use a non-zero value for MENU_ITEM command IDs, because 0 is reserved for the {{Icode|EEikCmdCanceled}} command.
  
Similarly, a dialog's item (DLG_LINE) IDs must be non-zero. Dialog items with a zero ID will result in "Eikon-Dialog 3" panic, where 3 is listed as <tt>EEikDialogPanicFocusableLineWithIdZero</tt>.
+
Similarly, a dialog's item (DLG_LINE) IDs must be non-zero. Dialog items with a zero ID will result in "Eikon-Dialog 3" panic, where 3 is listed as {{Icode|EEikDialogPanicFocusableLineWithIdZero}}.
  
 
Typically, applications define resource ID values as enumerations and a common mistake is to begin the enumeration from 0 (default), which leads to these hard-to-identify problems.
 
Typically, applications define resource ID values as enumerations and a common mistake is to begin the enumeration from 0 (default), which leads to these hard-to-identify problems.
 
<!-- Translation --> [[zh-hans:防止资源文件枚举值中出现保留ID值]]
 
<!-- Translation --> [[zh-hans:防止资源文件枚举值中出现保留ID值]]

Revision as of 06:26, 12 March 2012

Article Metadata
Compatibility
Platform(s): S60 (all)
Article
Created: User:Technical writer 1 (April 7, 2005, updated October 14, 2008)
Last edited: hamishwillee (12 Mar 2012)


Overview

Menu item command IDs and dialog item ID values of 0 will cause problems which may be hard to identify and debug.


Detailed description

Menu item (RESOURCE MENU_ITEM) command IDs and dialog item (RESOURCE DLG_LINE) will cause problems which may be hard to identify and debug if 0 is used as the ID value.


Solution

Always use a non-zero value for MENU_ITEM command IDs, because 0 is reserved for the EEikCmdCanceled command.

Similarly, a dialog's item (DLG_LINE) IDs must be non-zero. Dialog items with a zero ID will result in "Eikon-Dialog 3" panic, where 3 is listed as EEikDialogPanicFocusableLineWithIdZero.

Typically, applications define resource ID values as enumerations and a common mistake is to begin the enumeration from 0 (default), which leads to these hard-to-identify problems.

58 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×