How can we sort views in DOORS - ibm-doors

when i create a new view in DOORS for a given module it generally goes to the end of all other views which are already there for the module. is it possible to move the newly created view to the top of the list just below the standard view, if so how ?

No, new views do not go to the end of all other views. They are always sorted alphabetically (first view will always be "Standard View", then follow the views beginning with 0-9 then with A-Z, then with a-z). So, if you want to sort your views, you will need a naming convention according to your needs.

Related

Same View in different view controllers?

I have a view like this:
Each one of the buttons has an action to do when I click on them. And these buttons are changing dynamically through coding (if statements...), when I click some button it leads me to other different buttons values..also the Label is changing accordingly.
ITS LIKE A QUIZ KIND OF THING!
What I want is when I click a button , It should lead me to a different layout of the (view buttons) ( area ).
I was thinking of adding a new view controller for each of what I want to do but this could mean 100 view controllers! I don't know if this is the right way to do it. Is there a better way?
First I'd find similarities between your desired layouts. Implement one view controller making all of those similarities happen. For instance:
show a label on top
show four buttons below
step back and forth between layouts
show different kinds of buttons according to their description
Then you can initialize your view controller with a description of your questions, potential answers/buttons and behavior for each button. Let's say it's a quiz. So you create a class Quiz containing an array of Questions. Each Question contains the question it self as a String and a description for each of the four buttons. It could be the shape and color or a text/answer. And of course some sort of actions for the buttons. It could be just as mutch as a boolean state or a more complicated enum. You get the picture?
(My answer seems to be as vague as your question.)
In the end you'll have to write the whole description for your requirements. I'd write this into a txt, csv, plist, json (whatever is convenient writing and parsing for you) and parse it. That would be the fewest code.

second table controller displaying 2 generic labels instead of instance properties

https://www.dropbox.com/sh/u9rkvwsrcdoa7q8/AABwKm_djSB2oENzuJNT1u35a?dl=0
include above, is the last iteration of this simple project I'm working on.
I am super close to achieving the basic fundamentals I wanted to practice with this project. Unfortunately, I am having trouble with the two cells with generic labels in the second table controller.
my first table controller displays these 4 restaurant types
let restaurantTypesArray = ["American", "Burgers", "Chinese", "Italian"]
if i choose "american", i want the array holding instances of (american) restaurants to be passed to the second controller. There, I want to simply display the name properties of the selected restaurants in my table.
This is my current view, if i select American in the first table controller I am just left with generic labels, indicated the values of the instances within the array.
I simply want these two labels to display the names "McDonalds" & "Burger King".
Any thoughts or suggestions towards a solution?

How can you duplicate a view programmatically in Swift? How does Auto-Layout affect the newly created View?

So I've got a table view which display a number of dots depending on some other data. Each cell in the table view contains a different number, and needs to display a certain number of dots according to that number. So for example, cell 1 corresponds to 5 dots, cell 2 corresponds to 3 dots, so on.
Since all the cells contain at least one dot, I have created a prototype cell which contains a single dot (called a dotView, which is a custom View that I am using).
I would like to basically duplicate the dot several times to match the number that I need.
The dots are aligned and positioned vertically, so I just need to copy and paste the dotView above itself, but treat it as a separate view so I can access its' members without altering any of the other dotViews.
If successful, will I need to set the auto layout parameters myself? Or will it inherit some of the prototypes values?
You can certainly do it if you're just designing things in the nib (storyboard). Any view you see in Interface Builder can be duplicated; just say Duplicate (or Option-drag). You will then have to configure the new copy completely.
You cannot, however, magically "copy and paste" an existing view in the interface in code, while the app is running. The standard way to do this sort of thing in code is to design the custom view in a .xib file. Then, whenever you need a new copy of this view, you load the nib and retrieve it. This is basically just an elaborate way of making a new but completely configured instance of this view (and all its subviews, settings in the nib, etc.). You will then need to insert the newly instantiated dot view manually (i.e. in code) into the interface wherever it is needed. Positioning it is up to you, and if it needs constraints, you will have to add them as well.

Two Tablew in One Screen

I want to have two tables and a webview in one iPad screen from the following:
The first table will parse items from an RSS feed, and will have an option for a
checkmark
The second table will be comprised of all checked items
The webview will be the content from didSelectRowAtIndexPath from the first table (so basically the first table gives the opportunity to display content from didSelectRow, AND check a box (or whatever) to create the secondary table.
I am told for the second table, I should have the checks write to a plist with NSMutableDictionary, and then the second table will just be a table of the plist...but really, what's the code for this?...where do I put it?...etc etc etc. And if the user unchecks the items, the line in the plist will be cleared, right???
I PRESUME I can show all three classes in one screen with something like
[viewController.view addSubview:someOtherViewControler.view];
Is there any reason why I should not do this??
Thanks so much!
XOXO
There is no reason you shouldn't do this, and you will be happier with your proposed approach than you would be if you tried to do it all with one view controller.
Organizing with design patterns is done to simplify design and maintenance of your software. What you have described is clearly three independent data sources each with their own independent views. You can use the MVC design pattern independently on each one of them. This independence lends itself to having separate view controllers that are easy to design and maintain.
The fact that they are collected into one main view for your application is outweighed by the simplification in maintainability that you will obtain with separate view controllers.

asp.net mvc changing one menu based on which controller is selected from another menu

I am envisioning a site layout like this-
top navigation menu linking to maybe 4 or 5 indexes of different controllers. each of these sections will be working with different model objects.
Left navigation menu is specific to a controller. so, for each of the top menu buttons (corresponding to different controllers) I would like the left navigation menu to offer options only specific to the currently used controler.
What's the best way to go about setting this up?
Thanks!!
Have separate master pages for the views for each controller/category is a possibility, where the specific menu is defined it the master page.
Are these menus static?
It sounds like the different controllers is the right way to go for your top menu given that you've stated each controller would be working with different model objects (which I take to mean different logical divisions). It makes sense to break logical chunks of your database/models into separate controllers.
As far as the left navigation menu, you could simply use different actions on the controller to service that section where it makes sense. Just think of actions as exactly that... actions.
You could think of StackOverflow itself as following a similar pattern, where there are 5 (or so) controllers along the top of the page, and then there are actions on those controllers. For example the "users" controller has actions for registering a new account, viewing user details, searching for existing users, etc. This is a common pattern in the ASP.NET MVC sites I've seen, and ASP.NET MVC itself is geared toward this type of a scenario.
I'm not really sure there's much else to say, but if you have more specific questions, feel free to post them. I think you're on the right track, though. Good luck.
I use custom attribute for this:
[LeftMenu("MyMenu")]
public class MyController ...
In my base controller, OnActionExecuted checks for the attribute, and use reflection to invoke CustomMenus.Get{menuname}(). Then it sets ViewData["leftmenu"]. You can avoid custom attribute if you just use controller's name as menu name.
CustomMenus is a class whose methods return IList<IMenuItem> - but that's my own menu system, you may decide to return classes, partial names, whatever suites your menu system.

Resources