Need help to resolve GWT runtime error

Can I post my error to you ? and can you help me ?

post it publicly

[ERROR] com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot read properties of undefined (reading 'directionalTextHelper')
Unknown.TypeError: Cannot read properties of undefined(Unknown)
Unknown.$setText_6(ode-0.js)
Unknown.$selectCategory(ode-0.js)
Unknown.new YoungAndroidPalettePanel(ode-0.js)
Unknown.new YaFormEditor(ode-0.js)
Unknown.$addFormEditor(ode-0.js)
Unknown.$loadProject(ode-0.js)
Unknown.execute_74(ode-0.js)
Unknown.runScheduledTasks(ode-0.js)
Unknown.$flushPostEventPumpCommands(ode-0.js)
Unknown.execute_150(ode-0.js)
Unknown.execute_149(ode-0.js)
Unknown.apply_10(ode-0.js)
Unknown.entry0(ode-0.js)
Unknown.anonymous(ode-0.js)
Unknown.callback(ode-0.js)

Can you check this error ?

Based on the error, you're trying to get/change the properties of the variable "directionalTextHelper," which hasn't been initialized. You may want to initialize it, first.

1 Like

I was doing changes in YoungAndroidPalettePanel and there is no variable "directionalTextHelper" :thinking:

Something you have changed in the YoungAndroidPalettePanel has triggered this exception. Use git to check your changes in that method. In particular, it looks like you could be calling selectCategory somewhere before the categories are initialized. Since your sources aren't available I can't really advise further.

2 Likes

This code is inside addSearchButton method. I had changed this code last time.

Sir @ewpatton, I created mLabel as a public variable.

Sir @ewpatton, I added this code inside selectCategory method.

mLabel.setText(currentCategory.getName());

Right, so potentially your issue is that if currentCategory is not yet initialized it will fail here. Remember that GWT converts the code into Javascript and as part of that process it inlines some of these simple methods like getName.

2 Likes

Sir @ewpatton , Should I use this code where category is parameter.

`mLabel.setText(category.getName());`

This worked :grinning: :grinning:. Thanks @ewpatton very very much.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.