Author Topic: Question about the parameters of database's constructor.  (Read 1522 times)

0 Members and 1 Guest are viewing this topic.

guohq

  • Newt
  • Posts: 84
Question about the parameters of database's constructor.
« on: August 10, 2021, 01:57:43 AM »
We have to input  two parameters to construct a database.
The first  parameter(buildDefaultDrawing) means  whether or not to build an empty object ,It's easy to understand.
The second parameter(noDocument) means  specifying whether or not to associate this database to the current document.

What is the differnece between true and false of the second parameter?

MickD

  • King Gator
  • Posts: 3619
  • (x-in)->[process]->(y-out) ... simples!
Re: Question about the parameters of database's constructor.
« Reply #1 on: August 10, 2021, 05:33:50 PM »
The 'Document' is the object shown in the editor screen(tab) and the database is edited and visualised through a Document by the end user on screen. So what the true/false parameter means is that if you want the user to edit the database you attach it to a document, if you just want to create/edit a database (drawing) in memory (with code) then you don't need a document.

hth
"Short cuts make long delays,' argued Pippin.”
J.R.R. Tolkien