Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Status class
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01023966
Message ID:
01024059
Views:
23
>Here is my code
>
>
>DEFINE CLASS statusform as Custom	
>	oForm=null
>	FUNCTION init()		
>		this.oform=CREATEOBJECT("form")
>		WITH this.oform			
>		        .height=200
>			.width=300
>			.controlbox=.f.
>			.addobject("mylistbox","listbox")
>			.mylistbox.width=.width
>			.mylistbox.height=.height
>			.mylistbox.fontsize=8
>			.mylistbox.visible=.t.			
>			.alwaysontop=.t.			
>			.caption="Status"
>		ENDWITH
>	
>	ENDFUNC 	
>	
>	FUNCTION Update(cMessage as String)
>	
>		this.oForm.visible=.t.
>		this.oForm.mylistbox.additem(cMessage)
>		this.oform.mylistbox.listindex = this.oform.mylistbox.listcount
>	
>	ENDFUNC
>
>ENDDEFINE
>
>
>
>The following code is called in a class that is instatiated from a button.click on a form
>
>
>
>statform=newobject("statusform","statusform.prg"
>
>do while <somecondition>
>  insert into table1 (field1) value (somevalue)
>  statform.update("Adding " + somevalue)
>  wait window "" noclear timeout .001  && my current workaround
>enddo
>
>release statform
>
>
>
>My current workaround is to add the pause with the wait window.

Unrelated question, but what is the purpose of the additional layer of the custom class? Why you can't have StatusForm?

You also may want to add refresh() in the Update routine...
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform