Wouldn't compile

Hello, I have problem compiling java classes that are in a package. Every time I try to compile a java file that extends another class, the DOS window gives me error messages. It points out those classes that are being imported.
Could please tell me how to compile it so that it can see other dependent classes.
Thanks for your help.

BATCH files does a bunch of things you. These things could be repeative tasks or something uttly boring you cant be arsed to do it over and over again. Ok on with exerice.
If YOU have windows 98/95 or some MSDOS you can wot i am about to show read on if you have:
Two things i need to show you.
1) 101 batch files explained
2) how you compile with batch files.
Ok here is a QUICK 101 on BATCH files in windows.
1) Open up a a new text editor and then add the following
---Start of batch file---
rem This is a comment it gets ignored.
rem
rem the "rem" in the middle is a BLANK.
mkdir c:\testdir
SET MYTEMPPATH=C:\testdir
echo "MY MYTEMPPATH="%MYTEMPPATH---End of batch file---
2) Save it as "c:\btest.bat"
3) Make sure it is a "btest.bat" as some programs adds more extensions like "btest.bat.txt"
3) Run it as if it was an executable. Browse for it in some explorer and run. You will lots of text pop up and that ECHO.
4) Check your c:\ harddrive. You will see testdir made.
OK ON WITH COMPILING!
1) Start simple. Make java file and save it as "mybtest.java". Save it into "c:\testdir" directory.
public class mybtest {
  public void main(String[] args) {
     System.out.println("Hellow world BTEST");
}2) Compile manually by running the following command
"c:\j2sdk1.4.2_01\bin\javac -classpath c:\testdir mybtest.java"
Basically you are telling javac where to find the .java files to compile. As there is only one file in one directory, i have only declared c:\testdir
It should compile. If it has check the c:\testdir to make sure the .class exists.
Run "c:\j2sdk1.4.2_01\bin\java c:\testdir\mybtest.java" to see the java program work.
3) Edit your test batch file i asked you to make. Get rid of all the lines in there. Then put in the following.
rem---START BATCH COMPILER----
set MYAPPPATH=c:\testdir
c:\j2sdk1.4.2_01\bin\javac -classpath %MYAPPPATH% mybtest.javarem---END OF MY NEW BATCH COMPILER------
4) Save it
5) Edit your "btest.java" make it show something different.
public class mybtest {
  public void main(String[] args) {
     System.out.println("Hellow world compiled by a batch file");
}6) Save it and then go run that c:\btest.bat
7) Check it has worked by runing
"c:\j2sdk1.4.2_01\bin\java c:\testdir\mybtest.java" to see the java program work.
You should see it has worked.
HOW THAT BATCH FILE WORKED(if it has worked for that matter)
"rem [SOME STATEMENT you want to show during batch] "Comment command
"set MYAPPPATH=c:\testdir"This sets up a variable called MYAPPPATH with the data "c:\testdir"
"c:\j2sdk1.4.2_01\bin\javac -classpath %MYAPPPATH% mybtest.java"The batch will prepare the variables and run the command. It calls up your variable data by using %[variablename]% it echos out that data.
If you dont have a clue what i am saying still, try look up in google "batch processing [you operating system make]" If all else fails. Try reading
http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html

