sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #05522
Re: [Question #171860]: X-1.0rc3: IDE: problems on restart
Question #171860 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/171860
Description changed to:
***** reason and workaround
This is all happening due to bugs in the new session save feature (at restart: restore IDE window and reopen files, that have been open when quitting IDE before)
see faq 1766
additionally there seems to be a bug (your first situation), that after
using File -> Open, the tab is named "Untitled" until you save it again.
If you quit the IDE in this situation, you are in the above restart
problem ("Untitled" cannot be reloaded).
So for now, until these bugs are fixed:
When quitting the IDE, make sure, that all tabs are closed - do not leave any files open.
-----------------------------------------------------------------------------------------------------
Hi,
171616 How to append common string into an array ..
This is my previous bug, according to ur comment , i used Import os. But this particular file bahaving differently
Paste this code and save it as any file name . for eg:
"navigation.sikuli"
import os
def myFunc(imagelist):
imageList = imagelist
result = []
for img in imageList:
imgpath = r"C:\images"
menuicon = os.path.join(imgpath, img)
if exists(menuicon,0): result.append(getLastMatch)
else: result.append(None)
return result
images =("icon1.png","icon2.png","icon3.png","icon4.png","icon5.png","icon6.png","icon7.png","icon8.png","icon9.png","icon10.png","icon11.png")
found = myFunc(images)
CLose that file. Now goto file->open and open that file .
Notice that , its opening with a tab name 'untitled'. But my code is working fine.
It gives me following error.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.sikuli.ide.SikuliIDE$MenuAction.actionPerformed(SikuliIDE.java:1065)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Sour
ce)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknow
n Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at org.sikuli.ide.ImageButton.createFromString(ImageButton.java:241)
at org.sikuli.ide.SikuliPane.replaceWithImage(SikuliPane.java:617)
at org.sikuli.ide.SikuliPane.parseLine(SikuliPane.java:568)
at org.sikuli.ide.SikuliPane.parseRange(SikuliPane.java:528)
at org.sikuli.ide
.SikuliPane.parse(SikuliPane.java:543)
at org.sikuli.ide.SikuliPane.parse(SikuliPane.java:546)
at org.sikuli.ide.SikuliPane.read(SikuliPane.java:427)
at org.sikuli.ide.SikuliPane.loadFile(SikuliPane.java:372)
at org.sikuli.ide.SikuliPane.loadFile(SikuliPane.java:383)
at org.sikuli.ide.SikuliIDE$FileAction.doLoad(SikuliIDE.java:1411)
... 43 more
Keep that file opened and close the sikuli ide, now open the sikuli tool by double clicking the icon.
noticed that , sikuli ide doesn appear. I need to press shift+alt+c to bring the sikuli ide to foreground.
The following message found in the message panel, as soon as opened.
Exception in thread "main" java.lang.NullPointerException
at org.sikuli.ide.ImageButton.createFromString(ImageButton.java:241)
at org.sikuli.ide.SikuliPane.replaceWithImage(SikuliPane.java:617)
at org.sikuli.ide.SikuliPane.parseLine(SikuliPane.java:568)
at org.sikuli.ide.SikuliPane.parseRange(SikuliPane.java:528)
at org.sikuli.ide.SikuliPane.parse(SikuliPane.java:543)
at org.sikuli.ide.SikuliPane.parse(SikuliPane.java:546)
at org.sikuli.ide.SikuliPane.read(SikuliPane.java:427)
at org.sikuli.ide.SikuliPane.loadFile(SikuliPane.java:372)
at org.sikuli.ide.SikuliIDE.loadFile(SikuliIDE.java:838)
at org.sikuli.ide.SikuliIDE.restoreSession(SikuliIDE.java:768)
at org.sikuli.ide.SikuliIDE.(SikuliIDE.java:713)
at org.sikuli.ide.SikuliIDE.getInstance(SikuliIDE.java:138)
at org.sikuli.ide.SikuliIDE.main(SikuliIDE.java:973)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.