The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

hxnk (1) [Avatar] Offline
#1
When trying to execute the statement mentioned on page 67, the component isn't removed:

Ext.getCmp("myLoginContainer").remove("orgField");

Seems like referencing the item by it's itemId (orgField in this case) isn't working?
I am able to add items like so:

Ext.getCmp("myLoginContainer").add(
{
xtype: "checkboxfield",
label: "Remember",
itemId: "rememberField"
}
);

But afterwards removing it doesn't work:

Ext.getCmp("myLoginContainer").remove("rememberField");

Am I misunderstanding the book, or is the book wrong?

Thanks in advance!
gussmith (5) [Avatar] Offline
#2
Re: Statement on page 67 not working
I have the same problem. Am using Chrome on OSX and Firebug Lite.

I can 'add' components but 'remove' does nothing. 'removeAll' does work and removes all from screen.
gussmith (5) [Avatar] Offline
#3
Re: Statement on page 67 not working
Ok looking at chapter 4.2 I tried what is done there.


container.remove(container.down('#orgField'),true); // -->> this works and removes it
mitchellsimoens (12) [Avatar] Offline
#4
Re: Statement on page 67 not working
Yes, I've issued a pull request to fix the code last week but the book is already sent out to printers unfortunately.