Welcome Guest, Not a member yet? Register   Sign In
html table library does not load
#1

[eluser]motsan[/eluser]
There is a problem when i try to load the "html table" library.

error msg is : "Fatal error: Call to a member function set_template() on a non-object in..."

so i try something :

in welcome controller i write this and there is error:

Quote:function index() {
$this->load->model('user');
$this->load->library('table');
$this->table->set_template($tmpl);
}

in welcome controller i write this and there is NO error:
Quote:function index() {
$this->load->library('table');
$this->load->model('user');
$this->table->set_template($tmpl);
}

just notice that load order is different between two function
I think there is not order to load library and model ?
so maybe a bug or something that i dont understand (so Is there somebody to learn me?) ?

best regard
#2

[eluser]Tom Glover[/eluser]
Have you tried loading the lib through the auto load file. If not, as far as i no that the CI loads libs first then models, but calling them the other way shouldn't be a problem.
#3

[eluser]motsan[/eluser]
Tried this morning,

Same result : error, function call on non object...set_template...
with autoload file having 'table' in array and user in model autoload array

in my controller :
function index() {
$this->table->set_template($tmpl);
...
}

I have some config that may cause problem in my Application developpment based on CI, I will try with fresh install of CI 1.6.1 and post here
#4

[eluser]TheFuzzy0ne[/eluser]
Could this be related to this issue? If so, I think we might need to file a bug report.

EDIT: Whoops! This is a bug report!...
#5

[eluser]motsan[/eluser]
This issue is a Good Post and could be explanation, but i dont think so :

- my probleme does not append in model::__construct nor library::__construct nor in function called in __construct functions.

-In new fresh install : with ou without autoload file, in controller::__construct or in controller::index(), order call load (model then lib or lib then model) and using function : work fine.

I was thinking that come from integration xajax, tinymce and tcpdf, so maybe i made some mistake, but dont see a this time.

There is no critical consequence, just need to load library after model.

realy curious...




Theme © iAndrew 2016 - Forum software by © MyBB