Possible bug in inheritance

Good morning from Gran Canaria to everybody!!

I´m putting my 5.2 solution into 6A5 and I have found some that might be a bug.

I have a forms that I use in all my File Maintenance Forms. It has buttons to save, delete, create new, go first record, etc., it also has a label for the form title and an image.

What I´m trying to do is create a new form that extends my “class” form but I have to change the text propery of the title label and the image to show the appropiate icon for the form.

When I change the text and/or size of the label it is not refreshed on the form, even saving it, what I have to do is just move up or down the label to get my new properties.

As the “class” form is in a module I can not change the image to a media that is imported in the main solution. I can understand that if I try to change the image from the module where the “class” form was created I could not do it, but if I want to do that from the form that is containing or “extends” that “class” form I must be able to choose a media that I have imported in the solution where that form is, no matter where the “class” form was created.

What do you think?

Much worst.

I have seen that when I change the text property of the label in the “child” form it´s also changed in the “class” form, so all the forms that are extending the “class” form now have the same title.

I think this is not the way that it should work. If I change a property in the “class” form within the “class” form must be inherited to all the “childs” forms, unless the element in the “child” form has overrided that property and when I change a property in an element of the “class” form from the “child” one it should no be changed in the “class” form.

I do not know if I have explained my self, but what in a few words the “class” form elements and it´s properties are inherited by its “children” forms unless I have overrided any of the properties in the “child” and, of course, changes made in the “children” are not passed to the “class”.

Can you open an issue in our system about this ? (http://www.servoy.com/s) And please fill in some steps to reproduce this, I tried this briefly but seems to me it works.

lvostinar:
Can you open an issue in our system about this ? (http://www.servoy.com/s) And please fill in some steps to reproduce this, I tried this briefly but seems to me it works.

I did (case 366035) and I have also uploaded a video reproducing the problem. Thanks.

I have noticed that if the child form is in the same solution of the class form properties are changed only in the child form, but still impossible to assign a datasource to the child form.

I just need to know if this problem happens to me or you can reproduce it.

I have a video that reproduce the problem if anyone would like to watch it just let me know an email address and I will send it to you.

jasantana:
I have noticed that if the child form is in the same solution of the class form properties are changed only in the child form, but still impossible to assign a datasource to the child form.

I just need to know if this problem happens to me or you can reproduce it.

I have a video that reproduce the problem if anyone would like to watch it just let me know an email address and I will send it to you.

This is on purpose, cannot change the datasource of the child form; parent and child must be based on same datasource…

lvostinar:
This is on purpose, cannot change the datasource of the child form; parent and child must be based on same datasource…

Then I must be missunderstanding something. I see that the reason to extend a form is because you can create elements, methods, etc that will be used in many other forms; for example a table maintenace form, where your record navigation buttons, actions buttons (save, edit…) and the common logic is used in many subforms and is not based on any datasource. The extended form or the “class” form has all this and the subform must have a datasource for it self.

In fact, if you create the form without setting the “extendform” property, then set the datasource in the child form and then set the “extendform” property it works.

Shouldn´t it be this way?

Thanks.

jasantana:

lvostinar:
In fact, if you create the form without setting the “extendform” property, then set the datasource in the child form and then set the “extendform” property it works.

Shouldn´t it be this way?

Thanks.

You will have a warning in Problems View that child and parent form have different datasources. These forms should be based on same datasource.

jasantana:

lvostinar:
This is on purpose, cannot change the datasource of the child form; parent and child must be based on same datasource…

Then I must be missunderstanding something. I see that the reason to extend a form is because you can create elements, methods, etc that will be used in many other forms; for example a table maintenace form, where your record navigation buttons, actions buttons (save, edit…) and the common logic is used in many subforms and is not based on any datasource. The extended form or the “class” form has all this and the subform must have a datasource for it self.

In fact, if you create the form without setting the “extendform” property, then set the datasource in the child form and then set the “extendform” property it works.

Shouldn´t it be this way?

Thanks.

If parent datasource is empty, you should be able to redefine the datasource in child. This is a bug in current alpha release, will be fixed in next release.

lvostinar:
If parent datasource is empty, you should be able to redefine the datasource in child. This is a bug in current alpha release, will be fixed in next release.

Yes, I´ve seen in the case I opened that will be fixed in the next release. Great !!

BTW Do you know a date for that release?

Thanks.

jasantana:

lvostinar:
If parent datasource is empty, you should be able to redefine the datasource in child. This is a bug in current alpha release, will be fixed in next release.

Yes, I´ve seen in the case I opened that will be fixed in the next release. Great !!

BTW Do you know a date for that release?

Thanks.

Is planned for this week.