×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    29

    Using the various components of Guarana together in Views

    Hi,

    I have just started using the Guarana UI and I spent the past 2 days trying to understand how to use the View and ViewManager components.

    Adding simple html text and images is easy but how do I integrate the other components in?

    Its like I have:

    Code:
    var loadTabs = function () { /* code to use the Tabs component */ };
    var loadList = function () { /* code to use the Transition List */};
    These 2 functions work well when used on their own (what I want appears on screen). So I wanted to integrate them together by using the Views component.

    So what I did was basically copied the JS code from the Views demo html file and changed the contents of the FirstView to

    Code:
    var FirstView = Nokia.View.extend({
    			init: function() {},
    			renderUI: function() {
    				loadList;		// Am I doing this wrongly?		
    			},
    			bindUI: function() {},
    			syncUI: function() {},
    			show: function(){this.getContainer().show();}
    		});
    And similarly for SecondView. (I dont have a third view, just wanted to test the tabs to transitionlist view)
    The rest of the code is copied from the demo.

    and then I try to initiate everything with

    Code:
    Nokia.use('viewmanager','transitionlist','tabs', loadView);
    where loadView is the function that stores the above Views code.

    Not sure if I stated enough info here, but I was trying to keep the post short.. I would appreciate any help and be glad to furnish more code/info if anyone can help!

    If you can, kindly advise where I should put the relevant codes!


    Thanks a million!
    Last edited by Aimevous; 2010-07-16 at 09:49.

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: Using the various components of Guarana together in Views

    Hi Aimevous,

    it seems you're missing the parentheses when calling the loadList function, in the renderUI method. So it should look like:
    Code:
    renderUI: function() {
    	loadList();
    },
    Apart from this, are you calling the loadTabs() function somewhere else? (cannot see it in your code)

    Pit

Similar Threads

  1. Replies: 15
    Last Post: 2010-12-29, 07:22
  2. Using Guarana UI and WRT Kit
    By Aimevous in forum Symbian
    Replies: 1
    Last Post: 2010-07-12, 11:59
  3. Options Menu Using guarana
    By remesh in forum Symbian
    Replies: 1
    Last Post: 2010-03-09, 08:42
  4. Guarana components with dynamic content
    By ivanlitovski in forum Symbian
    Replies: 2
    Last Post: 2010-01-22, 12:30
  5. Switching views on a Dialog-based Views App
    By net314 in forum Symbian User Interface
    Replies: 4
    Last Post: 2003-08-26, 21:05

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×