Print Page | Close Window

How to use PropExchange?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=23214
Printed Date: 25 April 2024 at 4:55pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to use PropExchange?
Posted By: Jebo
Subject: How to use PropExchange?
Date Posted: 28 November 2016 at 6:17am
Hello,

I'm evaluatin V17.3 and try to use the "PropExchange" object, but your example code (from Helpfile) will not work because "New" isn't possble:

Private Sub LoadData()
    Dim pxRead As New PropExchange
...

So I tried another way, but also not work...

Dim pxWr As PropExchange
Set pxWr = Xtremesuitecontrols.CreatePropExchange

pxWr.CreateAsXML False, "Test"
If pxWr.Valid Then
    pxWr.ExchangeString "Name", "Jack", ""
    pxWr.SaveToFile "B:\Test.xml"
End If

The Result is a Type mismatch error.



-------------
[Sig removed by Admin: Signature can't exceed 40GB]



Replies:
Posted By: olebed
Date Posted: 29 November 2016 at 12:09pm
Hi,

About second argument of ExchangeString:  from documentation
Quote Value
Reference to a variable of type String to save data to or to retrieve data from.
So fixed code is
    Dim pxWr As PropExchange    Set pxWr = Xtremesuitecontrols.CreatePropExchange

    Dim refStr As String
    refStr = "Jack"
    
    pxWr.CreateAsXML False, "Test"
    If pxWr.Valid Then
        pxWr.ExchangeString "Name", refStr, ""
        pxWr.SaveToFile "B:\Test.xml"
    End If

about
Dim pxRead As New PropExchange
it is VB.Net

Regards,
 Oleksandr Lebed


Posted By: Jebo
Date Posted: 29 November 2016 at 12:12pm
> Reference to a variable of type String to save data to or to retrieve data from.
Ah YES! Thank you!

-------------
[Sig removed by Admin: Signature can't exceed 40GB]



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net