Setting A Watch On Variables
I'm probably doing something really stupid here.
I'm trying to debug my app and I can't get the Flex debugger
to watch variables.
I have written pretty much the simplest app I can think of to
see what I am doing wrong :
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" applicationComplete="main()">
<mx:Script>
<![CDATA[
private function main():void {
var astring:String = "Hello";
]]>
</mx:Script>
</mx:Application>
And I have set a watch on astring. It adds it to the
expression list but always displays 'astring = ... ' in the
debugger never updating the value. It does the same thing if I try
and use the debugger with my main app as well with any variable I
care to try.
I would be very grateful if someone could tell me what I am
doing wrong.
Thanks a lot.
Chris
Sorry to have bothered everyone - having a dim afternoon -
didnt set a breakpoint - will crawl into a corner and be very
ashamed.
Similar Messages
-
Need help setting a breakpoint and watching a variable
I have a very basic newbie question. I am trying to follow a variable's value through xcode's debugger. Here is what I have tried:
1. set a breakpoint on the line of the variable I want to watch.
2. click "build and debug"
3. click "pause" in the debugger window
However, none of the information that comes up in the debugger is recognizable as the variable I want to "watch".
Is there something I need to do in the "breakpoints" window in order to watch a variable's value as I step through the program?
Thanks in advance for any and all suggestions.I understand your point about the pause button stopping the program where ever the program happens to be when you hit the pause button. That actually makes intiative sense to me.
In fact the only reason I tried the pause button was because the debugger did not seem to be stopping the way I expected (which by the way is exactly the behavior you just decribed).
To follow last instructions as best I could I:
1. Opened the project ClaendarView in /Develper/Examples/Carbon/
2. Set a breakpoint in the file main.c line 51 (enum) by clicking in the gutter of the line 51. The preakpoint appears yellow.
3. Clicked the debug button in the debugger window (the the "build and debug" button). I get a message about "running" and "program loaded" in the debugger window.
GDB runs, and then a calendar window appears. If I understand your last point. the debugger should hit line 51 in main.c long before it executes enough code to open the application.
Is there something more to setting a breakpoint besides double clicking in the gutter of the line number where you want the breakpoint? -
Find text from a file and set it as a variable in applescript?
I am trying to build a script that sends me updates and notifications from cex.io. Please keep on reading below, so I may guide you until the point I have trouble with.
The first simple script in this operation goes to cex.io's trading page for BTC/GHS. It records ands saves the text to a file every 4 seconds. It works great. It doesn't need to have safari refresh because the site pushes info to the browser live.
repeat
set the webpage_content to ""
tell application "Safari" to set the webpage_content to the text of document 1
set theText to webpage_content
set a to "Macintosh HD:Users:PRIVATE:Desktop:CEX:"
set theFile to (open for access file ((a) & "CEXRaw") with write permission)
write theText to theFile
close access theFile
delay 4
end repeat
And it returns this from the site to this main file every 4 seconds: (note I cut off a chunk from the bottom and the top of the file, because they are unimportant)
GHS:
0.05233439
BTC:
0.00000223
NMC:
0.00002939
LTC:
0.00000000
GHS/BTC
0.02362958 LTC/BTC
0.02438131 NMC/BTC
0.00597565 GHS/NMC
3.96951800 BF1/BTC
1.67000000 Fund Account
GHS/BTC
Last price:
0.02362958
Daily change:
-0.00018042
Today's open:
0.02381000
24h volume:
73812.35539255
I now need an applescript to read that file, and return wanted values. But I'm lost on how to write it.
It needs to find the number under BTC, and set it as a variable.
It needs to find the number under GHS, and set it as a variable.
It needs to find the number under Last Price, and set it as a variable.
If anyone could script that really quick for me, or tell me how to do it, that would be amazing. Thank you so much!Couldn't tell if you had any whitespace in the lines (i.e. is there a space before or after GHS:), so I used contains, not is. Also, if you have a line such as GHS/BTC with a colon GHS/BTC: then it will also fail (as contains "BTC:" would be true for BTC: and GHS/BTC:)
However, this will give you some guidance:
set a to "Macintosh HD:Users:PRIVATE:Desktop:CEX:CEXRaw"
set x to 0
set Names to paragraphs of (read file a)
repeat with nextLine in Names
set x to x + 1
if nextLine contains "BTC:" then
set BTC to item (x + 1) of Names
else if nextLine contains "GHS:" then
set GHS to item (x + 1) of Names
else if nextLine contains "Last Price:" then
set lastPrice to item (x + 1) of Names
end if
end repeat -
Code to set and destroy session variables in Java Server Pages(JSP)
code to set and destroy session variables in Java Server Pages(JSP)
we have use following statement to set session variable
session.setAttribute("userClient",id);
we have use following statement to destroy session variable
session.setAttribute("userClient","");
and
the session.invalidate() is not working
Plz. solve this probemcode to set and destroy session variables in Java
Server Pages(JSP)
we have use following statement to set session
variable
session.setAttribute("userClient",id);
we have use following statement to destroy session
variable
session.setAttribute("userClient","");Perhaps if you tried using
session.setAttribute("userClient", null);
or
session.removeAttribute("userClient");
and
the session.invalidate() is not workingNot working how?
>
Plz. solve this probem -
How to set a new session variable?
Hi all,
Can anybody say how to set a new session variable in istore?Hi,
you can use either
pageContext.getAttribute(VAR, PageContext.REQUEST_SCOPE);
or
<%@page session="true" %>
session.putValue
session.getValue
Hope this will help.
Thanks
Gurjeet -
Can I capture the url of the page I am on and set it to a variable??
Hi..
I was wondering how I can capture the url of the page that I am on and then set it to a variable??? is that possible???
Thx
RichTry this.
String url =request.getRequestURI();
Hope this helps.
Fred -
Spry XML data set and dynamic post variables
Hi,
I am trying to create an XML data set that has dynamic post
variables.
Everytime something is pressed on the page a variable changes
and I then want to reload the XML data set using the new variable.
I know I can just pull in an XML with all possible variables
and filter client side but this would make it way too large.
Does anyone know what I may need to do.
I tried this:
var myVar = 0;
var dss = new Spry.Data.XMLDataSet (
'../../cgi-bin/server_details.pl' , 'top' , { method: 'POST' ,
postData: sid=ajaja21&ip=127.0.0.1&cid=' . myVar ,
subPaths: [ "auth" , "plugins" , "plugins/plugin" ] , keepSorted:
"true", sortOnLoad: "plugins/plugin/order", sortOrderOnLoad:
"descending", useCache: false, loadInterval: 10000 } );
onclick="myVar=1";
But the script doesn't understand the post variables sent (it
does when I remove the . myVar part and put in a static value). I
think it isn't sending that dynamic variable with the post
variables.
Any ideas anyone?
ThanksWell I had it working when I stripped back everything and
just had the dss data set and a single onclick function, but now
that I put it back together it hash foobared again.
Here are the relevant bits of code that I've changed.
The function to change server id:
//function to run when changing the server id
function changeServer ( sid ) {
//set the url to use the current server id
dss.setURL = ( '../../cgi-bin/server_details.pl' , { method:
'POST' , postData:
'sid=7gv1m3vjvagfl7h7qeefb8iodj8evhmb&ip=127.0.0.1&cid='+sid
//force a reload of the server data
dss.loadData();
The inital load of the data set
var dss = new Spry.Data.XMLDataSet (
'../../cgi-bin/server_details.pl' , 'yams' , { method: 'POST' ,
postData:
'sid=7gv1m3vjvagfl7h7qeefb8iodj8evhmb&ip=127.0.0.1&cid=0' ,
subPaths: [ "auth" , "plugins" , "plugins/plugin" ] , keepSorted:
"true", sortOnLoad: "plugins/plugin/order", sortOrderOnLoad:
"descending", useCache: false, loadInterval: 10000 } );
And the part that changes the server id
<td align="left" style="cursor:default; width:174px;"
onclick="changeServer({dsv::servers/server/@id})">{dsv::servers/server/name}</td>
I checked that the function is receiving the correct server
id and I even tried hard coding the cid variable to 2 in the change
function but it still wasn't changing on the server side.
Any ideas?
Thanks -
Setting empty Selections in Variables
When setting a user-exit variable to initial for unassigned values, the variable value in the planning level displays the '#'. When entering data for this selection in a layout and saving it, everything looks fine. The data records are written to the cube and can be verified using list cube. However, when exiting the layout and returning the newly created records do not show up. If I take the variable out of the selection on the package and open the layout I can see the values. I've tried everything I can think of as far as assigning values to the variable to represent unassigned. I've tried the # sign, clearing the values, and assigning space but this behavior persists. Does anyone have any ideas on this problem.
thanks,
Chuck HallHi,
Thanks for your message. I have found the reason of my problem.
We use 0SOURSYSTEM as a primary key of all the characteristics (compounding). We have 2 source systems. In the SID tables, SAP has got three entries for the initial values of my characteristic 0NETWORK.
0SOURSYSTEM NETWORK
0 0
R1 0
F1 0
When I inserted the 0NETWORK to my cube, SAP grabbed its first index 0/0, and I was expecting having the second R1/0.
So the combination does not match when I execute a layout.
I'll now use Remodeling to remove 0NETWORK and put it back with the value R1/0.
Thanks
Laurent -
Best practices for setting environment based static variables?
I have a set of static string variables that hold the url location of modules in a project. These locations change depending on whether I'm building for development, staging or production.
What's the best way to set static variables in this way?I don't know if this is best practice, but here's the solution I've come up with.
The root domain is accessible within the swf via a node on a loaded xml file. So I created a simple method that sets a url variable based on that domain node.
The domain-based url variable is then used within the static string variables that define the location of the modules.
Simplified like so:
var domain:String = xml.node.value;
static var bucketLocation:String = getLocation()
static var moduleLocation:String = bucketLocation + "modulename.swf";
function getLocation():String
var loc:String
switch (domain) {
case stagingUrl:
loc = "pathToAmazonStagingBucket";
break;
case productionUrl:
loc = "pathToAmazonProductionBucket";
break; -
Trouble in BEx Analyzer when try to set values to the variables in ZXRSRU01
Hi Experts!
I have the trouble in BEx Analyzer when try to set values to the variables in ZXRSRU01 on i_step = 1.
When variable's screen apeares the values is not those what was set in ZXRSRU01. When I try to trace
this in RSRT I have no this problem, all the values are same as was set in ZXRSRU01.
Thanks in advance.
Best regards,
Andrey BychkovHi
Check this
Documentation about variable types & their processing in i_step = 1, 2 etc.
It may help you....
Cheers -
I want to know how to set file watcher for my sql database using java.
my doubt is i am running an web application in a web server.
the user information are stored one databse.
i want that user details in other databases.
it will do automatically.
when ever new values are stored one database then automatically that value transfered in other data base.
i want urgent.
please help me
thanksIt seems like the most natural way to do that would be with database triggers, if your DB allows its triggers to interact with the world outside the DB--e.g. invoking Java code, invoking some other process, opening a socket, etc.
-
Setting Java ZWT.headless variable
I am creating graphics on the fly with the Oracle JVM in the database. I need to set the headless environment variable.
I found the command: -Djava.awt.headless=true
I can not find where this needs to be run.
Can this environment variable be set from the Java code?
I have this code from Sun which does not change the headless variable.
System.setProperty("java.awt.headless", "true");
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
boolean headless_check = ge.isHeadless();
if(headless_check)
htpPrint("<br/>headless<br/>");
else
htpPrint("<br/>not headless<br/>");
I am working with 11g and 10g.
Any help with this would be greatly appreciated.
Thanks,
Gregory
Message was edited by:
phillippioThanks Again Marcelo.
That set headless to true.
This, unfortunately did not fix issue.
I get the following error every time I try to create a BufferedImage in Java on the Database.
ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
The image I am trying to create is from a JFreeChart object.
BufferedImage bufferedImage = chart.createBufferedImage(500, 300);
Like I stated earlier this works in my desktop environmet. With Java 1.4.
The Stack if you are interested:
start. org.jfree.chart.JFreeChart@68ecbb34 This is a title to end all titles. 1.5.0_10 sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1236)
sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:170)
sun.awt.FontConfiguration.(FontConfiguration.java:75)
oracle.aurora.awt.OracleFontConfiguration.(OracleFontConfiguration.java:33)
oracle.aurora.awt.OracleGraphicsEnvironment.createFontConfiguration(OracleGraphicsEnvironment.java:25)
sun.java2d.SunGraphicsEnvironment$1.run(SunGraphicsEnvironment.java:186)
java.security.AccessController.doPrivileged(Native Method)
sun.java2d.SunGraphicsEnvironment.(SunGraphicsEnvironment.java:94)
oracle.aurora.awt.OracleGraphicsEnvironment.(OracleGraphicsEnvironment.java:14)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:511)
java.lang.Class.newInstance0(Class.java:373)
java.lang.Class.newInstance(Class.java:326)
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1141)
org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1397)
org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1378)
org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1363)
LASER_REP_MH_EVENTS_BARGRAPH.buildGraph(LASER_MH_EVENTS_GRAPH_JV:135)
If you have any idea on running JFreeChart on the DB JVM I would like to hear them.
Thanks for your help. -
Setting up the windows variable
Hello i need the first step, how do i set up my windows variable so i can conline my java programs? thanks
Before running the J2EE SDK, you must set these environment variables:
* J2EE_HOME - the directory where you installed this release.
* JAVA_HOME - the directory where the Java 2 SDK Standard Edition is installed.
* PATH - include the bin directory beneath the directory where you've installed this release.
If you don't know how to set environment variables:
right mouse click on my pc - properties - tab advanced - button environment variables.
This should do it. -
Hi,
How to setup a session variable of User id in PHP in
Dreamweaver Style. Is it possible to assign the session variable
value equal to user id from the recordset......if yes i need the
procedure. Thanks in advance.prashi123 wrote:
> How to setup a session variable of User id in PHP in
Dreamweaver Style. Is it
> possible to assign the session variable value equal to
user id from the
> recordset......if yes i need the procedure.
There is no "Dreamweaver style" for setting up a session
variable. You
do it in exactly the same way as for any PHP page. Put this
at the
beginning of the page:
session_start();
Retrieve the value that you want from the recordset and
assign it to a
session variable like this:
$_SESSION['user_id'] = $row_recordsetName['user_id'];
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/ -
Setting a user defined variable at topic level?
RH8 HTML
I want 2 topics to use the same snippet, in this snippet are several variables, and I want to set these variables at the topic level. Because these topics carry the same information, accept for some very minor thing, i.e button names and a screenshot. So I want to single source as best I can.
Though I cant find anyway to set a user defined variable at the topic level.
Is this possible?
ThanksHi Nick
Well, hoping I don't add any fuel to the fire here, but...
Version 8 isn't really version 8. Logically, it's version 16! And that probably surprises you. Maybe even frustrates you! But there's even another twist here. From the Adobe perspective, it's version 3. Adobe acquired Macromedia. At the time, RoboHelp was at version X5. Logically version 13. So seeing the "5" in there, Adobe naturally assumed 6 would seem logical I suppose.
On the Snippet variable thing, I'm thinking you might be able to work around it a smidge by using a bit of JavaScript magick. Define the variable in the Topic using JavaScript and insert some script in the Snippet to dynamically write in the variable content found in the topic.
Aside from that, probably the best we can all do here is to exercise using the Wish Form to ask for these features.
Cheers... Rick
Helpful and Handy Links
RoboHelp Wish Form/Bug Reporting Form
Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
Adobe Certified RoboHelp HTML Training
SorcerStone Blog
RoboHelp eBooks
Maybe you are looking for
-
IPhoto Library upgrade version won't import previous library
So I have been reading past posts and have figured out how to locate my iphoto library. I have my originals & I can view them in Preview. However, I can't get them into iphoto, I get an error message. I also tried to re-import the whole library and I
-
Group By Select Statement aggregate function error.
I am using Dreamweaver MX4 and have an ASP web page. I can easily do this in Access 2007 a simple "group by" sum totals statement. Why can I not get this to work on a web page? Are the "#" signs messing this up in the Code2 Select Statement? How can
-
Add Approver / Reviewer Button
Hello Experts - I did search the forum before posting this note and only found information that I already knew about this. The add approver, add reviewer button is displayed and works in our QA region but not in Production. I compared the source code
-
Add a App Server after it crashed back to farm
Hi, Just want to check on the following: Farm: SQL Cluster, 2 x WFE and 1 x App server that crashed. To get a App server up again i can just install a new server and when i run the wizard point to existing DB. How do i start Central admin on the ser
-
Is it possible to export a composition without rendering a given effect?
I have a custom generator created in Motion 5 and I would like to see its result in FCP X preview window, but without burning it into the export. The use case is to forward the exported video (with all effects burnt in, except mine) as well as the XM