Search Results

Search found 503 results on 21 pages for 'fx'.

Page 3/21 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • adobe flash buider (flex4): Error #2025 or Error: addChild() is not available in this class. Instead

    - by user306584
    Hi, I'm a complete newbie to Flex, so apologies for my dumbness. I've searched for an answer but haven't found anything that seems to be doing the trick. What I'm trying to do: port this example http://www.adobe.com/devnet/air/flex/articles/flex_air_codebase_print.html to Flash Builder 4. All seems to be fine but for one thing. When I use the original code for the Air application <?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="onApplicationComplete()"> <fx:Script> <![CDATA[ private static const neededForCompilation:AirGeneralImplementation = null; private function onApplicationComplete():void { var can:MainCanvas = new MainCanvas(); this.addChild(can); can.labelMessage = "Loaded in an AIR Application "; } ]]> </fx:Script> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> </s:WindowedApplication> I get this run time error Error: addChild() is not available in this class. Instead, use addElement() or modify the skin, if you have one. at spark.components.supportClasses::SkinnableComponent/addChild()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:1038] If I substitute the code with this.addElement(can); Everything loads well but the first time I try to press any of the buttons on the main canvas I get the following run time error ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. at flash.display::DisplayObjectContainer/getChildIndex() at mx.managers::SystemManager/getChildIndex()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:1665] at mx.managers.systemClasses::ActiveWindowManager/mouseDownHandler()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\systemClasses\ActiveWindowManager.as:437] here's the super simple code for the main canvas <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="init();"> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <fx:Script source="main.as" /> <mx:Label id="lblMessage" text="The UI from the shared Flex app BothCode" x="433" y="112"/> <s:Button x="433" y="141" click="saveFile();" label="Save File"/> <s:Button x="601" y="141" click="GeneralFactory.getGeneralInstance().airOnlyFunctionality();" label="Air Only"/> </s:Application> Any help would be immensely appreciated. And any pointers to how to setup a project that can compile in both Air and Flash while sharing the same code, all for Flex 4, would also be immensely appreciated. thank you!

    Read the article

  • JavaScript function binding (this keyword) is lost after assignment

    - by Ding
    this is one of most mystery feature in JavaScript, after assigning the object method to other variable, the binding (this keyword) is lost var john = { name: 'John', greet: function(person) { alert("Hi " + person + ", my name is " + this.name); } }; john.greet("Mark"); // Hi Mark, my name is John var fx = john.greet; fx("Mark"); // Hi Mark, my name is my question is: 1) what is happening behind the assignment? var fx = john.greet; is this copy by value or copy by reference? fx and john.greet point to two diferent function, right? 2) since fx is a global method, the scope chain contains only global object. what is the value of this property in Variable object?

    Read the article

  • How to make a call to an executable from Python script?

    - by fx
    I need to execute this script from my Python script. Is it possible? The script generate some outputs with some files being written. How do I access these files? I have tried with subprocess call function but without success. fx@fx-ubuntu:~/Documents/projects/foo$ bin/bar -c somefile.xml -d text.txt -r aString -f anotherString >output The application "bar" also references to some libraries, it also creates some files besides the output. How do I get access to these files? Just by using open()? Thank you,

    Read the article

  • No Source available

    - by Eric
    I am not sure what happened or if I did anything.. Now anytime I try and debug it says no source available on all BCL stuff For example, on a debug.print I get that message with Locating source for 'f:\dd\ndp\fx\src\CompMod\System\Diagnostics\Debug.cs'. Checksum: MD5 {40 74 18 44 a8 15 28 2e 54 75 5e 40 d1 5f 6a 0} The file 'f:\dd\ndp\fx\src\CompMod\System\Diagnostics\Debug.cs' does not exist. Looking in script documents for 'f:\dd\ndp\fx\src\CompMod\System\Diagnostics\Debug.cs'... Looking in the projects for 'f:\dd\ndp\fx\src\CompMod\System\Diagnostics\Debug.cs'. The file was not found in a project. Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\crt\src\'... Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'... Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'... Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\'... The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: f:\dd\ndp\fx\src\CompMod\System\Diagnostics\Debug.cs. The debugger could not locate the source file 'f:\dd\ndp\fx\src\CompMod\System\Diagnostics\Debug.cs'. This happens all the time now and I 1. Don't have an F: 2. Enable .net framework source stepping is unchecked Is there some other sneaky setting to make these messages go away? Regards _Eric

    Read the article

  • Prefix for element not bound

    - by Tim
    Hello! I am a newbie in Flex development and using Flash Builder 4 with SDK 4. Now I get the error that "the prefix "fx" for element "fx:Style" is not bound" in line number 4. I searched for it, and it has sth. to do with namespaces, but I can not solve it by myelf. I have the file called "UserStory.mxml" in the directory "components" to place it via the main.mxml onto the screen: <fx:Script> <![CDATA[ import components.UserStory; private function init():void { var userStory1:UserStory = new UserStory(); userStory1.x = 100; userStory1.y = 100; userStory1.userStoryText = "test"; this.addChild(userStory1); } ]]> </fx:Script> The file in which the error occurs in line no. 4: <?xml version="1.0" encoding="utf-8"?> <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="300" height="150" styleName="userstory"> <fx:Style source="styles/styles.css"/> <fx:Text x="5" y="5" width="275" height="135" text="{userStoryText}" fontFamily="notes" fontSize="18"/> <mx:Script> ... </mx:Script> </mx:Canvas> Can someone tell me what's wrong? Thanks a lot in advance & Best Regards.

    Read the article

  • set the focus on the scroller when button is clicked

    - by liz
    hi i have a script <script type="text/javascript"> window.addEvent('domready', function(){ var totIncrement = 0; var increment = 560; var maxRightIncrement = increment*(-6); var fx = new Fx.Style('slider-list', 'margin-left', { duration: 1000, transition: Fx.Transitions.Back.easeInOut, wait: true }); //------------------------------------- // EVENTS for the button "previous" $('previous').addEvents({ 'click' : function(event){ if(totIncrement<0){ totIncrement = totIncrement+increment; fx.stop() fx.start(totIncrement); } } }); //------------------------------------- // EVENTS for the button "next" $('next').addEvents({ 'click' : function(event){ if(totIncrement>maxRightIncrement){ totIncrement = totIncrement-increment; fx.stop() fx.start(totIncrement); } } }) }); </script> in mootools v1.1 it makes a scroller function at the bottom of my html page. but when i click the next button the page's focus moves to the top of the page. how do i keep it on the scroller? this is the html fragment: <h3>Our Pastas</h3> <div id="slider-buttons"> <a href="#" id="previous">Previous</a> | <a href="#" id="next">Next</a&gt; </div> <div id="slider-stage"> <ul id="slider-list"> <li class="list_item"> <div id="thumbnail"><a href="xxx/product-catalog/pasta/long-pasta-in-brown-bags/bucatini"><img src="xxx/images/stories/products/_thumb1/bucatini.gif"></a></div><h4><a href="xxx/product-catalog/pasta/long-pasta-in-brown-bags/bucatini">Rustichella d'Abruzzo Bucatini</a></h4> </li> <li class="list_item"> <div id="thumbnail"><a href="xxx/product-catalog/pasta/pasta-in-trays/calamarata"><img src="xxx/images/stories/products/_thumb1/calamarata.jpg"></a></div><h4><a href="xxx/product-catalog/pasta/pasta-in-trays/calamarata">Rustichella d'Abruzzo Calamarata</a></h4> </li> <li class="list_item"> <div id="thumbnail"><a href="xxx/product-catalog/pasta/pasta-in-trays/cannolicchi"><img src="xxx/images/stories/products/_thumb1/cannolicchi.jpg"></a></div><h4><a href="xxx/product-catalog/pasta/pasta-in-trays/cannolicchi">Rustichella d'Abruzzo Cannolicchi</a></h4> </li> </ul></div>

    Read the article

  • customizing item renderer

    - by BretzelPretzel
    i would like the label and message to be on the left of the icon....i would also like the icon to be right-aligned what is the best way to do this? I'm confused by some of the tutorials i'm seeing for custom item renderers since they never explain how to format the renderer mxml, so i haven't figured that out yet although i suspect that's what i need to be doing <?xml version="1.0" encoding="utf-8"?> <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:components="components.*" creationComplete="imagelistings.send()" title="{data.title}"> <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.events.FlexEvent; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; import spark.events.IndexChangeEvent; import valueObjects.imagelistingclass; [Bindable] private var listings:ArrayCollection = new ArrayCollection(); protected function toursService_resultHandler(event:ResultEvent):void { var listingarray:ArrayCollection=event.result.Chapter1.entry; var entry:imagelistingclass; for each(var plate:Object in listingarray) { entry=new imagelistingclass(); entry.image=plate.image; entry.location=plate.location; entry.html=plate.html; listings.addItem(entry); } } ]]> </fx:Script> <fx:Declarations> <s:HTTPService id="imagelistings" result="toursService_resultHandler(event)" url="assets/chapter1info.xml"/> </fx:Declarations> <s:List id="theList" left="0" right="0" top="0" bottom="0" alternatingItemColors="#000000" contentBackgroundColor="#404040" dataProvider="{listings}" horizontalScrollPolicy="off" > <s:itemRenderer> <fx:Component> <s:IconItemRenderer color="#FFFFFF" fontSize="30" iconField="location" labelField="" iconFillMode="scale" iconScaleMode="letterbox" iconHeight="125" messageField="image"> </s:IconItemRenderer> </fx:Component> </s:itemRenderer> </s:List>

    Read the article

  • pass data from popup to parent

    - by user522962
    I have a parent w/ a popup child. When parent loads, I have to call a function within the popup without showing the popup (thus, I load "pupLove" but don't include it in layout)....I then pass this data to the parent. When the user manually clicks another button to open the popup, the same function is called & data passed to the parent. However, I am not able to pass dg.length to the parent. I believe the root problem is that I am loading "pupLove" & thus the parents are getting confused.....I'm guessing if I get rid of "pupLove" I can pass the data correctly but will need to call the child's function at creationComplete of the parent....how do I do that? Here's my parent: <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" backgroundColor="green" width="50%" height="100%" xmlns:local="*" > <fx:Script> <![CDATA[ import pup; import mx.managers.PopUpManager; public function showPup(evt:MouseEvent):void { var ttlWndw:pup = PopUpManager.createPopUp(this, pup, true) as pup; PopUpManager.centerPopUp(ttlWndw); } ]]> </fx:Script> <mx:VBox> <local:pup id="pupLove" visible="false" includeInLayout="false" /> <s:Button click="showPup(event);" label="launch Pup" /> <mx:Text id="Ptest" color="black" text="from Parent:{pupLove.dg.length}" /> </mx:VBox> </s:Application> And a popup child called 'pup.mxml': <?xml version="1.0" encoding="utf-8"?> <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300"> <fx:Script> <![CDATA[ public function init():void{ // send php call } import mx.events.CloseEvent; import mx.managers.PopUpManager; private function removePup(evt:Event):void { PopUpManager.removePopUp(this); } ]]> </fx:Script> <fx:Declarations> <s:ArrayCollection id="dg"> </s:ArrayCollection> </fx:Declarations> <s:TitleWindow width="100%" height="100%" close="removePup(event)"> <mx:VBox> <mx:Text id="test" color="red" text="from Child:{dg.length}" /> <s:Button label="add Items" click="dg.addItem({id:'cat'})" /> </mx:VBox> </s:TitleWindow> </s:Group> UPDATE: I guess my question can be more easily stated as: "is there a way to call a child's function from the parent without actually loading the child?"

    Read the article

  • Running ODI 11gR1 Standalone Agent as a Windows Service

    - by fx.nicolas
    ODI 11gR1 introduces the capability to use OPMN to start and protect agent processes as services. Setting up the OPMN agent is covered in the following post and extensively in the ODI Installation Guide. Unfortunately, OPMN is not installed along with ODI, and ODI 10g users who are really at ease with the old Java Wrapper are a little bit puzzled by OPMN, and ask: "How can I simply set up the agent as a service?". Well... although the Tanuki Service Wrapper is no longer available for free, and the agentservice.bat script lost, you can switch to another service wrapper for the same result. For example, Yet Another Java Service Wrapper (YAJSW) is a good candidate. To configure a standalone agent with YAJSW: download YAJSW Uncompress the zip to a folder (called %YAJSW% in this example) Configure, start and test your standalone agent. Make sure that this agent is loaded with all the required libraries and drivers, as the service will not load dynamically the drivers added subsequently in the /drivers directory. Retrieve the PID of the agent process: Open Task Manager. Select View Select Columns Select the PID (Process Identifier) column, then click OK In the list of processes, find the java.exe process corresponding to your agent, and note its PID. Open a command line prompt in %YAJSW%/bat and run: genConfig.bat <your_pid> This command generates a wrapper configuration file for the agent. This file is called %YAJSW%/conf/wrapper.conf. Stop your agent. Edit the wrapper.conf file and modify the configuration of your service. For example, modify the display name and description of the service as shown in the example below. Important: Make sure to escape the commas in the ODI encoded passwords with a backslash! In the example below, the ODI_SUPERVISOR_ENCODED_PASS contained a comma character which had to be prefixed with a backslash. # Title to use when running as a console wrapper.console.title=\"AGENT\" #******************************************************************** # Wrapper Windows Service and Posix Daemon Properties #******************************************************************** # Name of the service wrapper.ntservice.name=AGENT_113 # Display name of the service wrapper.ntservice.displayname=ODI Agent # Description of the service wrapper.ntservice.description=Oracle Data Integrator Agent 11gR3 (11.1.1.3.0) ... # Escape the comma in the password with a backslash. wrapper.app.parameter.7 = -ODI_SUPERVISOR_ENCODED_PASS=fJya.vR5kvNcu9TtV\,jVZEt Execute your wrapped agent as console by calling in the command line prompt: runConsole.bat Check that your agent is running, and test it again.This command starts the agent with the configuration but does not install it yet as a service. To Install the agent as service call installService.bat From that point, you can view, start and stop the agent via the windows services. Et voilà ! Two final notes: - To modify the agent configuration, you must uninstall/reinstall the service. For this purpose, run the uninstallService.bat to uninstall it and play again the process above. - To be able to uninstall the agent service, you should keep a backup of the wrapper.conf file. This is particularly important when starting several services with the wrapper.

    Read the article

  • XNA Deferred Shading, Replace BasicEffect

    - by Alex
    I have implemented deferred shading in my XNA 4.0 project, meaning that I need all objects to start out with the same shader "RenderGBuffer.fx". How can I use a custom Content Processor to: Not load any textures by default (I want to manually do this) Use "RenderGBuffer.fx" as the default shader instead of BasicEffect Below is the progress so far public class DeferredModelProcessor : ModelProcessor { EffectMaterialContent deferredShader; public DeferredModelProcessor() { } protected override MaterialContent ConvertMaterial(MaterialContent material, ContentProcessorContext context) { deferredShader = new EffectMaterialContent(); deferredShader.Effect = new ExternalReference<EffectContent>("DeferredShading/RenderGBuffer.fx"); return context.Convert<MaterialContent, MaterialContent>(deferredShader, typeof(MaterialProcessor).Name); } }

    Read the article

  • How do I dynamically reload content files?

    - by Kikaimaru
    Is there a relatively simple way to dynamically reload content files, such as effect files? I know I can do the following: Detect change of file Run content pipeline to rebuild that specific file Unload ALL content that was loaded Load all content And use double references to reference content files. The problem is with step 3 (and step 2 isn't that nice either). I need to unload everything because if I have model Hero.x which references Model.fx effect, and I change the Model.fx file, I need to reload the Hero.x file which will then call LoadExternalReference on Model.fx. Has someone managed to make this work without rewriting the whole ContentManager (and every ContentReader) and tracking calls to LoadExternalReference?

    Read the article

  • Dynamic content realoding

    - by Kikaimaru
    Is there a relatively simple way to dynamicaly reload content files? (ie: effect files) I know i can do following: Detect change of file Run content pipeline to rebuild that specific file Unload ALL content that was loaded Load All content And use double references to reference content files. Problem is with step 3 (and step 2 isn't that nice too). But i need to unload everything because if i have model Hero.x which references Model.fx effect, and i change Model.fx file, i need to reload Hero.x file which will then call LoadExternalReference on Model.fx. So I guess question is, did someone mange to make this work without rewriting whole ContentManager (and every ContentReader) and tracking calls to LoadExternalReference?

    Read the article

  • Flex service in debug

    - by Tom
    Hello everybody, I am trying to learn the new services method in flex 4. but i can´t get it work. A test oparation near the service in flash builder 4 works. But when i run the code i get NetConnection.Call.Failed: HTTP: Failed. Does somebody knows what the problem can be? Tom CODE: PHP <?php class AuthService { public function login($username, $password) { return 'ok'; } public function logout() { return true; } } ?> FLEX <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:authservice="services.authservice.*"> <fx:Script> <![CDATA[ import mx.controls.Alert; protected function button_clickHandler(event:MouseEvent):void { loginResult.token = authService.login(username, password); } ]]> </fx:Script> <fx:Declarations> <s:CallResponder id="loginResult"/> <authservice:AuthService id="authService" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <s:Button x="97" y="193" label="Button" id="button" click="button_clickHandler(event)"/> <s:TextInput x="91" y="87" id="username"/> <s:TextInput x="97" y="117" id="password"/> </s:Application

    Read the article

  • AMF data is incomplete with Flex Service

    - by Tom
    Hello everybody. I am bussy with a Flex Project with a data services. Flash builder installed Zend Framework with Zend_Amf. When i run the project i get the error NetConnection.Call.Failed: HTTP: Failed. With chalers i say that Zend_Amf give the error: AMF data is incomplete (0 bytes of 0 bytes). Please check the recording limits in the Recording Settings. I don't know what the problem means. I have searched on google, but i haven't found a good result. The Flex project code is: <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:authservice="services.authservice.*"> <fx:Script> <![CDATA[ import mx.controls.Alert; protected function click_me_clickHandler(event:MouseEvent):void { text.text += "Test started"; testmeResult.token = authService.testme(); text.text += testmeResult.lastResult text.text += "Test ended"; } ]]> </fx:Script> <fx:Declarations> <s:CallResponder id="testmeResult"/> <authservice:AuthService id="authService" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <s:Button x="124" y="85" label="Click Me!" id="click_me" click="click_me_clickHandler(event)"/> <s:RichText x="58" y="114" width="238" height="182" id="text"/> </s:Application> The php code is: <?php class AuthService { public function testme() { return 'ik ben getest op'+date('d-m-Y H:i:s', time()); } }?> Please, help me!

    Read the article

  • Seemingly simple skinning problem in Flex4; style gives disco effect

    - by Cheradenine
    I'm doing something wrong, but I can't figure out what. Simple project in flex4, whereby I create a skinned combobox (fragments at end). If I turn on the 3 skin references (over-skin, up-skin, down-skin), the combobox appears to simply stop working. If I remove the up-skin, hovering over the combo produces a flickering effect, where it appears to apply the style, then remove it immediately. I get the same thing with a button instead of a combo. I'm sure it's something really simple, but it's evading me. <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:containers="flexlib.containers.*"> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; #myCombo { over-skin: ClassReference("nmx.MyComboSkin"); up-skin: ClassReference("nmx.MyComboSkin"); down-skin: ClassReference("nmx.MyComboSkin"); } </fx:Style> <fx:Script> <![CDATA[ [Bindable] public var items:Array = ["A","B","C"]; ]]> </fx:Script> <mx:Canvas backgroundColor="#ff0000" width="726" height="165" x="20" y="41"> <mx:ComboBox id="myCombo" x="10" y="10" prompt="Hospital" dataProvider="{items}"> </mx:ComboBox> </mx:Canvas> </s:Application> Skin Definition: package nmx { import flash.display.GradientType; import flash.display.Graphics; import mx.skins.Border; import mx.skins.ProgrammaticSkin; import mx.skins.halo.ComboBoxArrowSkin; import mx.skins.halo.HaloColors; import mx.utils.ColorUtil; public class MyComboSkin extends ProgrammaticSkin { public function MyComboSkin() { super(); } override protected function updateDisplayList(w:Number, h:Number):void { trace(name); super.updateDisplayList(w, h); var arrowColor:int = 0xffffff; var g:Graphics = graphics; g.clear(); // Draw the border and fill. switch (name) { case "upSkin": case "editableUpSkin": { g.moveTo(0,0); g.lineStyle(1,arrowColor); g.lineTo(w-1,0); g.lineTo(w-1,h-1); g.lineTo(0,h-1); g.lineTo(0,0); } break; case "overSkin": case "editableOverSkin": case "downSkin": case "editableDownSkin": { // border /*drawRoundRect( 0, 0, w, h, cr, [ themeColor, themeColor ], 1); */ g.moveTo(0,0); g.lineStyle(1,arrowColor); g.lineTo(w-1,0); g.lineTo(w-1,h-1); g.lineTo(0,h-1); g.lineTo(0,0); // Draw the triangle. g.beginFill(arrowColor); g.moveTo(w - 11.5, h / 2 + 3); g.lineTo(w - 15, h / 2 - 2); g.lineTo(w - 8, h / 2 - 2); g.lineTo(w - 11.5, h / 2 + 3); g.endFill(); } break; case "disabledSkin": case "editableDisabledSkin": { break; } } } } }

    Read the article

  • Difference between URLLIB2 call in IDLE and from Django?

    - by danspants
    The following piece of code works as expected when running in a local install of django apache 2.2 fx = urllib2.Request(f); fx.add_header('User-Agent','Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.36 Safari/525.19'); url_opened = urllib2.urlopen(fx); However when I enter that code into IDLE on the same machine I get the following error: url_opened = urllib2.urlopen(fx); File "C:\Python25\lib\urllib2.py", line 124, in urlopen return _opener.open(url, data) File "C:\Python25\lib\urllib2.py", line 387, in open response = meth(req, response) File "C:\Python25\lib\urllib2.py", line 498, in http_response 'http', request, response, code, msg, hdrs) File "C:\Python25\lib\urllib2.py", line 425, in error return self._call_chain(*args) File "C:\Python25\lib\urllib2.py", line 360, in _call_chain result = func(*args) File "C:\Python25\lib\urllib2.py", line 506, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 407: Proxy Authentication Required Any ideas?

    Read the article

  • How can this verbose, unpythonic routine be improved?

    - by fmark
    Is there a more pythonic way of doing this? I am trying to find the eight neighbours of an integer coordinate lying within an extent. I am interested in reducing its verbosity without sacrificing execution speed. def fringe8((px, py), (x1, y1, x2, xy)): f = [(px - 1, py - 1), (px - 1, py), (px - 1, py + 1), (px, py - 1), (px, py + 1), (px + 1, py - 1), (px + 1, py), (px + 1, py + 1)] f_inrange = [] for fx, fy in f: if fx < x1: continue if fx >= x2: continue if fy < y1: continue if fy >= y2: continue f_inrange.append((fx, fy)) return f_inrange

    Read the article

  • Highlight row of form when input is focussed

    - by Jeepstone
    I have the following piece of Mootools 1.11 code (not upgradable as this is within Joomla), which I want to highlight the form row, when an item within it is focussed. However, this doesn't work. I need to know how to access the parent div of the form item. window.addEvent('domready', function() { var list = $$('#ChronoContact_lensorder div.formrow'); list.each(function(element) { var fx = new Fx.Styles(element, {duration:200, wait:false}); element.addEvent('focus', function(){ fx.start({ 'background-color': '#e6f0f2', color: '#FFF' }); }); element.addEvent('focus', function(){ fx.start({ 'background-color': '#FFF', 'color': '#2F9AD0' }); }); }); }); HTML is: <div class="formrow"> <label for="ud">Uncut Diameter:</label> <input type="text" id="ud" name="ud" /> </div> Thanks

    Read the article

  • Obtain reference to View in ActionScript class within ViewNavigatorApplication

    - by chb
    I've got a very simple project in FlashBuilder 4.5. It's a mobile application of type ViewNavigatorApplication with a single view, MapView. In the MapView.mxml file, I've got a Flex component of type Map declared in xml. <?xml version="1.0" encoding="utf-8"?> <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" name="CatBusMapView"> <fx:Script> <![CDATA[ import com.esri.ags.Map; .... ]]> </fx:Script> <fx:Declarations> .... </fx:Declarations> <esri:Map id="cbm"> ... </esri:Map> </s:View> In this same project, I've an actionscript class called UserGeolocation. In this class, I'm attempting to get a reference to this map component. So far, I can get a reference to the top-level application, its ViewNavigator and the NavigationStack of said ViewNavigator. However, I cannot find a way to access the MapView, much less the map I've declared within it. I'm aware of methods like firstView() and activeView(), but I want an absolute solution, one that retrieves the view regardless of whether or not it's first or active. I've tried navigator.getChildByName("MapView") with no luck.

    Read the article

  • At the Java DEMOgrounds - JavaFX

    - by Janice J. Heiss
    JavaFX has made rapid progress in the last year, as is evidenced by the wealth of demos on display. A few questions appear to be prominent in the minds of JavaFX enthusiasts. Here are some questions with answers provided by Oracle’s JavaFX team.When will the rest of the JavaFX code be available in open source?Oracle has started to open source JavaFX. The existing platform code will finish being committed to OpenJFX by the end of the year.Why should I use JavaFX instead of HTML5?We see JavaFX as complementary to HTML5, and most companies we talk to react positively once they understand how they can benefit from a hybrid solution. As most HTML5 developers will tell you, the biggest obstacle to deploying HTML5 applications is fragmentation. JavaFX offers a convenient way to render HTML and JavaScript within its WebView component, which provides the same level of quality and features across Windows, Mac, and Linux. Additionally, JavaScript in WebView can make calls into the Java code, and vice versa, allowing developers to tap into the best of both worlds.What is the market penetration of JavaFX? It is currently limited, as we've just made available JavaFX on Mac and Linux in August, but we expect JavaFX to be present on millions of desktop-type systems now that JavaFX is included as part of the JRE. We have also significantly lowered the level of effort required to deploy an application bundling the JRE and JavaFX runtime libraries. Finally, we are seeing a lot of interest by companies operating in the embedded market, who have found it hard to develop compelling UIs with existing technologies.Below are summaries of JavaFX Demos on display at JavaOne 2012:JavaFX EnsembleEnsemble is a collection of over 100 JavaFX samples packaged as a JavaFX application. This demo is especially useful to those new to JavaFX, or those not familiar with its latest features (e.g. canvas, color picker). Ensemble is the reference for getting familiar with JavaFX functionality. Each sample can be run from within Ensemble, and the API for each sample, as well as the source code are available alongside the sample.The samples source code can be saved as a NetBeans project for convenience purposes, or can be copied as is in any other Java IDE. The version of Ensemble shown is packaged as a native Windows application, including the JRE and JavaFX libraries. It was created with the JavaFX packager, which provides multiple packaging options, and frees developers from the cumbersome and error-prone process of packaging a Java application.FX Experience ToolsFX Experience Tools is a JavaFX application that provides different utilities to create new skins for your JavaFX applications. One of the most powerful features of JavaFX is the ability to skin applications via CSS. Since not all Java developers are familiar with CSS, these utilities are a great starting point to create custom skins. JavaFX allows developers to easily customize the look and feel of their applications through CSS. FX Experience Tools makes it easy to create new themes for JavaFX applications, even if you are not familiar with CSS. FX Experience Tools is a JavaFX application packaged as a native application including the JRE and JavaFX runtime libraries. FX Experience tools shows how this type of deployment simplifies the packaging of Java applications without requiring developers to master the intricacies of Java application packaging. The download site for FX Experience Tools is http://fxexperience.com/2012/03/announcing-fx-experience-tools/ JavaFX Scene BuilderJavaFX Scene Builder is a visual layout tool that lets users quickly design the UI of your JavaFX application, without coding. Users can drag and drop UI components, modify their properties, apply style sheets, and the FXML code they create for the layout is automatically generated in the background. The result is an FXML file that can then be combined with a Java project by binding the UI to the application’s logic. Developers can easily create user interfaces for their application, as well as separate the application’s UI from the application logic for easier maintenance. Attendees can get this app by going to javafx.com and checking the link at top of the “Overview” page.Scene Builder allows developers to easily layout JavaFX UI controls, charts, shapes, and containers, so that you can quickly prototype user interfaces. It generates FXML, an XML-based markup language that enables users to define an application’s user interface, separately from the application logic. Scene Builder can be used in combination with any Java IDE, but is more tightly integrated with NetBeans IDE. It is written as a JavaFX application, with native desktop integration on Windows and Mac OS X. It’s a perfect example of a JavaFX application packages as a native application.Scene Builder is available for your preferred development platform. Besides the GA release on Windows and Mac, a Developer Preview of Scene Builder for Linux has just been made available.Scenic ViewScenic View is a tool that can be used to understand the current state of your application UI, and to also easily manipulate properties of the scenegraph without having to keep editing your code. Creating UIs is a complex process, and it can be hard and tedious detecting these issues, editing the code, and then compiling it to test the app again. Scenic View is a great diagnostics tool that helps developers identify these issues and correct them at runtime.Attendees can get Scenic View by going to javafx.com, selecting the “Community” tab, and clicking the link under the “Third Party Tools and Utilities” section.Scenic View allows developers to easily examine the state of a JavaFX application scenegraph while the application is running. Some of the latest features added to Scenic View include event monitoring, javadoc browsing, and contextual menus. The download site for Scenic View is available here: http://fxexperience.com/scenic-view/ Conference TourConference Tour is an application that lets users discover some of the major Java conferences throughout the world. The Conference Tour application shows how simple it is to mix JavaFX and HTML5 into a single, interactive application. Attendees get Conference Tour here.JavaFX includes a Web engine based on Webkit that provides a consistent web interface to render HTML5 across operating systems, within a JavaFX application. JavaFX features a bi-directional bridge that allows Java APIs to call JavaScript within WebView, or allows JavaScript to make calls to Java APIs. This allows developers to leverage the best of both worlds.Java EE developers can take advantage of WebView and the JavaScript-Java bridge to allow their HTML clients to seamlessly bypass Web browser’s sandbox to access native system resources, providing a richer user experience.FXMediaPlayerFXMediaPlayer is an application that lets developers check different media functionality in JavaFX, such as synthesizer or support for HTTP Live Streaming (HLS). This demo shows how developers can embed video content in their Java applications. JavaFX leverages the underlying video (e.g., H.264) and audio (e.g., AAC) codecs on the user’s computer. JavaFX APIs allow developers to interact with the video content (e.g. play/pause, or programmable markers). Some of the latest media features introduced in JavaFX 2.2 include HTTP Live Streaming (HLS). Obviously there is a lot for JavaFX enthusiasts to chew on!

    Read the article

  • Low graphics mode error on startup with NVIDIA graphics (12.04 LTS )

    - by champost
    My problem is similar to two other posts concerning ATI cards and 12.04 LTS: Post1 & Post2. In my case I use a Dell Precision M4300 laptop which uses a NVidia Quadro FX 880M. Doing a lspci | grep VGA gave me this: 01:00.0 VGA compatible controller: NVIDIA Corporation GT216 [Quadro FX 880M] (rev a2) My workaround consists of logging in at the console and running sudo start lightdm which works perfectly but I am looking for a better workaround than this ?

    Read the article

  • Dual NVidia graphics cards in Ubuntu / xorg.conf mania

    - by John Zwinck
    I have two NVidia graphics cards: Quadro NVS 295 (PCI Express, dual DisplayPort outputs) GeForce FX 5200 (PCI, DVI and VGA outputs) I have three identical monitors, two on DisplayPort and one on DVI. I'm on Ubuntu Hardy (and cannot currently dist-upgrade for separate reasons). I use the "nvidia" driver. What's new is the GeForce card and the third monitor. I currently have the dual DisplayPort monitors working fine. Here are the display-related parts of my xorg.conf: Section "ServerLayout" Identifier "Default Layout" Screen "PCI-Express Screen" 0 0 # adding this makes X fail to start: Screen "PCI Screen" 0 Inputdevice "Generic Keyboard" Inputdevice "Configured Mouse" EndSection Section "Module" Load "glx" # not sure why/if this is needed EndSection Section "Monitor" Identifier "DELL 2408WFP" Option "DPMS" EndSection Section "Device" Identifier "NVIDIA Quadro NVS 295" Driver "nvidia" Option "RenderAccel" "true" Screen 0 BusID "PCI:2:0:0" EndSection Section "Device" Identifier "NVIDIA GeForce FX 5200" Driver "nvidia" Option "RenderAccel" "true" Screen 1 BusID "PCI:6:4:0" EndSection Section "Screen" Identifier "PCI-Express Screen" Device "NVIDIA Quadro NVS 295" Monitor "DELL 2408WFP" Defaultdepth 24 Option "TwinView" "True" Option "UseEdidFreqs" "True" Option "MetaModes" "1920x1200 +0+1200, 1920x1200 +0+0" EndSection Section "Screen" Identifier "PCI Screen" Device "NVIDIA GeForce FX 5200" Monitor "DELL 2408WFP" Defaultdepth 24 Option "TwinView" "True" Option "UseEdidFreqs" "True" Option "MetaModes" "1920x1200 +0+0" EndSection I use nvidia-settings to configure my monitors, and it does not show the second GPU. lspci, though, shows: 02:00.0 VGA compatible controller: nVidia Corporation Unknown device 06fd 06:04.0 VGA compatible controller: nVidia Corporation NV34 [GeForce FX 5200] Which is where I got the BusID settings for the two devices (when I just had one device, I didn't have any BusID listed...and adding the BusID hasn't broken anything). What am I missing? How can I make nvidia-settings show my second GPU so I can then configure its monitor?

    Read the article

  • Using the new CSS Analyzer in JavaFX Scene Builder

    - by Jerome Cambon
    As you know, JavaFX provides from the API many properties that you can set to customize or make your components to behave as you want. For instance, for a Button, you can set its font, or its max size.Using Scene Builder, these properties can be explored and modified using the inspector. However, JavaFX also provides many other properties to have a fine grained customization of your components : the css properties. These properties are typically set from a css stylesheet. For instance, you can set a background image on a Button, change the Button corners, etc... Using Scene Builder, until now, you could set a css property using the inspector Style and Stylesheet editors. But you had to go to the JavaFX css documentation to know the css properties that can be applied to a given component. Hopefully, Scene Builder 1.1 added recently a very interesting new feature : the CSS Analyzer.It allows you to explore all the css properties available for a JavaFX component, and helps you to build your css rules. A very simple example : make a Button rounded Let’s take a very simple example:you would like to customize your Buttons to make them rounded. First, enable the CSS Analyzer, using the ‘View->Show CSS Analyzer’ menu. Grow the main window, and the CSS Analyzer to get more room: Then, drop a Button from the Library to the ContentView: the CSS Analyzer is now showing the Button css properties: As you can see, there is a ‘-fx-background-radius’ css property that allow to define the radius of the background (note that you can get the associated css documentation by clicking on the property name). You can then experiment this by setting the Button style property from the inspector: As you can see in the css doc, one can set the same radius for the 4 corners by a simple number. Once the style value is applied, the Button is now rounded, as expected.Look at the CSS Analyzer: the ‘-fx-background-radius’ property has now 2 entries: the default one, and the one we just entered from the Style property. The new value “win”: it overrides the default one, and become the actual value (to highlight this, the cell background becomes blue). Now, you will certainly prefer to apply this new style to all the Buttons of your FXML document, and have a css rule for this.To do this, save you document first, and create a css file in the same directory than the new document.Create an empty css file (e.g. test.css), and attach it the the root AnchorPane, by first selecting the AnchorPane, then using the Stylesheets editor from the inspector: Add the corresponding css rule to your new test.css file, from your preferred editor (Netbeans for me ;-) and save it. .button { -fx-background-radius: 10px;} Now, select your Button and have a look at the CSS Analyzer. As you can see, the Button is inheriting the css rule (since the Button is a child of the AnchorPane), and still have its inline Style. The Inline style “win”, since it has precedence on the stylesheet. The CSS Analyzer columns are displayed by precedence order.Note the small right-arrow icons, that allow to jump to the source of the value (either test.css, or the inspector in this case).Of course, unless you want to set a specific background radius for this particular Button, you can remove the inline Style from the inspector. Changing the color of a TitledPane arrow In some cases, it can be useful to be able to select the inner element you want to style directly from the Content View . Drop a TitledPane to the Content View. Then select from the CSS Analyzer the CSS cursor (the other cursor on the left allow you to come back to ‘standard’ selection), that will allow to select an inner element: height: 62px;" align="LEFT" border="0"> … and select the TitledPane arrow, that will get a yellow background: … and the Styleable Path is updated: To define a new css rule, you can first copy the Styleable path : .. then paste it in your test.css file. Then, add an entry to set the -fx-background-color to red. You should have something like: .titled-pane:expanded .title .arrow-button .arrow { -fx-background-color : red;} As soon as the test.css is saved, the change is taken into account in Scene Builder. You can also use the Styleable Path to discover all the inner elements of TitledPane, by clicking on the arrow icon: More details You can see the CSS Analyzer in action (and many other features) from the Java One BOF: BOF4279 - In-Depth Layout and Styling with the JavaFX Scene Builder presented by my colleague Jean-Francois Denise. On the right hand, click on the Media link to go to the video (streaming) of the presa. The Scene Builder support of CSS starts at 9:20 The CSS Analyzer presentation starts at 12:50

    Read the article

  • error X3501: 'main': entrypoint not found

    - by Pasha
    I am trying to learn DX10 by following this tutorial. However, my shader won't compile. Below is the detailed error message. Build started 9/10/2012 10:22:46 PM. 1>Project "D:\code\dx\Engine\Engine\Engine.vcxproj" on node 2 (Build target(s)). C:\Program Files (x86)\Windows Kits\8.0\bin\x86\fxc.exe /nologo /E"main" /Fo "D:\code\dx\Engine\Debug\color.cso" /Od /Zi color.fx 1>FXC : error X3501: 'main': entrypoint not found compilation failed; no code produced 1>Done Building Project "D:\code\dx\Engine\Engine\Engine.vcxproj" (Build target(s)) -- FAILED. Build FAILED. Time Elapsed 00:00:00.05 I can easily compile the downloaded code, but I want to know how to fix this error myself. My color.fx looks like this //////////////////////////////////////////////////////////////////////////////// // Filename: color.fx //////////////////////////////////////////////////////////////////////////////// ///////////// // GLOBALS // ///////////// matrix worldMatrix; matrix viewMatrix; matrix projectionMatrix; ////////////// // TYPEDEFS // ////////////// struct VertexInputType { float4 position : POSITION; float4 color : COLOR; }; struct PixelInputType { float4 position : SV_POSITION; float4 color : COLOR; }; //////////////////////////////////////////////////////////////////////////////// // Vertex Shader //////////////////////////////////////////////////////////////////////////////// PixelInputType ColorVertexShader(VertexInputType input) { PixelInputType output; // Change the position vector to be 4 units for proper matrix calculations. input.position.w = 1.0f; // Calculate the position of the vertex against the world, view, and projection matrices. output.position = mul(input.position, worldMatrix); output.position = mul(output.position, viewMatrix); output.position = mul(output.position, projectionMatrix); // Store the input color for the pixel shader to use. output.color = input.color; return output; } //////////////////////////////////////////////////////////////////////////////// // Pixel Shader //////////////////////////////////////////////////////////////////////////////// float4 ColorPixelShader(PixelInputType input) : SV_Target { return input.color; } //////////////////////////////////////////////////////////////////////////////// // Technique //////////////////////////////////////////////////////////////////////////////// technique10 ColorTechnique { pass pass0 { SetVertexShader(CompileShader(vs_4_0, ColorVertexShader())); SetPixelShader(CompileShader(ps_4_0, ColorPixelShader())); SetGeometryShader(NULL); } }

    Read the article

  • Problem loading shaders with slimdx

    - by Levi
    I'm attempting to load an FX file in slimdx, I've got this exact FX file loading and compiling fine with XNA 4.0 but I'm getting errors with slimdx, here's my code to load it. using SlimDX.Direct3D11; using SlimDX.D3DCompiler; public static Effect LoadFXShader(string path) { Effect shader; using (var bytecode = ShaderBytecode.CompileFromFile(path, null, "fx_2_0", ShaderFlags.None, EffectFlags.None)) shader = new Effect(Devices.GPU.GraphicsDevice, bytecode); return shader; } Here's the shader: #define TEXTURE_TILE_SIZE 16 struct VertexToPixel { float4 Position : POSITION; float2 TextureCoords: TEXCOORD1; }; struct PixelToFrame { float4 Color : COLOR0; }; //------- Constants -------- float4x4 xView; float4x4 xProjection; float4x4 xWorld; float4x4 preViewProjection; //float random; //------- Texture Samplers -------- Texture TextureAtlas; sampler TextureSampler = sampler_state { texture = <TextureAtlas>; magfilter = Point; minfilter = point; mipfilter=linear; AddressU = mirror; AddressV = mirror;}; //------- Technique: Textured -------- VertexToPixel TexturedVS( byte4 inPos : POSITION, float2 inTexCoords: TEXCOORD0) { inPos.w = 1; VertexToPixel Output = (VertexToPixel)0; float4x4 preViewProjection = mul (xView, xProjection); float4x4 preWorldViewProjection = mul (xWorld, preViewProjection); Output.Position = mul(inPos, preWorldViewProjection); Output.TextureCoords = inTexCoords / TEXTURE_TILE_SIZE; return Output; } PixelToFrame TexturedPS(VertexToPixel PSIn) { PixelToFrame Output = (PixelToFrame)0; Output.Color = tex2D(TextureSampler, PSIn.TextureCoords); if(Output.Color.a != 1) clip(-1); return Output; } technique Textured { pass Pass0 { VertexShader = compile vs_2_0 TexturedVS(); PixelShader = compile ps_2_0 TexturedPS(); } } Now this exact shader works fine in XNA, but in slimdx I get the error ChunkDefault.fx(28,27): error X3000: unrecognized identifier 'byte4'

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >