Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. About Doc/View relation : Vc++ _Plz Help

About Doc/View relation : Vc++ _Plz Help

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++helpcareer
14 Posts 8 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    parims
    wrote on last edited by
    #1

    What is the relationship between Doc and View 1)One to Many 2)One to One 3)Many to Many 4)Many to One Choose the Correct One ? ( This is TCS Interview Question) Praveen .C

    T G E 3 Replies Last reply
    0
    • P parims

      What is the relationship between Doc and View 1)One to Many 2)One to One 3)Many to Many 4)Many to One Choose the Correct One ? ( This is TCS Interview Question) Praveen .C

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      a document and a view are the same. a Frame can contain several Docs/Views...


      TOXCCT >>> GEII power
      [toxcct][VisualCalc]

      M E 2 Replies Last reply
      0
      • T toxcct

        a document and a view are the same. a Frame can contain several Docs/Views...


        TOXCCT >>> GEII power
        [toxcct][VisualCalc]

        M Offline
        M Offline
        Maximilien
        wrote on last edited by
        #3

        are you certain ? a document is not contained in a frame, it's a data class. In the Doc-View Architecture, a view is the representation of the data in the document. A document can have multiple views attached to it, in as many frame window as you wish.


        Maximilien Lincourt Your Head A Splode - Strong Bad

        T 1 Reply Last reply
        0
        • P parims

          What is the relationship between Doc and View 1)One to Many 2)One to One 3)Many to Many 4)Many to One Choose the Correct One ? ( This is TCS Interview Question) Praveen .C

          G Offline
          G Offline
          georgemarios
          wrote on last edited by
          #4

          one Doc can have many views one View can be associated with only one doc one App can have many docs. If the app is SDI, can display only one view of one doc at a time If the app is MDI, can display many views of many docs at a time

          C 1 Reply Last reply
          0
          • M Maximilien

            are you certain ? a document is not contained in a frame, it's a data class. In the Doc-View Architecture, a view is the representation of the data in the document. A document can have multiple views attached to it, in as many frame window as you wish.


            Maximilien Lincourt Your Head A Splode - Strong Bad

            T Offline
            T Offline
            toxcct
            wrote on last edited by
            #5

            did i misundertood this ?

            "A frame-based application uses a concept known as the Document/View Architecture.
            This allows the frame to serve as a place holder for other parts of an application
            (such as the document and the view).
            "


            TOXCCT >>> GEII power
            [toxcct][VisualCalc] -- modified at 9:24 Wednesday 26th October, 2005

            E 1 Reply Last reply
            0
            • T toxcct

              a document and a view are the same. a Frame can contain several Docs/Views...


              TOXCCT >>> GEII power
              [toxcct][VisualCalc]

              E Offline
              E Offline
              Eytukan
              wrote on last edited by
              #6

              cant a document have multiple views??, for example, a data that is available in the DOC can be viewed as a chart in one view and in another view the same can be viewed as graph. right??:~ He is like a one-legged man in a bum kicking competition. -Novjot Sidhu --[v]--

              B 1 Reply Last reply
              0
              • T toxcct

                did i misundertood this ?

                "A frame-based application uses a concept known as the Document/View Architecture.
                This allows the frame to serve as a place holder for other parts of an application
                (such as the document and the view).
                "


                TOXCCT >>> GEII power
                [toxcct][VisualCalc] -- modified at 9:24 Wednesday 26th October, 2005

                E Offline
                E Offline
                Eytukan
                wrote on last edited by
                #7

                you've really misunderstood the "/". :) He is like a one-legged man in a bum kicking competition. -Novjot Sidhu --[v]--

                1 Reply Last reply
                0
                • G georgemarios

                  one Doc can have many views one View can be associated with only one doc one App can have many docs. If the app is SDI, can display only one view of one doc at a time If the app is MDI, can display many views of many docs at a time

                  C Offline
                  C Offline
                  Cedric Moonen
                  wrote on last edited by
                  #8

                  georgemarios wrote:

                  If the app is SDI, can display only one view of one doc at a time

                  Are you sure about this point ? I think that in a SDI the limitation is that you can have only one document but several views can be used to display the document... Am I wrong ?:doh:

                  G 1 Reply Last reply
                  0
                  • P parims

                    What is the relationship between Doc and View 1)One to Many 2)One to One 3)Many to Many 4)Many to One Choose the Correct One ? ( This is TCS Interview Question) Praveen .C

                    E Offline
                    E Offline
                    Eytukan
                    wrote on last edited by
                    #9

                    so what are the other questions?? He is like a one-legged man in a bum kicking competition. -Novjot Sidhu --[v]--

                    1 Reply Last reply
                    0
                    • E Eytukan

                      cant a document have multiple views??, for example, a data that is available in the DOC can be viewed as a chart in one view and in another view the same can be viewed as graph. right??:~ He is like a one-legged man in a bum kicking competition. -Novjot Sidhu --[v]--

                      B Offline
                      B Offline
                      Blake Miller
                      wrote on last edited by
                      #10

                      yes - A single document can have many views open on it simultaneously. Not all views need to be the same type for any given document. I can have 'spread sheet' document, but a view with a spreadsheet, a view with some charts, and another view with statistics all open on the 'spread sheet' document's data.

                      1 Reply Last reply
                      0
                      • C Cedric Moonen

                        georgemarios wrote:

                        If the app is SDI, can display only one view of one doc at a time

                        Are you sure about this point ? I think that in a SDI the limitation is that you can have only one document but several views can be used to display the document... Am I wrong ?:doh:

                        G Offline
                        G Offline
                        georgemarios
                        wrote on last edited by
                        #11

                        ooops, my mistake certainly, you can have several views of the same doc in SDI at the same time (using splitters for example)

                        J 1 Reply Last reply
                        0
                        • G georgemarios

                          ooops, my mistake certainly, you can have several views of the same doc in SDI at the same time (using splitters for example)

                          J Offline
                          J Offline
                          John R Shaw
                          wrote on last edited by
                          #12

                          Blast! And right after I gave you a 5 for your very short and very precise answer. SDI: Single view, Single document. Using splitters does not change that, each split reprsents a seperate view. Which would make it an MDI. Of course there are ways around that minor detail. INTP Every thing is relative...

                          G 1 Reply Last reply
                          0
                          • J John R Shaw

                            Blast! And right after I gave you a 5 for your very short and very precise answer. SDI: Single view, Single document. Using splitters does not change that, each split reprsents a seperate view. Which would make it an MDI. Of course there are ways around that minor detail. INTP Every thing is relative...

                            G Offline
                            G Offline
                            georgemarios
                            wrote on last edited by
                            #13

                            thanks for the 5 well, think of a 3d modeler like 3dmax you have the same doc shown in 4 diferent views (top, left, front and perspective). Its still the same document. Many views at the same time doesn't make the app MDI, MDI=multi-doc interface.... A splitter can be used in both SDI and MDI. The difference is that in SDI you put it in CMainFrame whereas in MDI you putit in CMDIChildWnd. Still, I may be wrong. Please, somebody correct me...

                            J 1 Reply Last reply
                            0
                            • G georgemarios

                              thanks for the 5 well, think of a 3d modeler like 3dmax you have the same doc shown in 4 diferent views (top, left, front and perspective). Its still the same document. Many views at the same time doesn't make the app MDI, MDI=multi-doc interface.... A splitter can be used in both SDI and MDI. The difference is that in SDI you put it in CMainFrame whereas in MDI you putit in CMDIChildWnd. Still, I may be wrong. Please, somebody correct me...

                              J Offline
                              J Offline
                              John R Shaw
                              wrote on last edited by
                              #14

                              Alright, you are correct! I was thinking in terms of how MFC uses it (thru the wizards), I sort of spaced on the fact that we still have to add those other views manualy and can show them via splitters (the tricks I mension earlier). SDI realy means a single document at time, not necessarily a single view. I was thincking in terms of having mutiple views in multiple windows, which SDI does not support. Thanks for the readjustment! INTP Every thing is relative...

                              1 Reply Last reply
                              0
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                              • Login

                              • Don't have an account? Register

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • World
                              • Users
                              • Groups