Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I can't do simple API Object stuff!!!
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00885374
Message ID:
00887175
Views:
11
Hi Joe,

>it just doesnt like that = .t. ...fox only see's it as a function, not a property?

From what you wrote from the help there, it is a function. You wrote :

>Function:
> boolean = TColumnOn( mux as integer, channel as integer, errr as integer )
> TColumnOn( mux as integer, channel as integer, errr as integer) = boolean

I don't know much VB but it seems to be possible to set a value by assigning a value to a function call ? This looks VERY weird to me. I don't think there is a way to do that in VFP. In any standard design (that I know at least), you'd wheter set a property directly or the property would be HIDDEN or PROTECTED and you'd set it by passing a parameter to a function call.

If it's really a function, I don't think you can get around this. However, VFP seems to see it as an array, and this would look more normal. Try to issue PEMSTATUS(DM916,"TColumnOn",3) and see what this returns. If it says Method and the only way to set the flag to .T. is to pass a value to the function call, you'll have to call the support for this component and see if there is another way. However, if it says Property than it's because you used a bad subscript to access the array. Maybe the err parameter is causing that.

Hope this helps,
Sylvain Bujold


>Thank you, this clears things up for me!
>However, here is the latest I am stuck on.
>
>In this object.class, there is a property that I need to set to true to continue. currently it is set to false and I can see that it is false in the watch list.
>
>Here is from the help file of the component (examples are for VB)
>-----------------------
>TColumnOn (Transducer column on or off.)
>Function:
> boolean = TColumnOn( mux as integer, channel as integer, errr as integer )
> TColumnOn( mux as integer, channel as integer, errr as integer) = boolean
>
>Description: Turns transducer column display update on or off.
>
>Arguments: mux is any valid multiplexer on the port, 1 to 8.
> channel is any number from 1 to 16.
> errr is return error code.
>
>Example: DM916.TColumnOn( 1, 2, errr ) = true
> if DM916.TColumnOn( 1, 2, errr ) then
> print “Is on”
> endif
>-----------------------
>
>I can run it just as it is, but if I try to set a boolean to it, fox can't handle it. It works in VB of course. I've tried many ways, including..
>
>dm916.TColumnOn(1,1,err) = .T.
>
>of which fox yields
>Err #31
>Invalid subscript reference
>
>it just doesnt like that = .t. ...fox only see's it as a function, not a property?
>
>Ideas?
>THANKS!
Previous
Reply
Map
View

Click here to load this message in the networking platform