Solved SalWindowHandleToNumber and complex data types

General discussion forum about all things Team Developer 7.x
Mirko
Italy
Posts: 5
Joined: 04 Apr 2017, 08:56
Location: Geneva

SalWindowHandleToNumber and complex data types

Post by Mirko » 18 Aug 2017, 08:36

Hello,

I used to pass complex data types between windows using SalSendMsg( hWnd , AM_HELLO, 0, SalWindowHandleToNumber( cObject ) )

with cObject declared as follows :

!!CB!! 244
Functional Class: cObject
Description:
Derived From
Class Variables
Instance Variables
Number: nNumber
String: sString
Constructor/Destructor
Functions

But this does not work anymore since V7 probably due to new data casting rules.

I make havvy use of this in one of my V6 applications with more complicated objects, can someone give me a workaround ? Is there a new casting function I shound be aware of or a solution to fool the new compiler ?

TIA
Mirko
You do not have the required permissions to view the files attached to this post.

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 484
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: SalWindowHandleToNumber and complex data types

Post by Dave Rabelink » 18 Aug 2017, 12:47

Hi Mirko,

Yes, the TD compiler is more strict starting from TD 6.1.

As far as I know a workaround is to pass an array of objects instead of one object.

It is described here:

http://wiki.tdcommunity.net/index.ph ... _any_array

I created a small test application which works ok.
(src format TD 5.1)
You do not have the required permissions to view the files attached to this post.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Mirko
Italy
Posts: 5
Joined: 04 Apr 2017, 08:56
Location: Geneva

Re: SalWindowHandleToNumber and complex data types

Post by Mirko » 21 Aug 2017, 07:28

Thanks Dave,

this works indeed ....

I'll change what needed as I guess that asking Gupta for a SalObjectToNumber and SalNumberToObject would be hopeless...

Thanks again
Mirko

Return to “General Discussion”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests