12-03-2010 07:36 AM - edited 12-03-2010 07:40 AM
I am planning to use NavController class to manage screens in my playbook project. Unfortunately I am able to find any documentation or samples. Please guide me.
12-03-2010 07:53 AM
hey Sudhish,
Documentation for the qnx.view package is currently unavailable. To be honest i didnt even know it existed until now. I just tried it out using Flash Builder and it just seems like a regular MovieClip type Class and Events and etc. It doesnt have any new or special functionality. All signs point to it being incomplete hence it is undocumented. You might have to go a different route for now. Why not use addChild and removeChild methods to simulate new pages?
12-03-2010 08:13 AM
Hi J,
Thanks for your reply.
I will take that root. Why I asked is, I am rewiring one ipad navigation control based project to playbook.
Sudhish
12-03-2010 08:20 AM
Ah yes. Porting apps is a great time saver but once in a while you run into some kind of bump of incompatibilty. Just gotta find the workarounds right? Good luck!
12-29-2010 12:46 PM
12-29-2010 01:05 PM
addChild and removeChild is a brut force way to change pages. I think @JRab is referring to some other threads that cover this topic. addChild/removeChild in conjunction with Tweener would animate a page to another page but then removing the old page from the display list once the animation is complete. Likewise, adding the new page prior to the Tweener animation. If you leave a page in the display list, eventhough you cannot see it, could be tabbed too from the keyboard.
12-29-2010 03:08 PM
12-29-2010 03:18 PM
Each "page" typically extends a Sprite or UIComponent in its own class that can be instantiated and added to the page controller. In your case, I would create a class (e.g. UserDetailPage), extend from UIComponent and add a method to set the user's ID which would call the logic to gather and display the information.
public class UserDetailPage extends UIComponent
{
public function UserDetailPage()
{
super();
// add display components here
}
public function SetId( id : String ) : void
{
// add logic here to set components
}
override protected function draw() : void
{
// position components here
}
}
Hope that helps.
12-29-2010 03:33 PM
12-29-2010 03:38 PM
I've been working on a community library that has this and other helpful classes. I am away from my development machine right now, so I will post the code to this class in a few hours (still in work).