globals var and method invisible

Questions and answers regarding the use of eclipse environment as seen in Servoy Developer

globals var and method invisible

Postby erdione » Mon Sep 08, 2008 5:47 pm

I've got an solution in 401 (i've imported it from servoy 357).

In eclipse can't see globals variable or method, i can see them in the right panel (outline) of Eclipse but not in the left one (Servoy Solution Explorer)

i can right click and edit global.js in the script editor but if i want to run my solution it can't find my globals method or vars.

Do you have any idea ?
Fabrice
erdione
 
Posts: 112
Joined: Thu Feb 01, 2007 1:19 pm

Re: globals var and method invisible

Postby ROCLASI » Mon Sep 08, 2008 5:54 pm

erdione wrote:In eclipse can't see globals variable or method, i can see them in the right panel (outline) of Eclipse but not in the left one (Servoy Solution Explorer)

You can select the Globals node and the methods list in the pane below. Same with the (global) variables.

erdione wrote:i can right click and edit global.js in the script editor but if i want to run my solution it can't find my globals method or vars.

Not sure what you mean by this.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: globals var and method invisible

Postby erdione » Mon Sep 08, 2008 6:20 pm

In one of my solution In the left panel nothing appears when i click on global (no variables and no methods), it seems that it can't decode globals.js (but i can load it in script editor)

I've got a warning (see enclosed my screen capture), but the text is in french and i don't known how to give you the english version of this error.
Attachments
ERRSRV401_1.JPG
ERRSRV401_1.JPG (147.56 KiB) Viewed 10464 times
Fabrice
erdione
 
Posts: 112
Joined: Thu Feb 01, 2007 1:19 pm

Re: globals var and method invisible

Postby IT2Be » Mon Sep 08, 2008 6:30 pm

You can change the locale of Servoy to English. It should then give errors in English as well...
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Re: globals var and method invisible

Postby erdione » Mon Sep 08, 2008 6:43 pm

The english version is "illegal octal literal digit 9; interpreting it as a decimal digit"
Fabrice
erdione
 
Posts: 112
Joined: Thu Feb 01, 2007 1:19 pm

Re: globals var and method invisible

Postby IT2Be » Mon Sep 08, 2008 6:58 pm

Aha, I have that error as well but it does not stop my application from executing...
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Re: globals var and method invisible

Postby erdione » Mon Sep 08, 2008 10:50 pm

I found what cause my trouble
Code: Select all
var idEtape = 09
instead of
Code: Select all
var idEtape = 9


just a typing error, what is strange is that the warning is not shown on the real bad line of the global.js
Fabrice
erdione
 
Posts: 112
Joined: Thu Feb 01, 2007 1:19 pm

Re: globals var and method invisible

Postby pbakker » Tue Sep 09, 2008 9:18 am

Hi erdione,

Could you please register this in our support system? Then the engineers can see if they can improve the error feedback.

Regards,

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Re: globals var and method invisible

Postby IT2Be » Tue Sep 09, 2008 3:49 pm

This is what I have:

Code: Select all
elements.it2be_gantt.setDateRange(new Date(2007,08,01), new Date(2007,11,31));
The error is
Severity and Description illegal octal literal digit 8; interpreting it as a decimal digit
Path Resource IT2BE_gantt/forms/folded_grouping_dataset
Location folded_grouping_dataset_methods.js line 188
Creation Time 1220967763170
Id 782
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Re: globals var and method invisible

Postby erdione » Tue Sep 09, 2008 4:03 pm

Maybe you should try this

Code: Select all
elements.it2be_gantt.setDateRange(new Date(2007,8,1), new Date(2007,11,31));


It seems to be the leading Zero for integer that make errors
Fabrice
erdione
 
Posts: 112
Joined: Thu Feb 01, 2007 1:19 pm

Re: globals var and method invisible

Postby IT2Be » Tue Sep 09, 2008 4:34 pm

