Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: INSERT ... FROM NAME objectName
Message
From
08/04/2005 03:48:07
 
 
To
07/04/2005 18:51:50
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01001906
Message ID:
01002527
Views:
20
>>
>>WITH CREATEOBJECT("empty")
>>ENDWITH
>>
>
>Fabio-
>
>There is something very strange about creating ojbect within a WITH block that won't be available outside of the block.

None is strange.

For not persistent objects it is useful for me
( in VFP a reference _WITHSTACK[level] lacks, but I cannot expect too much from the VFPT )
WITH CREATEOBJECT...
   .Prop1= ...
   .methodX
   =WITH_Procedure1(some parameters)
   WITH NEWOBJECT...

      ...
   ENDWITH
ENDWITH

PROCEDURE WITH_Procedure1(parameters)
   .Methods()
   .PropX = ....
   =WITH_Procedure2()
....
>
>But I suppose you could do something like:
>
>
>WITH CREATEOBJECT( "Word.Application" )
>	.Visible = .T.
>	loDocument = .Documents.Add()
>	loSelection = .Selection
>	loSelection.TypeText("Hello World")
>	loDocument.SaveAs("HelloWorld")
>	.Quit()
>ENDWITH
>
Previous
Reply
Map
View

Click here to load this message in the networking platform