Creating and running Java .ini files

Reply

Join Date: Nov 2009
Posts: 6
Reputation: Camzie is an unknown quantity at this point 
Solved Threads: 0
Camzie Camzie is offline Offline
Newbie Poster

Creating and running Java .ini files

 
0
  #1
Nov 25th, 2009
Hi there

Iam busy creating an .ini file for an application, but it is throwing a null pointer exception the whole time and can't seem to figure out what the problem is.

Why would it throw such an error and what does it mean?

Could you please help me?
Will appreciate it...

Here is the code for the .ini file InteractiveScreen.ini:

  1. ;@InteractiveScreen
  2. ;
  3. ;This interactive screen shows the general information on SmartVillage and Neotel.
  4. ;Smart Village
  5. ;
  6. ;Set page properties
  7. [PortalPage]
  8. OnShow=focus:buttonInformation
  9. Type=com.mca.portal.PortalPage
  10. ;
  11. ;Places the logo onto the screen
  12. ;
  13. ;Create the complex logo image
  14. [iconLogo1]
  15. Graphic=Normal, images/smartVillage.jpg
  16. Location=50, 50
  17. Size=150, 150
  18. Type=org.havi.ui.HStaticIcon
  19. ;
  20. ;Places text content on to the screen
  21. ;
  22. ;Set the page header
  23. [textHeader1]
  24. Text=Smart Village
  25. Type=org.havi.ui.HStaticText
  26. ;
  27. ;Set the page text content
  28. [textContent1]
  29. Text=Smart Village™ is South Africa’s leading, next generation network and infrastructure solutions provider.
  30. Location=50, 60
  31. Size=90, 90
  32. Type=org.havi.ui.HStaticText
  33. ;
  34. ;Set the page text content
  35. [textContent2]
  36. Text=By utilising state-of-the-art fibre optic networks, Smart Village is able to deliver fully integrated multimedia,telecommunication and security solutions to residential, commercial and hospitality developments.
  37. Location=50, 61
  38. Size=90, 90
  39. Type=org.havi.ui.HStaticText
  40. ;
  41. ;Set the page text content
  42. [textContent3]
  43. Text=Our competitive advantage draws its strength from the diversity and technical capabilities of our networks, which guarantees a solid base for our core and value added service offerings.
  44. Location=50, 62
  45. Size=90, 90
  46. Type=org.havi.ui.HStaticText
  47. ;
  48. ;Set the page text content
  49. [textContent4]
  50. Text=From humble beginnings in 2004, the company has grown from a small start-up venture, into South Africa’s premier multi-play service provider.
  51. Location=50, 63
  52. Size=90, 90
  53. Type=org.havi.ui.HStaticText
  54. ;
  55. ;Set the page text content
  56. [textContent5]
  57. Text=Smart Village has a very strong national footprint, with over a thousand homes and businesses already connected.
  58. Location=50, 64
  59. Size=90, 90
  60. Type=org.havi.ui.HStaticText
  61. ;
  62. ;Set the page text content
  63. [textContent6]
  64. Text=Having already secured a significant portion of the market, accelerated growth is expected as Multichoice has acquired a controlling stake in Smart Village to broaden its core DStv offerings, by using Smart Village's next generation networks.
  65. Location=50, 65
  66. Size=90, 90
  67. Type=org.havi.ui.HStaticText
  68. ;
  69. ;Set the page text content
  70. [textContent7]
  71. Text=By providing a totally unique turnkey solution, Smart Village enables clients to deal with a single provider for multimedia, telecommunication, data and security services.
  72. Location=50, 66
  73. Size=90, 90
  74. Type=org.havi.ui.HStaticText
  75. ;
  76. ;Set the page text content
  77. [textContent8]
  78. Text=Smart Village also offers all the necessary service, maintenance and support that clients require, ensuring complete and total peace of mind.
  79. Location=50, 67
  80. Size=90, 90
  81. Type=org.havi.ui.HStaticText
  82. ;
  83. ;Contact details
  84. ;
  85. ;Set the page text content
  86. [textContent9]
  87. Text=Smart Village Head Office
  88. Location=50, 68
  89. Size=90, 90
  90. Type=org.havi.ui.HStaticText
  91. ;
  92. ;Set the page text content
  93. [textContent10]
  94. Text=Tel : +27 (0) 12 679 3400
  95. Location=50, 69
  96. Size=90, 90
  97. Type=org.havi.ui.HStaticText
  98. ;
  99. ;Set the page text content
  100. [textContent11]
  101. Text=Fax : +27 (0) 12 679 3401
  102. Location=50, 70
  103. Size=90, 90
  104. Type=org.havi.ui.HStaticText
  105. ;
  106. ;Set the page text content
  107. [textContent12]
  108. Text=Post Box : ////////throws an error right here!!!!!!!!!!!!!!
  109. Location=50, 71
  110. Size=90, 90
  111. Type=org.havi.ui.HStaticText
  112. ;
  113. ;Set the page text content
  114. [textContent13]
  115. Text=Postnet Suite 422
  116. Location=50, 72
  117. Size=90, 90
  118. Type=org.havi.ui.HStaticText
  119. ;
  120. ;Set the page text content
  121. [textContent14]
  122. Text=Privatebag x 108
  123. Location=50, 73
  124. Size=90, 90
  125. Type=org.havi.ui.HStaticText
  126. ;
  127. ;Set the page text content
  128. [textContent15]
  129. Text=Centurion
  130. Location=50, 74
  131. Size=90, 90
  132. Type=org.havi.ui.HStaticText
  133. ;
  134. ;Set the page text content
  135. [textContent16]
  136. Text=0046
  137. Location=50, 75
  138. Size=90, 90
  139. Type=otg.havi.ui.HStaticText
  140. ;
  141. ;Set the page text content
  142. [textContent17]
  143. Text=Physical Address :
  144. Location=50, 76
  145. Size=90, 90
  146. Type=org.havi.ui.HStaticText
  147. ;
  148. ;Set the page text content
  149. [textContent18]
  150. Text=Centurion Gate Complex
  151. Location=50, 77
  152. Size=90, 90
  153. Type=org.havi.ui.HStaticText
  154. ;
  155. ;Set the page text content
  156. [textContent19]
  157. Text=2nd Floor
  158. Location=50, 78
  159. Size=90, 90
  160. Type=org.havi.ui.HStaticText
  161. ;
  162. ;Set the page text content
  163. [textContent20]
  164. Text=Cnr John Vorster & Akkerboom Street
  165. Location=50, 79
  166. Size=90, 90
  167. Type=org.havi.ui.HStaticText
  168. ;
  169. ;Set the page text content
  170. [textContent21]
  171. Text=Centurion
  172. Location=50, 80
  173. Size=90, 90
  174. Type=org.havi.ui.HStaticText
  175. ;

