Search Results

Search found 111 results on 5 pages for 'dispatchevent'.

Page 2/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • 1136: Incorrect number of arguments. Expected 0 AS3 Flash CS5.5 [on hold]

    - by Erick
    how do I solve this error? I've been trying to get the answer online but have not been successful. I'm trying to learn As3 for flash so I decided to try making a preloader for a game. Preloader.as package com.game.moran { import flash.display.LoaderInfo; import flash.display.MovieClip; import flash.events.*; public class ThePreloader extends MovieClip { private var fullWidth:Number; public var ldrInfo:LoaderInfo; public function ThePreloader (fullWidth:Number = 0, ldrInfo:LoaderInfo = null) { this.fullWidth = fullWidth; this.ldrInfo = ldrInfo; addEventListener(Event.ENTER_FRAME, checkLoad); } private function checkLoad (e:Event) : void { if (ldrInfo.bytesLoaded == ldrInfo.bytesTotal && ldrInfo.bytesTotal !=0) { dispatchEvent (new Event ("loadComplete")); phaseOut(); } updateLoader (ldfInfo.bytesLoaded / ldrInfo.bytesTotal); } private function updateLoader(num:Number) : void { mcPreloaderBar.Width = num * fullWidth; } private function phaseOut() : void { removeEventListener (Event.ENTER_FRAME, checkLoad); phaseComplete(); } private function phaseComplete() : void { dispatchEvent (new Event ("preloaderFinished")); } } } Engine.as package com.game.moran { import flash.display.MovieClip; import flash.display.Sprite; import flash.events.Event; public class Engine extends MovieClip { private var preloader:ThePreloader; public function Engine() { preloader = new ThePreloader(732, this.loaderInfo); stage.addChild(preloader); preloader.addEventListener("loadComplete", loadAssets); preloader.addEventListener("preloaderFinished", showSponsors); } private function loadAssets (e:Event) : void { this.play(); } private function showSponsors(e:Event) : void { stage.removeChild(preloader); trace("show sponsors") } } } The line being flagged as an error is line 13 in Engine.as.

    Read the article

  • Adding UIComponent to both Canvas and Tree in Flex 3

    - by Chris M
    I currently am trying to add a custom class which subclasses UIComponent to both a tree and a canvas, but when I try to re-order the tree by dragging I get this error: TypeError: Error #1010: A term is undefined and has no properties. at mx.controls::Tree/get firstVisibleItem()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\Tree.as:764] at flash.utils::ByteArray/writeObject() at flash.desktop::Clipboard/putSerialization() at flash.desktop::Clipboard/convertFlashFormat() at flash.desktop::Clipboard/setData() at mx.managers::NativeDragManagerImpl/doDrag()[C:\autobuild\3.2.0\frameworks\projects\airframework\src\mx\managers\NativeDragManagerImpl.as:282] at mx.managers::DragManager$/doDrag()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\DragManager.as:243] at mx.controls.listClasses::ListBase/dragStartHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:9085] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298] at mx.controls.listClasses::ListBase/mouseMoveHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:8822] When I do not add the UIComponent to the canvas, this error does not occur, anyone have any knowledge as to why this happens?

    Read the article

  • Error while assigning the data to dataGrid Dataprovided

    - by sudeep kumar
    Hi , I was trying to acces the datagrid at runtime and want to assign the data to it like public function getGridData(reportsArray:ArrayCollection):void{ reportData = reportsArray; trace(" The length of the datagrid is "+reportData.length); graphDataGrid.dataProvider = reportData; invalidateDisplayList(); } but I was getting this error TypeError: Error #1009: Cannot access a property or method of a null object reference. at views.charts::ComparisonAnalysis/createDataGrid()[C:\FlexProjects\AdvancedMetering\views\charts\ComparisonAnalysis.mxml:32] at views.charts::ComparisonAnalysis/getGridData()[C:\FlexProjects\AdvancedMetering\views\charts\ComparisonAnalysis.mxml:26] at components.CustomReport::CustomReportSelector/getResultHandler()[C:\FlexProjects\AdvancedMetering\components\CustomReport\CustomReportSelector.mxml:147] at components.CustomReport::CustomReportSelector/__reportingBase_dataGridResultChanged()[C:\FlexProjects\AdvancedMetering\components\CustomReport\CustomReportSelector.mxml:203] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298] at components.CustomReport::ReportingBase/getDataFromServer()[C:\FlexProjects\AdvancedMetering\components\CustomReport\ReportingBase.as:98] at components.CustomReport::ReportingBase/getResults()[C:\FlexProjects\AdvancedMetering\components\CustomReport\ReportingBase.as:78] at components.CustomReport::CustomReportSelector/getGraphData()[C:\FlexProjects\AdvancedMetering\components\CustomReport\CustomReportScripts.as:20] at components.CustomReport::CustomReportSelector/__getGraphandGridData_click()[C:\FlexProjects\AdvancedMetering\components\CustomReport\CustomReportSelector.mxml:248] Can someboedy please let me know what the problem it looks like the datagrid is not instantiated at this ppoint of time Sudee[

    Read the article

  • DOM Level 3 CustomEvents not bubbling on WebKit

    - by Edu Felipe
    I'm observing CustomEvents not bubbling, even though I set bubbling to true. The code below: var evt = document.createEvent("CustomEvent") evt.initCustomEvent("mycustomevent", true, false) var someh1 = document.getElementById("someh1") someh1.addEventListener("mycustomevent", function(){ alert("OMG!"); }) document.getElementsByTagName("body")[0].dispatchEvent(evt) With the HTML below: <html> <head></head> <body> <h1 id="someh1">content!</h1> </body> </html> Never shows the alert, demonstrating that the event is not bubbling down. Am I doing something wrong? Please note that if I do a getElementById("someh1") and run the dispatchEvent on it, the alert is displayed. Thanks!

    Read the article

  • FLEX, Actionscript: how can I invoke a CustomEvent ?

    - by Patrick
    hi, I've created a custom MouseEvent in Flex: package { import flash.events.MouseEvent; public class CustomMouseEvent extends MouseEvent { public var tags:Array = new Array(); public function CustomMouseEvent(type:String, tags:Array) { super(type, true); this.tags = tags; } } } Now I would like to understand how to pass the parameter tags from both Actionscript and MXML: From actionscript I'm trying something like this, but it doesn't work: newTag.addEventListener(MouseEvent.MOUSE_UP, dispatchEvent(new CustomMouseEvent(MouseEvent.MOUSE_UP,[newTag.name]))); From MXML i'm doing this and it doesn't work as well: <mx:LinkButton click="dispatchEvent(new CustomMouseEvent(MouseEvent.MOUSE_UP, bookmarksRepeater.currentItem.tags))" /> thanks

    Read the article

  • Is possible to remove an event listener in actionscript 3 (flash) ??

    - by DomingoSL
    In the frame 1 of my movie, part of my code is: stage.addEventListener(Event.RESIZE, resizeHandler); It works all fine, but when i go to the frame 2 the listener is still there but the function resizeHandler is not anymore (and i dont want it). So the console output this: TypeError: Error #1009: Cannot access a property or method of a null object reference. at index_fla::MainTimeline/resizeHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.display::Stage/dispatchEvent() at index_fla::MainTimeline/frame2() Is possible to remove the event listener on the frame 2? Thanks!!!

    Read the article

  • IntellIJ editor doesn't appear

    - by neveu
    I updated my IntellIJ install to the latest version (11.1.4) and now the Editor window doesn't appear. Double-clicking on the file, jump-to-source, nothing happens. No error message, it just doesn't appear. If I double-click on an xml layout file the preview window works, but no Editor window. Have installed and reinstalled; went back to an earlier version and it doesn't work there either. I'm at a loss. Any ideas? Update: Editor works if I create a new project. Update 2: idea.log file includes this (I don't know what ins.android.sdk.AndroidSdkData is): 2012-11-04 20:40:52,481 [ 2677] INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/macros.xml file is null 2012-11-04 20:40:52,481 [ 2677] INFO - .impl.stores.XmlElementStorage - Document was not loaded for $APP_CONFIG$/macros.xml 2012-11-04 20:40:52,482 [ 2678] INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/quicklists.xml file is null 2012-11-04 20:40:52,482 [ 2678] INFO - .impl.stores.XmlElementStorage - Document was not loaded for $APP_CONFIG$/quicklists.xml 2012-11-04 20:40:52,564 [ 2760] INFO - pl.stores.ApplicationStoreImpl - 76 application components initialized in 1285 ms 2012-11-04 20:40:52,575 [ 2771] INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/customization.xml file is null 2012-11-04 20:40:52,575 [ 2771] INFO - .impl.stores.XmlElementStorage - Document was not loaded for $APP_CONFIG$/customization.xml 2012-11-04 20:40:52,674 [ 2870] INFO - ij.openapi.wm.impl.IdeRootPane - App initialization took 3385 ms 2012-11-04 20:40:53,136 [ 3332] INFO - TestNG Runner - Create TestNG Template Configuration 2012-11-04 20:40:53,138 [ 3334] INFO - TestNG Runner - Create TestNG Template Configuration 2012-11-04 20:40:53,253 [ 3449] INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/dynamic.xml file is null 2012-11-04 20:40:53,253 [ 3449] INFO - .impl.stores.XmlElementStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/dynamic.xml 2012-11-04 20:40:53,280 [ 3476] INFO - api.vfs.impl.local.FileWatcher - 1 paths checked, 0 mapped, 202 mks 2012-11-04 20:40:53,366 [ 3562] INFO - ellij.project.impl.ProjectImpl - 137 project components initialized in 403 ms 2012-11-04 20:40:53,563 [ 3759] INFO - .module.impl.ModuleManagerImpl - 4 modules loaded in 197 ms 2012-11-04 20:40:53,625 [ 3821] INFO - api.vfs.impl.local.FileWatcher - 6 paths checked, 0 mapped, 150 mks 2012-11-04 20:40:54,187 [ 4383] INFO - .roots.impl.DirectoryIndexImpl - Directory index initialized in 271 ms, indexed 1611 directories 2012-11-04 20:40:54,207 [ 4403] INFO - pl.PushedFilePropertiesUpdater - File properties pushed in 18 ms 2012-11-04 20:40:54,237 [ 4433] INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/plainTextFiles.xml file is null 2012-11-04 20:40:54,237 [ 4433] INFO - .impl.stores.XmlElementStorage - Document was not loaded for $APP_CONFIG$/plainTextFiles.xml 2012-11-04 20:40:54,246 [ 4442] INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/gant_config.xml file is null 2012-11-04 20:40:54,246 [ 4442] INFO - .impl.stores.XmlElementStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/gant_config.xml 2012-11-04 20:40:54,253 [ 4449] INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/gradle.xml file is null 2012-11-04 20:40:54,253 [ 4449] INFO - .impl.stores.XmlElementStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/gradle.xml 2012-11-04 20:40:55,855 [ 6051] INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/IntelliLang.xml file is null 2012-11-04 20:40:55,855 [ 6051] INFO - .impl.stores.XmlElementStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/IntelliLang.xml 2012-11-04 20:40:56,995 [ 7191] INFO - leEditor.impl.EditorsSplitters - splitter 2012-11-04 20:40:56,996 [ 7192] INFO - leEditor.impl.EditorsSplitters - splitter 2012-11-04 20:40:57,233 [ 7429] INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/codeStyleSettings.xml file is null 2012-11-04 20:40:57,233 [ 7429] INFO - .impl.stores.XmlElementStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/codeStyleSettings.xml 2012-11-04 20:40:57,234 [ 7430] INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/projectCodeStyle.xml file is null 2012-11-04 20:40:57,234 [ 7430] INFO - .impl.stores.XmlElementStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/projectCodeStyle.xml 2012-11-04 20:40:58,145 [ 8341] INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 3911 ms 2012-11-04 20:40:58,146 [ 8342] INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 0 files to update 2012-11-04 20:40:58,146 [ 8342] INFO - indexing.UnindexedFilesUpdater - Unindexed files update done in 0 ms 2012-11-04 20:40:58,362 [ 8558] INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/fileColors.xml file is null 2012-11-04 20:40:58,362 [ 8558] INFO - .impl.stores.XmlElementStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/fileColors.xml 2012-11-04 20:41:00,420 [ 10616] INFO - ins.android.sdk.AndroidSdkData - For input string: "20.0.1" java.lang.NumberFormatException: For input string: "20.0.1" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:458) at java.lang.Integer.parseInt(Integer.java:499) at org.jetbrains.android.sdk.AndroidSdkData.parsePackageRevision(AndroidSdkData.java:86) at org.jetbrains.android.sdk.AndroidSdkData.<init>(AndroidSdkData.java:73) at org.jetbrains.android.sdk.AndroidSdkData.parse(AndroidSdkData.java:167) at org.jetbrains.android.sdk.AndroidPlatform.parse(AndroidPlatform.java:83) at org.jetbrains.android.sdk.AndroidSdkAdditionalData.getAndroidPlatform(AndroidSdkAdditionalData.java:119) at org.jetbrains.android.facet.AndroidFacet.addResourceFolderToSdkRootsIfNecessary(AndroidFacet.java:532) at org.jetbrains.android.facet.AndroidFacet.access$500(AndroidFacet.java:103) at org.jetbrains.android.facet.AndroidFacet$3.run(AndroidFacet.java:440) at com.intellij.ide.startup.impl.StartupManagerImpl$6.run(StartupManagerImpl.java:230) at com.intellij.ide.startup.impl.StartupManagerImpl.runActivities(StartupManagerImpl.java:203) at com.intellij.ide.startup.impl.StartupManagerImpl.access$100(StartupManagerImpl.java:41) at com.intellij.ide.startup.impl.StartupManagerImpl$4.run(StartupManagerImpl.java:170) at com.intellij.openapi.project.DumbServiceImpl.updateFinished(DumbServiceImpl.java:213) at com.intellij.openapi.project.DumbServiceImpl.access$1000(DumbServiceImpl.java:51) at com.intellij.openapi.project.DumbServiceImpl$IndexUpdateRunnable$1$3.run(DumbServiceImpl.java:363) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:702) at java.awt.EventQueue.access$400(EventQueue.java:82) at java.awt.EventQueue$2.run(EventQueue.java:663) at java.awt.EventQueue$2.run(EventQueue.java:661) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.awt.EventQueue.dispatchEvent(EventQueue.java:672) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:699) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:538) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:420) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:378) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) 2012-11-04 20:41:00,459 [ 10655] INFO - ins.android.sdk.AndroidSdkData - For input string: "20.0.1" java.lang.NumberFormatException: For input string: "20.0.1" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:458) at java.lang.Integer.parseInt(Integer.java:499) at org.jetbrains.android.sdk.AndroidSdkData.parsePackageRevision(AndroidSdkData.java:86) at org.jetbrains.android.sdk.AndroidSdkData.<init>(AndroidSdkData.java:73) at org.jetbrains.android.sdk.AndroidSdkData.parse(AndroidSdkData.java:167) at org.jetbrains.android.sdk.AndroidPlatform.parse(AndroidPlatform.java:83) at org.jetbrains.android.sdk.AndroidSdkAdditionalData.getAndroidPlatform(AndroidSdkAdditionalData.java:119) at org.jetbrains.android.facet.AndroidFacet.addResourceFolderToSdkRootsIfNecessary(AndroidFacet.java:532) at org.jetbrains.android.facet.AndroidFacet.access$500(AndroidFacet.java:103) at org.jetbrains.android.facet.AndroidFacet$3.run(AndroidFacet.java:440) at com.intellij.ide.startup.impl.StartupManagerImpl$6.run(StartupManagerImpl.java:230) at com.intellij.ide.startup.impl.StartupManagerImpl.runActivities(StartupManagerImpl.java:203) at com.intellij.ide.startup.impl.StartupManagerImpl.access$100(StartupManagerImpl.java:41) at com.intellij.ide.startup.impl.StartupManagerImpl$4.run(StartupManagerImpl.java:170) at com.intellij.openapi.project.DumbServiceImpl.updateFinished(DumbServiceImpl.java:213) at com.intellij.openapi.project.DumbServiceImpl.access$1000(DumbServiceImpl.java:51) at com.intellij.openapi.project.DumbServiceImpl$IndexUpdateRunnable$1$3.run(DumbServiceImpl.java:363) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:702) at java.awt.EventQueue.access$400(EventQueue.java:82) at java.awt.EventQueue$2.run(EventQueue.java:663) at java.awt.EventQueue$2.run(EventQueue.java:661) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.awt.EventQueue.dispatchEvent(EventQueue.java:672) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:699) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:538) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:420) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:378) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) 2012-11-04 20:41:01,305 [ 11501] INFO - tor.impl.FileEditorManagerImpl - Project opening took 8374 ms 2012-11-04 20:41:01,719 [ 11915] INFO - dom.attrs.AttributeDefinitions - Found tag with unknown parent: AndroidManifest.AndroidManifestCompatibleScreens 2012-11-04 20:41:07,522 [ 17718] INFO - roid.compiler.tools.AndroidApt - [/Users/neveu/Dev/android-sdk-macosx/platform-tools/aapt] [package] [-m] [--non-constant-id] [-J] [/private/var/folders/xb/hg6cdxt51rs8lylmmjw0fk8m0000gp/T/android_apt_autogeneration6157451500950136901tmp] [-M] [/Users/neveu/Dev/magic_android/3rdParty/facebook/AndroidManifest.xml] [-S] [/Users/neveu/Dev/magic_android/3rdParty/facebook/res] [-I] [/Users/neveu/Dev/android-sdk-macosx/platforms/android-14/android.jar] 2012-11-04 20:41:08,706 [ 18902] INFO - roid.compiler.tools.AndroidApt - [/Users/neveu/Dev/android-sdk-macosx/platform-tools/aapt] [package] [-m] [-J] [/private/var/folders/xb/hg6cdxt51rs8lylmmjw0fk8m0000gp/T/android_apt_autogeneration3143184519400737414tmp] [-M] [/Users/neveu/Dev/magic_android/AndroidManifest.xml] [-S] [/Users/neveu/Dev/magic_android/res] [-I] [/Users/neveu/Dev/android-sdk-macosx/platforms/android-15/android.jar] 2012-11-04 20:41:08,763 [ 18959] INFO - roid.compiler.tools.AndroidIdl - [/Users/neveu/Dev/android-sdk-macosx/platform-tools/aidl] [-p/Users/neveu/Dev/android-sdk-macosx/platforms/android-15/framework.aidl] [-I/Users/neveu/Dev/magic_android/magic/src] [-I/Users/neveu/Dev/magic_android/src] [-I/Users/neveu/Dev/magic_android/3rdParty/Tapjoy] [-I/Users/neveu/Dev/magic_android/gen] [/Users/neveu/Dev/magic_android/src/com/android/vending/billing/IMarketBillingService.aidl] [/Users/neveu/Dev/magic_android/gen/com/android/vending/billing/IMarketBillingService.java] 2012-11-04 20:41:14,004 [ 24200] INFO - dom.attrs.AttributeDefinitions - Found tag with unknown parent: AndroidManifest.AndroidManifestCompatibleScreens 2012-11-04 20:41:18,781 [ 28977] INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/cachedDictionary.xml file is null 2012-11-04 20:41:18,782 [ 28978] INFO - .impl.stores.XmlElementStorage - Document was not loaded for $APP_CONFIG$/cachedDictionary.xml

    Read the article

  • Netbeans platform projects - problems with wrapped jar files that have dependencies

    - by I82Much
    For starters, this question is not so much about programming in the NetBeans IDE as developing a NetBeans project (e.g. using the NetBeans Platform framework). I am attempting to use the BeanUtils library to introspect my domain models and provide the properties to display in a property sheet. Sample code: public class MyNode extends AbstractNode implements PropertyChangeListener { private static final PropertyUtilsBean bean = new PropertyUtilsBean(); // snip protected Sheet createSheet() { Sheet sheet = Sheet.createDefault(); Sheet.Set set = Sheet.createPropertiesSet(); APIObject obj = getLookup().lookup (APIObject.class); PropertyDescriptor[] descriptors = bean.getPropertyDescriptors(obj); for (PropertyDescriptor d : descriptors) { Method readMethod = d.getReadMethod(); Method writeMethod = d.getWriteMethod(); Class valueType = d.getClass(); Property p = new PropertySupport.Reflection(obj, valueType, readMethod, writeMethod); set.put(p); } sheet.put(set); return sheet; } I have created a wrapper module around commons-beanutils-1.8.3.jar, and added a dependency on the module in my module containing the above code. Everything compiles fine. When I attempt to run the program and open the property sheet view (i.e.. the above code actually gets run), I get the following error: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:319) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330) at java.lang.ClassLoader.loadClass(ClassLoader.java:254) at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:259) Caused: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory starting from ModuleCL@64e48e45[org.apache.commons.beanutils] with possible defining loaders [ModuleCL@75da931b[org.netbeans.libs.commons_logging]] and declared parents [] at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:261) at java.lang.ClassLoader.loadClass(ClassLoader.java:254) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399) Caused: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.commons.beanutils.PropertyUtilsBean.<init>(PropertyUtilsBean.java:132) at org.myorg.myeditor.MyNode.<clinit>(MyNode.java:35) at org.myorg.myeditor.MyEditor.<init>(MyEditor.java:33) at org.myorg.myeditor.OpenEditorAction.actionPerformed(OpenEditorAction.java:13) at org.openide.awt.AlwaysEnabledAction$1.run(AlwaysEnabledAction.java:139) at org.netbeans.modules.openide.util.ActionsBridge.implPerformAction(ActionsBridge.java:83) at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:67) at org.openide.awt.AlwaysEnabledAction.actionPerformed(AlwaysEnabledAction.java:142) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.AbstractButton.doClick(AbstractButton.java:389) at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:95) at java.awt.MenuItem.processActionEvent(MenuItem.java:627) at java.awt.MenuItem.processEvent(MenuItem.java:586) at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:317) at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:305) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:638) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:125) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) I understand that beanutils is using the commons-logging component. I have tried adding the commons-logging component in two different ways (creating a wrapper library around the commons-logging library, and putting a dependency on the Commons Logging Integration library). Neither solves the problem. I noticed that the same problem occurs with other wrapped libraries; if they themselves have external dependencies, the ClassNotFoundExceptions propagate like mad, even if I've wrapped the jars of the libraries they require and added them as dependencies to the original wrapped library module. Pictorially: I'm at my wits end here. I noticed similar problems while googling: Is there a known bug on NB Module dependency Same issue I'm facing but when wrapping a different jar NetBeans stance on this - none of the 3 apply to me. None conclusively help me. Thank you, Nick

    Read the article

  • How to use apache beanutils in a NetBeans platform project? (Error with commons-logging)

    - by I82Much
    For starters, this question is not so much about programming in the NetBeans IDE as developing a NetBeans project (e.g. using the NetBeans Platform framework). I am attempting to use the BeanUtils library to introspect my domain models and provide the properties to display in a property sheet. Sample code: public class MyNode extends AbstractNode implements PropertyChangeListener { private static final PropertyUtilsBean bean = new PropertyUtilsBean(); // snip protected Sheet createSheet() { Sheet sheet = Sheet.createDefault(); Sheet.Set set = Sheet.createPropertiesSet(); APIObject obj = getLookup().lookup (APIObject.class); PropertyDescriptor[] descriptors = bean.getPropertyDescriptors(obj); for (PropertyDescriptor d : descriptors) { Method readMethod = d.getReadMethod(); Method writeMethod = d.getWriteMethod(); Class valueType = d.getClass(); Property p = new PropertySupport.Reflection(obj, valueType, readMethod, writeMethod); set.put(p); } sheet.put(set); return sheet; } I have created a wrapper module around commons-beanutils-1.8.3.jar, and added a dependency on the module in my module containing the above code. Everything compiles fine. When I attempt to run the program and open the property sheet view (i.e.. the above code actually gets run), I get the following error: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:319) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330) at java.lang.ClassLoader.loadClass(ClassLoader.java:254) at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:259) Caused: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory starting from ModuleCL@64e48e45[org.apache.commons.beanutils] with possible defining loaders [ModuleCL@75da931b[org.netbeans.libs.commons_logging]] and declared parents [] at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:261) at java.lang.ClassLoader.loadClass(ClassLoader.java:254) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399) Caused: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.commons.beanutils.PropertyUtilsBean.<init>(PropertyUtilsBean.java:132) at org.myorg.myeditor.MyNode.<clinit>(MyNode.java:35) at org.myorg.myeditor.MyEditor.<init>(MyEditor.java:33) at org.myorg.myeditor.OpenEditorAction.actionPerformed(OpenEditorAction.java:13) at org.openide.awt.AlwaysEnabledAction$1.run(AlwaysEnabledAction.java:139) at org.netbeans.modules.openide.util.ActionsBridge.implPerformAction(ActionsBridge.java:83) at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:67) at org.openide.awt.AlwaysEnabledAction.actionPerformed(AlwaysEnabledAction.java:142) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.AbstractButton.doClick(AbstractButton.java:389) at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:95) at java.awt.MenuItem.processActionEvent(MenuItem.java:627) at java.awt.MenuItem.processEvent(MenuItem.java:586) at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:317) at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:305) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:638) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:125) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) I understand that beanutils is using the commons-logging component (wish it mentioned that in the javadoc, but that's OK). I have tried adding the commons-logging component in two different ways (creating a wrapper library around the commons-logging library, and putting a dependency on the Commons Logging Integration library). Neither solves the problem. Has anyone successfully used BeanUtils in a NetBeans Platform project?

    Read the article

  • Netbeans / persistence API error

    - by Danny
    I am following this tutorial, I'm using netbeans 6.5.1 http://www.netbeans.org/kb/docs/java/gui-db-custom.html When I get to the part where I create the "new entity class from database", which is in the "Customizing the Master/Detail View" section of the tutoiral. I can't ever compile because I get this error in the task list (and I get a runtime error when I run)... Atleast I think these two are related. Error Named queries can be defined only on an Entity or MappedSuperclass class. Countries.java 27 C:/Users/Danny/dev/NetBeansProjects/Test/src/test Error Named queries can be defined only on an Entity or MappedSuperclass class. Products.java 28 C:/Users/Danny/dev/NetBeansProjects/Test/src/test note that all I do is do newentity classes from database, and do exactly as the tutorial says. I stopped on the tutoral at the "Adding Dialog Boxes" heading, because the tutorial writer says the application should be "partially functional" which makes me think it should atleast RUN. I haven't edited the generated code outside of what I've been instructed to do. This is the output produced by the netbeans output console: run: Jun 23, 2009 3:03:23 PM org.jdesktop.application.Application$1 run SEVERE: Application class test.TestApp failed to launch javax.persistence.PersistenceException: No Persistence provider for EntityManager named MyBusinessRecordsPU: Provider named oracle.toplink.essentials.PersistenceProvider threw unexpected exception at create EntityManagerFactory: oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException Local Exception Stack: Exception [TOPLINK-30005] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: sun.misc.Launcher$AppClassLoader@11b86e7 Internal Exception: javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException Exception Description: predeploy for PersistenceUnit [MyBusinessRecordsPU] failed. Internal Exception: Exception [TOPLINK-7244] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.ValidationException Exception Description: An incompatible mapping has been encountered between [class test.Products] and [class test.Orders]. This usually occurs when the cardinality of a mapping does not correspond with the cardinality of its backpointer. at oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:143) at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:169) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:110) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83) at test.TestView.initComponents(TestView.java:337) at test.TestView.(TestView.java:39) at test.TestApp.startup(TestApp.java:19) at org.jdesktop.application.Application$1.run(Application.java:171) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Caused by: javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException Exception Description: predeploy for PersistenceUnit [MyBusinessRecordsPU] failed. Internal Exception: Exception [TOPLINK-7244] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.ValidationException Exception Description: An incompatible mapping has been encountered between [class test.Products] and [class test.Orders]. This usually occurs when the cardinality of a mapping does not correspond with the cardinality of its backpointer. at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:643) at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.callPredeploy(JavaSECMPInitializer.java:171) at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:239) at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:255) at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:155) ... 14 more Caused by: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException Exception Description: predeploy for PersistenceUnit [MyBusinessRecordsPU] failed. Internal Exception: Exception [TOPLINK-7244] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.ValidationException Exception Description: An incompatible mapping has been encountered between [class test.Products] and [class test.Orders]. This usually occurs when the cardinality of a mapping does not correspond with the cardinality of its backpointer. at oracle.toplink.essentials.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:228) ... 19 more Caused by: Exception [TOPLINK-7244] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.ValidationException Exception Description: An incompatible mapping has been encountered between [class test.Products] and [class test.Orders]. This usually occurs when the cardinality of a mapping does not correspond with the cardinality of its backpointer. at oracle.toplink.essentials.exceptions.ValidationException.invalidMapping(ValidationException.java:1069) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataValidator.throwInvalidMappingEncountered(MetadataValidator.java:275) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.OneToManyAccessor.process(OneToManyAccessor.java:161) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.RelationshipAccessor.processRelationship(RelationshipAccessor.java:290) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProject.processRelationshipDescriptors(MetadataProject.java:579) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProject.process(MetadataProject.java:512) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor.processAnnotations(MetadataProcessor.java:246) at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:370) at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:607) ... 18 more The following providers: oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider Returned null to createEntityManagerFactory. at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:154) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83) at test.TestView.initComponents(TestView.java:337) at test.TestView.(TestView.java:39) at test.TestApp.startup(TestApp.java:19) at org.jdesktop.application.Application$1.run(Application.java:171) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Exception in thread "AWT-EventQueue-0" java.lang.Error: Application class test.TestApp failed to launch at org.jdesktop.application.Application$1.run(Application.java:177) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named MyBusinessRecordsPU: Provider named oracle.toplink.essentials.PersistenceProvider threw unexpected exception at create EntityManagerFactory: oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException Local Exception Stack: Exception [TOPLINK-30005] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: sun.misc.Launcher$AppClassLoader@11b86e7 Internal Exception: javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException Exception Description: predeploy for PersistenceUnit [MyBusinessRecordsPU] failed. Internal Exception: Exception [TOPLINK-7244] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.ValidationException Exception Description: An incompatible mapping has been encountered between [class test.Products] and [class test.Orders]. This usually occurs when the cardinality of a mapping does not correspond with the cardinality of its backpointer. at oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:143) at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:169) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:110) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83) at test.TestView.initComponents(TestView.java:337) at test.TestView.(TestView.java:39) at test.TestApp.startup(TestApp.java:19) at org.jdesktop.application.Application$1.run(Application.java:171) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Caused by: javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException Exception Description: predeploy for PersistenceUnit [MyBusinessRecordsPU] failed. Internal Exception: Exception [TOPLINK-7244] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.ValidationException Exception Description: An incompatible mapping has been encountered between [class test.Products] and [class test.Orders]. This usually occurs when the cardinality of a mapping does not correspond with the cardinality of its backpointer. at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:643) at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.callPredeploy(JavaSECMPInitializer.java:171) at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:239) at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:255) at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:155) ... 14 more Caused by: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException Exception Description: predeploy for PersistenceUnit [MyBusinessRecordsPU] failed. Internal Exception: Exception [TOPLINK-7244] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.ValidationException Exception Description: An incompatible mapping has been encountered between [class test.Products] and [class test.Orders]. This usually occurs when the cardinality of a mapping does not correspond with the cardinality of its backpointer. at oracle.toplink.essentials.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:228) ... 19 more Caused by: Exception [TOPLINK-7244] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.ValidationException Exception Description: An incompatible mapping has been encountered between [class test.Products] and [class test.Orders]. This usually occurs when the cardinality of a mapping does not correspond with the cardinality of its backpointer. at oracle.toplink.essentials.exceptions.ValidationException.invalidMapping(ValidationException.java:1069) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataValidator.throwInvalidMappingEncountered(MetadataValidator.java:275) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.OneToManyAccessor.process(OneToManyAccessor.java:161) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.RelationshipAccessor.processRelationship(RelationshipAccessor.java:290) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProject.processRelationshipDescriptors(MetadataProject.java:579) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProject.process(MetadataProject.java:512) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor.processAnnotations(MetadataProcessor.java:246) at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:370) at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:607) ... 18 more The following providers: oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider Returned null to createEntityManagerFactory. at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:154) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83) at test.TestView.initComponents(TestView.java:337) at test.TestView.(TestView.java:39) at test.TestApp.startup(TestApp.java:19) at org.jdesktop.application.Application$1.run(Application.java:171) ... 8 more BUILD SUCCESSFUL (total time: 2 seconds) I'm thinking my netbeans application must be misconfigured or something, I can't seem to find anyone with the same problem as myself

    Read the article

  • ArgumentError: Error #2004: One of the parameters is invalid.

    - by Florian
    I got the following stack trace while running a piece of code in my flex application: ArgumentError: Error #2004: One of the parameters is invalid. at ObjectOutput/writeObject() at mx.collections::ArrayList/writeExternal()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\collections\ArrayList.as:470] at mx.collections::ArrayCollection/writeExternal()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\collections\ArrayCollection.as:144] at flash.utils::ByteArray/writeObject() at mx.utils::ObjectUtil$/copy()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\utils\ObjectUtil.as:100] at components::SettingsHandler/saveOpenNodes()[C:\workspaces\Intranets\UniqueInbox\flex_src\components\SettingsHandler.as:153] at components::soapjira/getIssuesByFilters()[C:\workspaces\Intranets\UniqueInbox\flex_src\components\soapjira.as:295] at components.tabs::JiraAllActions/loadData()[C:\workspaces\Intranets\UniqueInbox\flex_src\components\tabs\JiraAllActions.mxml:193] at components::SettingsHandler/settingsClosed()[C:\workspaces\Intranets\UniqueInbox\flex_src\components\SettingsHandler.as:114] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\UIComponent.as:9408] at components.general::JiraSettings/closeSettings()[C:\workspaces\Intranets\UniqueInbox\flex_src\components\general\JiraSettings.mxml:58] at components.general::JiraSettings/__save_click()[C:\workspaces\Intranets\UniqueInbox\flex_src\components\general\JiraSettings.mxml:107] That stack comes up when running the following line (SettingsHandler.as:153): var tmp:Object = parentComponent.dataGrid.dataProvider.openNodes; I am actually copying the open nodes of a datagrid's provider. Has been working until now and just started going wrong, no idea what I have changed that could interfere with this. On debug mode, I see that openNodes is accessible and contains the open nodes, as expected. Doing tmp:Object = parentComponent.dataGrid.dataProvider.openNodes works, but not with ObjectUtil. (parentComponent is the reference to the component which contains the DG).

    Read the article

  • java.lang.VerifyError on method that worked a minute ago

    - by Travis
    Apologies in advance but I have never seen this error before and don't know what to include. I am using NetBeans and suddenly began getting this error: Exception in thread "AWT-EventQueue-0" java.lang.VerifyError: (class: market/CostOperations, method: <init> signature: ()V) Constructor must call super() or this() at Bluebuild.Main.refreshTables(Main.java:748) at Bluebuild.Main.formComponentShown(Main.java:649) at Bluebuild.Main.access$100(Main.java:28) at Bluebuild.Main$2.componentShown(Main.java:374) at java.awt.Component.processComponentEvent(Component.java:6095) at java.awt.Component.processEvent(Component.java:6043) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Window.processEvent(Window.java:1836) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) I have not a clue what happened. I didn't even modify market/CostOperations. Here's the constructor though: public CostOperations() throws ParserConfigurationException, SAXException, IOException { //Open the xml file DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); f = new File(dbName); doc = builder.parse(f); System.out.println(f.canWrite()); //Create the XPath XPathFactory xpfactory = XPathFactory.newInstance(); path = xpfactory.newXPath(); } In Debug Mode I get this: debug: Have no FileObject for C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\sunrsasign.jar Have no FileObject for C:\Program Files (x86)\Java\jdk1.6.0_20\jre\classes I just need to know what is causing the error and how to fix it. Thanks!

    Read the article

  • Unable to load WSDL file error in flex while making a call to a web service.

    - by Angeline Aarthi
    I am trying to call a webservice from my Flex application and this is the code: <mx:WebService id="myWebService" wsdl="http://172.16.111.103:22222/cics/services/PRESENT1?wsdl"> <mx:operation name="PRESENT1Operation" result="resultHandler(event)" fault="faultHandler(event)"> </mx:operation> </mx:WebService> //Function to send customer id to the wsdl request private function searchDetails():void{ myWebService.PRESENT1Operation.send(cusNo.text); cusDetails.visible=true; } The webservice is up and running. I have a separate Java application to test the webservice, And I am able to execute it properly. I am able to request the webservice and get response. But If I try to call the webservice through the Flex application, I get the following error. [RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (http://172.16.111.103:22222/cics/services/PRESENT1?WSDL)"] at mx.rpc.wsdl::WSDLLoader/faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\wsdl\WSDLLoader.as:98] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:170] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:225] at mx.rpc::Responder/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:53] at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103] at DirectHTTPMessageResponder/errorHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:362] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/redirectEvent() Please some one help me with this.

    Read the article

  • loaderInfo null inside creationComplete handler function

    - by Thiago
    Hi, I've coded this small snippet to show what I'm not understanding: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()"> <mx:Script> public function init():void { txtName.text = this.loaderInfo.toString(); } </mx:Script> <mx:TextInput x="50" y="10" id="txtName"/> </mx:Application> I'm getting the following error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at Teste/init()[C:\Lucas\flex\AppName\src\Teste.mxml:5] at Teste/___Teste_Application1_creationComplete()[C:\User\flex\CornetaRecorder\src\Teste.mxml:2] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298] at mx.core::UIComponent/set initialized()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:1169] at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:718] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8628] at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8568] Shouldn't I be able to read loaderInfo inside the creationComplete handler? I'm trying to pass a string from the html to my flash component, that's why I have to get loaderInfo working.

    Read the article

  • Flex NetConnection error: Property onDirtyList not found on flash.net.NetConnection

    - by David Wolever
    I'm having some trouble with NetConnection. The following code makes a connection without issue… var n:NetConnection = new NetConnection(); n.objectEncoding = ObjectEncoding.AMF0; n.addEventListener(NetStatusEvent.NET_STATUS, function(...args):void { trace("HERE"); }); n.connect("rtmp://...host...", ...args); But as soon as the NET_STATUS event handler finishes (ie, hitting "step into" with the debugger), I get this error: ReferenceError: Error #1069: Property onDirtyList not found on flash.net.NetConnection and there is no default value. Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetConnection was unable to invoke callback onDirtyList. error=ReferenceError: Error #1069: Property onDirtyList not found on flash.net.NetConnection and there is no default value. at Test/___Test_Application1_creationComplete()[/Users/wolever/Workspace/Test/src/Test.mxml:13] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9440] at mx.core::UIComponent/set initialized()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as:1168] at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:718] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8744] at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8684] Which is kind of scary because onDirtyList only yields two hits on Google. So... Any suggestions?

    Read the article

  • how to return response from post in a variable? jQuery

    - by robertdd
    i use this function to return the response of post: $.sendpost = function(){ return jQuery.post('inc/operations.php', {'operation':'test'}, "json"); }, i want to make something like this: in: $.another = function(){ var sendpost = $.sendpost(); alert(sendpost); } but i get: [object XMLHttpRequest] if i print the object with: jQuery.each(sendpost, function(i, val) { $(".displaydetails").append(i + " => " + val + "<br/>"); }); i get: details abort => function () { x && h.call(x); g("abort"); } dispatchEvent => function dispatchEvent() { [native code] } removeEventListener => function removeEventListener() { [native code] } open => function open() { [native code] } setRequestHeader => function setRequestHeader() { [native code] } onreadystatechange => [xpconnect wrapped nsIDOMEventListener] send => function send() { [native code] } readyState => 4 status => 200 getResponseHeader => function getResponseHeader() { [native code] } responseText => mdaaa from php how to return only the response in the variable?

    Read the article

  • How to properly set button phase after dragging over button?

    - by irobeth
    I have a class (mxml) that extends Button while implementing drag/drop support. When I drag one of them onto another, the drag receiver stays stuck in its 'over' phase until I click on it (As if something about DragManager.acceptDragDrop is preventing the MouseEvent from getting to button) Is there a way to make a button re-evaluate its phase after the drop? I've tried fabricating a MouseEvent and sending it to rollOverHandler with no luck. This resembles the scenario in Button.as (lines 2606-2647) described like Drag over and up mouse down while out of Button roll over Button - stay in "up" phase mouse up while over Button - "over" phase continue with step 2 of first three sequences above This is my drag/drop handler private function dragDropHandler(event:DragEvent):void { trace("dropped"); var ib : IconButton = (event.dragInitiator as IconButton); if(this.data is Section) { if(ib.data is Item) { trace("ITEM"); //move an item into a section. var ae : AldonaEvent = new AldonaEvent(AldonaEvent.MOVE); ae.data = ib.data; dispatchEvent(ae); } else if(ib.data is Section) { trace("SECTION"); //change a section's parent. var ae : AldonaEvent = new AldonaEvent(AldonaEvent.MOVE); ae.data = ib.data; dispatchEvent(ae); } } //you can only drag stuff into sections. }

    Read the article

  • Adapting Javascript game for mobile

    - by Cardin
    I'm currently developing a Javascript web game for desktop users. It is a sort of tower-defense game that relies on mouse input only, developed on canvas using EaselJS. In the future, or perhaps simultaneously, I would like to adapt the game for mobile devices. I can see at least 3 potential areas in shifting from desktop to mobile: 1. resolution size and UI rearrangement, 2. converting mouse events to touch events, 3. distribution as native app wrapper or mobile Web. What would be the best strategy to facilitate this desktop to mobile conversion? For example, should I try to code the game for both platforms, or port the game UI over to mobile by branching the code base. Should I just publish on the mobile Web or wrap the game in a native app framework? And if I were to code for both platforms using the same codebase, should I register both click and touch events, or remap click events to touch using dispatchEvent?

    Read the article

  • When to use event.initMouseEvent for simulating mouse clicks?

    - by Protector one
    I wonder if there are benign use-cases for simulating mouse clicks using event.initMouseEvent. I found that it is used for creating pop-under ads in the following way: var e = document.createEvent('MouseEvents'); e.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, true, false, false, true, 0, null); a.dispatchEvent(e); This code simulates a click on the opening browser window, to force the newly opened window beneath it. Evil. I'm thinking of simply preventing all simulated clicks in my own browser via a browser extension, but I wonder if I might break useful websites and behavior in the process. Therefore I wonder what situations justify simulating mouse clicks, and if there are big sites that use it in non-evil ways.

    Read the article

  • Problem launching Flex Builder 3.x

    - by Vlad
    I have been using Flex Builder for while, then this just happen, and now it would not launch again. !SESSION 2009-09-01 11:24:33.517 ----------------------------------------------- eclipse.buildId=unknown java.version=1.5.0_11 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86 !ENTRY org.eclipse.equinox.app 2009-09-01 11:25:45.449 !MESSAGE Product com.adobe.flexbuilder.standalone.product could not be found. !ENTRY org.eclipse.osgi 4 0 2009-09-01 11:25:45.464 !MESSAGE Application error !STACK 1 java.lang.RuntimeException: No application id has been found. at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:236) at org.eclipse.equinox.internal.app.EclipseAppContainer.start(EclipseAppContainer.java:98) at org.eclipse.equinox.internal.app.Activator.addingService(Activator.java:112) at org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.java:1064) at org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialServices(ServiceTracker.java:926) at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:330) at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:274) at org.eclipse.equinox.internal.app.Activator.start(Activator.java:54) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:260) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400) at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:417) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340) at org.eclipse.osgi.framework.internal.core.SingleSourcePackage.loadClass(SingleSourcePackage.java:37) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:405) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at org.eclipse.core.internal.runtime.PlatformActivator.startAppContainer(PlatformActivator.java:47) at org.eclipse.core.internal.runtime.PlatformActivator.start(PlatformActivator.java:32) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:350) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1118) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:634) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:282) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:468) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:195) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:297) Has anyone seen this before? Please let me know, thanks.

    Read the article

  • How to dispatch event from application to module in flex

    - by Viliam Husár
    Is there a way how modules can listen to parent application event? My current solution that works is: private function directoryRemoteObject_saveCompany_resultHandler(e:ResultEvent):void { this.directoryModuleLoader.child.dispatchEvent(new CompanyEvent(CompanyEvent.COMPANY_SAVED, e.result as int)); } this means that I need to dispatch event for every module. Isn't there better solution? Thanks.

    Read the article

  • Cutom event dispatchment location

    - by Martino Wullems
    Hello, I've been looking into custom event (listeners) for quite some time, but never succeeded in making one. There are so many different mehods, extending the Event class, but also Extending the EventDispatcher class, very confusing! I want to settle with this once and for all and learn the appriopate technique. package{ import flash.events.Event; public class CustomEvent extends Event{ public static const TEST:String = 'test'; //what exac is the purpose of the value in the string? public var data:Object; public function CustomEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, data:Object = null):void { this.data = data; super(); } } } As far as I know a custom class where you set the requirements for the event to be dispatched has to be made: package { import flash.display.MovieClip; public class TestClass extends MovieClip { public function TestClass():void { if (ConditionForHoldToComplete == true) { dispatchEvent(new Event(CustomEvent.TEST)); } } } } I'm not sure if this is correct, but it should be something along the lines of this. Now What I want is something like a mouseevent, which can be applied to a target and does not require a specific class. It would have to work something like this: package com.op_pad._events{ import flash.events.MouseEvent; import flash.utils.Timer; import flash.events.TimerEvent; import flash.events.EventDispatcher; import flash.events.Event; public class HoldEvent extends Event { public static const HOLD_COMPLETE:String = "hold completed"; var timer:Timer; public function SpriteEvent(type:String, bubbles:Boolean=true, cancelable:Boolean=false) { super( type, bubbles, cancelable ); timer = new Timer(1000, 1); //somehow find the target where is event is placed upon -> target.addEventlistener target.addEventListener(MouseEvent.MOUSE_DOWN, startTimer); target.addEventListener(MouseEvent.MOUSE_UP, stopTimer); } public override function clone():Event { return new SpriteEvent(type, bubbles, cancelable); } public override function toString():String { return formatToString("MovieEvent", "type", "bubbles", "cancelable", "eventPhase"); } ////////////////////////////////// ///// c o n d i t i o n s ///// ////////////////////////////////// private function startTimer(e:MouseEvent):void { timer.start(); timer.addEventListener(TimerEvent.TIMER_COMPLETE, complete); } private function stopTimer(e:MouseEvent):void { timer.stop() } public function complete(e:TimerEvent):void { dispatchEvent(new HoldEvent(HoldEvent.HOLD_COMPLETE)); } } } This obviously won't work, but should give you an idea of what I want to achieve. This should be possible because mouseevent can be applied to about everything.The main problem is that I don't know where I should set the requirements for the event to be executed to be able to apply it to movieclips and sprites. Thanks in advance

    Read the article

  • Simulating click with javascript on document

    - by Charlie
    Is it possible to simulate a click on a webpage using javascript but without defining a specific element, but rather just specifying the document? I would have liked to do something like this, and if the location happens to have a link, then this will be pressed: function simulateClick(x, y) { var evt = window.createEvent("MouseEvents"); evt.initMouseEvent("click", true, true, window, x, y, x, y, 1, false, false, false, false, 0, null); window.dispatchEvent(evt); }

    Read the article

  • Trigger events from Firefox browser extension?

    - by Alex
    Hello, I want to trigger events from a firefox extension, specifically click events. I've tried jQuery's .click() as well as the whole: var evt = document.createEvent("HTMLEvents"); evt.initEvent("click", true, false ); toClick[0].dispatchEvent(evt); This is not working for me, and I was wondering if this is even possible? (to trigger events from a firefox extension)? If so, how does one do it?

    Read the article

  • Delay function with greasemonkey

    - by Riccardo
    I need a code that when CheckForZero happens for the first time, after 30 seconds happens again. var waitForZeroInterval = setInterval (CheckForZero, 0); function CheckForZero () { if ( (unsafeWindow.seconds == 0) && (unsafeWindow.milisec == 0) ) { clearInterval (waitForZeroInterval); var targButton = document.getElementById ('bottone1799'); var clickEvent = document.createEvent ('MouseEvents'); clickEvent.initEvent ('click', true, true); targButton.dispatchEvent (clickEvent); } };

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >