BOs have value of Nothing on Page Load


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
In VB.NET StrataFrame will create the instance and you don't have to specified the "New."  In C#, you have to define these as properties, so you must specify the "new" as part of the property definition.  I am a bit stumped as to what is going on within your environment.  This really isn't rocket science here, and there isn't that much that can go wrong.  What add-ons and other products do you have loaded on your development machine?
Andrew Harper
Andrew Harper
StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)
Group: StrataFrame Users
Posts: 87, Visits: 3.3K
Hi Trent,

Thanks for you efforts trying to sort this out - I believe that I have found the cause of this problem.

I ran the sample application that you sent me on a different computer running VS2010 yesterday and got the same result as shown in my earlier post. What I found however was if I added a quick watch the object was instantiated and if I continued the grid did display. see attached screen shots. I tried again on my computer and got the same results.

I looked at your BO definition in  the applicationbasepage.cs

    private CustomersBO _Customers = new CustomersBO();


I use VB not C# but what stood out was the new keyword. In my applicationbasepage.vb I had declared my BOs as using

    Public WithEvents Customers As CustomersBO

as this was what was used in the StrataFrame sample application. This definition would result in my application working under VS2008 but not under VS2010. If I changed this definition to

    Public WithEvents Customers As New CustomersBO

my application ran correctly under VS2010.

I have looked at the compile options for in VS2008 & VS2010 and they seem to be set the same in both case. (explicit on, strict off, infer on). If there has been a change in behaviour between the V2008 & VS2010 then I am happy to add the new keyword in VS2010 - what I can't understand (yet!) is why the Strataframe VB Web Sample runs under VS2010 as it does not include the new keword in the BO definitions,

Best regards,

Andy
Attachments
debug1.png (96 views, 85.00 KB)
debug2.png (85 views, 124.00 KB)
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Sent you a PM with a link.
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Still working on that build...sorry for the delay Blush
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Before you do...let me give you a beta SF build just to make sure that there isn't something underlying that I am not thinking about.  Hold on for just a bit Smile
Andrew Harper
Andrew Harper
StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)
Group: StrataFrame Users
Posts: 87, Visits: 3.3K
Trent L. Taylor (1/20/2011)
You are trying to run an Express version are you?  Also, as an aside, I would definitely go with VS 2010...major enhancements and a far better development environment.  If you are doing new development, you are going to want to start in VS 2010 instead of VS 2008.


I have the full version of VS2010Pro, installed from MSDN CD. From memory I had vs2003, vs2005 and vs2008 and Strataframe already installed.

I then installed VS2010, uninstalled Strataframe, downloaded the latest version of Strataframe and then reinstalled Strataframe so options would appear in VS2010.

I agree that this would appear to an environmental issue. I could re-install Strataframe and VS2010 and if you think thats worth a shot,

Best regards,

Andy
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
You are trying to run an Express version are you?  Also, as an aside, I would definitely go with VS 2010...major enhancements and a far better development environment.  If you are doing new development, you are going to want to start in VS 2010 instead of VS 2008.
Edited 13 Years Ago by Trent L. Taylor
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Wow...I ran this on two different machines and environments.  So this tells me that there is something fishy with your development environment.  I can't imagine the changes that have been made in SF would have an effect on this, but I will do a build and let you have a beta version and see if this resolves the problem.

http://forum.strataframe.net/Uploads/Images/4091e23f-d0e5-4b5f-a738-db17.png
Attachments
Debug.png (127 views, 21.00 KB)
Andrew Harper
Andrew Harper
StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)
Group: StrataFrame Users
Posts: 87, Visits: 3.3K
Hi Trent,

I loaded your sample application and ran it under VS2010. I got the same issue with the BO as before unfortunately.

I have attached a screenshot of the debugger display for your reference,

Best regards,

Andy 
Attachments
debug_display.png (98 views, 71.00 KB)
Andrew Harper
Andrew Harper
StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)StrataFrame User (282 reputation)
Group: StrataFrame Users
Posts: 87, Visits: 3.3K
Hi Trent,

Thanks for the sample, I will load, test and reply. In all my tests so far  have been using the VB.Net SF Web Application Project template.

Subsequent to my original post I repeated the process in a W7 virtual machine that only had VS2010 and Strataframe freshly installed. My main XP development machine has vs2003, vs2005, vs2008 and vs2010 installed. In the W7 VM the Default.aspx file still had the same issue with the inherits statement but once I had fixed this the solutuon built without error and the BO's were instantiating correctly. I did however have problem with this setup where the microfour assemblies were not visible  in the 'Add Reference' dialogue. I found another post in these forums that solved this issue.

At this stage I will stick to VS2008 as there are no compelling reasons for me to use VS2010.

I appreciate your help,

Best regards,

Andy 
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search