0

In Nodebox you can have:

  1. grid() as a command
  2. grid as a library

If I follow this tutorial:

http://nodebox.net/code/index.php/Grid

It says to import grid with this:

grid = ximport("grid")

But in nodebox this is a command, which is why I believe things dont work as they should.

Is that correct? If not how do I import that correct.

Thanks

jscs
  • 63,694
  • 13
  • 151
  • 195
digit
  • 1,513
  • 5
  • 29
  • 49

1 Answers1

0

That is correct. When you import the grid library, grid = ximport("grid"), you can no longer use the built-in grid function. However, the functionality of the grid library is a superset of the grid built-in. That is, you can do everything and more with the library that you could with the function. The function is provided as a simple to use way of creating a grid, whereas the library provides more customization.

If you really feel like you need to use both, you can do as I suggested in this NB forum thread and rename the grid function before you import the library:

gridfunc = grid
grid = ximport("grid")
jscs
  • 63,694
  • 13
  • 151
  • 195