Similar Messages

  • Removing Exception Handling Causes Compiler Error

    I am very new to Java. I have a background in other programming languages including Ruby. I am in need of a convenient means to parse XML code. I picked up the code shown at the end of this message on the Internet. In its original form, it works perfectly. I experimented by trying to comment out the try block as you can see. I was surprised to find that in that form it wouldn't compile. In essence, I thought what I was doing was simply removing exception handling. I figured that since the code worked and there were no exceptions being thrown, it would work just fine for experimentation purposes. (I understand that I would not want to do this in production mode.) Can someone please explain to me why removing the exception handling causes the program to fail to compile?
    Thanks for any input.
    ... doug
    /* Experimental Code */
    /* http://www.mkyong.com/java/how-to-read-xml-file-in-java-dom-parser/ */
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import org.w3c.dom.Document;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import org.w3c.dom.Element;
    import java.io.File;
    public class ReadXMLFile {
    public static void main(String argv[]) {
    try {
    File fXmlFile = new File("ReadXMLFile.xml");
    DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
    Document doc = dBuilder.parse(fXmlFile);
    doc.getDocumentElement().normalize();
    System.out.println("Root element :" + doc.getDocumentElement().getNodeName());
    NodeList nList = doc.getElementsByTagName("staff");
    System.out.println("-----------------------");
    for (int temp = 0; temp < nList.getLength(); temp++) {
    Node nNode = nList.item(temp);     
    if (nNode.getNodeType() == Node.ELEMENT_NODE) {
    Element eElement = (Element) nNode;
    System.out.println("First Name : " + getTagValue("firstname",eElement));
    System.out.println("Last Name : " + getTagValue("lastname",eElement));
    System.out.println("Nick Name : " + getTagValue("nickname",eElement));
    System.out.println("Salary : " + getTagValue("salary",eElement));
    } catch (Exception e) {
    e.printStackTrace();
    private static String getTagValue(String sTag, Element eElement){
    NodeList nlList= eElement.getElementsByTagName(sTag).item(0).getChildNodes();
    Node nValue = (Node) nlList.item(0);
    return nValue.getNodeValue();
    }

    877757 wrote:
    I figured that since the code worked and there were no exceptions being thrown, it would work just fine for experimentation purposes. The compiler doesn't know that your code works. It only knows that some method you call can throw some checked exception, and it requires you to catch it or declare that you don't.

  • PL/SQL Native Compilation - not working!

    I'm at my wits end here.
    Oracle 10.2.0.3 under Windows Server 2003 (i know, i know...) and a whole lot of procedural PL/SQL that I think could benefit from native compilation. I've done this on Linux/unix environments a few times but never imagined it would be quite so painful under Windows.
    Ended up using Visual C++ 2003 (7.1 compiler) which compiled everything. MinGW wouldn't compile everything, lots of undefined references to _setjmp and others, but that's a different subject.
    Anyway, after two days of dealing with issues, I finally get things to compile. The .dll is created. The init parameters say we're native. The test procedure is recompiled as native, and verified in dba_plsql_object_settings. As far as I am aware, native compilation is present and working. But when I run the thing.... performance is the same. Recompile as interpreted... same. Recompile as native again... same. This is demo code here, simple loop, the kind of thing that is 10x faster on my Linux environment.
    Basically the behavior is as though native compilation just isn't working... the DLL isn't working. Funny thing is that it -was- working earlier with the same code... right up until I bounced the box. Now I am dead in the water with no log file, no trace, nothing... just a non-functional native compilation feature.
    Any ideas? Anyone else struggle with this?
    Bob

    SELECT name, value
    FROM gv$parameter
    WHERE name LIKE '%code%';
    Did you do this before you bounced the database?
    ALTER SYSTEM SET plsql_compiler_flags = 'NATIVE';
    or
    ALTER SESSION SET plsql_compiler_flags = 'NATIVE';when perhaps you should have done this:
    ALTER SYSTEM SET plsql_code_type = 'NATIVE' SCOPE=BOTH;

  • What are the benefits of compiling in a fakeroot environment? [SOLVED]

    Out of curiosity, what exactly are the benefits of compiling packages in a fakeroot environment?  There are a couple packages I've had to compile manually before running makepkg because they wouldn't compile in a fakeroot environment, and was just wondering what the benefits are as to why all packages are compiled in such a way (without an option to disable it).
    Last edited by deltaecho (2009-02-22 22:38:03)

    I only know of downsside and problems doing so. Only installing needs to be done within fakeroot. Next version of pacman will support separate build and package function to solve this issue.

  • Adt compile for ipa-app-store never completes

    I'm trying to compile my project for the app store. It compiles without issue in about five minutes when compiled for ipa-test or ipa-debug. I'm compiling it for ipa-app-store right now but the process has been running for over two hours. I can see the java process running and the memory fluctuating, which tells me it's not frozen, but the temp files that are created aren't changing at all, which makes it seem like nothing is happening. Does anyone have any ideas what could be wrong? I'm using the latest version of the Flex framework with the latest AIR sdk on a machine running Windows 7.

    I did eventually figure it out. At the time I didn't know how to embed an XML file, so I was taking the file and converting it to a reallly long string. It was in the format of:
    xmlString += "<xmlTag>stuff</xmlTag>";
    xmlString += "<otherTag>stuff</otherTag>";
    There were three files, the shortest of which was over 1000 lines long. For some reason the compiler just choked on that. If I had even one of them in there it wouldn't compile for the app store. The moment I removed them, everything could compile just fine. That was when I figured out how to just embed the XML files and everything has worked since. Interestingly, my compile times for test and debug mode dropped by half once I did that; so it was clearly causing some issues for the compiler in general.
    If you don't have a file like the one I just described, I would recommend commenting out almost everything in your main file and compiling it. If you have an empty project, everything should compile correctly. Start adding things back in one at a time until you get the problem. That was how I ended up nailing down what was happening for us.

  • Nifty tip:  How to get display container parent references to compile. (AS3)

    Hello,
    I appreciate the help I've received in this forum and wanted
    to give back a little bit (am not familiar enough with AS3 yet to
    answer questions).
    Today I encountered a tricky problem in referencing a parent
    container. The class structure was something like this:
    class wrapper extends Sprite {
    function wrapper() {
    var displayChild = new displayChild();
    addChild( displayChild );
    function parentFunction() {
    //Code here
    class displayChild {
    function childFunction() {
    parent.parentFunction();
    This code compiled and ran properly in standard mode. The
    problem was that this type of structure wouldn't compile in strict
    mode. It gave an error:
    1061: Call to a possibly undefined method parentFunction
    through a reference with static type
    flash.display:DisplayObjectContainer.
    The fix was to reference the parent like this:
    function childFunction() {
    var parentObj = parent;
    parentObj.parentFunction();
    However after putting this fix into three or four functions I
    decided to make parentObj a global. Believe it or not, the
    following wouldn't compile:
    class displayChild {
    var parentObj = parent;
    In other words, the compiler would only accept the fix if the
    parentObj reference was in a function.
    Why would this be? Any takers?
    It turns out that the parent object doesn't exist until the
    constructor has completed running. We encountered this in Flash MX
    when using embedded movie clips too. A movie clip or any display
    object (in AS3) doesn't exist until it is completely loaded. If it
    doesn't exist it doesn't have a parent. So the parent reference is
    invalid at compile time. It is only valid at runtime. When we call
    a function at runtime, the parent exists so we can assign it to
    parentObj and use it to call the parent.
    Luckily the compiler is forgiving enough to allow the
    statement:
    var parentObj = parent;
    even though parent is undefined. But of course the compiler
    has to allow this, otherwise it wouldn't allow us to assign any
    undefined values to a variable.
    Hope this is helpful to someone!
    Cheers,
    Mark

    Hi,
       Try this:
    RootUIElementContainer - GridLayout, colCount=1, width=500px.
    Goup1 - FlowLayout, colSpan=1, width=100%.
    Group2 - FlowLayout, colSpan=1, width=100%.
    Regards,
    Satyajit.
    Message was edited by: Satyajit Chakraborty

  • Xcode will not compile

    I migrated from Windows C++(Dev C++) to Mac (Xcode) and Xcode will not compile, the command for it is greyed out (not selectable). Even Hello World Wouldn't compile. What am I doing wrong here?
    (this is an empty C++ file that's been opened)

    What kind of application do I want to open for basic C++. I've tried numerous now and I always get at least one error of conflicting commands.

  • Can't compile with any layers hidden on timeline

    Can someone explain what could possibly be going on?
    Running CS4 I have a .fla that was compiling fine yesterday.  Today I made some slight additions and it wouldn't compile, giving errors saying that various things were undefined.  I was starting to go nuts until finally I made all layers in the timeline visible and compiled again.  Now it compiles fine. 
    Just in case it was something Flash itself I created a new file, hid some layers and compiled and it was fine.  So it's not the application, just this particular file.
    What could be doing this?  Why can't I compile with hidden layers?
    Thanks for any help.

    Hi fizbeam,
    This happened to me a while ago!
    It's annoying.. somewhere in the publish settings theres a checkbox marked 'dont export hidden frames' and if it's checked it'll cause this to happen.

  • Compile archlinux from scratch ??

    Is possible to recompile archlinux from scratch ? from sources ? like gentoo (Stage 1 2 3) ??

    I know it's common to try and "solve" a problem by providing what you asked for, but I want to attack this from a different angle:
    Why do you want to do this?  If you're looking to actually start up a "port" to a different architecture, it's fairly complicated and not recommended if you don't really know all the details.  If you just want to compile "because it's faster" I can tell you that there will positively be no difference in speed after you recompile everything.  Your biggest jumps would be in compiling maybe the kernel, glibc, X, and your WM for your architecture.  I wouldn't compile everything.

  • A rant about C with a question at the end. :P

    C is okay. It's just really hard to understand.
    So this is my rant about it. It starts out by listing where I've been in terms of programming and then lists my difficulties with C itself.
    I discovered C many years ago. I'm not too sure how. All I know is that for many years I've wanted to know what this C thing was all about, but had no way or knowledge of how to. I didn't really know anybody before I got the 'net last year, so asking someone else was out of the question. Plus, I wouldnt've known what question(s) to ask.
    As I became more proficient with the whole technology thing, I began to go to the local libraries nearby and use their free internet access to look stuff up. But I didn't get the idea to do any research about C, most likely because I didn't have the mental capacity to plan well and my access was once or twice weekly at best. Plus, the only computer I had at home was 66MHz and ran DOS, and I only knew BASIC around that time which I was comfortable and content with, so wasn't looking for a new language. I think I knew about assembly language but didn't pursue it if I did.
    A couple of computer upgrades later, I finally got the 'net at home and began to see the convenience of being able to spontaneously look something up when I wanted to as good, rather than weird. Ideas gradually began to pop into my head that I'd run off and look up, and one day C became one of them. So I did some research on C and finally began to learn what it was: an incomprehensible mess of manually managed memory and low-level trickery. Since I knew a fair bit about assembly language now I decided C was worse than asm (and I had no chance of learning asm back then), and left it at that.
    Being the BASIC coder I was (pun intended), I found the syntax and concepts over my head by several miles. But the fascination never died, and kept poking at me again and again. And I just had to keep forgetting about it.
    I moved on from QuickBASIC, which I'd been using for just about everything, to FreeBASIC, which was in such a beta state when I tried it, I disliked it enough to move on and discovered PHP.
    PHP has been called the BASIC of the 21st century, and I can understand why. There are typically at least 10 ways to do something whether in principle or method, multiple functions do the same or an equivalent task, and overall it just doesn't look like a good language. But beyond all that, PHP made sense to me. As I went along many of the things I expected to perform in a given way performed in said way, which was a huge confidence boost. The model it followed might have been convoluted, but something inside my head "clicked" when I saw PHP, so I liked it, since I could understand it easily.
    But recently, I found myself hitting too many walls. I wanted to get into graphical software development, and none of the graphical extensions PHP had available would work for me. PHP-GTK did work but prevented PHP from outputting anything as an Apache module, without throwing a single error anywhere. PHP-QT wouldn't compile on my system. PHP-TK did compile, but both segfaulted when any tk_* function was called and also exhibited the Apache module issue.
    So I decided then and there that I needed to switch languages.
    The problem was, my current machine happens to be so slow that a GIMP operation that executes in 6 seconds on the lowest generation AMD CPU from 4-5 years ago will execute in 38 seconds on mine. I have no idea why; the machine is, after all, 2.66GHz.
    Although PHP is pretty snappy on my system, I don't know how other languages would fare and don't really want to risk the experiment; I want to switch to a language I know will be as fast as, or faster than, PHP. So I decided that a compiled language would have to be it, since I regarded PHP as the fastest language I knew. I was probably wrong, but whatever.
    So I set my mind to understanding C. I'd asked around online before, and someone took pity on me and explained the basics of C and I did my best to understand them. This was great for a couple of days, but didn't last all that long unfortunately. So I asked around again, dreading their responses, and with good reason too: most of the tutorials I read often left me boggled and flew over my head at one point or another, which didn't help.
    But I got some dreaded tutorial links, and did my best to read them. It took me a couple of weeks to finally convince my brain to understand the point of a language that utilizes variables that doesn't contain any data, but instead references to other variables. I eventually grasped the why, but am still having quite a hard time understanding the how.
    So then, after that initial hurdle, I moved onto other topics. Or rather tried to. I quickly discovered that C interconnects some of its issues so deeply that it's hard to learn one thing at a time, move on and learn the next thing - how I best learn. I don't create paths very well by reading information; I create those paths by staying away from information and letting it slowly process in my mind. But to actually remember it in the first place, it needs to make sense, and C doesn't make sense because things are so interconnected and... we come full circle.
    To be honest, after about a fortnight of trying to understand pointers, I still don't understand them. I've read what is probably the best the web has to offer about pointers. Has it helped? Not really.
    Either the documentation:
    - is too terse and I have to slow down, risking losing interest in what I'm reading
    - skips over vital points or assumes I know Pascal or some other language
    - is hard to understand or is poorly written
    - puts segments in the wrong order, so I don't understand everything something might depend on before I reach that something
    ...and in general I either give up on reading the documentation, give up on C or just cry. I've done the 3rd a few times, the 2nd quite a few times and the 1st pretty much as many times as I've read documentation.
    So what are my issues with C?
    Let me address the two I can think of right now:
    Pointers aren't addressed "simply"; if I declare a pointer to int named x I have to use *x to access what x points to, rather than use *x to get x's location, like one does with non-pointer variables where & is used to get an address. It'd be nice if we used &x to get x's value if x wasn't a pointer and *x to get x's value if x was a pointer, rather than use this convoluted scheme.
    Also, I've heard that it's a common misconception that C handles arrays natively. Elsewhere, I've heard that strings are merely arrays of char. I can understand the 2nd, but what do I do with the 1st?
    I do understand that if I say printf("%d\n", x[1]) I'm effectively saying x++; printf("%d\n", x), but I don't understand how this fully works. For example, let us consider the following code:
    char *filename = "<insert file here>";
    int i;
    struct stat filebuffer;
    int status;
    FILE *handle;
    handle = fopen(filename, "r");
    status = stat(filename, &filebuffer);
    char *buffer = malloc(filebuffer.st_size);
    for (i = 0; i < filebuffer.st_size; i++) buffer[i] = fgetc(handle);
    printf("%s\n", buffer);
    You'll of course notice the array notation. Do I understand why if I replace said notation with something to the effect of...
    buffer++
    buffer = fgetc(handle);
    ...the program segfaults? No. Likewise, I don't understand why the...
    buffer++
    *buffer = fgetc(handle);
    ...in the loop does work, printf("%s"...); causes segfaults and printf("%d"...); does not.
    Another thing I found is that declaring a char *, filling it with data, and then using memcpy on said char *, the program works fine, but if I declare for example char x[1] = "hi"; the compiler will shout at me for not allocating enough arrays. Only while writing this did I realize that the 2nd element is for the null byte.
    Suffice to say that C confuses me. To bits. Although I have written a 500 line program in it (579 to be exact). All said program does is display a message on the screen via Xlib, but I managed to figure out how to make a word wrapping engine using strsep and how to use XDrawPoint XDrawLine to not only create a nice UI but also let me define various UI "styles" which can be loaded at startup.
    Said program uses a very big helping of "if it doesn't work stab it until it does", so not only do I not understand how a lot of it works, it probably wouldn't compile under anything except gcc. Which is from a theory perspective quite a problem, IMHO. Almost every 2nd variable is typecast to this or that type.
    So put simply, every tutorial or introduction to C hasn't made a lot of sense to me. Maybe I learn slowly; I'm hoping it's that, because I can't see anything besides assembly language which would be faster than C. I plan to learn asm after I've mastered the very basics of C, but I may end up having to learn the other way around if I expect to get anywhere.
    Like I said in the title, I have one actual question in this post. So here it is:
    Are there any fun, easy reading tutorials out there that don't visually look like they came out of 1992 and read like http://poignantguide.net/ or http://learnyouahaskell.com/?
    -dav7

    dav7 wrote:Pointers aren't addressed "simply"; if I declare a pointer to int named x I have to use *x to access what x points to, rather than use *x to get x's location, like one does with non-pointer variables where & is used to get an address. It'd be nice if we used &x to get x's value if x wasn't a pointer and *x to get x's value if x was a pointer, rather than use this convoluted scheme.
    Pointer syntax is extremely unfortunate. The best part:
    char *a; // It's a pointer.
    *a; // It's a character. Good move, guys.
    Also, I've heard that it's a common misconception that C handles arrays natively. Elsewhere, I've heard that strings are merely arrays of char. I can understand the 2nd, but what do I do with the 1st?
    Insofar as C has arrays, C strings are character arrays. C arrays are just a promise that the system won't mess within a certain set of memory addresses. Array syntax is a concise way to calculate and dereference a specific location in memory, relative to an address that you hope is the beginning of some memory you reserved. array[n] = *(array + n), right? Personally, I would have left out the subscript notation entirely. Regardless, any time you choose to use brackets, you can mentally substitute in an explicit addition and dereference there. You're saying, "Give me the number stored at the memory address I have just calculated, which I know by my science holds something I put there intentionally, and not garbage at all."
    One more clarification with regard to pointer arithmetic is necessary: when you add 2 to an int*, the resulting address is actually 2*sizeof(int) bytes after your base address. Same for a double*: 2*sizeof(double).
    I do understand that if I say printf("%d\n", x[1]) I'm effectively saying x++; printf("%d\n", x), but I don't understand how this fully works.
    It's not the same! First of all, in example #2, you're passing a pointer to an int. In example #1, you're passing an integer, since [] dereferences pointers for you. Any time you use those brackets, it's as if you had typed an asterisk yourself. Second, in example #1 you're not messing with x. In example #2 you're incrementing x by four bytes (the likely size of one integer). Doesn't make a difference in this short example, but if x ever gets used again it will be very significant.
    Another thing I found is that declaring a char *, filling it with data, and then using memcpy on said char *, the program works fine, but if I declare for example char x[1] = "hi"; the compiler will shout at me for not allocating enough arrays. Only while writing this did I realize that the 2nd element is for the null byte.
    Looks like a counting problem. Arrays are indexed from 0, but sizes are specified from 1 on up. Your "char x[1]" has only index [0]. To hold a two-character string, you'll need at least size three (char x[3]), so that x[0]='h', x[1]='i', x[2]='\0', the null terminator.
    Suffice to say that C confuses me. To bits.
    Any time you get confused by pointers or arrays (which are the same thing), take a step back and think about what's happening in terms of memory addresses. Draw it out on paper if you think you're making a mistake. In some languages you can ignore low-level details like that and write perfectly fine programs, even though you won't be able to optimize them without knowing how your code maps onto the machine. But in C, everything that looks like a high-level feature is just shorthand for setting a few bytes to different numbers, and the abstraction is so leaky that you can't get by without understanding it. Types are just a way for the compiler to catch dumb mistakes (some people believe this is helpful) and to automate some math, like the pointer arithmetic above. In a running program there are no types, so when you're trying to figure out what a program is actually doing, you need to consider what the types are shorthand for.
    If you're having trouble "thinking like a programmer", by which I mean sanity-checking your use of syntax and stepping through a program so you know what it does, you might want to get up to speed in a different language, or by working through a book on algorithms.
    Last edited by pauldonnelly (2008-11-03 22:54:12)

  • Flex 3 vs Flex 4 Preprocessor directives and code behind (External Actionscript file)

    I have a framework that I've built that I want to use on Flex3 and Flex4.
    I've added pre-processor directives as per this link (http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_21.html) and got my Flex 4 code to compile nicely.
    I then went to flex 3 and discovered my sub-class of Application wouldn't compile because it was based off of spark. No problem, I'll add in a directive.
    Except now my overridden class has duplicate code, specific to which SDK it is using.
    No problem, I'll put all of the application class code in an Actionscript file and include it in both Application class declarations for each directive.
    It works nicely in Flex 3, so I went to Flex 4, tried to compile and now I'm getting compiler errors saying things such as "The (private|public|protected) attribute may only be used on class property definitions." and "The (private|public|protected) attribute can only be used inside a package.
    This same file works in Flex 3, but not in Flex 4.
    What can I do to make the code compile in both places?
    I'll work on a simple case so I can upload some code.

    Nevermind.
    I got around this issue by renaming my sub-classed Application to "...Application".
    Now I can use a directive to specify an import statement for the extends Application portion rather than specifiing the fully qualified spark.components.Application or mx.core.Application.
    Lame - but done.

  • I can't get SDL 1.2 to run in Xcode 5

    Up until recently, I've been using an eight year old iMac running OS X 10.6, but I just bought a brand new six core Mac Pro with OS X 10.10, and I've been trying to get my old SDL 1.2 programs to run.
    I installed Xcode 5 on my new computer (I had read several bad reviews about Xcode 6). I tried opening my old Xcode docs and they wouldn't compile, which I figured might happen, so I went back to the same tutorial video that I used to set up SDL 1.2 on my old computer: http://youtu.be/d3TPsUAO3L4
    And I tried to create a test project just to see if I could get the SDL window to open, but it still wouldn't compile. I got this long list of errors. These are a few of them:
    /SDL1-2_SetUp/SDLMain.m:50:12: Cast of C pointer type 'CFDictionaryRef' (aka 'const struct __CFDictionary *') to Objective-C pointer type 'const NSDictionary *' requires a bridged cast
    /SDL1-2_SetUp/SDLMain.m:166:16: 'release' is unavailable: not available in automatic reference counting mode
    /SDL1-2_SetUp/SDLMain.m:166:16: ARC forbids explicit message send of 'release'
    /SDL1-2_SetUp/SDLMain.m:167:15: 'release' is unavailable: not available in automatic reference counting mode
    /SDL1-2_SetUp/SDLMain.m:167:15: ARC forbids explicit message send of 'release'
    /SDL1-2_SetUp/SDLMain.m:182:15: 'release' is unavailable: not available in automatic reference counting mode
    /SDL1-2_SetUp/SDLMain.m:182:15: ARC forbids explicit message send of 'release'
    Anyway, I don't really understand what this all means, but I didn't get these errors with my SDL projects on my old computer, so I'm wondering if this is because SDL 1.2 is so old it won't run on a current OS? I spent so much time on these programs and I'd really like to be able to run them again, but I don't have the knowhow to update all my code for SDL 2.0. If anyone has any ideas on how to get SDL 1.2 to run in Xcode 5, I'd be so grateful!  And keep in mind that I'm still fairly new to coding (as you've probably guessed), so please try to give me the preschool version!  Thank you.

    The problem is not with the Xcode project folder hierarchy. Your problem is a flaw in the Mac version of SDL 1.2. When you add image files to an Xcode project, Xcode places them in the Resources folder of your application bundle. But the Mac version of SDL 1.2 sets the working directory to the directory containing the application bundle so your game can't find the image files.
    There are two ways to solve the problem. The manual way is to go into your game's app bundle and move the image files from the Resources folder to the directory containing the app bundle. Select your app, right-click, and choose Show Package Contents to access your game's app bundle. The better way is to change the working directory to the app bundle's Resources folder. To change the working directory, open the SDLMain.m file and modify the setupWorkingDirectory: method. The following code sets the working directory to the app bundle's Resources folder:
    NSString *resourcePath = [[NSBundle mainBundle] resourcePath];
    [[NSFileManager defaultManager] changeCurrentDirectoryPath:resourcePath];
    SDL 2 fixes a lot of annoyances with setting up SDL on OS X. You should look into it.

  • Follow-up question on ZXM08U16 table E_TDRSEG  (function group XM08)

    Rich's suggestion worked (on how to retype the E_TDRSEG table received from MIRO by include ZXM08U16 in the function group XM08.
    Before asking my new follow-up question, let me recap the original SAP typing of this table and the way I've retyped it (following Rich's instructions):
    The original SAP typing is:
    E_TDRSEG TYPE  MMCR_TDRSEG
    TYPES: mmcr_tdrseg TYPE mmcr_drseg OCCURS 0,
    TYPES: BEGIN OF mmcr_drseg_co.
            INCLUDE STRUCTURE cobl_mrm_d.
    TYPES: cr LIKE drseg_cr    OCCURS 0,
           unpl_refwr TYPE refwr,
           END OF mmcr_drseg_co.
    TYPES: BEGIN OF mmcr_drseg.
            INCLUDE STRUCTURE drseg.
    TYPES: cr LIKE drseg_cr OCCURS 0,
           co TYPE mmcr_drseg_co OCCURS 0,
           sm LIKE drseg_sm OCCURS 0,
           charact TYPE rbcharact_instance OCCURS 3,
                                           "instances of characteristics
           uebgmat  TYPE matnr,
           uebrblgp TYPE rblgp,
           selkz_db TYPE selkz,
           rblgp_old TYPE rblgp,           "rblgp before aggregation
           END OF mmcr_drseg.
    I retyped this as follows:
    TYPES:
      ty_cobl_mrm_d        TYPE cobl_mrm_d,
      ty_drseg_cr          TYPE STANDARD TABLE OF drseg_cr with DEFAULT KEY,
      ty_drseg_sm          TYPE STANDARD TABLE OF drseg_sm with DEFAULT KEY,
      ty_charact           TYPE STANDARD TABLE OF rbcharact_instance with DEFAULT KEY,
      BEGIN OF ty_mmcr_drseg_co.
        INCLUDE            TYPE ty_cobl_mrm_d.
        TYPES:
          cr               TYPE ty_drseg_cr ,
          unpl_refwr       TYPE refwr,
      END OF   ty_mmcr_drseg_co,
      ty_co                TYPE STANDARD TABLE OF ty_mmcr_drseg_co
                           WITH DEFAULT KEY,
      BEGIN OF ty_mmcr_drseg.
        INCLUDE            TYPE drseg.
        TYPES:
          cr               TYPE ty_drseg_cr,
          co               TYPE ty_co,
          sm               TYPE ty_drseg_sm,
          charact          TYPE ty_charact,        "instances of characteristics
          uebgmat          TYPE matnr,
          uebrblgp         TYPE rblgp,
          selkz_db         TYPE selkz,
          rblgp_old        TYPE rblgp,             "rblgp before aggregation
      END OF   ty_mmcr_drseg.
      DATA:
        x_mmcr_drseg       TYPE mmcr_drseg,
        x_mmcr_drseg_oo    TYPE ty_mmcr_drseg,
        it_mmcr_drseg      TYPE STANDARD TABLE OF ty_mmcr_drseg,
        x_drseg_cr         TYPE drseg_cr,
        x_drseg_sm         TYPE drseg_sm,
        x_drseg_co         TYPE ty_mmcr_drseg_co.
    But here's my question.  To load the new table from the SAP table, I've had to use the code below.  Is there any way to simplify this code?  (I don't think there is because the drseg structure is included in the old and the new, so you can't simply say new-drseg = old-drseg.  But maybe there's another way to do it and I'm not seeing it.  Also, note that I had to loop on each of  the inner three tables because it wouldn't compile when I tried statements of the form "new-table[] = old-table[].)
      LOOP AT e_tdrseg INTO x_mmcr_drseg.
        x_mmcr_drseg_oo-anln1     = x_mmcr_drseg-anln1.
        x_mmcr_drseg_oo-anln2     = x_mmcr_drseg-anln2.
        x_mmcr_drseg_oo-aplzl     = x_mmcr_drseg-aplzl.
        x_mmcr_drseg_oo-arewr     = x_mmcr_drseg-arewr.
        x_mmcr_drseg_oo-areww     = x_mmcr_drseg-areww.
        x_mmcr_drseg_oo-aufnr     = x_mmcr_drseg-aufnr.
        x_mmcr_drseg_oo-aufpl     = x_mmcr_drseg-aufpl.
        x_mmcr_drseg_oo-basme     = x_mmcr_drseg-aufpl.
        x_mmcr_drseg_oo-bedat     = x_mmcr_drseg-bedat.
        x_mmcr_drseg_oo-begru     = x_mmcr_drseg-begru.
        x_mmcr_drseg_oo-bewae     = x_mmcr_drseg-bewae.
        x_mmcr_drseg_oo-ekgrp     = x_mmcr_drseg-ekgrp.
        x_mmcr_drseg_oo-bpmng     = x_mmcr_drseg-bpmng.
        x_mmcr_drseg_oo-bprme     = x_mmcr_drseg-bprme.
        x_mmcr_drseg_oo-bpumn     = x_mmcr_drseg-bprme.
        x_mmcr_drseg_oo-bpumz     = x_mmcr_drseg-bpumz.
        x_mmcr_drseg_oo-bpwem     = x_mmcr_drseg-bpwem.
        x_mmcr_drseg_oo-bprem     = x_mmcr_drseg-bprem.
        x_mmcr_drseg_oo-bsmng     = x_mmcr_drseg-bsmng.
        x_mmcr_drseg_oo-budat     = x_mmcr_drseg-budat.
        x_mmcr_drseg_oo-bukrs     = x_mmcr_drseg-bukrs.
        x_mmcr_drseg_oo-bwtar     = x_mmcr_drseg-bwtar.
        LOOP at x_mmcr_drseg-cr INTO x_drseg_cr.
          APPEND x_drseg_cr TO x_mmcr_drseg_oo-cr.
        ENDLOOP..
        LOOP at x_mmcr_drseg-co INTO x_drseg_co.
          APPEND x_drseg_co TO x_mmcr_drseg_oo-co.
        ENDLOOP..
        LOOP at x_mmcr_drseg-sm INTO x_drseg_sm.
          APPEND x_drseg_sm TO x_mmcr_drseg_oo-sm.
        ENDLOOP..
        x_mmcr_drseg_oo-charact   = x_mmcr_drseg-charact.
        x_mmcr_drseg_oo-uebgmat   = x_mmcr_drseg-uebgmat.
        x_mmcr_drseg_oo-uebrblgp  = x_mmcr_drseg-uebrblgp.
        x_mmcr_drseg_oo-selkz_db  = x_mmcr_drseg-selkz_db.
        x_mmcr_drseg_oo-rblgp_old = x_mmcr_drseg-rblgp_old.
      ENDLOOP.

    Hi
    I don't think, I'm agree with you, u can only replace some statament:
    LOOP AT E_TDRSEG INTO X_MMCR_DRSEG.
      X_MMCR_DRSEG_OO-ANLN1     = X_MMCR_DRSEG-ANLN1.
      X_MMCR_DRSEG_OO-ANLN2     = X_MMCR_DRSEG-ANLN2.
      X_MMCR_DRSEG_OO-APLZL     = X_MMCR_DRSEG-APLZL.
      X_MMCR_DRSEG_OO-AREWR     = X_MMCR_DRSEG-AREWR.
      X_MMCR_DRSEG_OO-AREWW     = X_MMCR_DRSEG-AREWW.
      X_MMCR_DRSEG_OO-AUFNR     = X_MMCR_DRSEG-AUFNR.
      X_MMCR_DRSEG_OO-AUFPL     = X_MMCR_DRSEG-AUFPL.
      X_MMCR_DRSEG_OO-BASME     = X_MMCR_DRSEG-AUFPL.
      X_MMCR_DRSEG_OO-BEDAT     = X_MMCR_DRSEG-BEDAT.
      X_MMCR_DRSEG_OO-BEGRU     = X_MMCR_DRSEG-BEGRU.
      X_MMCR_DRSEG_OO-BEWAE     = X_MMCR_DRSEG-BEWAE.
      X_MMCR_DRSEG_OO-EKGRP     = X_MMCR_DRSEG-EKGRP.
      X_MMCR_DRSEG_OO-BPMNG     = X_MMCR_DRSEG-BPMNG.
      X_MMCR_DRSEG_OO-BPRME     = X_MMCR_DRSEG-BPRME.
      X_MMCR_DRSEG_OO-BPUMN     = X_MMCR_DRSEG-BPRME.
      X_MMCR_DRSEG_OO-BPUMZ     = X_MMCR_DRSEG-BPUMZ.
      X_MMCR_DRSEG_OO-BPWEM     = X_MMCR_DRSEG-BPWEM.
      X_MMCR_DRSEG_OO-BPREM     = X_MMCR_DRSEG-BPREM.
      X_MMCR_DRSEG_OO-BSMNG     = X_MMCR_DRSEG-BSMNG.
      X_MMCR_DRSEG_OO-BUDAT     = X_MMCR_DRSEG-BUDAT.
      X_MMCR_DRSEG_OO-BUKRS     = X_MMCR_DRSEG-BUKRS.
      X_MMCR_DRSEG_OO-BWTAR     = X_MMCR_DRSEG-BWTAR.
      X_MMCR_DRSEG_OO-CR[]      = X_MMCR_DRSEG-CR[].
      X_MMCR_DRSEG_OO-CO[]      = X_MMCR_DRSEG-CO[].
      X_MMCR_DRSEG_OO-SM[]      = X_MMCR_DRSEG-SM[].
      X_MMCR_DRSEG_OO-CHARACT   = X_MMCR_DRSEG-CHARACT.
      X_MMCR_DRSEG_OO-UEBGMAT   = X_MMCR_DRSEG-UEBGMAT.
      X_MMCR_DRSEG_OO-UEBRBLGP  = X_MMCR_DRSEG-UEBRBLGP.
      X_MMCR_DRSEG_OO-SELKZ_DB  = X_MMCR_DRSEG-SELKZ_DB.
      X_MMCR_DRSEG_OO-RBLGP_OLD = X_MMCR_DRSEG-RBLGP_OLD.
    ENDLOOP.
    If you want to use APPEND statament u need to refresh the target table at very loop:
    LOOP AT E_TDRSEG INTO X_MMCR_DRSEG.
      X_MMCR_DRSEG_OO-ANLN1     = X_MMCR_DRSEG-ANLN1.
      X_MMCR_DRSEG_OO-ANLN2     = X_MMCR_DRSEG-ANLN2.
      X_MMCR_DRSEG_OO-APLZL     = X_MMCR_DRSEG-APLZL.
      X_MMCR_DRSEG_OO-AREWR     = X_MMCR_DRSEG-AREWR.
      X_MMCR_DRSEG_OO-AREWW     = X_MMCR_DRSEG-AREWW.
      X_MMCR_DRSEG_OO-AUFNR     = X_MMCR_DRSEG-AUFNR.
      X_MMCR_DRSEG_OO-AUFPL     = X_MMCR_DRSEG-AUFPL.
      X_MMCR_DRSEG_OO-BASME     = X_MMCR_DRSEG-AUFPL.
      X_MMCR_DRSEG_OO-BEDAT     = X_MMCR_DRSEG-BEDAT.
      X_MMCR_DRSEG_OO-BEGRU     = X_MMCR_DRSEG-BEGRU.
      X_MMCR_DRSEG_OO-BEWAE     = X_MMCR_DRSEG-BEWAE.
      X_MMCR_DRSEG_OO-EKGRP     = X_MMCR_DRSEG-EKGRP.
      X_MMCR_DRSEG_OO-BPMNG     = X_MMCR_DRSEG-BPMNG.
      X_MMCR_DRSEG_OO-BPRME     = X_MMCR_DRSEG-BPRME.
      X_MMCR_DRSEG_OO-BPUMN     = X_MMCR_DRSEG-BPRME.
      X_MMCR_DRSEG_OO-BPUMZ     = X_MMCR_DRSEG-BPUMZ.
      X_MMCR_DRSEG_OO-BPWEM     = X_MMCR_DRSEG-BPWEM.
      X_MMCR_DRSEG_OO-BPREM     = X_MMCR_DRSEG-BPREM.
      X_MMCR_DRSEG_OO-BSMNG     = X_MMCR_DRSEG-BSMNG.
      X_MMCR_DRSEG_OO-BUDAT     = X_MMCR_DRSEG-BUDAT.
      X_MMCR_DRSEG_OO-BUKRS     = X_MMCR_DRSEG-BUKRS.
      X_MMCR_DRSEG_OO-BWTAR     = X_MMCR_DRSEG-BWTAR.
      REFRESH: X_MMCR_DRSEG_OO-CR,
               X_MMCR_DRSEG_OO-CO,
               X_MMCR_DRSEG_OO-SM.
      APPEND LINES OF: X_MMCR_DRSEG-CR TO X_MMCR_DRSEG_OO-CR,
                       X_MMCR_DRSEG-CO TO X_MMCR_DRSEG_OO-CO
                       X_MMCR_DRSEG-SM TO X_MMCR_DRSEG_OO-SM.
      X_MMCR_DRSEG_OO-CHARACT   = X_MMCR_DRSEG-CHARACT.
      X_MMCR_DRSEG_OO-UEBGMAT   = X_MMCR_DRSEG-UEBGMAT.
      X_MMCR_DRSEG_OO-UEBRBLGP  = X_MMCR_DRSEG-UEBRBLGP.
      X_MMCR_DRSEG_OO-SELKZ_DB  = X_MMCR_DRSEG-SELKZ_DB.
      X_MMCR_DRSEG_OO-RBLGP_OLD = X_MMCR_DRSEG-RBLGP_OLD.
    ENDLOOP.
    Max

  • HTML Help viewer crashes.

    The Problem:
    After making some modifications to a working RH HTML file a
    crash occurs when trying to view a compiled .chm file.
    The Clues:
    - It doesn't occur right away, but after clicking on a couple
    links.
    - Sometimes the ".. tell Microsoft about this problem .."
    dialog tells me that Microsoft HTLM Help Executable has encountered
    the problem whereas other times it says that
    hhlauncher.exe had the problem.
    - This problem ONLY occurs when the compiled file is viewed
    on the computer I compiled it from. If I try viewed the .chm file
    on another computer it experiences no problems.
    - The "Application Error" dialog following the ".. tell
    Microsoft about this problem ... " dialog reads: "The instruction
    at "0x4080df31" referenced memory at 0x4080df31". The memory could
    not be 'read'."
    What I Tried:
    Tried picking apart the particular project I was working on,
    taking out things I had recently added etc. When this didn't work,
    I started over with the project, but it
    still wouldn't compile. My next strategy is to reinstall
    RoboHelp.
    Plea for Help:
    I need to get this problem solved so I can view the output of
    the project I am working on. Can anyone tell me what in the world
    is going on here?
    Much Thanks -
    Andy

    Hi Bob
    Within RoboHelp HTML, you may define a "Home" link that will
    be visited if the user clicks the Home item. In RoboHelp HTML, you
    expand the Windows pseudo folder and edit the Window properties to
    define the Home location. If you are using RoboHelp 7, you first
    click View > Pods > Project set-up. Then you expand the
    Windows pseudo folder found in the Project pane and double-click
    the window to get at its properties. Click the Advanced Properties
    button and enter a URL into the Home field.
    What is worth noting here is that clicking the Home link will
    open any URL that can be reached. Whether it is a page compiled
    inside the .CHM or it's
    http://www.Google.com. This is
    where the Refresh link comes into play. You may need to refresh
    loading of the page displayed in the Topic pane of the .CHM viewer.
    Hopefully this helps... Rick

  • How to use Sonos as wireless speakers for a Mac...

    Here's a solution I just tried, and found that actually works!   I've listed it as an *idea* because I would assume that SONOS might be able to offer a similar solution, unless (of course) licensing issues prevent them from doing it without permission from Apple.  (Don't know... just speculating here).
    This software solution provides an "airplay" driver on your mac that points to one of your Sonos players.  Once it's installed, you use it with three simple steps.
    Step 1)  Open a terminal prompt (command prompt) and type airsonos.  This starts the driver.
    Don't close the session.  It's OK to minimize the window.
    Step 2) You use the Mac's "System Preferences..." , "Sound" to select the sonos as the output for your sound.  Now, play some music on your mac, and turn up the volume, and the sound comes out of your Sonos" instead of your Mac.   No wires.  No hassle.
    Step 3) Grin from ear to ear as any and all Mac sound streams wirelessly to your Sonos!
    HERE'S HOW TO INSTALL THE DRIVERS,
    PLUS LINKS TO WHERE I FOUND THE SOLUTION.
    (I can't take credit for creating it, but I'm so happy to have found it... thank you Stephen! ... that I'm willing to share it far and wide!)
    airsonos a Node.js application, and it's free!  
    You need to install the right version of Node.js (it's an older version),
    and then you need to use npm (the Node package manager) which will download, compile and i
    install airsonos.   It's all pretty easy.  You don't need more than basic computer skills to get it done.
    I found info here: 
    https://medium.com/@stephencwan/hacking-airplay-into-sonos-93a41a1fcfbb
    and installation instructions here:
    https://github.com/stephen/airsonos
    IMPORTANT NOTE: It states it requires Node.js version v0.10.33 or greater.
    I tried it with the current release of Node.js (v0.12.xx) and it wouldn't compile.
    When I downloaded and installed Node.js version v0.10.33, and then tried to install it everything worked!
    Here are the brief instructions:
    Step 1)
    Download Node.js v0.10.33 from here:
    http://blog.nodejs.org/2014/10/23/node-v0-10-33-stable/
    or use google to find it.
    Step 2) Run the install (node-v0.10.33.pkg) to install Node.js
    Step 3)  Open a terminal prompt, and at the command line type:
    sudo npm install airsonos -g
    This will cause the npm (the node package manager) to download, compile and install airsonos and the packages it requires.  It took about 5 or 10 minutes to complete.
    Now it's installed!
    To use it, it's two simple steps:
    *** First) open a terminal and at the command prompt type:
      airsonos
    You should see output similar to:
    MacBook-Pro:~user$ airsonos
    Searching for Sonos devices on network...
    Setting up AirSonos for Basement {192.168.0.10:1400}
    Setting up AirSonos for Office {192.168.0.20:1400}
    On my machine these messages were repeated several times. 
    LEAVE THE TERMINAL WINDOW.  Don't close it, or kill the airsonos app.
    It *IS* OK to minimize the window.
    *** Second)
    Go to system preferences... (under the apple menu), select "Sound" and for "Output" create one of the airsonos outputs.  For instance, in my situation I selected .
    "Office (AirSonos)                  AirPlay".
    Now play some music on your mac, turn up the volume on your mac, and listen the music come out through Sonos!
    This is awesome.  You can now send steaming services to Sonos, you can output your itunes music to sonos.  Want to hear a playlist of songs from youtube... done,  amazon music prime... it now works!, etc, etc.
    Many, many thanks to Stephen for creating this and sharing the info.
    I didn't create any of this, I'm just sharing the information since I've wanted this feature for so long, I'm happy to finally find a quality solution that works!
    -Phil

    Phil,
    Thanks for this post.  I am trying to work with Band-in-a-Box, a music generating program on the Mac, and this "hack" could be a lifesaver since my home is wired with Sonos, but the Line-in ports are not (it appears) available (other than inside the central wiring closet).
    So...I got the install, and ran the program.  All seems to be fine - it says Setting Up AirSonos for ... {many, many speakers}.  But, I don't see any of those speakers available inside my /Preferences/Sound... dialog box.  Have you ever seen this problem?  Any advice?
    Thank so much!
    Matt.

Maybe you are looking for

  • Flash Player crashes in all browsers

    I have IE 8, Firefox 3.6 and Chrome 6.0 on my laptop.  I have the latest version of Flash on all three.  All of of a sudden, the Flash Player plugin will crash and the browser will lock up any time I open a page that uses Flash.  What could be doing

  • How can I get a replacement license code

    I have been trying for 6 weeks to get a replacement license code for the one I lost when I purchased Lightroom (the delay caused by having to upgrade MAX to iOS10.7 which took a week). I have contacted the help desk on 5 separate occasions and have b

  • Saving of sales order

    hi gurus i am going through a scenario where i need to restrict saving of sales order if there is no materials in the stock, as the normal process the sales order gets saved even if there is no stock. so the point is no sales order should be saved if

  • Problems in asha 311..

    The nokia 311 is an exceptional phone...but although it has 1ghz processor,it has no multitasking...and also the facebook social app is absent .. But there's no solution given by nokia... Is the company working to update a new software where these pr

  • PSE13 editor will not launch (windows 7)

    I have seen other posts like this one but have not gotten any answer form the forum people. I just tried chatting with adobe people three times and the last time they took over my computer and did some tinkering and then kicked me off the chat.  Stil