Visual Studio 2005 Toolbox...

Posts   
 
    
smcleod_au
User
Posts: 13
Joined: 27-Jul-2005
# Posted on: 27-Jul-2005 12:20:23   

It seems to have been done to death a little bit, but for the life of me I can't get my collections classes to show up in the toolbox.

I'm using the express editions of visual studio - beta 2 in c#

I'm generating my project using the VS2005 self servicing two class scenario templates and when I bring in the dll and 'show all' on the toolbox, they just come greyed out when I'm in design mode of a web form.

I've even tried compiling the runtime libraries in .net 2.

So frustrating... anyway. If someone could tell me what I'm doing wrong, that 'd be great.

Thanks,

Stuart.

smcleod_au
User
Posts: 13
Joined: 27-Jul-2005
# Posted on: 27-Jul-2005 15:03:38   

Bit of an update...

Tried this process in VS 2003 and it worked fine. So it might have something to do with the Express Versions as you can't include both projects in the one...

Any ideas?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 27-Jul-2005 16:01:48   

That's indeed a problem at the moment. Some interface usage in vs.net 2005 has changed or isn't working properly.

For the time being, either use a datasource or an ObjectDataSource and map the 4 methods to the 4 entity methods.

Frans Bouma | Lead developer LLBLGen Pro
smcleod_au
User
Posts: 13
Joined: 27-Jul-2005
# Posted on: 28-Jul-2005 02:02:55   

I must be a bit slow, for which I apologise. I know what you mean by using an ObjectDataSource and mapping the methods to the entities, but I haven't been able to figure out the code for which to do so. Can you give me a tip?

Thanks.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 28-Jul-2005 09:52:03   

smcleod_au wrote:

I must be a bit slow, for which I apologise. I know what you mean by using an ObjectDataSource and mapping the methods to the entities, but I haven't been able to figure out the code for which to do so. Can you give me a tip?

Thanks.

I'll see what it takes, it's new territory for me as well, so I have to try it out myself as well simple_smile What I do know is that a customer told me it worked almost flawlessly, but perhaps he had setup some wrapper code, not sure. I'll get back to you on this.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 28-Jul-2005 21:18:35   

Well, I can't get the design time experience going either... very frustrating. I don't know WHAT's wrong, lack of an interface implementation or other things...

The main thing is: the design time code apparently uses reflection to perform the determination of the columns. Though in an entity, the properties are provided by the ITypedList implementation, as it was done in .NET 1.x. When I pick a random class, like PrefetchPath, I get columns, though these are reflected by vs.net from the actual type.

I have no idea how to solve this at this point, as there's not a lot of info how to write code which appeals to the design time code.

When I drop ICustomTypeDescriptor from the code, and make a .NET 2.0 build of the runtime libraries, and then try again, I get the same result in ASP.NET, in winforms it them works (though not 2 levels deep).

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 28-Jul-2005 21:42:55   

Ok, I found some good articles here: http://www.nikhilk.net/DataSourceControlsDesignTime.aspx (and other articles in this series).

It looks like either the BL tier developer writes the datasource, or I provide an LLBLGenProDataSource with designer. Anyway, adding just generic design time databinding code like in .NET 1.x is not the way it's supposed to be done disappointed

Frans Bouma | Lead developer LLBLGen Pro
smcleod_au
User
Posts: 13
Joined: 27-Jul-2005
# Posted on: 29-Jul-2005 05:04:43   

Ok, well I'm glad it wasn't me then. I figure if you're having trouble with it then it's ok that I do. Have you tried it in Visual Studio 2005 proper? Not the express versions? does it work in those? I've ordered the full version beta on CD but probably won't be here for a week or 2.

Otherwise, from the look of those articles it would appear further implementation in Llblgen is required to get the design time interfaces working for VS2005...?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 29-Jul-2005 09:45:44   

smcleod_au wrote:

Ok, well I'm glad it wasn't me then. I figure if you're having trouble with it then it's ok that I do. Have you tried it in Visual Studio 2005 proper? Not the express versions? does it work in those? I've ordered the full version beta on CD but probably won't be here for a week or 2.

This was done in vs.net 2005 team system (enterprise edition, thus the full version).

The design time requirements are different with vs.net 2005. Which is particularly sad, because now a lot of code has to be changed. That would be ok, if there was proper documentation, but it's trial/error and look around for sparse info. Everyone talks about how to use objectdatasource, but not a lot talk about how to make your own class/collection work with objectdatasource.

After the article series I found yesterday I understand more the purpose of it, and I see why it doesn't work with normal entities, at least not in design time mode. A thin wrapper class is needed.

Otherwise, from the look of those articles it would appear further implementation in Llblgen is required to get the design time interfaces working for VS2005...?

Yes, new code for that has to be added (ASP.NET) and some code has to be removed (Winforms). As vs.net 2005 is still in beta, I'm reluctant to invest a lot of time in behavior which can/probably will change in the RTM version. Especially in asp.net where a lot of changes have been made after beta2.

Nevertheless, 1.0.2005.1 will have a .NET 2.0 native build of the runtime libs (the .NET 1.1 code build with the .NET 2.0 beta2 compiler) and basic code which allows you to do very basic design time databinding, nothing fancy. It will probably not work always, as its .NET 1.1 code still.

Frans Bouma | Lead developer LLBLGen Pro
smcleod_au
User
Posts: 13
Joined: 27-Jul-2005
# Posted on: 02-Aug-2005 03:53:00   

Hi Otis,

Can you estimate a timeframe on this build for me by any chance?

Thanks.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 02-Aug-2005 08:31:02   

smcleod_au wrote:

Hi Otis,

Can you estimate a timeframe on this build for me by any chance?

Thanks.

Beta is planned this month, it depends on how much time the features still to be developed take, though it looks very good simple_smile You can download beta's of upgrades when beta periods start.

Frans Bouma | Lead developer LLBLGen Pro
omar avatar
omar
User
Posts: 569
Joined: 15-Oct-2004
# Posted on: 02-Aug-2005 23:43:11   

an interesting article about the subject is also here http://www.ftponline.com/vsm/2005_09/magazine/columns/aspnet/

it talks about how to

Create Data-Bound Controls With ASP.NET 2.0

Hope this helps. I definitly want LLBLv2.0 design time data-binding to be at least as functional as that of v1.x

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 03-Aug-2005 10:50:12   

Thanks Omar, yes I saw the same (or similar) article on the msdn magazine site and bookmarked it. simple_smile I think a solution is possible, it just requires some more reading and testing I think before I have a good view on what to do to get it working.

Frans Bouma | Lead developer LLBLGen Pro