0
votes

My problem is, when i click on the Button, the following Error is displayed:

TypeError: EntryForm.show is not a function

Main.js

Ext.define('MyApp.view.main.Main', {
  extend: 'Ext.container.Container',
  .....
  do Stuff
  .....
    tbar: [{
    text: 'Button',
    handler: function(){
      var mask = Ext.create('MyApp.view.main.EntryForm');
      mask.show(this);

EntryForm.js

Ext.define('MyApp.view.main.EntryForm',{
  extend: 'Ext.Widget',
  ....
  generate my items for the form
  ....

When I use the EntryForm widget in the main.js class and use the create instead of the define and save it in a variable it works without problems.

1

1 Answers

0
votes

I do not fully understand your question, but I think you need to add the EntryForm view to the Viewport before trying to show it, e.g.

var mask = Ext.create('MyApp.view.main.EntryForm');
Ext.Viewport.add(mask);

If EntryForm is set to hidden by default, then you would still need the

mask.show();

This link may also help http://training.figleaf.com/tutorials/senchacomplete/chapter2/lesson3/5.cfm