2012/4/5 Anthony <[email protected]>:
> Does it work if you do the following at the top of model and controller
> files (requires latest web2py version):
>
> if 0:
> from gluon import *
>
> If you've got db and auth objects, you could also add:
>
> from gluon.tools import Auth
> db = DAL()
> auth = Auth(db)
>
> Anthony
>
Hi, Anthony, that's enough to avoid Eclipse marking as errors lines
containing web2py references, but to get autocomplete working, with
the latest web2py stable version , I need to add to my modules:
if 0:
from gluon import *
global LOAD; LOAD = compileapp.LoadFactory()
global request; request = globals.Request()
global response; response = globals.Response()
global session; session = globals.Session()
global cache; cache = cache.Cache()
global db; db = sql.DAL()
global auth; auth = tools.Auth()
global crud; crud = tools.Crud()
global mail; mail = tools.Mail()
global plugins; plugins = tools.PluginManager()
global service; service = tools.Service()
>
> On Tuesday, April 3, 2012 10:54:06 PM UTC-4, Rod Watkins wrote:
>>
>> I know this has been asked before. I don't mean to be an annoyance. I've
>> done the searches are read numerous posts about how to handle this. But the
>> advice conflicts and I've yet to actually fix the problem.
>>
>> What is the best way to handle imports for eclipse to get autocomplete to
>> work properly (as well as rid eclipse of all the incorrect error messages?
>>
>> I rather like having autocomplete functioning since, as a beginner, it
>> helps me discover functionality that I might otherwise miss (besides saving
>> some typing).
>>
>> Please accept my thanks in advance for any help on this.
>>
>> Cordially,
>> Rod Watkins