🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #49

Re: Jbuilder firing events twice... why?

#49
From: Dillan Fernando
Date: Mon, 15 Feb 1999 00:00
61 lines
2930 bytes
Hi!


I had the same problem. What I did was, copied the contents,  removed the
.java file from the project, created a new .java file with the same name,
and pasted the contents. This worked for me.

Regards

Dillan Fernando

Kiran Deshpande wrote in message <36A2221E.7164C865@incentric.com>...
>Hi,
>    I am running across problems because JBuilder is firing events
>twice.  It basically executes the code fragment twice.  Here is an
>example scenario:
>
>I have two dialog boxes,
>Dialog1 has : a grid control, a button 'Modify',  and the grid is
>assigned a dataset.
>Dialog2 has: jdbTextFields for modifying the data in the dataset, and
>buttons to save, cancel and close.
>
>First I get a list of rows into the dataset and set it to 'Dialog1'.
>Now when I press the 'Modify' button on this dialog, it disposes
>'Dialog1' and I assign the dataset to 'Dialog2' so that the user can
>modify the data, and I show 'Dialog2'.  After this when the user clicks
>on 'Close' on 'Dialog2' I dispose 'Dialog2'.  When I debugged this code
>fragment, I  noticed that the program goes into the actionPreformed
>event of 'Close' button of 'Dialog2' twice and then again into the
>actionPerformed event of 'Modify' button on 'Dialog1' thus displaying
>the 'Dialog2' again.
>
>the sequence of events are:
>
>1. modify_actionPerformed in 'Dialog1' (user clicks no the 'Modify'
>button)
>    - disposes 'Dialog1' and shows 'Dialog2'
>2. this shows 'Dialog2'
>3. close_actionPerformed in 'Dialog2' (user Clicks on the 'Close'
>button)
>    - disposes 'Dialog2'
>4. again close_actionPerformed in 'Dialog2' (why?)
>5. goes again into modify_actionPerformed in 'Dialog1' (why should it do
>this?)
>6. shows 'Dialog2' again
>7. close_actionPerformed in 'Dialog2' (user Clicks on the 'Close'
>button)
>8. again close_actionPreformed in 'Dialog2'
>9. finally 'Dialog2' is not there.
>
>Why does JBuilder fire the events twice.  This is so weird and I dont
>know what to do to fix this stupid problem.
>How do I fix this problem.  has anyone else come across this problem.
>
>All your help will be greatly appretiated.
>
>Thanks & regards
>Kiran
>
>
Technical Details
Message-ID: <7aa1bl$56j13@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <36A2221E.7164C865@incentric.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5c5,93398afba4987f59
X-Google-Attributes: gidff5c5,public
X-Google-Thread: 1073da,93398afba4987f59
X-Google-Attributes: gid1073da,public
X-Google-Thread: f74b3,93398afba4987f59
X-Google-Attributes: gidf74b3,public
From: "Dillan Fernando" <dillan@geocities.com>
Subject: Re: Jbuilder firing events twice... why?
Date: 1999/02/15
Message-ID: <7aa1bl$56j13@forums.borland.com>
X-Deja-AN: 444704339
References: <36A2221E.7164C865@incentric.com>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.language,borland.public.jbuilder.database,borland.public.jbuilder.debugger