Thanks Alex,

It's pretty clear I'm pushing the envelope architecture-wise - I've got a 
module that opens a popup that opens a window that contains a datagrid.  
Interestingly though, in my Flex 4.0 version, where I wasn't using a Spark 
datagrid but instead using my solution using DataGroups (spark datagrid wasn't 
yet available) I had no issues. Note the first error I get is from that the 
DataGrid skin cannot be found.  Makes me wonder whether it's the styles that 
are not loaded.

I'm going to try to get my wits around using moduleFactory.  It appears that in 
order to use it I cannot use MXML but instead using AS?

Jeff

From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf 
Of Alex Harui
Sent: Thursday, December 01, 2011 5:05 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] RE: AIR/Window/DataGrid Issue



That's a very puzzling stack trace.  I have no idea how you can get into this 
situation.  Do you have a simple test case?

The moduleFactory subsystem relies on instantiating classes in a module via 
moduleInfo.factory.create().  The children of that class have moduleFactory 
propagated to them as they are added to their parents.

Calling some function on a module that calls PopUpManager.createPopUp() 
bypasses the subsystem because the popup is added to the systemManager and some 
class that has its moduleFactory set to the right place.  Is that what is going 
on in your code?  There is a moduleFactory parameter to createPopUp you can use.


On 12/1/11 10:06 AM, "Battershall, Jeff" <jeff.battersh...@djindexes.com> wrote:





Thanks Alex,

Here's the stack trace:

TypeError: Error #1009: Cannot access a property or method of a null object 
reference.
       at 
spark.components::Group/addElement()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Group.as:1342]
       at 
spark.components.gridClasses::GridLayout/createTypicalItemRenderer()[E:\dev\4.y\fr!
 ameworks\projects\spark\src\spark\components\gridClasses\GridLayout.as:748]
       at 
spark.components.gridClasses::GridLayout/updateTypicalCellSizes()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\gridClasses\GridLayout.as:883]
       at 
spark.components.gridClasses::GridLayout/measure()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\gridClasses\GridLayout.as:444]
       at 
spark.components.supportClasses::GroupBase/measure()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\supportClasses\GroupBase.as:1148]
       at mx.core::UIComponent! 
/http://www.adobe.com/2006/flex/mx/internal::measureSizes()[E:<http://www.adobe.com/2006/flex/mx/internal::measureSizes()%5bE:>!
 \dev\4.y \frameworks\projects\framework\src\mx\core\UIComponent.as:8506]
       at 
mx.core::UIComponent/validateSize()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:8430]
       at 
spark.components::Group/validateSize()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Group.as:1012]
       at 
mx.managers::LayoutManager/validateSize()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\LayoutManager.as:665]
       at 
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\LayoutManager.as:816]
       at 
mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1180]


The app is constructed like so:

1)  Shell application
2)  Modules loaded at runtime
3)  The module in question has a pop up wizard (TitleWindow).
4)  The popup wizard opens Window.
5)  Window contains DataGrid.

I! don't understand how the module factory for the datagrid points to the 
module factory for the module.  How's that accomplished?

Jeff




From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf 
Of Alex Harui
Sent: Thursday, December 01, 2011 12:51 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] RE: AIR/Window/! DataGrid Issue
&n bsp;



What is the Group stack trace?  If classes are in a module you definitely have 
to get the moduleFactory pointing to that module because that's probably where 
the skins are as well.


On 12/1/11 5:06 AM, "Battershall, Jeff" <jeff.battersh...@djindexes.com> wrote:





My issue sounds similar to this issue:

http://forums.adobe.com/message/3910406

What's unclear to me is how to work around it in my circumstance.  Clearly I 
should be able to declare a datagrid in a Window and have it work without an 
elaborate workaround.

Any advice appreciated.

Jeff


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf 
Of Battershall, Jeff
Sent: Wednesday, November 30, 2011 8:58 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AIR/Window/DataGrid Issue





Hi,

I'm mid re-factoring a SDK 4.0 AIR app to 4.5 and attempting to take advantage 
of the Spark DataGrid.   In this app (which is built with modules) I'm openin! 
g a NativeWindow and displaying a datagrid.   The fi! rst erro r is that the 
DataGrid Skin class cannot be found.  I dealt with this by creating a new Skin 
! from the DataGrid and referencing that.  Then when I atte! mpt to p opulate 
the grid with data, I get RTEs pointing to Group.as with error #1009 null.

I can get in to more exhaustive detail about the exact error(s) but I think 
something more fundamental is happening.  Note that the libs are all merged 
into code.  It seems that some of the underlying libraries aren' being included.

Does anyone have any experience or theories on what might be happening?
____________________________

Jeff Battersh! all
Application Architect

T 609 520 5637
F 609 520 5370
C 732 666-8205
jeff.battersh...@djindexes.com

Dow Jones Indexes
4300 Route 1 North
South Brunswick, NJ 08852
www.djindex! es.com <http://www.cmegroup.com/>
&nb! sp;< /p>







--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui




<<inline: image001.jpg>>

Reply via email to