From: Justin F. <je...@ey...> - 2001-07-10 10:19:14
|
Alex: Now Alex, with that arcane Subject:, I hope to get your attention. I think this is important, I have been working hours on this problem, and I think I have been very careful. This problem is difficult to explain, so give me some latitude. To get your attention, your allegation that inter-module communication via the construct: $Page->modules[group][idx_in_group]->some_method_or_parm; DOES NOT WORK anymore since you changed the machinery from using Init() to having a constructor instead. But, that may be a red herring... I am afraid that I have an error somewhere that I just keep overlooking, but I don't think so. General Synopsis of problem --------------------------- 1. I have a Warning module that collects warnings from any module, on a stack, and in the page render I display them all in a "pane". 2. This Warning module is in a group 'bottom', all by itself. 3. From another module, I call a method in the Warning module to stack a warning thus: $Page->modules['bottom'][0]->setWarning($msg); to stack the warning ($msg) within the Warning module/Class on $this->WarningStack. 4. Before Init() was dropped, and the constructor used, I put the stack ($WarningStack) global. The code worked fine, any warning anywhere from any other module was collected on the stack. 5. When a constructor was introduced, I moved $WarningStack inside the Warning class as a var $WarningStack; What it seems like is that inter-module communication via your suggested construct, or the one I am also using, via a "tag", is only talking to a copy of the "real class". In the application, all warnings I collect (and from that module, verify that they are on the stack, by the same construct as above) appear to be present. What that means is if I do from the outside, so to speak: $Page->modules['bottom'][0]->showWarnings(); the stack contains all of the warnings collected. BUT, by the time the Warning module is ready to Output(), the stack $this->WarningStack ONLY HAS stacked data that it put there itself. The "outside" warnings are not present. A bit of code and output _may_ illustrate: IN Warning->Output() #== set some warnings, various ways == global $Page; $this->setWarning("Test inside class". __FILE__); $Warning->setWarning("SET BY TAG"); $Page->modules['bottom'][0]->setWarning("SET BY INDEX"); #== dump the stacks, various ways == echo "<pre>"; echo "var_dump of \$this->WarningStack\n"; var_dump($this->WarningStack); echo "var_dump of \$Page->modules[bottom][0]\n"; var_dump($Page->modules['bottom'][0]->WarningStack); echo "var_dump of & \$Page->modules[bottom][0]\n"; var_dump(& $Page->modules['bottom'][0]->WarningStack); echo "var_dump of \$Warning->WarningStack\n"; var_dump($Warning->WarningStack); echo "var_dump of & \$Warning->WarningStack\n"; var_dump(& $Warning->WarningStack); echo "</pre>"; ------------------- GIVES: =============================================== var_dump of $this->WarningStack array(2) { [0]=> string(22) "IN Warning CONSTRUCTOR" [1]=> string(73) "Test inside class/usr/local/binarycloud/build/en/user/mod/lib/Warning.php" } var_dump of $Page->modules[bottom][0] array(3) { [0]=> string(22) "IN Warning CONSTRUCTOR" [1]=> string(10) "SET BY TAG" [2]=> string(12) "SET BY INDEX" } var_dump of & $Page->modules[bottom][0] &array(3) { [0]=> string(22) "IN Warning CONSTRUCTOR" [1]=> string(10) "SET BY TAG" [2]=> string(12) "SET BY INDEX" } var_dump of $Warning->WarningStack array(3) { [0]=> string(22) "IN Warning CONSTRUCTOR" [1]=> string(10) "SET BY TAG" [2]=> string(12) "SET BY INDEX" } var_dump of & $Warning->WarningStack &array(3) { [0]=> string(22) "IN Warning CONSTRUCTOR" [1]=> string(10) "SET BY TAG" [2]=> string(12) "SET BY INDEX" } ============================================= Why? I have been "fooled in the past" thinking stuff worked, because the usual result is "correct" whether or not you talk to _any_ instantiation of that class. But, in this case, when you need only one stack, one copy, somehow I obviously have more than one stack somewhere... As Einstein once said, "Zend does not play tricks." Oy Weh, I am too tired for levity. What is going on here? Who made the copy, where is the copy, why don't I have only one stack since I moved it within the Warning class? Now, within Page, if I change: $this->modules[$_group][$pos] = new $mod['name']($mod['options']); to $this->modules[$_group][$pos] =& new $mod['name']($mod['options']); the results are the same. _a_frustrated_jef -- Justin Farnsworth Eye Integrated Communications 321 South Evans - Suite 203 Greenville, NC 27858 | Tel: (252) 353-0722 |
From: Jimmy H. <ji...@ha...> - 2001-07-10 12:20:51
|
Hi alex, Yeah it's me again :) I have a question, I just understood (a little bit) about how modules work...., please correct or add: 1. Implement small logics into separate modules (e.g. news display) 2. put the template needed by the module in a subdirectory under that module's directory. 3. in Module::Output() I can import the template using the import syntax (does this mean the directory can't have dot in the name?) Smarty uses a fixed directory for its template files (as well as a separate dir for compiled template files). How can it fit in binarycloud's directory model? Thanks |
From: Alex B. <en...@tu...> - 2001-07-10 17:56:12
|
> Hi alex, > > Yeah it's me again :) > > I have a question, I just understood (a little bit) about how modules > work...., please correct or add: > > 1. Implement small logics into separate modules (e.g. news display) Yes. You want all non-output operations in the constructor (queries, math, etc). All output goes in Output(); > 2. put the template needed by the module in a subdirectory under that > module's directory. Yes. or in the same directory if you like, it's a matter of personal preference. I like to have a tmpl/ dir under module directories. > 3. in Module::Output() I can import the template using the import syntax > (does this mean the directory can't have dot in the name?) Yes, I believe you can. > Smarty uses a fixed directory for its template files (as well as a > separate dir for compiled template files). How can it fit in > binarycloud's directory model? binarycloud/user/tmpl/html/smarty/ :) _a -- alex black, ceo en...@tu... the turing studio, inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 |
From: Alex B. <en...@tu...> - 2001-07-10 17:54:33
|
> Alex: > > Now Alex, with that arcane Subject:, I hope to get your > attention. > > I think this is important, I have been working hours on this > problem, and I think I have been very careful. This problem > is difficult to explain, so give me some latitude. To > get your attention, your allegation that inter-module > communication via the construct: > > $Page->modules[group][idx_in_group]->some_method_or_parm; > > DOES NOT WORK anymore since you changed the machinery from > using Init() to having a constructor instead. That has nothing to do with Init or a Constructor? That's a fairly standard, boring class reference. Remember that to reference a module, the module doing the ref must load _after_ the target. > --------------------------- > 1. I have a Warning module that collects warnings from > any module, on a stack, and in the page render > I display them all in a "pane". > 2. This Warning module is in a group 'bottom', all > by itself. > 3. From another module, I call a method in the Warning > module to stack a warning thus: > > $Page->modules['bottom'][0]->setWarning($msg); > > to stack the warning ($msg) within the Warning > module/Class on $this->WarningStack. > 4. Before Init() was dropped, and the constructor used, > I put the stack ($WarningStack) global. The code > worked fine, any warning anywhere from any other > module was collected on the stack. You can keep that Global, again Init(); has nothing to do with it? > 5. When a constructor was introduced, I moved $WarningStack > inside the Warning class as a var $WarningStack; > > What it seems like is that inter-module communication via > your suggested construct, or the one I am also using, via > a "tag", is only talking to a copy of the "real class". > In the application, all warnings I collect (and from that > module, verify that they are on the stack, by the same > construct as above) appear to be present. What that means > is if I do from the outside, so to speak: > > $Page->modules['bottom'][0]->showWarnings(); > > the stack contains all of the warnings collected. > > BUT, by the time the Warning module is ready to Output(), > the stack $this->WarningStack ONLY HAS stacked data that > it put there itself. The "outside" warnings are not present. That sounds like a problem with your module. > What is going on here? Who made the copy, where is > the copy, why don't I have only one stack since > I moved it within the Warning class? I don't know. _a -- alex black, ceo en...@tu... the turing studio, inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 |
From: Jimmy H. <ji...@ha...> - 2001-07-11 00:31:58
|
I tried writing: require_once('DB.php'); Got an error message saying cannot redeclare "pear_error". How can I use Pear DB classes without conflicting with PEAR_Error ? |
From: Alex B. <en...@tu...> - 2001-07-11 00:46:15
|
for the moment you'd need to remove the reference to Pear erro in Init. I can't remember the method name, edit binarycloud/base/init/Init.php, in Startup() there should be an obvious method name. comment that out, and try again. thought note that I'll be doing PEAR integration pretty soon :) _a > I tried writing: > require_once('DB.php'); > > Got an error message saying cannot redeclare "pear_error". > > How can I use Pear DB classes without conflicting with PEAR_Error ? > > > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > -- alex black, ceo en...@tu... the turing studio, inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 |
From: jason <ja...@gr...> - 2001-07-11 03:29:53
|
!@# ok -? so completely ignore my last message sent .. Alex Black wrote: > thought note that I'll be doing PEAR integration pretty soon :) |
From: alex b. <en...@tu...> - 2001-07-11 03:47:35
|
> !@# ok -? > so completely ignore my last message sent .. hehe, caught you by surprise? :) I think some of PEAR is fantastic. But again, I'm keen to use the good parts, not everything just because it's PEAR. Actually, once that is done, it would be great if someone coule take a look at the PEAR cache classes, and see if they would do for caching output from Page. _a > Alex Black wrote: > > thought note that I'll be doing PEAR integration pretty soon :) > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > |
From: alex b. <en...@tu...> - 2001-07-11 03:50:16
|
hi all, John (Donagher) just suggested that I split the lists (which I had intended to do at some point) now, given the amount of traffic, etc. I think that's a timely suggestion, so I'm going to do it: binarycloud-dev (development discussions, no user support) binarycloud-cvs (cvs commit notices) binarycloud-announce (if I feel like babbling) binarycloud-general (for general questions) I particularly like the addition of the binarycloud-cvs commit list, it will give everyone a good sense of the amount of activity :) btw, I have done that variable change, and will be synching a new tarball tomorrow. _alex ----- Original Message ----- From: "jason" <ja...@gr...> To: <bin...@li...> Sent: Tuesday, July 10, 2001 8:30 PM Subject: Re: [binarycloud-dev] Question on using PEAR DB > !@# ok -? > so completely ignore my last message sent .. > > > Alex Black wrote: > > thought note that I'll be doing PEAR integration pretty soon :) > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > |
From: Alby L. <al...@th...> - 2001-07-11 12:21:19
|
Alex, Another suggestion included having someone do a write up on some of the stuff we've discussed here including a win2K install. Do you have any standards for doing so? I could lend a hand, often times useful info gets lost in a list like this. Alby ----- Original Message ----- From: "alex black" <en...@tu...> To: <bin...@li...> Sent: Tuesday, July 10, 2001 11:47 PM Subject: [binarycloud-dev] list-split > hi all, > > John (Donagher) just suggested that I split the lists (which I had intended > to do at some point) now, given the amount of traffic, etc. > > I think that's a timely suggestion, so I'm going to do it: > > binarycloud-dev (development discussions, no user support) > binarycloud-cvs (cvs commit notices) > binarycloud-announce (if I feel like babbling) > binarycloud-general (for general questions) > > I particularly like the addition of the binarycloud-cvs commit list, it will > give everyone a good sense of the amount of activity :) > > btw, I have done that variable change, and will be synching a new tarball > tomorrow. > > _alex > > > > ----- Original Message ----- > From: "jason" <ja...@gr...> > To: <bin...@li...> > Sent: Tuesday, July 10, 2001 8:30 PM > Subject: Re: [binarycloud-dev] Question on using PEAR DB > > > > !@# ok -? > > so completely ignore my last message sent .. > > > > > > Alex Black wrote: > > > thought note that I'll be doing PEAR integration pretty soon :) > > > > _______________________________________________ > > binarycloud-dev mailing list > > bin...@li... > > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > > > > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > |
From: John D. <jo...@we...> - 2001-07-11 17:26:32
|
I stuck the directions provided by Ronald Tao for installing under Cygwin/WIN32 in cvs, in a file called INSTALL.WIN32 in the root of the binarycloud source tree. Anyone using that platform who can take a look and confirm/enhance that document would be appreciated. John On Wed, 11 Jul 2001, Alby Lash wrote: > Alex, > > Another suggestion included having someone do a write up on some of the > stuff we've discussed here including a win2K install. Do you have any > standards for doing so? I could lend a hand, often times useful info gets > lost in a list like this. > > Alby > > > ----- Original Message ----- > From: "alex black" <en...@tu...> > To: <bin...@li...> > Sent: Tuesday, July 10, 2001 11:47 PM > Subject: [binarycloud-dev] list-split > > > > hi all, > > > > John (Donagher) just suggested that I split the lists (which I had > intended > > to do at some point) now, given the amount of traffic, etc. > > > > I think that's a timely suggestion, so I'm going to do it: > > > > binarycloud-dev (development discussions, no user support) > > binarycloud-cvs (cvs commit notices) > > binarycloud-announce (if I feel like babbling) > > binarycloud-general (for general questions) > > > > I particularly like the addition of the binarycloud-cvs commit list, it > will > > give everyone a good sense of the amount of activity :) > > > > btw, I have done that variable change, and will be synching a new tarball > > tomorrow. > > > > _alex > > > > > > > > ----- Original Message ----- > > From: "jason" <ja...@gr...> > > To: <bin...@li...> > > Sent: Tuesday, July 10, 2001 8:30 PM > > Subject: Re: [binarycloud-dev] Question on using PEAR DB > > > > > > > !@# ok -? > > > so completely ignore my last message sent .. > > > > > > > > > Alex Black wrote: > > > > thought note that I'll be doing PEAR integration pretty soon :) > > > > > > _______________________________________________ > > > binarycloud-dev mailing list > > > bin...@li... > > > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > > > > > > > > > _______________________________________________ > > binarycloud-dev mailing list > > bin...@li... > > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > > > > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > > -- John Donagher Application Engineer Intacct Corp. - Powerful Accounting on the Web 408-395-0989 720 University Ave. Los Gatos CA 95032 www.intacct.com Public key available off http://www.keyserver.net Key fingerprint = 4024 DF50 56EE 19A3 258A D628 22DE AD56 EEBE 8DDD |
From: Alex B. <en...@tu...> - 2001-07-11 18:56:36
|
groovy, got 'em, thanks :):) _a > > I stuck the directions provided by Ronald Tao for installing under > Cygwin/WIN32 > in cvs, in a file called INSTALL.WIN32 in the root of the binarycloud source > tree. Anyone using that platform who can take a look and confirm/enhance that > document would be appreciated. > > John > > On Wed, 11 Jul 2001, Alby Lash wrote: > >> Alex, >> >> Another suggestion included having someone do a write up on some of the >> stuff we've discussed here including a win2K install. Do you have any >> standards for doing so? I could lend a hand, often times useful info gets >> lost in a list like this. >> >> Alby >> >> >> ----- Original Message ----- >> From: "alex black" <en...@tu...> >> To: <bin...@li...> >> Sent: Tuesday, July 10, 2001 11:47 PM >> Subject: [binarycloud-dev] list-split >> >> >>> hi all, >>> >>> John (Donagher) just suggested that I split the lists (which I had >> intended >>> to do at some point) now, given the amount of traffic, etc. >>> >>> I think that's a timely suggestion, so I'm going to do it: >>> >>> binarycloud-dev (development discussions, no user support) >>> binarycloud-cvs (cvs commit notices) >>> binarycloud-announce (if I feel like babbling) >>> binarycloud-general (for general questions) >>> >>> I particularly like the addition of the binarycloud-cvs commit list, it >> will >>> give everyone a good sense of the amount of activity :) >>> >>> btw, I have done that variable change, and will be synching a new tarball >>> tomorrow. >>> >>> _alex >>> >>> >>> >>> ----- Original Message ----- >>> From: "jason" <ja...@gr...> >>> To: <bin...@li...> >>> Sent: Tuesday, July 10, 2001 8:30 PM >>> Subject: Re: [binarycloud-dev] Question on using PEAR DB >>> >>> >>>> !@# ok -? >>>> so completely ignore my last message sent .. >>>> >>>> >>>> Alex Black wrote: >>>>> thought note that I'll be doing PEAR integration pretty soon :) >>>> >>>> _______________________________________________ >>>> binarycloud-dev mailing list >>>> bin...@li... >>>> http://lists.sourceforge.net/lists/listinfo/binarycloud-dev >>>> >>> >>> >>> _______________________________________________ >>> binarycloud-dev mailing list >>> bin...@li... >>> http://lists.sourceforge.net/lists/listinfo/binarycloud-dev >>> >> >> >> _______________________________________________ >> binarycloud-dev mailing list >> bin...@li... >> http://lists.sourceforge.net/lists/listinfo/binarycloud-dev >> >> -- alex black, ceo en...@tu... the turing studio, inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 |
From: Alex B. <en...@tu...> - 2001-07-11 18:46:49
|
The only standard that I would like is that it be extremely detailed. Ronald, are you happy to write the make/r2 tutorial for windows? best, _alex > Alex, > > Another suggestion included having someone do a write up on some of the > stuff we've discussed here including a win2K install. Do you have any > standards for doing so? I could lend a hand, often times useful info gets > lost in a list like this. > > Alby > > > ----- Original Message ----- > From: "alex black" <en...@tu...> > To: <bin...@li...> > Sent: Tuesday, July 10, 2001 11:47 PM > Subject: [binarycloud-dev] list-split > > >> hi all, >> >> John (Donagher) just suggested that I split the lists (which I had > intended >> to do at some point) now, given the amount of traffic, etc. >> >> I think that's a timely suggestion, so I'm going to do it: >> >> binarycloud-dev (development discussions, no user support) >> binarycloud-cvs (cvs commit notices) >> binarycloud-announce (if I feel like babbling) >> binarycloud-general (for general questions) >> >> I particularly like the addition of the binarycloud-cvs commit list, it > will >> give everyone a good sense of the amount of activity :) >> >> btw, I have done that variable change, and will be synching a new tarball >> tomorrow. >> >> _alex >> >> >> >> ----- Original Message ----- >> From: "jason" <ja...@gr...> >> To: <bin...@li...> >> Sent: Tuesday, July 10, 2001 8:30 PM >> Subject: Re: [binarycloud-dev] Question on using PEAR DB >> >> >>> !@# ok -? >>> so completely ignore my last message sent .. >>> >>> >>> Alex Black wrote: >>>> thought note that I'll be doing PEAR integration pretty soon :) >>> >>> _______________________________________________ >>> binarycloud-dev mailing list >>> bin...@li... >>> http://lists.sourceforge.net/lists/listinfo/binarycloud-dev >>> >> >> >> _______________________________________________ >> binarycloud-dev mailing list >> bin...@li... >> http://lists.sourceforge.net/lists/listinfo/binarycloud-dev >> > > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > -- alex black, ceo en...@tu... the turing studio, inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 |
From: jason <ja...@gr...> - 2001-07-11 03:27:20
|
Which brings up a question. Why selectively use some PEAR classes for things, and not others. For consistency, would it not make sense to utilize all new PEAR functionaliy in a sort of wrapper that speaks to the managers? This of course would only depends on MetaBase having features that binarycloud would ultimately depends on. I personally would rather see a more suitable/simple wrapper for the database calls, and extend the extra features of metabase into external tools. Perhaps this is where I can help contribute once I have more nerves to play with. Right now, it's only bones and muscle. =] a long overdue thanks to alex, for this great incentive. jason Jimmy Harlindong wrote: > > I tried writing: > require_once('DB.php'); > > Got an error message saying cannot redeclare "pear_error". > > How can I use Pear DB classes without conflicting with PEAR_Error ? > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev |
From: alex b. <en...@tu...> - 2001-07-11 03:47:35
|
> Which brings up a question. Why selectively use some PEAR classes for > things, and not others. For consistency, would it not make sense to Because some pear classes are mature and good, others aren't. for example, Pear_error on the whole is quite good. Pear DB isn't. > utilize all new PEAR functionaliy in a sort of wrapper that speaks to > the managers? This of course would only depends on MetaBase having PEAR is (and will be considered as such in bc) a set of libraries. PEAR stuff will be included by core and modules as needed, for caching, error handling, and anything else people find that they like. > features that binarycloud would ultimately depends on. QuerManager depends on Metabase. It is a superior abstraction layer, which I have no intention of switching. I have used Pear DB. I don't like it. :) Of course, you are welcome to use it in your modules instead of queryManager, but you will lose all of the benefits of using QueryManager, of course.. > I personally > would rather see a more suitable/simple wrapper for the database calls, > and extend the extra features of metabase into external tools. I actually would as well. But as it happens, it's in one package, and it's better than anything else I have seen. To boot, it's mature, and fast. > Perhaps this is where I can help contribute once I have more nerves to > play with. Right now, it's only bones and muscle. =] > > a long overdue thanks to alex, for this great incentive. I'm actually going to work on "general" PEAR integration this week, and start distro'ing the bits of PEAR we use in binarycloud/ext. PEAR will be included at Init, so you'll have complete access to the Pear libs. -alex |