St3fX
unread,Feb 28, 2011, 5:55:27 PM2/28/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pixlib
Hey List,
I'm trying to play with the PXContainerView but unfortunately it
does'nt appears on my stage.
I have a main class which extends PXBaseDocument where I load several
pngs in a QueueLoader to build my app.
After the queue was loaded, I'm building buttons with that code on the
Main class:
private function onQueueLoadInit( event :
PXLoaderCollectionEvent ) : void
{
for( var i : String in dict )
{
var dp : DisplayObject = dict[ i ];
var sb : SimpleButton = new SimpleButton( null, i, mc );
sb.show();
}
PXLogManager.INFO( PXViewLocator.getInstance().keys );
}
dict is a Dictionary I populated with all the PXGraphicsLoader loaded.
PXLogManager.INFO( PXViewLocator.getInstance().keys ); returns a list
off all PXContainerView registered correctly.
My PXContainerView is as this:
package
{
import flash.display.Graphics;
import net.pixlib.log.PXLogManager;
import net.pixlib.view.PXContainerView;
import net.pixlib.plugin.PXPlugin;
import net.pixlib.view.PXAbstractView;
import flash.display.DisplayObject;
import flash.display.Sprite;
/**
* @author stef
*/
public class SimpleButton extends PXContainerView
{
private var back : Sprite;
public function SimpleButton( viewOwner : PXPlugin = null,
viewName : String = null, dpo : DisplayObject = null )
{
super( viewOwner, viewName, dpo );
}
override protected function onInitView() : void
{
super.onInitView();
PXLogManager.DEBUG( content.stage + " - " + size );
}
}
}
in this class, PXLogManager.DEBUG( content.stage + " - " + size );
returns null for the content.stage and a good PXDimension for the
size.
What did I forgot?
thanks,
Stef