The Cache: Technology Expert's Forum
Welcome, Guest. Please login or register. September 21, 2019, 02:18:25 AM

Login with username, password and session length

Pages: [1]
Author Topic: @perks  (Read 1558 times)
Global Moderator
Offline Offline

Posts: 2203

View Profile
« on: September 23, 2009, 04:37:32 AM »

Too lazy to look up the post.
But where u wanted to set/get the property of ur widget.
And see if it changed.
I suggested a getter/setter
but maybe u could use a "watch" which is like a perl tie.
Olde World Hacker
Offline Offline

Posts: 10096

View Profile
« Reply #1 on: September 23, 2009, 10:46:15 AM »

Thanks Nop ... actually I don't need to get/set, I thought that was someone else...

the PHP get/set is rather crappy in that ALL properties are set through a single magic method... and if you define the method, then all getting or setting goes through it. It's a PIA and doesn't "feel" right. It can be used (I've used it thus) to limit access or even ensure that you're doing things correctly: you can spontaneously "set" an object property that doesn't even exist, so the ability for you to create code where you think something's happening but it really isn't is high - so the ability to lock down / add code to the getting/setting of properties is good, but it's not entirely well thought out IMO. Using it you could also do type enforcement. I just don't care for it very much.

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks

Valid XHTML 1.0! Valid CSS!