Why does thid code not work?
LOOP AT gt_1 INTO gs_1.
WRITE: / gs_1-created_at+0(8).
gs_1-created_at = gs_1-created_at+0(8).
IF gs_1-created_at IN s_date.
APPEND gs_1 TO gt_11.
ELSE.
ENDIF.
ENDLOOP.
I do not just get the first eight positions. Why?
Hi Linn,
in which structure ?
what stands in gs_1-created_at in line 4 of your coding ?
-i think there's no error in your coding
Andreas
Message was edited by: Andreas Mann
Similar Messages
-
Repaint() an applet from a swing applet, why does this code not work?
below are three files that work as planned except for the call to repaint(). This is envoked when a button is hit in one applet and it should repaint another applet. I opened them up in a html file that simply runs both applets. If you could see why the repaint doesn't work I'd love to know. good luck.
//speech1
import java.awt.*;
import java.applet.Applet;
import java.awt.event.*;
//java extension packages
import javax.swing.*;
public class speechapp1 extends JApplet implements ActionListener{
// setting up Buttons and Drop down menus
char a[];
Choice choicebutton;
JLabel resultLabel;
JTextField result;
JLabel enterLabel;
JTextField enter;
JButton pushButton;
TreeTest PicW;
// setting up applets G.U.I
public void init(){
// Get content pane and set it's layout to FlowLayout
Container container = getContentPane();
container.setLayout( new FlowLayout() );
// initialise buttons and shit
a = new char[30];
choicebutton = new Choice();
enterLabel = new JLabel("Test");
enter = new JTextField(30);
resultLabel= new JLabel("speech label");
result = new JTextField(30);
result.setEditable(false);
// Add items to Choice Button
choicebutton.addItem("abc");
choicebutton.addItem("def");
choicebutton.addItem("ghi");
choicebutton.addItem("jkl");
pushButton = new JButton("Click to continue");
// Add new Tree from file TreeTest.java
PicW = new TreeTest();
// Add buttons to container.
container.add(resultLabel);
container.add(result);
container.add(enterLabel);
System.out.println("");
container.add(choicebutton);
System.out.println("");
container.add(pushButton);
pushButton.addActionListener(this);
//choicebutton.addActionListener( this );
// Set the text in result;
result.setText("Hello");
//public void paint(Graphics gg){
// result.setText("Hello");
public void actionPerformed(ActionEvent event){
// continue when action performed on pushButton
String searchKey = event.getActionCommand();
System.out.println("");
if (choicebutton.getSelectedItem().equals("abc"))
PicW.getPicWeight(1);
if (choicebutton.getSelectedItem().equals("def"))
PicW.getPicWeight(2);
if (choicebutton.getSelectedItem().equals("ghi"))
PicW.getPicWeight(3);
if (choicebutton.getSelectedItem().equals("jkl"))
PicW.getPicWeight(4);
System.out.println("repainting from actionPerformed method()");
PicW.repaint();
import java.applet.Applet;
import java.awt.*;
import java.util.*;
public class TreeTest extends Applet{
Tree BackgroundImageTree;
Tree PlayerImageTree;
Image snow,baby;
int weight;
public void getPicWeight(int w){
weight = w;
System.out.println("the new weight has been set at: "+weight);
this.repaint();
public void init()
// initialising trees for backgound images and player images
BackgroundImageTree = new Tree();
PlayerImageTree = new Tree();
// initialising images and correcting size of images to correctly fit the screen
snow = getImage(getDocumentBase(),"snow.gif");
baby = getImage(getDocumentBase(),"baby.gif");
// inserting images into correct tree structure
System.out.println("inserting images into tree: ");
// inserting background images into tree structure
BackgroundImageTree.insertImage(1,snow);
// inserting players into tree structure
PlayerImageTree.insertImage(1,baby);
public void paint(Graphics g){
System.out.println("Searching for selected Image");
if((BackgroundImageTree.inorderTraversal(1)==null)&&(PlayerImageTree.inorderTraversal(1)==null)){
System.out.println("There is no tree with the selected value in the trees");
}else{
g.drawImage(BackgroundImageTree.inorderTraversal(1),1,3,this);
//g.drawImage(PlayerImageTree.inorderTraversal(1),55,150,this);
import java.awt.*;
import java.applet.Applet;
class TreeNode {
TreeNode left;
Image data;
TreeNode right;
int value;
public TreeNode(int weight,Image picture){
left = right = null;
value = weight;
data = picture;
public void insert(int v, Image newImage){
if ( v< value){
if (left ==null)
left = new TreeNode(v,newImage);
else
left.insert(v,newImage);
else if (v>value){
if (right ==null)
right = new TreeNode(v,newImage);
else
right.insert(v, newImage);
public class Tree{
private TreeNode root;
public Tree() {
root = null;
public void insertImage(int value, Image newImage){
if (root == null)
root = new TreeNode(value,newImage);
else
root.insert(value,newImage);
// in order search of tree.
public Image inorderTraversal(int n)
return(inorderHelper(root,n));
private Image inorderHelper(TreeNode node, int n){
Image temp = null;
if (node == null)
return null;
if (node.value == n ){
return(node.data);
temp = inorderHelper(node.left,n);
if (temp == null){
temp = inorderHelper(node.right,n);
return temp;
}I can fix your problems
1. You get an error here because you can only invoke the superclass's constructor in the subclass's constructor. It looks like that's what you're trying to do, but you're not doing it right. Constructors don't return any value (actually they do, but it's implied, so you don't need the void that you've got in your code)
2. I'm not sure, but I think your call to show might be wrong. Move the setsize and setvisible calls to outside of the constructor -
Why does this code not work?
String answer = new String("");
in = new BufferedReader(new InputStreamReader( connection.getInputStream ()));
String test = new String("");
for (int i = 0 ; i < 1000 ; i++)
answer = in.readLine();
if (answer == null)
System.out.println ("null");
break;
else
test += answer;
System.out.println ("answer: " + answer);
System.out.println ("test: " + test);
Many times, the loop will go through 2 iterations but each time, test is only equal to the first answer. The second, third, fourth etc.time it goes through the loop, it should concatenate the value of answer to the end of the string variable test. So why is it that whenever i run the program that has this code, the loop might lloop many times (let's say 2 time) but the value of test is only the first answer, and not the first answer concatenated with the second answer.It worked for me...my code looks like this...i used FileInputStream instead of connection..
import java.io.*;
class Forum {
public static void main(String a[]) throws IOException{
String answer = new String("");
BufferedReader in = new BufferedReader(new InputStreamReader( new FileInputStream("hi.txt")));
String test = new String("");
for (int i = 0 ; i < 1000 ; i++)
answer = in.readLine();
if (answer == null)
System.out.println ("null");
break;
else
test += answer;
System.out.println ("answer: " + answer);
System.out.println ("test: " + test);
my hi.txt is like this:
fasd rea reks krie
fsdfasd
asdfasd
sfasdf
asdfasd
The output is
answer: fasd rea reks krie
answer: fsdfasd
answer: asdfasd
answer: sfasdf
answer: asdfasd
null
test: fasd rea reks kriefsdfasdasdfasdsfasdfasdfasd
Is this not the way u want??? -
why does adobe flash not work in my firefox. i have down loaded it several times. it will work in explorer and chrome.
IE uses a different version of Flash than other browsers use. You need to install the Plugin version of Flash for Firefox.
1.Download the Flash setup file from here: <br />
[http://fpdownload.adobe.com/get/flashplayer/current/install_flash_player.exe Adobe Flash - Plugin version]. <br />
Save it to your Desktop.<br />
2. Close Firefox using File > Exit <br />
then check the Task Manager > Processes tab to make sure '''firefox.exe''' is closed, <br />
{XP: Ctrl+Alt+Del, Vista: Shift+Ctrl+ESC = Processes tab}
3. Then run the Flash setup file from your Desktop. -
Why does my iMessage not work even with my apple ID signed in?
Why does my iMessage not work even with my apple ID signed in?
Using FaceTime http://support.apple.com/kb/ht4319
Troubleshooting FaceTime http://support.apple.com/kb/TS3367
The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
http://tinyurl.com/a7odey8
Troubleshooting FaceTime and iMessage activation
http://support.apple.com/kb/TS4268
iOS: FaceTime is 'Unable to verify email because it is in use'
http://support.apple.com/kb/TS3510
Using FaceTime and iMessage behind a firewall
http://support.apple.com/kb/HT4245
iOS: About Messages
http://support.apple.com/kb/HT3529
Set up iMessage
http://www.apple.com/ca/ios/messages/
iOS 6 and OS X Mountain Lion: Link your phone number and Apple ID for use with FaceTime and iMessage
http://support.apple.com/kb/HT5538
How to Set Up & Use iMessage on iPhone, iPad, & iPod touch with iOS
http://osxdaily.com/2011/10/18/set-up-imessage-on-iphone-ipad-ipod-touch-with-io s-5/
Troubleshooting Messages
http://support.apple.com/kb/TS2755
Troubleshooting iMessage Issues: Some Useful Tips You Should Try
http://www.igeeksblog.com/troubleshooting-imessage-issues/
Setting Up Multiple iOS Devices for iMessage and Facetime
http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
FaceTime and iMessage not accepting Apple ID password
http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
FaceTime, Game Center, Messages: Troubleshooting sign in issues
http://support.apple.com/kb/TS3970
Unable to use FaceTime and iMessage with my apple ID
https://discussions.apple.com/thread/4649373?tstart=90
How to Block Someone on FaceTime
http://www.ehow.com/how_10033185_block-someone-facetime.html
My Facetime Doesn't Ring
https://discussions.apple.com/message/19087457
Send an iMessage as a Text Message Instead with a Quick Tap & Hold
http://osxdaily.com/2012/11/18/send-imessage-as-text-message/
To send messages to non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
How to Send SMS from iPad
http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
You can check the status of the FaceTime/iMessage servers at this link.
http://www.apple.com/support/systemstatus/
Cheers, Tom
BTW- Your profile shows you have iOS 6.1.4 installed. The max iOS for an iPad is 6.1.3. iOS 6.1.4 is for iPhones only. -
Why does my imessage not work with only 1 phone number
Why does my imessage not work with only 1 phone number? It keeps going to imessage and then back to text message
Both you and the recipient have to have active data connections, and both devices have to have iOS 5 or higher to be able to use iMessage. Also, they both have to have iMessage activated. If that is already the case, there is a possiblility that iMessage is down. It has gone up and down several times in the past week. Check this page for status, and if necessary you can report a problem with a link in the lower right corner. http://www.apple.com/support/icloud/systemstatus/
-
Why does flash player not work with facebook?
Why does flash player not work with fcebook? Whenever I wish to view a video, I get the message that i need to upgrade my flash player. Then no matter how often I download and install flash player I still get the message that I need to upgrade my flash player. When I go check which version I have, I always get the message that I have the most current one. I run Mozilla Firefox with Windows. I don't know anything else.
Message was edited by: khettichThis means you don't have the latest version installed. Update to 11.9.900.117, and Firefox will allow it: Flash Player Plug-in (All other browsers)
-
Why does Java Application not working with Macromedia Flash 5 or MX?
Why does Java Application not working with Macromedia Flash 5 or MX?
Who says they don't?
Although I don't know much about those I'd think they should be able to talk to Java Aps using Sockets or request Servlets ...
Spieler -
Why Does Dynamic Link Not Work
I purchased the CS5 Adobe Production Premium. I have been working in Premiere and I have been learning about how to use Dynamic Link. I want to be able to alter clips in After Effects and bring them back and forth into Premiere. When I go to File/ Adobe Dynamic Link/New After Effect Composition, I get this message:
Adobe Dynamic Link Requires Adobe Production Premium.
Since I own production premium, I do not know why I am getting this message. I have reinstalled the CS5 Production Premium Software twice and it still gives me the same message. What can I do to get Dynamic Link Working.Thank you for the tip. Could you possibly tell me how to deactivate and
then reactivate the suite. I am using a Macbook Pro laptop running OS
10.6.4. I do not even know where to start.
From: Colin Brougham <[email protected]>
To: Dan Seanor <[email protected]>
Date: 03/15/2011 09:55 AM
Subject: Why Does Dynamic Link Not Work
Deactivate the software (not uninstall), and then reactivate the suite.
This often fixes this. You can opt to leave the serial number on the
system; no need to clear it and re-enter it. -
HT4993 why does my internet not work when not connected to wifi?
why does my internet not work when not connected to wifi
Hi farmgirl0812,
Thanks for using Apple Support Communities. This article has steps to try if you are unable to connect to a cellular network:
iPhone: Troubleshooting a cellular data connection
http://support.apple.com/kb/ts3780
Cheers,
- Ari -
Why does photo stream not work on 4g
Hi, I have a iPhone and a Mac and an iCloud account, but why does photo stream not work on 4g, but as soon as I connect to wifi, it send photos to photo stream, can please tell why it does not send photos to photo stream when on 4g, thanks.
The data requirements for sending potentially many photos can be too taxing/costly on a carrier's data plan.
-
Why does the alarm not work when the iphone 4 is turned off
why does the alarm not work when the iphone 4 for is turned off works fine when on most other phones work when off
The only phone I've ever had that would turn on and sound the alarm is a Blackberry. So, I'd hardly say "most phones" have this function.
-
Why does the mail not work when i updated my 5s to iOs 8?
why does the mail not work when i updated my 5s to iOs 8?
Thank you for the reply. But can you tell me what this configuration is about and how I should do this?
-
Why does the swiping not work to scroll down the screen
why does the swiping not work to scroll down the screen or swipe from side to side
Thank you for the reply. But can you tell me what this configuration is about and how I should do this?
-
My printer is out of Black Ink .... why does my Scanner Not Work anymore?
Hello Londen.
The community is eager to assist! To ensure the most accurate information is provided, we’ll need to know the model of the printer you are using. We look forward to hearing back from you!
Maybe you are looking for
-
I just hooked up my G4 Powerbook via the VGA port through a composite cable (the red/green/blue ones) to my sharp aquos lcd TV. The screen prefs auto detects the connected TV and i can move my cursor over to the TV screen, but nothing but black shows
-
I have website that on the Home page and the home only. When opened in Chrome or Safari the last 3 menu buttons do not work. But work fine in Explorer and Firefox.Its weird. The site is baystatewiring.com see if you have the same problem. Does anyone
-
Hi, I have two users who are getting error (You have encountered an unexpected error. Please contact the System Administrator for assistance.) when trying to open the payslip. I have already checked that they have the proper responsibility. Any idea
-
Trying to hide when not specified
If my xmlnode of <info> (in my tArray) doesn''t have any info specified I want to hide my textfield called "picInfo". This is one of my attempts on this which doesn't work;
-
Install of second HD pushing fan hard.
I have a G5 Dual 1.8, the one with 8GB RAM capicity not the 4GB one. Just got a Seagate 7200.10 500GB HD and installed it. As soon as the computer is turned on the power supply fan seems to be spinning at full throttle. It's the fan up top between th