Blackberry - 使用eclipse插件的System.out.println()(Blackberry - System.out.println() using eclipse plugin)
我刚刚进入黑莓竞技场..
我正在使用
Eclipse Plugin
将我的测试应用程序运行到模拟器。所以,在我的代码中我添加了
System.out.println("Print");
语句,但通过调试或运行应用程序到模拟器,我找不到打印到eclipse控制台的任何日志语句。有什么我需要注意使用
println()
方法吗?I am just entered into the Blackberry Arena..
I am using
Eclipse Plugin
for running my testing application to simulator.So, In my code somewhere I have add
System.out.println("Print");
statements, but by debugging or running app to simulator, I couldn't find any log statements printed to eclipse console.Is there anything that I need to take care for using
println()
methods ?
原文:https://stackoverflow.com/questions/2873135
最满意答案
你混淆了它们的变量和字符串重复,这是一个更正的版本
<li><a href="#" class="decorNavi" onclick ="xmlRequest('about')" >ABOUT</a></li>
所以现在你传递一个字符串作为参数
function xmlRequest(target){ var targetClick; //here you say the string argument now is called targetClick targetClick = target; if (window.XMLHttpRequest) { xmlRequest = new XMLHttpRequest(); } else{ xmlRequest = new ActiveXObject("Microsoft.XMLHTTP"); } //in this line you concatinate the variable with another string, result is a string so you dont need to quote the variable, this wouldnt work xmlRequest.open("GET", targetClick+".html?="+Math.random() , true); xmlRequest.onreadystatechange = function(){ if (xmlRequest.readyState == 4 && xmlRequest.status ==200) { document.getElementById("midContainer").innerHTML = xmlRequest.responseText; } } xmlRequest.send(); }
你需要在网络服务器上运行它,当使用“file://”protocoll你会得到一个跨源错误,另外url需要在同一个主机上
you mixed up variables and string represantations of them, heres a corrected version
<li><a href="#" class="decorNavi" onclick ="xmlRequest('about')" >ABOUT</a></li>
so now youre passing a string as argument
function xmlRequest(target){ var targetClick; //here you say the string argument now is called targetClick targetClick = target; if (window.XMLHttpRequest) { xmlRequest = new XMLHttpRequest(); } else{ xmlRequest = new ActiveXObject("Microsoft.XMLHTTP"); } //in this line you concatinate the variable with another string, result is a string so you dont need to quote the variable, this wouldnt work xmlRequest.open("GET", targetClick+".html?="+Math.random() , true); xmlRequest.onreadystatechange = function(){ if (xmlRequest.readyState == 4 && xmlRequest.status ==200) { document.getElementById("midContainer").innerHTML = xmlRequest.responseText; } } xmlRequest.send(); }
you need to run this on a webserver, when using the "file://" protocoll youl get a cross origin error, additionally the url needs to be on the same host
相关问答
更多-
return function () { console.warn(arguments) //[120, 0, [120, 90, 180]] [90, 0, [120, 90, 180]] ... 这些论点来自哪里? 为什么不出现在test_args? 因为它是一个新函数 - 返回的函数 - 它有一个新的arguments对象。 你可以在这里查看: var tipper = partial(tip,0.2); [120, 90, 180].map(function(el) { con ...
-
使用稍后决定的参数调用JavaScript函数(Calling a JavaScript Function With Arguments That Are Decided Later)[2023-08-17]
你可以使用apply接受一组参数作为参数 var myarray = [2,5,...] //your array of arguments method.apply(this,myarray); //execute your method 在你拥有的方法中,你可以通过“hidden”“伪数组” arguments参数接收参数。 function method(){ var args = arguments; //is [2,5,...] } 这比call有优势,因为你可以预先构建参数数组,而 ... -
您应该在$(document).ready()范围之外定义您的函数。 You should define your function outside $(document).ready() scope.
-
如果你只需要两个参数,只需将arguments剪切为两个项目 如果你想要自动,你可以编写函数包装器,如下所示: function wrapperCutParams(func, paramsCount){ return function(){ var args = Array.prototype.slice(arguments, 0); if(args.length > paramsCount){ args = args.slice(0, paramsCount) } ...
-
尝试在onLoad函数中移动函数并将它们链接回全局范围: var score = 0; var aWidth; var aHeight; var timer; var that = this; function setGameAreaBounds() { //Setting the size of GameBoard/Window that.moveDot = function () { //randomly move the button(id: dot) within th ...
-
你可能想要改变 substitute v new_var() (typevar v) 至 substitute v (new_var()) (typevar v) (布塔的答案解释了为什么。) You probably want to change substitute v new_var() (typevar v) to substitute v (new_var()) (typevar v) (boutta's answer explains why.)
-
HTML不会使用必需的参数调用javascript函数(HTML doesn't call javascript function with required arguments)[2023-03-24]
你混淆了它们的变量和字符串重复,这是一个更正的版本- ABOUT
所以现在你传递一个字符串作为参数 function xmlRequest(target){ var targetClick; //here you say the string argument now is called targetClick ... -
你的问题是,当你传递你创建属性对象时,你不是创建一个参数,取自你的property名,而是一个名为property 。 如果调试代码,可以检查参数property是否传递给mixpanel.track函数。 要做你想做的事,你必须使用其他语法。 public native void trackComplexEvent(String eventName, String property, String value)/*-{ //create the property object yo ...
-
HTML表单onclick事件不会调用javascript函数(HTML Form onclick event doesn't call javascript function)[2023-10-14]
看起来它之前有某种特殊性: . 我只是复制并粘贴在这里 。 查看第13行中的第一个字符 Looks like it have some kind of special character before: . I just copied and pasted Here. Look the first character in the 13th line -
在JavaScript中使用名为“arguments”的参数可以吗?(Is it ok to use an argument named “arguments” in JavaScript?)[2023-03-22]
在“sloppy模式”下使用名称arguments是可以的,但不推荐。 在严格模式下是禁止的,如果作者关心代码质量,所有新代码都应该使用。 function a(arguments) { console.log(arguments); } a(1); // Prints "1" (function () { 'use strict'; function a(arguments) { console.log(arguments); } a(1); }( ...