Thread: [Cxtable-devel] Borne....
Status: Alpha
Brought to you by:
xiarcel
From: Williams, D. <DAV...@ca...> - 2001-12-04 21:10:42
|
Is there a reason why only 3 Adds appear on the Project page under the CVS heading in Summary? Shouldn't it be like 12x? Also....just a warning....in the early days...I had code like this... class B extends Thread{ private A a; public B(A an) { a=an; } public void run() { .... .... a.someCrazyThang(); } } class A extends Thread{ public A() {} public void run() { B b = new B(this); new Thread(b).start(); } public void someCrazyThang() { ... } } At some point, someone convinced me that such a thing was a bad idea...and that A should implement an interface instead, so that if something broke in A, it wouldn't trigger compile errors in B....etc.... or recursive errors between the two... But there may still be code similar to that. ~Dave David Scott Williams Computer Associates Marketing Representative-Sales Call Center One Computer Associates Plaza Islandia, New York 11749 tel: +1 800-243-9462 ext. 73431 tel: +1 631-342-3431 (Direct) fax: +1 631-342-5734 wi...@ca... |
From: Williams, D. <DAV...@ca...> - 2002-01-07 23:38:31
|
ok...This is still my baby project for awhile, you know... I have some unfinished/unresolved things here... So.. pardon me if I still ask a question on this list :-) If a class in package cxtable.* happens to import from another package (cxtable.core_comm.*) does it need an import? Similarly, does cxtable.core_comm.XXX need to import cxtable.*, or is it implicitly there already? I know that cxtable.core_comm.XXX would need to import cxtable.gui.* or cxtable.WHATEVER.* if it needed a package that was of parallel depth to itself...but... does it need to import backwards? ~Dave David Scott Williams Computer Associates Marketing Representative-Sales Call Center One Computer Associates Plaza Islandia, New York 11749 tel: +1 800-243-9462 ext. 73431 tel: +1 631-342-3431 (Direct) fax: +1 631-342-5734 wi...@ca... |
From: Borne Goodman-M. <bj...@gl...> - 2002-01-08 01:29:01
|
Classes outside of the context of your "local" package are never picked up without an import statement. This said, if I am a class in the cxtable package, I do need to import cxtable.core_comm.* and cxtable.gui.* if I want to use classes in those packages. If I am a class in the package cxtable.gui, and I am used by a class in cxtable.core_comm, I do not need to import cxtable.core_comm. I would only need to do that if I use a class from cxtable.core_comm. So, to summarize, you need to import any class outside of your "local" scope, and you never need to import a class that you don't use, even if it uses you. I hope that was clear :) --bjgm On Mon, 2002-01-07 at 18:35, Williams, David wrote: > ok...This is still my baby project for awhile, you know... I have some unfinished/unresolved things here... So.. pardon me if I still ask a question on this list :-) > > If a class in package cxtable.* happens to import from another package (cxtable.core_comm.*) does it need an import? > > Similarly, does cxtable.core_comm.XXX need to import cxtable.*, or is it implicitly there already? I know that cxtable.core_comm.XXX would need to import cxtable.gui.* or cxtable.WHATEVER.* if it needed a package that was of parallel depth to itself...but... does it need to import backwards? > > ~Dave > > > David Scott Williams > Computer Associates > Marketing Representative-Sales Call Center > One Computer Associates Plaza > Islandia, New York 11749 > tel: +1 800-243-9462 ext. 73431 > tel: +1 631-342-3431 (Direct) > fax: +1 631-342-5734 > wi...@ca... > > > _______________________________________________ > Cxtable-devel mailing list > Cxt...@li... > https://lists.sourceforge.net/lists/listinfo/cxtable-devel |
From: Borne Goodman-M. <bm...@eg...> - 2001-12-04 21:36:40
|
I believe the issue with the listing is that these weren't technically CVS "adds", they were imports, so for that reason not listed. I do believe I saw some funky code in places in my wanderings through the source, but it will all improve in time. I personally rarely extend classes of my own creation, and usually build interfaces for shared functionality, so keep the door open for extension if it is needed in the future. A major issue is that you can extend only one class (unlike c++), so it has to be done carefully. --bjgm On Tue, 2001-12-04 at 15:56, Williams, David wrote: > Is there a reason why only 3 Adds appear on the Project page under the CVS heading in Summary? Shouldn't it be like 12x? > > Also....just a warning....in the early days...I had code like this... > > class B extends Thread{ > > private A a; > > public B(A an) > { > a=an; > } > > public void run() > { > .... > .... > a.someCrazyThang(); > } > > } > > class A extends Thread{ > > public A() > {} > > public void run() > { > B b = new B(this); new Thread(b).start(); > } > > public void someCrazyThang() > { > ... > } > > } > > > > At some point, someone convinced me that such a thing was a bad idea...and that A should implement an interface instead, so that if something broke in A, it wouldn't trigger compile errors in B....etc.... or recursive errors between the two... But there may still be code similar to that. > > ~Dave > > > > David Scott Williams > Computer Associates > Marketing Representative-Sales Call Center > One Computer Associates Plaza > Islandia, New York 11749 > tel: +1 800-243-9462 ext. 73431 > tel: +1 631-342-3431 (Direct) > fax: +1 631-342-5734 > wi...@ca... > > > _______________________________________________ > Cxtable-devel mailing list > Cxt...@li... > https://lists.sourceforge.net/lists/listinfo/cxtable-devel > |