Manipulate[] CreateDocument[] BUG ???
- To: mathgroup at smc.vnet.net
- Subject: [mg81352] Manipulate[] CreateDocument[] BUG ???
- From: roby.nowak at gmail.com
- Date: Thu, 20 Sep 2007 03:49:49 -0400 (EDT)
hi everyone, i try to set up two or more Manipulate[] Panels
originated in seperate notebooks.
for the creation of the notebooks i use CreateDocument[]
the code below defines a function A when invoked creates a notebook
containing one Manipulate[] Panel
then A is invoked twice such that 2 notebooks are generated.
but when i try to move the slider s in both Panels the local variable
k gets somehow corrupted.
changeing Module to DynamicModule does not help.
same code works fine if CreateDocument@ ommited, then two Manipulate[]
are generated and working fine but both inside the current notebook.
any clues on whats happening ?
is it a bug or a feature ?
(*----------------------------------*)
(* corrupt example*)
A := Module[{k},
k = 1;
CreateDocument@Manipulate[
k*s,
{{s, 1}, 1, 10}
]
];
A
A
(*----------------------------------*)
(* working example *)
A := Module[{k},
k = 1;
Manipulate[
k*s,
{{s, 1}, 1, 10}
]
];
A
A
(*----------------------------------*)