hmm, I 'could' agree. However, it used to work :(
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Re: globals var and method invisible

Postby jcompagner » Thu Oct 09, 2008 10:31 am

i think the warning is correct i guess the javascript compiler is made more strict about it because it doesnt
know what you mean
and writing things with 0 in front of it means that it is a octal value.

also 1 observation when i see the included picture..
why do you start all your globals with MODDEVIS? thats pretty horrible code completion wise.
if you really want to group globals then use max ony 2 chars as a prefix and use a post fix for better explanation..
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: globals var and method invisible

Postby xtsr » Mon Mar 26, 2012 9:47 am

I seem to be having a similar issue. While I can open globals.js in the Script editor, the variables and the methods don't show up in the solution explorer. They also cannot be seen by other forms and show up as errors, e.g. "button is linked to an entity that does not exist" etc. Code completion does not work and everything global does not appear in drop downs.

Strangely enough, I closed the solution, which was working fine last night and had the issue when I opened the solution today. I can add a variable in the solution explorer and I can see it in the script editor, but not in the solution explorer.

I also checked the local history and nothing that was changed in the last minutes before closing the solution should have any effect at all. I also could not find anything similar to the problem that caused the issues in the original post.

Is there a way to refresh or rebuild? I'm currently fixing the many warnings I got after upgrading from 4.1.7 to 6. I have already fixed 1000+ warnings and starting from scratch would be a disaster...

Thanks
Reto

Servoy Version: 6.0.5 - build 1230, OS X 10.7.3, MySQL 5.5.21
xtsr
 
Posts: 101
Joined: Wed Jan 21, 2004 11:47 am

Re: globals var and method invisible

Postby jcompagner » Mon Mar 26, 2012 10:04 am

do you have anything in the log files? (servoy log or eclipse log in your workspace/.metadata dir)
Because it seems that it can't parse the globals file. Are you sure you don't have any error in it?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: globals var and method invisible

Postby xtsr » Mon Mar 26, 2012 10:24 am

Indeed I do have a parsing error
!ENTRY com.servoy.eclipse.model 2 0 2012-03-26 07:01:31.791
!MESSAGE Javascript file '/Users/tsr/servoy6_workspace/DCA/globals.js' had a parsing error
!STACK 0
java.lang.StringIndexOutOfBoundsException: String index out of range: -10
at java.lang.String.substring(String.java:1937)
at com.servoy.eclipse.model.repository.SolutionDeserializer.parseJSFile(SolutionDeserializer.java:1070)
at com.servoy.eclipse.model.repository.SolutionDeserializer.readObjectFilesFromSolutionDir(SolutionDeserializer.java:378)
at com.servoy.eclipse.model.repository.SolutionDeserializer.updateSolution(SolutionDeserializer.java:255)
at com.servoy.eclipse.model.repository.SolutionDeserializer.readSolution(SolutionDeserializer.java:203)
at com.servoy.eclipse.model.repository.EclipseRepository.loadRootObject(EclipseRepository.java:203)
at com.servoy.j2db.persistence.RootObjectCache.getRootObject(RootObjectCache.java:226)
at com.servoy.j2db.persistence.RootObjectCache.getActiveRootObject(RootObjectCache.java:160)
at com.servoy.j2db.persistence.RootObjectCache.getActiveRootObject(RootObjectCache.java:168)
at com.servoy.j2db.persistence.AbstractRepository.getActiveRootObject(AbstractRepository.java:426)
at com.servoy.eclipse.model.nature.ServoyProject.getSolution(ServoyProject.java:125)
at com.servoy.eclipse.core.ServoyModel.autoSelectActiveProjectIfNull(ServoyModel.java:669)
at com.servoy.eclipse.core.ServoyModel.initialize(ServoyModel.java:2538)
at com.servoy.eclipse.core.ServoyModelManager$1.run(ServoyModelManager.java:71)
at com.servoy.eclipse.core.ServoyModelManager.getServoyModel(ServoyModelManager.java:80)
at com.servoy.eclipse.core.ServoyModelProvider.getServoyModel(ServoyModelProvider.java:32)
at com.servoy.eclipse.model.ServoyModelFinder.initializeServoyModel(ServoyModelFinder.java:102)
at com.servoy.eclipse.model.ServoyModelFinder.getServoyModel(ServoyModelFinder.java:42)
at com.servoy.eclipse.debug.script.TypeCreator.getFlattenedSolution(TypeCreator.java:826)
at com.servoy.eclipse.debug.script.ValueCollectionProvider.getTopValueCollection(ValueCollectionProvider.java:154)
at org.eclipse.dltk.internal.javascript.ti.TypeInferencer2.getTopValueCollection(TypeInferencer2.java:316)
at org.eclipse.dltk.internal.javascript.ti.TopValueCollection.<init>(TopValueCollection.java:104)
at org.eclipse.dltk.internal.javascript.ti.TypeInferencerVisitorBase.initialize(TypeInferencerVisitorBase.java:83)
at org.eclipse.dltk.internal.javascript.ti.TypeInferencer2.initializeVisitor(TypeInferencer2.java:80)
at org.eclipse.dltk.internal.javascript.ti.TypeInferencer2.doInferencing(TypeInferencer2.java:106)
at org.eclipse.dltk.internal.javascript.parser.JavaScriptSourceElementParser2.parseSourceModule(JavaScriptSourceElementParser2.java:46)
at org.eclipse.dltk.internal.core.AbstractSourceModule.buildStructure(AbstractSourceModule.java:528)
at org.eclipse.dltk.internal.core.Openable.generateInfos(Openable.java:193)
at org.eclipse.dltk.internal.core.ModelElement.openWhenClosed(ModelElement.java:184)
at org.eclipse.dltk.internal.core.BecomeWorkingCopyOperation.executeOperation(BecomeWorkingCopyOperation.java:45)
at org.eclipse.dltk.internal.core.ModelOperation.run(ModelOperation.java:698)
at org.eclipse.dltk.internal.core.ModelOperation.runOperation(ModelOperation.java:764)
at org.eclipse.dltk.internal.core.SourceModule.becomeWorkingCopy(SourceModule.java:69)
at org.eclipse.dltk.internal.ui.editor.SourceModuleDocumentProvider.createFileInfo(SourceModuleDocumentProvider.java:1280)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.connect(TextFileDocumentProvider.java:478)
at org.eclipse.dltk.internal.ui.editor.SourceModuleDocumentProvider.connect(SourceModuleDocumentProvider.java:1521)
at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4056)
at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:217)
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1444)
at org.eclipse.dltk.internal.ui.editor.ScriptEditor.internalDoSetInput(ScriptEditor.java:827)
at org.eclipse.dltk.internal.ui.editor.ScriptEditor.doSetInput(ScriptEditor.java:1323)
at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3043)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2606)
at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3061)
at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3088)
at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:798)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(EditorAreaHelper.java:271)
at org.eclipse.ui.internal.EditorManager.setVisibleEditor(EditorManager.java:1429)
at org.eclipse.ui.internal.EditorManager$5.runWithException(EditorManager.java:942)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3593)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3286)
at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
at org.eclipse.ui.internal.Workbench$31.runWithException(Workbench.java:1567)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3593)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3286)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2548)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)

!ENTRY com.servoy.eclipse.model 1 0 2012-03-26 07:01:35.430
!MESSAGE Time taken to read in the solution DCA: 3856


Can you point me in a direction?

Thanks!

PS: I still have quite a few warnings in my globals.js, but no error is reported in the "Problems" tab.
xtsr
 
Posts: 101
Joined: Wed Jan 21, 2004 11:47 am

Next

Return to Eclipse Environment

Who is online

Users browsing this forum: No registered users and 1 guest