Page 1 of 1

New IWCGJQMobile application with usersession vars

PostPosted: 07 Mar 2018 18:28
by kmmagic
Hello,
Building my first IWCGJQ Mobile Test/Learning application based on JQMobileDemoIW14 and I must be missing something.

In my other IWCGJQ Web Applications where I use CGDevtools components exclusively, I access usersession objects and variables at will.

In my IWCGJQ Mobile Test/Learning application I cannot seem to access usersession objects and variables the same way.

For example in the design UI I can specifiy a usersession variable for a label caption like
usersession.testvariable without any complaint from the IDE. The IDE sees that the usersession's unit in in the uses and I can see all the objects and variables in code completion. But when I compile and run the application and click on a control where I'm trying to assign this variable I get an exception raised: access violation at 0x0040b066: write of address 0x00000084.

Just to be sure that I didn't build the application structure incorrectly, I took a copy of the JQMobileDemoIW14 demo app and added one string variable to the usersession unit and tried to access it in the main form and I got the same type or error message.

Whats different about building a mobie IW app than a regular IW Web Application?

Re: New IWCGJQMobile application with usersession vars

PostPosted: 07 Mar 2018 18:55
by Jorge Sousa
Hi

Nothing its different with regard to the UserSession,

Please send us your demo copy, so that we can better understand.

tia

Re: New IWCGJQMobile application with usersession vars

PostPosted: 07 Mar 2018 19:29
by kmmagic
Hey Jorge,

Thanks for the quick response.

I'm trying to upload a zipped up project for you to look at but It doesn't seem to be going through.

I'll try again.

Regards

Kevin

Re: New IWCGJQMobile application with usersession vars

PostPosted: 08 Mar 2018 14:33
by kmmagic
Hi Jorge,
I pushed up a zip file of the demo project with a change that demonstrates the error. I can't see if you received it.

Pls let me know.

Kevin

Re: New IWCGJQMobile application with usersession vars

PostPosted: 08 Mar 2018 15:27
by Jorge Sousa
Hi

No we didn't receive it, where did you send to?

You can use Upload attachment in this forum or send by email to support at cgdevtools dot com

Re: New IWCGJQMobile application with usersession vars

PostPosted: 08 Mar 2018 16:06
by kmmagic
Please review line 57 in Main.pas

Re: New IWCGJQMobile application with usersession vars

PostPosted: 08 Mar 2018 16:10
by kmmagic
Cannot upload the file through the forum. I emailed to support@cgdevtools.com

Re: New IWCGJQMobile application with usersession vars

PostPosted: 08 Mar 2018 17:02
by Jorge Sousa
Ok, thanks

We will replay asawc

Re: New IWCGJQMobile application with usersession vars

PostPosted: 09 Mar 2018 10:38
by Alexander Bulei
Hi kmmagic,

The access violation caused because the UserSession is nil.
Please check your ServerController, and assign the OnNewSession event (IWServerControllerBaseNewSession).

Best Regards.

Re: New IWCGJQMobile application with usersession vars

PostPosted: 10 Mar 2018 18:56
by kmmagic
Thank you Alexander. I figured something got dropped while adapting the demo.