Raphael,
You can attach it to _Screen but my preference is to create a global object
from a hand coded class and then add properties to it .... one of them being
your object in question.
Doing it this way means you can always access what you want by using (in my
case) oGlobal in the command window with all its properties and also use it
easily in Debug without having the _Screen prefix which I usually always forget
Dave
Example
* Mainline.....
=Create_Global_Object()
Addproperty(oGlobal, "MyObject", <myObject>)
...
Return
*
* End of Mainline
Procedure Create_Global_Object
release oGlobal
public oGlobal
oGlobal=Createobject("clsGlobal")
*
Endproc
****************************
* Global Class
*
define class clsGlobal as relation
lFoxyPreviewer=.F.
Sys_User="****"
Sys_Auth=0
oUser_Tree_Menu_Form = null
* Specify the QR Code Object
oQR_Code = null
function init()
local cApp
cApp="FoxyPreviewer.app"
This.lFoxyPreviewer=File(cApp)
This.oQR_Code = Newobject("FoxBarcodeQR")
*
endfunc
*
enddefine
-----Original Message-----
From: ProFox [mailto:[email protected]] On Behalf Of Rafael Copquin
Sent: 14 April 2015 12:03
To: profox
Subject: copy objects
I need to create an object in a form with private data session from a cursor
like so:
select mycursor
go 1
scatter name oCur
then I want to place this object on the screen so it can be seen by other forms
with private data sessions.
The idea is that any of the other forms can get the object from the screen and
then use it inside the form for its own purposes like:
**form2
(get object from screen) copy its properties and contents to the local object
do something
** form3
(get object from screen) copy its properties and contents to the local object
do something
I know that one can pass the object directly to another form like so:
do form form2 with oCur
But in this case I need to keep the object somewhere (the _screen
object) to make it available to more than one form.
How is that done?
TIA
Rafael Copquin
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.