Re: [Flashcoders] Coding Standards: Use of Get/Set

2007-02-13 Thread Daniel Grace
The biggest complaint that I have seen is the issue of speed. If you do
var foo: String = obj.theLetterA you expect that to be a hash
lookup/dereference/something fast. If you do var foo: String =
obj.getSomething() and you are thinking about speed, you go and look at
what getSomething() is doing. This makes sense to me, while the other
arguments I've heard against get/set make no sense to me.

For the record though I've never used get/set functions because I don't
see the point in making the syntax stranger compared to the other
languages I've used which either don't have or didn't provide me a good
reason to use get/set. Can someone tell me any benefit at all?

Daniel

Pete Miller wrote:
 Just to fuel your query, how does it affect the user to know whether
 they are 'get'-ing from a variable or a function call, encapsulation
 considered?

 P.

   
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Holth, Daniel C.
 Sent: Tuesday, February 13, 2007 3:32 PM
 To: Flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] Coding Standards: Use of Get/Set


 I was wondering what people's thoughts were on the use of get and
 set functions.  I personally have felt that creating functions such
 as:

 public function get theLetterA(){
 return a;
 }

 so the user can simply call someObject.theLetterA are confusing
   
 because
   
 the user doesn't know if they are doing a function call or accessing
   
 a
   
 public variable.  I prefer writing functions such as:

 public function getTheLetterA(){
 return a;
 }

 So the user needs to explicitly call the function
 someObject.getTheLetterA().

 Are there advantages to using get and set that I'm not seeing?


 I ask because I was always use getVariable() functions and started
 reading ActionScript 3 with Design Patterns and the authors (as well
   
 as
   
 many others I've read) are using get and set functions.


 Daniel Holth
 I.S. Programmer



 This e-mail and its attachments are intended only for the use of the
 addressee(s) and may contain privileged, confidential or proprietary
 information. If you are not the intended recipient, or the employee
   
 or
   
 agent responsible for delivering the message to the intended
   
 recipient,
   
 you are hereby notified that any dissemination, distribution,
   
 displaying,
   
 copying, or use of this information is strictly prohibited. If you
   
 have
   
 received this communication in error, please inform the sender
 immediately and delete and destroy any record of this message. Thank
   
 you.
   
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com
   
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com
   

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Flash 9, XMLSocket.onClose

2007-02-07 Thread Daniel Grace
I am currently building a large-scale Flash application. I had been
testing with the v8.something plugin. During beta customers were
complaining about crashes and I've finally tracked it down.

I'm connecting to a custom message bus using an XMLSocket. When the
remote end closes the connection (when we have to restart the message
bus, as it's also beta quality) the Flash 8 plugin calls my onClose
handler. The flash 9 plugin however brings down the entire browser.
Backtraces have a call to EnforceLocalSecurity in common.

Has anyone seen this? Does anyone have a workaround or further question
to help me track this down? I haven't seen anything in the results of a
google query and I have confirmed this behavior in the latest Flash
plugin (at least for the Mac).

Thanks in advance, I'm a new subscriber but these archives have come in
handy several times when they came up in google queries. You guys seem
to be the  most intelligent group of flash developers in a single spot.

Daniel
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com