going to CC back to the list, 'cos others may want to know

public TestDialog : base (null, true) (true if you are pushing it!!){}
public override ViewDidLoad(){      RootElement root = new RootElement() etc..

//set it up here, add sections, etc

//Root is a variable in the class. root is your local one. could just
add it all into the main one I guess... but I never do.
     Root = root;}
here's a full class from one of my apps

https://gist.github.com/1334139

On Wed, Nov 2, 2011 at 16:24, Mittchel Van Vliet <[email protected]> wrote:
> Yea thats what I thought I wanted to do but DialogViewController needs a
> Root element atleast.. so how do I fix that with the inherent?
> public TestDialog : base (????)
> {
> }
> public override ViewDidLoad()
> {
>       RootElement = new RootElement() etc..
> }
> In the appdelegate:
> DialogViewController dialog = new TestDialog();
> See my problem? The base needs a RootElement, how am I going to supply this
> in the TestDialog class?
> 2011/11/2 Nic Wise <[email protected]>
>>
>> Make a new class. Inherit from DialogViewController, and put it all in
>> the constructor or possibly events like ViewDidLoad / ViewWillLoad
>> (there's another one - LoadView I think? - which might be better)
>>
>> and make home of the type of your new class
>>
>> On Wed, Nov 2, 2011 at 15:52, Mittchel Van Vliet <[email protected]>
>> wrote:
>> > Hello everyone,
>> > Currently I'm facing a minor problem regarding the DialogViewController.
>> > In the AppDelegate I've got the following code to produce a
>> > TabBarController
>> > AND NavigationController:
>> >
>> > // Creating the NavigationControllers and TabBarItems
>> >
>> > tabNavControllers = new UINavigationController[]
>> >
>> > {
>> >
>> > new UINavigationController(dialog)
>> >
>> > {
>> >
>> > TabBarItem = new UITabBarItem("Home",
>> > UIImage.FromBundle("Images/house.png")
>> > ,0)
>> >
>> > }
>> >
>> > } ;
>> >
>> > // Assign the NavigationControllers to the TabBarController
>> >
>> > tabController.SetViewControllers(tabNavControllers, false);
>> >
>> > The problem is that I'm pushing a DialogViewController (dialog) to the
>> > TabBar. This means my RootElement (so the UI) has to be in the
>> > AppDelegate,
>> > which I dont want.
>> >
>> > Basicly what I want is a class that has all the UI Elements of the
>> > DialogViewController. In the Appdelegate I can instantiate this class
>> > and
>> > pass it to the TabBar.. but how can I accomplish this? or is this just
>> > not
>> > possible?
>> >
>> > Regards,
>> >
>> > Mittchel
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > MonoTouch mailing list
>> > [email protected]
>> > http://lists.ximian.com/mailman/listinfo/monotouch
>> >
>> >
>>
>>
>>
>> --
>> Nic Wise
>> t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
>> b. http://www.fastchicken.co.nz/
>>
>> Nearest Bus: find when the next bus is coming to your stop.
>> http://goo.gl/Vcz1p
>> mobileAgent (for FreeAgent): get your accounts in your pocket.
>> http://goo.gl/IuBU
>> Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
>> London Bike App: Find the nearest Boris Bike, and get riding!
>> http://goo.gl/Icp2
>
>



-- 
Nic Wise
t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
b. http://www.fastchicken.co.nz/

Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p
mobileAgent (for FreeAgent): get your accounts in your pocket.
http://goo.gl/IuBU
Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to