|
From: Justin F. <je...@ey...> - 2001-07-15 23:12:51
|
Alex/Guys:
Now I know it is usually too much to expect for others to
run a piece of code or search for a bug if it is not directly
affecting you. This is not a complaint, only
an observation of reality But, first, I
will ask a question to the group.
Are any of you building sites with BC and using inter-module
"communication", that is, fetching variables or calling
methods in another module with the construct:
$return = $Page->modules[group][idx]->foo();
or
$some_var = $Page->modules[group][idx]->bar;
?????????
IF YOU ARE DOING THIS, DOES IT WORK FOR YOU?
Now, if you are concerned or interested, you can read
farther. I have been having all kinds of strangeness
trying to make this "intermodule" communications work,
which should just be nothing more, except through
a couple more dereferences, than calling a method
in a class or fetching a var in a class in the
same namespace.
I have experienced all kinds of strangeness. I have
posted before on this. I have spent days looking for
the "problem", and and starting to be suspicious of
Zend as well as my own sanity.
Now I have a $bc_page with 4 groups.
1. top has two modules, EyeLibrary
and DataDictionary
2. main has two modules, Lister and
TestMain
3. left has one module, TestNavLeft
4. bottom has two modules, Warning and
Blank
SO, if in the TestMain module I put this
little bit of debugging code
global $Page;
if(1) {
echo "<pre>";
$group = "top";
$idx = 0;
$item =& $Page->modules[$group][$idx];
if (empty($item)) { printf("EMPTY reference in [%s][%d]",$group,$idx); }
print_r($item);
echo "</pre>";
What is rendered is fine, namely
eyelibrary Object
(
[options] => appears 1
)
which is expected, since EyeLibrary is the first in the group.
if I change group to main and idx remains at 0,
what I get is expected, namely the Lister
lister Object
(
[tableOptions] => Array
snip
BUT IF I LOOK FOR group = "bottom", idx = 0,
I get:
EMPTY reference in [bottom][0]
This is same for the group 'left". In other
words, I cannot "see" anything in groups 'left'
or 'bottom".
Any ideas? I have some VERY WILD ones, like Zend
sees, somehow, the method of instantiation that
BC uses as a recursion, and Zend is throwing something
away after three levels.
_jef
--
Justin Farnsworth
Eye Integrated Communications
321 South Evans - Suite 203
Greenville, NC 27858 | Tel: (252) 353-0722
|