New Posts New Posts RSS Feed: [COMPLETED] Widget View Template
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

[COMPLETED] Widget View Template

 Post Reply Post Reply Page  <1 234
Author
Bill Jensen View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Jul-2007
Location: United States
Posts: 229
Post Options Post Options   Quote Bill Jensen Quote  Post ReplyReply Direct Link To This Post Topic: [COMPLETED] Widget View Template
    Posted: 27-Sep-2007 at 1:55pm
Sorry, you have to provide the handlers to add, edit or delete objects.  In MasterDetailTabViewController (in IdeaBlade.Cab.UI), look at the method
 
ConfigureMasterViewContext()
 
You'll need to create handlers and register commands in much the same way in your ContactViewTabViewController.  Just walk thru the code to see how it's done.
 
The point of the command pattern is to decouple the source of the command's firing (button, menu item) from the actual command processing.  The view controller is where you "know" about how to create, edit and delete elements of your data mode.  You don't want to couple the general-purpose presenter or the ToolStripAdapter to this information.
 
Bill J.
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 27-Sep-2007 at 2:10pm
I should create a new ControlViewTabViewController in the IdeaBlade.Cab.UI project under the TabViewController folder.  When I add a new control view to a tab controller, I would just add the view using this controller.  What I am trying not to do is have to create all of that add/edit/delete code every time I add a new view.
 
Please let me know if there are any gotchas for doing it this way.


Edited by Linguinut - 27-Sep-2007 at 2:11pm
Back to Top
Bill Jensen View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Jul-2007
Location: United States
Posts: 229
Post Options Post Options   Quote Bill Jensen Quote  Post ReplyReply Direct Link To This Post Posted: 27-Sep-2007 at 3:45pm
Yeah, that sounds reasonable.  It'll probably be generic <boundType>.  Be sure to follow the template pattern so a specific TabViewController can override the Add, Delete and Edit methods.
 
Bill J.
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 28-Sep-2007 at 4:53pm
Thanks for all of your help, Bill.  I am going to end this thread.  It is a bit long.  And, I think I can pursue other questions separately, now.  The new widget control view works quite well.
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 29-Sep-2007 at 10:32am
Can you supply your final findings and paths to final product. This thread was rather long and hard to keep track of what exactly was going on.
 
 
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 29-Sep-2007 at 10:36am
Hey Dan,
 
Certainly.  I am leaving for the day, so Monday I will try to put something together as a summary of this widget view creation.
 
Have a good weekend!
Bill
Back to Top
 Post Reply Post Reply Page  <1 234

Forum Jump Forum Permissions View Drop Down