Here is the code that gets the text content from the .ini file and places it on the page

  1. private void SetHStaticText(HStaticText component, String name, ArrayList<Property> propertyList)
  2. {
  3. //gets the text content from the .ini file
  4. //places the text content on the page
  5. if (component == null)
  6. {
  7. component = new HStaticText();
  8. component.setName(name);
  9. _owner.AddComponent(component);
  10. }
  11.  
  12. // Set base class properties first
  13. SetHVisible((HVisible)component, name, propertyList);
  14.  
  15. }

Thanx
Camzie
Last edited by adatapost; Nov 25th, 2009 at 6:11 am. Reason: Add [code] tags. Encase your code in: [code] and [/code] tags.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 1,189
Reputation: JamesCherrill is a glorious beacon of light JamesCherrill is a glorious beacon of light JamesCherrill is a glorious beacon of light JamesCherrill is a glorious beacon of light JamesCherrill is a glorious beacon of light 
Solved Threads: 172
JamesCherrill JamesCherrill is offline Offline
Veteran Poster
 
1
  #2
Nov 25th, 2009
If you rhink anyone will study nearly 200 lines of code and data, mostly unformatted and unindented, to find an unspecified error, which may possibly be in a part of the code that you have not posted, you are a great optimist.
Re-post, with all the code in code tags, and tell us what the exact text of the exception is (including the class/method/line number) and you may do better.
Last edited by JamesCherrill; Nov 25th, 2009 at 7:08 am.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 354 | Replies: 1
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC