Skip to main content
Participant
Aug 8, 2008 7:38 PM UTC
Question

Object equality

Are you planning to implement object equality (aka java equals and hashcode) in Flex 4 SDK?

What is the current alternative?
This topic is closed to new replies. Start a new post to keep the conversation going.

4 replies

Known Participant
Aug 10, 2008 2:09 AM UTC
So file a feature request for IList, and submit a patch :) There's only a few classes you'd have to change, and I've poked around in their insides a fair bit while writing ListIndexer, it's like 3 hours' work. It's definitely not something I've really missed, but I can see it being useful, particularly for AIR apps.


-Josh

On Sat, Aug 9, 2008 at 6:24 PM, HappyCoder < member@adobeforums.com> wrote:

A new message was posted by HappyCoder in



Developers --

  Object equality



That's bad...

I think it's essential especially for flex because almost every application written using this technology uses data coming from elsewhere.

Implementing IUid interface won't help since it's not taken into account by core classes like Arraycollection that uses == to compare entities. The only workaround I have for now is using homemade *Util classes.


The problem is described here http://blog.iconara.net/2007/11/25/architectural-atrocities-part-8-is-there-no-equality/





View/reply at Object equality

Replies by email are OK.

Use the unsubscribe form to cancel your email subscription.





--
"Therefore, send not to know For whom the bell tolls. It tolls for thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: josh@gfunk007.com


Translate
Participant
Aug 9, 2008 7:24 AM UTC
That's bad...

I think it's essential especially for flex because almost every application written using this technology uses data coming from elsewhere.

Implementing IUid interface won't help since it's not taken into account by core classes like Arraycollection that uses == to compare entities. The only workaround I have for now is using homemade *Util classes.

The problem is described here http://blog.iconara.net/2007/11/25/architectural-atrocities-part-8-is-there-no-equality/
Translate
matt_chotin
Inspiring
Aug 8, 2008 8:49 PM UTC
We've requested it in the past but it's a Player feature, not yet planned. Doesn't exist in ECMAScript.<br /><br />Matt<br /><br /><br />On 8/8/08 2:16 PM, "Jono Spiro" <member@adobeforums.com> wrote:<br /><br />A new message was posted by Jono Spiro in<br /><br />Developers --<br /> Object equality<br /><br /><br />Do you mean, are we planning on rewriting existing code to use a mechanism like equals?<br /><br />Working in AS and in Java, it never occurred to me (until now) that we were missing that concept - which says that it doesn't come up a lot, or we have different idioms for accomplishing the same...<br /><br />- Jono<br /><br /><br />From: HappyCoder [mailto:member@adobeforums.com]<br />Sent: Friday, August 08, 2008 1:39 PM<br />To: flexsdk-dev@adobeforums.com<br />Subject: Object equality<br /><br />A new discussion was started by HappyCoder in<br /><br />Developers --<br /> Object equality<br /><br />Are you planning to implement object equality (aka java equals and hashcode) in Flex 4 SDK?<br /><br />What is the current alternative?<br />________________________________<br />View/reply at Object equality <a href=http://www.adobeforums.com/webx?13@@.59b61d50><br />Replies by email are OK.<br />Use the unsubscribe <a href=http://www.adobeforums.com/webx?280@@.59b61d50!folder=.3c060fa3> form to cancel your email subscription.<br /><br /><br />________________________________<br />View/reply at Object equality <a href=http://www.adobeforums.com/webx?13@@.59b61d50/0><br />Replies by email are OK.<br />Use the unsubscribe <a href=http://www.adobeforums.com/webx?280@@.59b61d50!folder=.3c060fa3> form to cancel your email subscription.
Translate
Participating Frequently
Aug 8, 2008 8:16 PM UTC
<div class=Section1><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Do you mean, are we planning on rewriting existing code to use a<br />mechanism like equals?<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Working in AS and in Java, it never occurred to me (until now)<br />that we were missing that concept &#8211; which says that it doesn&#8217;t come up a lot,<br />or we have different idioms for accomplishing the same&#8230;<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>- Jono<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'> <o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><br /><br /><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span<br />style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> HappyCoder<br />[mailto:member@adobeforums.com] <br><br /><b>Sent:</b> Friday, August 08, 2008 1:39 PM<br><br /><b>To:</b> flexsdk-dev@adobeforums.com<br><br /><b>Subject:</b> Object equality<o:p></o:p></span></p><br /><br /></div><br /><br /><p class=MsoNormal><o:p> </o:p></p><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>A new discussion was started by<br />HappyCoder in <br><br /><br><br /><b>Developers</b> --<br><br />  Object equality<br><br /><br><br />Are you planning to implement object equality (aka java equals and hashcode) in<br />Flex 4 SDK? <br><br /><br><br />What is the current alternative? <o:p></o:p></p><br /><br /><div class=MsoNormal><br /><br /><hr size=2 width=200 style='width:150.0pt' align=left><br /><br /></div><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>View/reply at <a<br />href="http://www.adobeforums.com/webx?13@@.59b61d50">Object equality</a><br><br />Replies by email are OK.<br><br />Use the <a<br />href="http://www.adobeforums.com/webx?280@@.59b61d50!folder=.3c060fa3">unsubscribe</a><br />form to cancel your email subscription.<o:p></o:p></p><br /><br /></div>
Translate