PDA

View Full Version : Getting a circular reference error when using a Class.Property for form's URL...



drunkmoose
7 Jul 2014, 7:31 AM
Hello

I'm getting a C1009 circular reference warning while building when doing this:



Ext.define('Customer_Portal_UI.view.MainContent.editContactWin', {
alias: 'widget.EditContactWin',
extend: 'Ext.Window',
id: 'EditContactWin',
height: 525,
overflowY: 'auto',
animateTarget: Ext.getBody(),
width: 450,
bodyStyle: 'background-color:white;',
resizable: false,
modal: true,
items: [
{
xtype: 'form',
frame: false,
bodyStyle: 'background-color:white;border-width: 0px;',
url: GlobalVars.contactPostApiUrl,
id: 'EditContactForm',
trackResetOnLoad: true,
method: 'POST',
buttons: [{ text: "OK", width: 100, id: 'contactFormSubmitButton'}],
items: [
{
xtype: 'fieldset',
columnWidth: 0.5,
style: 'border-width: 0px;',
defaults: {
anchor: '100%'
},
layout: 'anchor'
},
{
xtype: 'hidden',
name: 'sessionToken'
}
]
}
]
});


And here's GlobalVars (defined in app.js):



Ext.define('GlobalVars', {
singleton: true,
contactPostApiUrl: 'http://site/api/contact/post'
});


Any ideas why would this design cause this ? If I comment out the line that defines the form's url, the warning goes away.I'm having troubles building a working production build and I'm wondering if this is causing it.

Here's the warning:



C1009: Circular reference in requirements chain (
C:\Projects\CustomerPortal\CustomerPortal.UI\Content\Customer_Portal_UI\app\Application.js [MVC] ->
C:\Projects\CustomerPortal\CustomerPortal.UI\Content\Customer_Portal_UI\app\controller\MainContent.js (line 199) [ExtWidgetCall] ->
C:\Projects\CustomerPortal\CustomerPortal.UI\Content\Customer_Portal_UI\app\view\MainContent.js (line 311) [StaticReference] ->
C:\Projects\CustomerPortal\CustomerPortal.UI\Content\Customer_Portal_UI\app.js (line 9) [ClassExtend] ->
C:\Projects\CustomerPortal\CustomerPortal.UI\Content\Customer_Portal_UI\app\Application.js



Thanks