Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: vece walet
  Where is vece walet?
 tangerang
 Indonesia
 vece walet
 Tags
Subject: RE: when event
Thread ID: 228581 Message ID: 228605 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Grids
Date: Wednesday, May 20, 2009 9:22:32 AM         
   


> hi..foxers
>
> how to make code one line "when()"
>
> ex.
> object.text1.click('blabla')....
>
> how about when()
>

Hi Vece,

Although you can for instance do something like this in the command window:

o = CREATEOBJECT('Form')
o.AddObject('t','Textbox')
? o.t.Click()
? o.t.When()


... doing so is considered not to be a good idea. Although it seems so, the example above actually does not run the object.event but merely your custom code that you added to the "event method".
Better let events just happen, and put actual code into custom methods that you can call separately, e.g. in you commandbutton.Click() do something like
Thisform.myPublicMethod()


Assumed I misunderstood what you want to do, can you rephrase your question?


hth
-Stefan

ENTIRE THREAD

when event Posted by vece walet @ 5/20/2009 3:41:18 AM
RE: when event Posted by Stefan Wuebbe @ 5/20/2009 9:22:32 AM
RE: when event Posted by vece walet @ 5/20/2009 10:50:12 AM
RE: when event Posted by Stefan Wuebbe @ 5/20/2009 11:52:07 AM