Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qc4 FormBase namespacing #18

Open
vmakre opened this issue Jun 8, 2018 · 5 comments
Open

qc4 FormBase namespacing #18

vmakre opened this issue Jun 8, 2018 · 5 comments

Comments

@vmakre
Copy link

vmakre commented Jun 8, 2018

@spekary can you check this code?

class Home extends FormBase {

previous v.3 was:
class Home extends QForm {

i think should be:
class Home extends Form {
or,
class Home extends Qcubed\Project\Control\Form {

All *Base classes are default qcubed , I think will be more convenient
to have different naming in project instead of default ones.
so we can write this at start:
use QCubed\Project\Control\Form ;

@kukrik
Copy link
Member

kukrik commented Jun 8, 2018

I do not know what the @spekary thinks. But I use this like this:

use QCubed\Project\Control\FormBase as QForm;

Then:

class Home extends QForm

It can be very freely used, for example:

use QCubed\Project\Control\FormBase as Form;

and

class Home extends Form

PS. In that case, if I understood your question correctly...

@vmakre
Copy link
Author

vmakre commented Jun 8, 2018

No it is just to be more convenient and without aliasing.
When we do autocomplete we have two results of same class.

@kukrik
Copy link
Member

kukrik commented Jun 8, 2018

Okay, I got it. Let's see what @spekary says...

@spekary
Copy link
Member

spekary commented Jun 8, 2018

All user form classes should derive from QCubed\Project\Control\FormBase so that you can put general form options in the user changeable form class. The idea of naming it FormBase instead of Form is just so that the names mirror what they override. But changing it to Form is not a big deal. It will only affect new projects, since that is part of the install directory.

@vmakre
Copy link
Author

vmakre commented Jun 9, 2018

Every other control have ControlName and ControlNameBase naming.
@spekary you can check , I tried in my test project to rename to Form and got some wreid errors.
Will be good to be done if it not need too much effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants