Thursday October 9, 2008
NXT-G MyBlocks and SaveAs
By Doug Frevert
Another year and another NXT-G class. This year exposed a bug in creating a MyBlock by SaveAs of another MyBlock.
SaveAs: don't use it to create a new MyBlock.
Don't:
- Open an existing MyBlock.
- File -> SaveAs -> Enter a new name for the MyBlock.
- Edit the MyBlock with the new name. Change something obvious.
- Close the MyBlock with the new name.
-
- Use the original and new MyBlock in a NXT-G program.
- Run the NXT-G program. You may or may not see anything.
- Now open either of the MyBlocks and change something else. The something else becomes part of both MyBlocks; the one edited and the one not edited. The "SaveAs" MyBlocks are linked together and that linkage is hidden.
Instead:
- Create a NXT-G program that functions.
- Save
- Create a MyBlock from the NXT-G program. This is the normal process.
- Save the MyBlock
- Close the MyBlock
- Close the NXT-G program without saving.
- Re-open the NXT-G program.
- Edit and then create second MyBlock. The two MyBlocks will not be linked in mysterious ways.
Teachers often learn while teaching.
Too bad about no one signing up for "advanced" NXT-G programming. Then again, I'm still learning the simple things.
Doug