PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Michael Meeks on March 13, 2005, 03:32:57 AM

Title: Passing Objects
Post by: Michael Meeks on March 13, 2005, 03:32:57 AM
Hi,

I have an ActiveX which has several objects.

FS1.FilePath  = vPath
FS1.FileName = vFileName
FS1.MinDate = vminDate
FS1.MaxDate = vmaxDate

FS2.VerifyOn = vTrue
FS2.Rention = vRention

Here's where I'm stuck:   In VB you do:   FS2.Settings = FS1
The Selection property must be set to a valid FS1 object.

So - what do I do?    FS2.Settings = (handle of FS1) ?

Also - what's the easy way to get a handle of a control in FF?
I've been using the API - but I think FF has a simple way of doing this.

Thanks
Mike
Title: Re: Passing Objects
Post by: TechSupport on March 13, 2005, 10:13:14 AM
Quote from: Michael MeeksAlso - what's the easy way to get a handle of a control in FF?

Press the "F4" key while in the code editor. :)

BTW, its great to have you back back Mike. It's been a long time since we heard from you. We missed having you around the PB scene.
Title: Passing Objects
Post by: Michael Meeks on March 13, 2005, 01:00:42 PM
Yes - it's good to take break every now and then...   :shock:

You can work hard and long hour - make all the money in the world - but several facts remain:

1)  You spend more $$$
2)  You have less time.
3)  Your wife schedules a date with you 2 weeks in advance.   :?

Had a free weekend and decided to continue my FireFly School - and put it through some major testing.  So far - it's handle everything just fine.  The problem - ( if any ) - is my lack of knowledge in using it.  Although one could write bad source - within FireFly - the ide attempts to guard you against this as much as possible - and provides us with a nice arena to be more careful and subjective when writing our code.

Is there gonna be a debugger with FF in the future?  I did notice someone writing one - and appears from the outside - that it look pretty good.

Regards
Mike
Title: Passing Objects
Post by: Jose Roca on March 13, 2005, 01:22:21 PM
Quote
Here's where I'm stuck: In VB you do: FS2.Settings = FS1
The Selection property must be set to a valid FS1 object.

So - what do I do? FS2.Settings = (handle of FS1) ?
There are not handles in COM. Handles are direct pointers and COM uses indirection, i.e. addresses to pointers, but regarding your question, if FS1 is an object variable and FS2.Settings wants it, then it depends of the version of the compiler that you're using.

With PBWIn 8.0/PBCC 4.0 you can do FS2.Settings = FS1, like in Visual Basic.

With 7.x/3.x you have to use:
DIM vObj AS VARIANT
SET vObj = FS1
SET FS2.Settings = vObj
vObj = EMPTY

Hope this helps.
Title: Passing Objects
Post by: Michael Meeks on March 13, 2005, 03:42:12 PM
Thank You Jose,

You came through for me again!

Regards
Mike
Title: Passing Objects
Post by: Jose Roca on March 13, 2005, 03:50:05 PM
Quote
With PBWIn 7.0/PBCC 4.0 you can do FS2.Settings = FS1, like in Visual Basic.
Of course I mean PBWin 8.0. I have edited the post to correct the mistake.