FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

A question - how to catch property change event?

 
Post new topic   Reply to topic     Forum Index -> General
View previous topic :: View next topic  
Author Message
bane



Joined: 01 May 2007
Posts: 41
Location: Pancevo, Serbia

PostPosted: Tue May 22, 2007 2:49 am    Post subject: A question - how to catch property change event? Reply with quote

Lets say ou have a code like
Code:

class MyClass {
    int x;
    float y;
}

MyClass a = new MyClass();
a.x = 5;


I need to catch event (call a func or something like that) when you change (set) value for x property of a class.
Or to generalize, any property of any class or struct.

Is it possible?
_________________
"I apologize only for my spelling" - a quote shamelessly stolen from some guy at unknown forum.
Back to top
View user's profile Send private message
Extrawurst



Joined: 14 Mar 2007
Posts: 41

PostPosted: Tue May 22, 2007 3:41 am    Post subject: Reply with quote

look at "Class and Struct Properties" in der docs.
http://www.digitalmars.com/d/property.html
Back to top
View user's profile Send private message
bane



Joined: 01 May 2007
Posts: 41
Location: Pancevo, Serbia

PostPosted: Tue May 22, 2007 5:22 am    Post subject: Reply with quote

Thanx, Extrasausage Smile
_________________
"I apologize only for my spelling" - a quote shamelessly stolen from some guy at unknown forum.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> General All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group