Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / May 2005

Tip: Looking for answers? Try searching our database.

Infopath async callback DOM

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nick - 16 May 2005 17:39 GMT
Does anyone know how to use callback functions in infopath managed code to
and use the application and XDocument object model?  When ever I try, it says
something like cannot be called when the object is in this state.
Scott L. Heim [MSFT] - 17 May 2005 18:34 GMT
Hi Nick,

Can you provide some additional information on what you are doing and what
is failing? For instance, the following code works for me on the click
event of a button using VS.NET:

           Dim xNode
           xNode =
thisXDocument.DOM.selectSingleNode("//my:myFields/my:field1")
           MsgBox(xNode.text)

Thanks,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights
Nick - 26 May 2005 19:32 GMT
Yes, it has to do with the delagates and async callback operation.  Im
speculating, because I dont fully understand the "under - the - hood" stuff
for the async callback, but if its on a different thread, then something is
preventing access to the XDocument DOM.

> Hi Nick,
>
[quoted text clipped - 13 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights
Nick - 26 May 2005 21:51 GMT
Here is the exact error:

{"Operation is not valid due to the current state of the object." }

I tried to use this from the global variable as well as passing it in the
delegate / async worker function.  Both yield the same result.

> Hi Nick,
>
[quoted text clipped - 13 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.