Error in class generated [message #600] |
Wed, 07 February 2007 12:56 |
stephenboey
Messages: 54 Registered: January 2007
|
Member |
|
|
Hi,
I did the following alterations to the table
ALTER TABLE `mnu_role`
ADD `role_id_snr` varchar(16),
ADD `lft` INTEGER NOT NULL default 0,
ADD `rgt` INTEGER NOT NULL default 0,
ADD KEY `role_id_snr` (`role_id_snr`)
Was trying to create a list then a pop up to specify parent child relationship.
Appears that framework is not generating mnu_role_jnr.class.inc properly.
Attached are the files
|
|
|
Re: Error in class generated [message #601 is a reply to message #600] |
Wed, 07 February 2007 14:18 |
AJM
Messages: 2369 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
When you export from the Data Dictionary it will only create the standard database table class (mnu_role), it will not create any subclasses (mnu_role_jnr).
Subclasses will be created from table_generate(b) when you specify any table alias names
What did you do to create the subclass?
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
|
|
Re: Error in class generated [message #606 is a reply to message #604] |
Thu, 08 February 2007 04:49 |
AJM
Messages: 2369 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
The reason the LIST2 screen is not showng anything for the master/outer record is that mnu_role(list2).php has the following entries:
$outer_table = 'mnu_role'; // name of outer (parent) table
$inner_table = 'mnu_role_jnr'; // name of inner (child) table
while mnu_role.list2.screen.inc has the following entries:
$structure['tables']['outer'] = 'mnu_role_snr';
$structure['tables']['inner'] = 'mnu_role_jnr';
You should see that there is a mismatch on the name for "outer" - the data is being put into the XML file with the name "mnu_role" but the XSL stylesheet is looking for data with the name "mnu_role_snr". When both names are the same the data will appear.
The screenshot you provided showed that the child forms you created were Add2, Delete1, Enquire1, Search, Update1 and Audit. It is only the Add2 function that uses the popup, not the Update1, so you are doing something seriously wrong.
You also have the popup appearing as a navigation button in the List2 screen. This simply will not work.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
Re: Error in class generated [message #608 is a reply to message #607] |
Thu, 08 February 2007 06:58 |
AJM
Messages: 2369 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
The transaction generation procedure does not overwrite any existing files as they may have been edited, so it does not overwrite any changes you have made. This is by design. If you don't want the contents of your current files you must delete them manually.
I changed the procedure to ask for popups by task_id, not table names, in the latest release. This is because a popup may use either one or two tables, and it began to make the code (and the screen) too complicated. It is easier to create whatever popup you need first, then to specify its name later.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
|
|
|