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.

mikel1982 (1) [Avatar] Offline
#1
Hi,

Hello world example does not work with Sencha 2.0.1.1. Im getting exception:

Uncaught Error: [ERROR][Anonymous] Using Ext.Msg without requiring Ext.MessageBox

This example should have reference to:
sencha-touch-all-debug.js instead of sencha-touch-debug.js

IMHO since its a Hello World example it should work with just copy&paste
laurie (1) [Avatar] Offline
#2
Re: Hello world
Hi Mikel, had the same issue.

Try the following code (with a requires line added for messagebox) and it'll work fine.

<!DOCTYPE html> <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" >
href="../sencha-touch-2.0.1.1/resources/css/sencha-touch.css"
type="text/css">
<script type="text/javascript" >
src="../sencha-touch-2.0.1.1/sencha-touch-debug.js"></script>
<script type="text/javascript">

Ext.require([ 'Ext.MessageBox' ]);
Ext.setup({
onReady : function() {
Ext.Msg.alert(
'Hello!',
'Hello there from Sencha Touch!'
);
}
});
</script>
</head>
<body>
</body>
</html>



Regards


Laurie
jesus.garcia (463) [Avatar] Offline
#3
Re: Hello world
Thanks for the heads up. I'll look into this and update the chapter contents and the example to allow this work w/ just copying and pasting.