GUI Template Bug?

Posts   
 
    
psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 26-Jan-2007 23:50:46   

Frans,

When viewing a list of entities, the "name" columns for all of my entities are missing (Client_Name, Project_Name, etc.). The are present when I view the entity individually.

Today is the first time I've seen the GUI Templates at work (couldn't get it to work before due to bugs, then had no free time). If this new feature isn't going to boost sales tenfold, I don't know what will. Awesome!

Thanks,

Phil

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 27-Jan-2007 03:18:35   

Are you certain that they aren't just listed without the underscores? This is the default behavior. So they would look something like ProjectName and ClientName.

psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 27-Jan-2007 06:16:59   

bclubb wrote:

Are you certain that they aren't just listed without the underscores? This is the default behavior. So they would look something like ProjectName and ClientName.

No, they weren't there at all. I checked three different entities that had field names that ended in "_name", and none of them were in the list. Again, they did show up in the view.

I may be able to send you a code sample on Monday.

Phil

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39776
Joined: 17-Aug-2003
# Posted on: 27-Jan-2007 08:32:25   

Ok, so a list of entities shows all fields of a entity except fields which have the '_name' suffix? Strange. I'll see if I can reproduce them. simple_smile

There are a couple of other glitches I saw, which I'll fix also very soon simple_smile We'll then release them in final format simple_smile

Frans Bouma | Lead developer LLBLGen Pro
psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 30-Jan-2007 00:42:43   

Otis wrote:

Ok, so a list of entities shows all fields of a entity except fields which have the '_name' suffix? Strange. I'll see if I can reproduce them. simple_smile

There are a couple of other glitches I saw, which I'll fix also very soon simple_smile We'll then release them in final format simple_smile

Frans,

Were you able to reproduce this, or do you need me to send/post code?

Thanks,

Phil

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39776
Joined: 17-Aug-2003
# Posted on: 30-Jan-2007 10:33:39   

psandler wrote:

Otis wrote:

Ok, so a list of entities shows all fields of a entity except fields which have the '_name' suffix? Strange. I'll see if I can reproduce them. simple_smile

There are a couple of other glitches I saw, which I'll fix also very soon simple_smile We'll then release them in final format simple_smile

Frans,

Were you able to reproduce this, or do you need me to send/post code? Thanks,

Phil

I didn't have time to reproduce it, I will have today. It only happens with fields suffixed with '_name' ?

Frans Bouma | Lead developer LLBLGen Pro
psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 30-Jan-2007 15:42:58   

Looking at it again, it appears that this has nothing to do with "_name", and has to do with the length of the varchar field. "Client_Name" does not appear, as it's varchar(256), where "City_Name" does appear, as it's varchar(50). It just happened that on this project the only fields that were large varchar were _name fields. So I'm guessing this is expected behavior?

Also, as I tinkered with it a little more this morning, I found another problem. Some entities are showing up on the main screen in the dropdown list, but when I click "Edit Existing" or "List All" I get an error:

The file '/GUI/Controls/ListCareerModelLevelInstances.ascx' does not exist

or

The file '/GUI/Controls/EditCareerModelLevel.ascx' does not exist

This is happening for at least two entities.

Thanks,

Phil

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39776
Joined: 17-Aug-2003
# Posted on: 30-Jan-2007 16:34:57   

psandler wrote:

Looking at it again, it appears that this has nothing to do with "_name", and has to do with the length of the varchar field. "Client_Name" does not appear, as it's varchar(256), where "City_Name" does appear, as it's varchar(50). It just happened that on this project the only fields that were large varchar were _name fields. So I'm guessing this is expected behavior?

ah! simple_smile Yes this is 'by design', to make the grid not too wide. It's a check in listInstancesControlAscx.lpt, line 97.

Also, as I tinkered with it a little more this morning, I found another problem. Some entities are showing up on the main screen in the dropdown list, but when I click "Edit Existing" or "List All" I get an error:

The file '/GUI/Controls/ListCareerModelLevelInstances.ascx' does not exist or The file '/GUI/Controls/EditCareerModelLevel.ascx' does not exist This is happening for at least two entities.

Hmm... These files don't exist ? Did you have a subgroup defined when generating code or did you just generated code for all entities? Is CareerModelLevel an abstract entity perhaps in an inheritance hierarchy?

Frans Bouma | Lead developer LLBLGen Pro
psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 30-Jan-2007 16:44:47   

Otis wrote:

ah! simple_smile Yes this is 'by design', to make the grid not too wide. It's a check in listInstancesControlAscx.lpt, line 97.

It made sense once I made that connection. Hopefully you didn't spend a lot of time poring over the code looking for "_name" because of me. simple_smile

Otis wrote:

Hmm... These files don't exist ? Did you have a subgroup defined when generating code or did you just generated code for all entities? Is CareerModelLevel an abstract entity perhaps in an inheritance hierarchy?

Yes, I had a subgroup defined. I just opened the project file and looked at the subgroup--this entity was not one of those selected, assuming that the project file accurately saves the subgroup information.

Phil

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39776
Joined: 17-Aug-2003
# Posted on: 30-Jan-2007 17:09:03   

psandler wrote:

Otis wrote:

ah! simple_smile Yes this is 'by design', to make the grid not too wide. It's a check in listInstancesControlAscx.lpt, line 97.

It made sense once I made that connection. Hopefully you didn't spend a lot of time poring over the code looking for "_name" because of me. simple_smile

heh no, you were just in time simple_smile

Otis wrote:

Hmm... These files don't exist ? Did you have a subgroup defined when generating code or did you just generated code for all entities? Is CareerModelLevel an abstract entity perhaps in an inheritance hierarchy?

Yes, I had a subgroup defined. I just opened the project file and looked at the subgroup--this entity was not one of those selected, assuming that the project file accurately saves the subgroup information. Phil

Ok, that's good information as then somewhere I still emit code based on the project entities instead of the selected entities. Will try to repro this.

I received your file, thanks simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39776
Joined: 17-Aug-2003
# Posted on: 05-Feb-2007 10:51:57   

I think I know what's going on.

The combo box with the entity names is created using the generated code's EntityType enum. So say you generate adapter code for ALL entities, then all entity names show up in the EntityType enum.

Now, if you then go in and generate UI code for a subset of these entities, it won't match: there are entities in the combo box which aren't in the set of entities used to generate the screens.

Could you please confirm if this is the case?

Frans Bouma | Lead developer LLBLGen Pro
psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 05-Feb-2007 15:23:41   

Otis wrote:

I think I know what's going on.

The combo box with the entity names is created using the generated code's EntityType enum. So say you generate adapter code for ALL entities, then all entity names show up in the EntityType enum.

Now, if you then go in and generate UI code for a subset of these entities, it won't match: there are entities in the combo box which aren't in the set of entities used to generate the screens.

Could you please confirm if this is the case?

Yep, I generated code for all entities for the DAL first, then generated a subset for the GUI.

Thanks,

Phil

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39776
Joined: 17-Aug-2003
# Posted on: 05-Feb-2007 16:44:52   

Then that's it: some of the entities in the adapter code aren't available in the gui code because they're not selected.

Best thing to do is to generate the code with the same set of entities.

Frans Bouma | Lead developer LLBLGen Pro