Skip to main content
Dear All,

I got a DRAFT version of the K2.net Studio Assist SDK document, and tried to create a template for mail server event by following the instructions in the SDK doc. The program is compiled fine in MS Visual C#, and the wizard is running in K2.net studio, but when I clicked the dataViewButton (next to the text field) it prompts the following message:

==================
An unhandled exception has occurred in a component in your application. Click continue and application will ignore this error and attempt to continue.

K2Object not set to an instance of an object.
==================

Moreover, without clicking the dataViewButton, the wizard is completed fine and a template was created; however, all input I typed in the wizard is not shown in the Event Item of the template that was just created.

Does anyone know how to fix those problems?
I appreciate any suggestion :-)

Thanks
Patrick
Patrick,

Check around the InitButtons() method to make sure that the textbox is assigned to the dv control. Also check around the LoadData and SaveData methods.

Graham
Patrick,

I am currently working on a wizard that will automate almost the whole event generation process. As long as there is no great deviations from the draft versions the wizard works fine. However, I am not sure how SourceCode will view any further distribution as the K2.net Studio Assist SDK is for partners only. Partner to partner should be okay IMHO.

Graham
Hi Graham,

Thanks for your reply. I checked those mehtods and they are alright.

But what I found was:

PropertyTemplatePage_Load(...) {...}
PropertyTemplatePageContainer_Load(...) {...}

never got invoked. Those two methods were manually typed in by myself, but they are exactly the same as whatever given in the K2.net Studio SDK. What I made changed was that in the design view, I double clicked the user control form, then MS Visual C# will automatically generate
PropertyTemplatePage_Load(...) {} 
, and I just copy paste exactly the same code as I typed in before, inside the method. I did the same for
 PropertyTemplatePageContainer_Load(...) {} 
Then everything works perfectlly well.

I'm not sure why it makes the difference by typing those method hearders manually and generating automatically by MS VC#


Cheers,
Patrick
Same topic as: http://forum.k2workflow.com/viewtopic.php?p=4109#4109
Patrick,

Can you single-step through the InitButtons, LoadData and SaveData methods in the debugger? Check also the loading of the Wizard components and initialisation of each component.

Regards
Graham

Reply