Article View: borland.public.jbuilder.java.swing
Article #11395Re: inspector bites icon
From: Bill Winspur
Date: Mon, 07 Jun 1999 00:00
Date: Mon, 07 Jun 1999 00:00
129 lines
7034 bytes
7034 bytes
This is a multi-part message in MIME format. --------------1017425BFC5543DCD9460CDC Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Greg, my ZoomIcon class source is attached. Thanks for your attention to the problem. Bill. Greg Hamer wrote: > The elements in an inspectors drop-down list are not instantiated until needed. No > point in making the designer slower than it already is. Whether it is a bug in > JBuilder or something in your ZoomIcon class reamins to be seen; it is certainly a > JBuilder bug that you can't determine what the problem is. The simplest > explanation for the behaviour you describe would be if the ZoomIcon class was not > public, or its constructor was not public. Can't think of any other explanations, > but if you could send me the class, I would be happy to figure out what is going > wrong. > > Bill Winspur wrote: > > > Thanks Greg, > > I assigned the logging to to stderr. Unfortunately, the inspector's process of > > ignoring assignment of a property from a property editor's drop down did not > > produce any errors. > > > > However, I have since verified that my Icon works when assigned to the > > JButton.icon property, by creating the button using 'Jbutton(Icon)' > > constructor. I just added the icon argument to the constuctor invocation > > generated by the IDE to do this. Interesting results from this experiment are: > > > > 1. inspector does not display the assignment of the icon to the button > > 2. the icon is not drawn at design time > > 3. the button IS drawn properly with its Icon at run time. > > > > So, I now have a work around for the problem of not being able to assign the > > icons in the inspector, but it is ugly. WYS is not WYG and I now dont trust the > > IDE to know when a property assginment is invalid. I've had this problem > > before, and found a similar work around. I would still like to know if the > > problem of not being able to assign a selection from a property editor's drop > > down list is: > > > > a) a bug in the IDE > > b) a compatibility conflict with the assigned element that the IDE finds by > > reflection at assignment time and simply does not publish. If so... > > . . . Why is it not detected before the element gets into the propEd's drop > > down ? > > . . . Is there something I can do to prevent the conflict and get WYSIWYG back > > for my layout ? > > . . . What problems could I encounter by having circumvented the IDE's > > (postulated) compatibility checks ? > > > > Even when wysiwyg is not an issue, i.e. when assigning properties with no > > visual consequences, this silent rejection of apparently valid property > > assignments is a pain. Under the JBuilder IDE, it disrupts the process of > > developing easily wired components for distribution/sale. Properties cannot be > > wired up in the JBuilder IDE, but can be wired up by programmatic techniques. > > I'm going to check this out in Symantec Cafe next week. Maybe I'll get > > diagnostics if the problem is mine. > > > > I'm using JB2. > > > > Greg Hamer wrote: > > > > > If you turn on logging for JBuilder, you may see some stack traces for your > > > problem. > > > To turn on logging, edit lib\jbuilder.properties while JBuilder is not > > > running . > > > Near the top of the file, change the line > > > jbuilder.logOutput=nul > > > to point to a file. > > > In JBuilder3, some design time problems write messages to the message view. > > > > > > Bill Winspur wrote: > > > > > > > I'm attempting to set the icon property of a JButton in the inspector. > > > > I've created class ZoomIcon, which extends Object and implements Icon. A > > > > ZoomIcon instance draws a plus sign or a minus sign when its paintIcon > > > > method is invoked (intended to save a couple of gif downloads). > > > > > > > > In a test JFrame, having only the single JButton on it, I create an > > > > instance of ZoomIcon by: > > > > > > > > Icon plusSign = new ZoomIcon(ZoomIcon.PlusSign); > > > > > > > > In its drop down menu, the 'icon' property editor of the JButton's > > > > inspector shows plusSign, BUT .... when I select plus sign from the drop > > > > down, the inspector flickers and fails to assign it to the property. > > > > > > > > 1. Given that the property editor accepted the ZoomIcon, which IDE > > > > component subsequently rejected it ? > > > > > > > > 2. Is there a diagrnostic/logging trace that would show why the property > > > > was rejected ? > > > > > > > > 3 What conditions can cause reject of a property assignment from the > > > > drop down list.? > > > > > > > > I've pored over the archives to no avail, except that a similar problem > > > > has been reported before <34F1CA3B.91027487@csi.com>, but there is no > > > > resolution of it in the archive. > > > > > > > > Thanks in advance for any help you can give. --------------1017425BFC5543DCD9460CDC Content-Type: application/x-unknown-content-type-JBuilder.JavaFile; name="ZoomIcon.java" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="ZoomIcon.java" cGFja2FnZSBkaWFncmFtczsNCg0KaW1wb3J0IGphdmEuYXd0Lio7DQppbXBvcnQgY29tLnN1 bi5qYXZhLnN3aW5nLio7DQoNCg0KLyoqIEluc3RhbnRpYXRlcyB0aGUgem9vbSBidXR0b24g aWNvbnMgKi8NCnB1YmxpYyBjbGFzcyBab29tSWNvbiBpbXBsZW1lbnRzIEljb24gew0KICBw dWJsaWMgZmluYWwgc3RhdGljIGludCBQbHVzU2lnbiAgPSAxOw0KICBwdWJsaWMgZmluYWwg c3RhdGljIGludCBNaW51c1NpZ24gPSAwOw0KICBpbnQgc2VsZWN0ZWRJbWFnZSA9IE1pbnVz U2lnbjsNCg0KICBwdWJsaWMgWm9vbUljb24gKGludCBpbWFnZVNlbGVjdG9yKSB7DQogICAg c2VsZWN0ZWRJbWFnZSA9IGltYWdlU2VsZWN0b3I7DQogIH0NCg0KICBwdWJsaWMgdm9pZCBw YWludEljb24oQ29tcG9uZW50IGMsIEdyYXBoaWNzIGcsIGludCB4LCBpbnQgeSkgew0KICAg IGcuc2V0Q29sb3IoQ29sb3IucmVkKTsNCiAgICBnLmRyYXdMaW5lKHgrMSwgeSs2LCB4KzEy LCB5KzYpOw0KICAgIGcuZHJhd0xpbmUoeCsxLCB5KzcsIHgrMTIsIHkrNyk7DQogICAgaWYg KHNlbGVjdGVkSW1hZ2UgPT0gUGx1c1NpZ24pIHsNCiAgICAgIGcuZHJhd0xpbmUoeCs2LCB5 KzEsIHgrNiwgeSsxMik7DQogICAgICBnLmRyYXdMaW5lKHgrNywgeSsxLCB4KzcsIHkrMTIp Ow0KICAgIH0NCiAgfQ0KCiAgLyoqQHJldHVybiBUaGUgZml4ZWQgd2lkdGggb2YgdGhlIGlj b24uKi8KICBwdWJsaWMgaW50IGdldEljb25XaWR0aCgpIHtyZXR1cm4gMTY7fQoKICAvKipA cmV0dXJuIFRoZSBmaXhlZCBoZWlnaHQgb2YgdGhlIGljb24uKi8KICBwdWJsaWMgaW50IGdl dEljb25IZWlnaHQoKSB7cmV0dXJuIDE2O30NCn0= --------------1017425BFC5543DCD9460CDC--
Technical Details
Message-ID:
<375C48BE.C9C6831@wynnon.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<375747BC.B95AB01D@wynnon.com> <37588946.7591048A@borland.com> <37596FAA.71C07039@wynnon.com> <375AE4BC.27194B99@borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,3c5e4ef4c2212740 X-Google-Attributes: gid111d45,public From: Bill Winspur <bwinspur@wynnon.com> Subject: Re: inspector bites icon Date: 1999/06/07 Message-ID: <375C48BE.C9C6831@wynnon.com> X-Deja-AN: 486837380 References: <375747BC.B95AB01D@wynnon.com> <37588946.7591048A@borland.com> <37596FAA.71C07039@wynnon.com> <375AE4BC.27194B99@borland.com> X-Accept-Language: en Content-Type: multipart/mixed; boundary="------------1017425BFC5543DCD9460CDC" Organization: Wynnon Methods & Systems, Inc Mime-Version: 1.0 Reply-To: bwinspur@wynnon.com Newsgroups: borland.public.jbuilder.java.swing