TicTacToe - Objects

Hey guys, I've been working on an objected-oriented tic-tac-toe game to get acquainted with the language, etc...
I'm having problems with the checkMove(int) method, in the board object. No matter what, the value returned is always true, even if the move is legal (in which case the value returned should be false). Here is the code:
Board object:
public class Board {
  private String[][] _board = new String[3][3];
  public Board() {
   int x = 0;
   for (int row = 0;  row < 3;  row++) {
     for (int column = 0;  column < 3;  column++) {
       x += 1;
       _board[row][column] = " " +x +" ";
  }   // End of constructor.
    public boolean checkMove(int position) {
    boolean test = false;
    switch (position) {
      case 1: {if (_board[0][0] != " " +1 +" ") {test = true;} break;}
      case 2: {if (_board[0][1] != " " +2 +" ") {test = true;} break;}
      case 3: {if (_board[0][2] != " " +3 +" ") {test = true;} break;}
      case 4: {if (_board[1][0] != " " +4 +" ") {test = true;} break;}
      case 5: {if (_board[1][1] != " " +5 +" ") {test = true;} break;}
      case 6: {if (_board[1][2] != " " +6 +" ") {test = true;} break;}
      case 7: {if (_board[2][0] != " " +7 +" ") {test = true;} break;}
      case 8: {if (_board[2][1] != " " +8 +" ") {test = true;} break;}
      case 9: {if (_board[2][2] != " " +9 +" ") {test = true;} break;}
      default: {test = true; break;}
    }   // End of switch.
    return test;
  } // End of method checkMove().
}   // End of class Board.The relevant part of the main code is:
do {
          System.out.println(player1.getName() +", it is your turn. Where would you like to play?"); 
          position = TextIO.getlnInt();
          illegalMove = board.checkMove(position);
        } while(illegalMove == true);Any corrections and general criticism is greatly appreciated :)

cotton.m wrote:
A few comments. This
the value returned is always true, even if the move is legal (in which case the value returned should be false).Seems logically backwards to me. A method called checkMove I would expect to return true for legal and false for illegal. But maybe that's just me.You are completely right. However, it just so happened that in the main method, I had the variable illegalMove. Therefore it makes sense that illegalMove is true when there is an illegalMove, and illegalMove is false when there isnt.
cotton.m wrote:
Another comment would be that I wouldn't use an array of Strings for the board. Why not ints? (or enums or bytes) Well ints anyway. I mean you only have three options right? X, O or empty. Storing 9 different strings is a pain now and going to be worse later when you check the results (to look for a winner or the "right" place to move next)Sorry for the possible naivet of this question, but how would you create an array of enums or bytes, and how would you apply it to this situation? seems like an interesting option.
Actually, i already had a method called checkWin() which was working. In fact, it was just this checkMove() method which wasnt working.
corlettk wrote:
Looks like an epic brainfart to me... if 1..9 then true, else true. Huh? In my (very limited) understanding, the default case just takes into account any possible input from the user which surpasses the values of 1-9, thus not being located on the board, which would classify it as an illegal move.
Thanks for all of the help guys, I really appreciate it :)

Similar Messages

  • Tic Tac Woes

    Catchy Title huh? Yea well I've now been up for about 32 hours trying to get this damn game done and I'm about ready to just bust out a napkin and play with myself. (Tic-Tac-Toe that is...).
    Ok, before I make more horrible jokes...
    import java.util.Scanner;
    public class TicTacToe
         private String grid;     //game grid (range from 0~8)
         private String name1;     //name of player 1
         private String name2;     //name of player 2
         private char character1;     //character representing player 1
         private char character2;     //character representing player 2
         private static String introduction;     //game introduction
         Scanner keyboard = new Scanner(System.in);
          * Create a new TicTacToe object with the two players'
          * name and representing characters.
          * @param n1 the first player's name
          * @param c1 the first player's representing character
          * @param n2 the second player's name
          * @param c2 the second player's representing character
         public void TicTacToe(String n1, char c1, String n2, char c2)
              System.out.println("Please input the first player's name: ");                                        
              n1 = keyboard.nextLine();
              System.out.println("Please input the representing character: ");
              String char1 = keyboard.nextLine();
              c1 = char1.charAt(0);          
              System.out.println("Please input the second player's name: ");
              n2 = keyboard.nextLine();
              System.out.println("Please input the representing character: ");
              String char2 = keyboard.nextLine();
              c2 = char2.charAt(0);
              if (c2 == c1)
                   System.out.println("Please re-input " + n2 + "'s character.");
                   String char2 = keyboard.nextLine();
                   c2 = char2.charAt(0);
          * Draw in a blank space.
          * @param player 1 for first and 2 for second
          * @param index the place to draw in the grid
          * @return whether the placement is legal or not
         public boolean place(int player, int index)
              System.out.println("Where do you want to put your mark? (0~8): ");     
          * Draw in a blank space.
          * @param player 1 for first and 2 for second
          * @param row the row of the place to draw in the grid
          * @param column the column of the place to draw in the grid
          * @return whether the placement is legal or not
         public boolean place(int player, int row, int column)
              //to do, you may change the return code when you decide to implement the method
              return false;
         public String getCurrentGrid()
              return grid;
         public boolean hasWinner()
              int i;
              for (i = 0; i < 3; i++)
                   if (grid.charAt(i * 4) != ' ')
                        if ((grid.charAt(i * 3) == grid.charAt(i * 3 + 1))                              
                             && (grid.charAt(i * 3) == grid.charAt(i * 3 + 2)))
                             return true;
                        if ((grid.charAt(i) == grid.charAt(i + 3))                                   
                             && (grid.charAt(i) == grid.charAt(i + 6)))
                             return true;
                        if (i == 1) {
                             if ((grid.charAt(0) == grid.charAt(4))                                   
                                  && (grid.charAt(0) == grid.charAt(8)))
                                  return true;
                             if ((grid.charAt(2) == grid.charAt(4))                                   
                                  && (grid.charAt(4) == grid.charAt(6)))
                                  return true;
              return false;
         public boolean isDraw()
              int i;     
              for (i = 0; i<3; i++)
                   if (grid.charAt(i * 4) !=' ')
                        if ((grid.charAt(i * 3) != grid.charAt(i * 3 + 1)))                              
                             return true;
                        if ((grid.charAt(i) != grid.charAt(i + 3)))                                       
                             return true;
                        if (i == 1)
                             if ((grid.charAt(0) != grid.charAt(4)))                                   
                                  return true;
                             if ((grid.charAt(2) != grid.charAt(4)))                                   
                                  return true;
              return false;
         public void printGrid()
              System.out.print(grid.charAt(0));
              System.out.print('|');
              System.out.print(grid.charAt(1));
              System.out.print('|');
              System.out.println(grid.charAt(2));
              System.out.println("-----");
              System.out.print(grid.charAt(3));
              System.out.print('|');
              System.out.print(grid.charAt(4));
              System.out.print('|');
              System.out.println(grid.charAt(5));
              System.out.println("-----");
              System.out.print(grid.charAt(6));
              System.out.print('|');
              System.out.print(grid.charAt(7));
              System.out.print('|');
              System.out.println(grid.charAt(8));
         public static void setIntroduction(String newIntroduction)
              introduction = newIntroduction;
         public static String getIntroduction()
              return introduction;
         public char getCharacter1()
              return character1;
         public char getCharacter2()
              return character2;
         public String getName1()
              return name1;
         public String getName2()
              return name2;
    }

    Obviously there is a program that calls all these methods but this is what it will be drawing from. I have included some comments as to where I am having issues. I know what I need to do just am iffy as to how. In terms of the placing a letter, I attempted the following code
              Scanner keyboard = new Scanner (System.in);
              char c1 = 'X';
              char c2 = 'O';
              String n1 = "Player 1";
              String n2 = "Player 2";
              char data[] = {' ',' ',' ',' ',' ',' ',' ',' ',' '};
              System.out.println("Enter a number between 0 and 8: ");
              int i = keyboard.nextInt();
              if (i >= 0 && i <= 8);
              data[i] = c1;
              String grid = new String(data);
              System.out.print(grid.charAt(0));
              System.out.print('|');
              System.out.print(grid.charAt(1));
              System.out.print('|');
              System.out.println(grid.charAt(2));
              System.out.println("-----");
              System.out.print(grid.charAt(3));
              System.out.print('|');
              System.out.print(grid.charAt(4));
              System.out.print('|');
              System.out.println(grid.charAt(5));
              System.out.println("-----");
              System.out.print(grid.charAt(6));
              System.out.print('|');
              System.out.print(grid.charAt(7));
              System.out.print('|');
              System.out.println(grid.charAt(8));
         }which did work, however only worked once because I have no looping statement but I feel char data[] = " " is the right direction. Thanks for your help as always.

  • Can I have multiple stream types in one object?

    For my final project in my data commucnications class I'm writing a client/server socket application that will allow multiple clients to play TicTacToe simultaneously against the game on the server. The teacher is a C/C++ jock, and knows very little Java. We're free to choose any language that will do sockets, and I love Java and don't love C++.
    I've built the GUI, and got it to the point that I can reliably connect multiple clients on different machines in the school lab to the Server object, which accepts the new sockets and creates a new thread of ServerGame to do the playing in response to the client's moves. A mousePressed() detects clicks in the grid, and modifies a string to contain the status of the game. I've used a BufferedReader and PrintWriter combination on both sides, to send the GameString back and forth, starting with "---------", then the client makes a move and it changes to "X--------" and the PrintWriter sends it over and the ServerGame makes a move to "X---O----" and send it back, etc, etc. You get the idea. I have a ways to go with the implementation of strategy stuff for the ServerGame's moves, but I like it so far. But now I realize it would be really cool to add to it.
    What I want to do, since there can be multiple players, is have a way that it can be like a TicTacToe club. At any one time, it would be nice to be able to know who else is playing and what their won/loss record is. I plan a Player object, with String name, int wins, losses, ties, gets and sets. With Textfields and a Sign In button I should be able to send the Player name to the Server, which can look up the name in a Vector of Player objects , find the one that matches, and sends the Player object for that name over to the Client, and also provide it to the ServerGame. Each player's won/loss record will be updated as the play continues, and the record will be "stored" in the Server's vector when he "logs off". Updates shouldn't be too hard to manage.
    So, with that as the description, here's the question -- most streams don't handle Objects. I see that ObjectInputStream and ObjectOutputStream do. So -- am I headed for trouble in using multiple stream objects in an application? I suppose I could just use the object streams and let them send out a serialized String. In other words, I want to add this to my program, but I don't want to lose too much time finding out for myself if it works one way or the other. I already have working code for the String. Without giving too much away, can anyone give me some general guidance here?

    Anyway, here's the present roadblock that's eating into the time I have left. I've spent many happy hours looking for what I'm missing here, and I'm stumped, real-time.
    I found it was no problem to just send everything over and back with ObjectInputStream and ObjectOutputStream. From the client I send a String with the state of the game, and can break it down and code for decisions in the server as to a response and send the new String back to the client. I now have a Player class with Strings name and password, ints wins, losses, ties. I have a sign-in in the client GUI and old "members" of the club are welcomed and matched with their Player object stored in a Vector, and new members are welcomed and added to the Vector. My idea is to make the Vector static so the clients can have access to the Vector through their individual threads of the Game in the server. That way I should be able to make it so that any one player can have in his client window a TextArea listing who's playing right now, with their won-loss record, and have it updated, real-time.
    The problem is that in my test-program for the concept, I can get a Player object to go back and forth, I can make changes in it and send it back and have it display properly at either end after a change. What I'm aiming at in the end is the ability to pass a copy of the Vector object from the server to the client, for updating the status of everyone else playing, and when there's a win or loss in an individual client, it should be able to tell its own server thread and through that update the Vector for all to access. Sounds OK to me, but what's happening is that the Vector that goes into the pipe at the server is not the same as the Vector that comes out the pipe into the client. I've tried all the tricks I can think of using console System.out.println()'s, and it's really weird.
    I build a dummy Vector in the constructor with 4 Players. I can send a message to the server that removes elementAt(0), and tell it to list the contents of the Vector there, and sure enough the first element is gone, and the console shows a printout of the contents of all the remaining Player objects and their members. But when I writeObject() back to the client, the whole Vector arrives at the client end. Even after I've removed all the Player elements one by one, I receive the full original Vector in the client. I put it into a local Vector cast from the readObject() method. I believe that should live only as long as the method. I even tried putting clear() at the end of the method, so there wouldn't be anything lingering the next time I call the method that gets the Vector from the server.
    What seems the biggest clue is that now I've set up another method and a button for it, that gets the elementAt(0) from the server Vector, changes the name and sends it back. Again, after the regular call to get the Vector sent over, it shows in the server console that one element has been removed. And one by one the element sent over from (0) is the one that was bumped down to fill the space from removeElementAt(). But in the client, the console shows 4 objects in the Vector, and one by one, starting at (0), the Player whose name was changed fills in right up to the top of the Vector.
    So something is persisting, and I just can't find it.
    The code is hundres of lines, so I hesitate to send it in here. I just hope this somewhat lengthy description tips off someone who might know where to look.
    Thanks a lot
    F

  • Error while activating a routine  "no object list"

    hi
    I am getting a error while activating a routine Rv50c601
    "There is no object list for INCLUDEs"  Please suggest on the error and resoulution
    regards
    Nishant

    Try running program RV80HGEN.
    Regards,
    Naiimesh Patel

  • Error in VBA reference for Adobe Photoshop CS4 Object Library

    Hello,
    I'm using Windows 7 Pro, MS Office 2010 Pro and Creative Suite CS4 (with all updates).
    I will automate Photoshop via Visual Basic for Applications in MS Access.
    Befor using there the Adobe Photoshop CS4 Object Library I must reference it in VBA.
    But when I will du this, I get the message "Error loading DLL".
    When I will manually reference to the WIASupport.8LI File, I get the error: "Cannot reference this file"
    Can you give a tip, how I can solve this problem?
    Regards

    I have the same problem!  I have photoshop cc2014 (which we own) and the object library shows, but not for cs 5.1 (30 day trial).
    Does registering unlock something?
    Help please!!

  • Logical Database in Abap Objects

    Hi to All
    I want do it a program report using a Logical Database.
    Is this possible ??? But when I make a GET <node>, occurs the following error:
             "" Statement "ENDMETHOD" missing.  ""
    I'm doing the following:
    CLASS MONFIN IMPLEMENTATION.
           METHOD TRAER_DATOS.
                   GET VBRK.
           ENDMETHOD.
    ENDCLASS.
    Please, somebody tell me how I use the logical database in Abap Objects.
    Thank you very much
    Regards
    Dario R.

    Hi there
    Logical databases whilst of "some use" are not really part of OO.
    If you want to use a logical database in an abap OO program I would create a special class which just does the get data from your DB and pass this either at record or table level.
    Techniques such as GET XXXX LATE aren't really part of any OO type of application since at Object Instantiation time you should be able to access ALL the attributes of that object.
    As far as OO is concerned Logical databases are a throwback to "Dinosaur Technology".
    Since however modules such as SD and FI are still heavily reliant on relational structures (i.e linked tables etc)  then there is still some limited life in this stuff but for OO try and solve it by another method.
    If you really must use this stuff in OO then do it via a FMOD call and save the data in a table which your method will pass back to your application program.
    You can't issue a GET command directly in a method.
    Cheers
    Jimbo

  • Null and empty string not being the same in object?

    Hello,
    I know that null and empty string are interpreted the same in oracle.
    However I discovered the strange behaviour concerning user defined objects:
    create or replace
    TYPE object AS OBJECT (
    value VARCHAR2(2000)
    declare
    xml xmltype;
    obj object;
    begin
    obj := object('abcd');
    xml := xmltype(obj);
    dbms_output.put_line(xml.getStringVal());
    obj.value := '';
    xml := xmltype(obj);
    dbms_output.put_line(xml.getStringVal());
    obj.value := null;
    xml := xmltype(obj);
    dbms_output.put_line(xml.getStringVal());
    end;
    When creating xml from object, all not-null fields are transformed into xml tag.
    I supposed that obj.value being either '' or null will lead to the same result.
    However this is output from Oracle 9i:
    <OBJECT_ID><VALUE>abcd</VALUE></OBJECT_ID>
    <OBJECT_ID><VALUE></VALUE></OBJECT_ID>
    <OBJECT_ID/>
    Oracle 10g behaves as expected:
    <OBJECT><VALUE>abcd</VALUE></OBJECT>
    <OBJECT/>
    <OBJECT/>
    However Oracle 9i behaviour leads me to the conclusion that oracle
    must somehow distinguish between empty string and null in user defined objects...
    Can someone clarify this behaviour?
    Thus is it possible to test if object's field is empty or null?

    However Oracle 9i behaviour leads me to the conclusion that oracle
    must somehow distinguish between empty string and null in user defined objects...
    Can someone clarify this behaviour?
    Thus is it possible to test if object's field is empty or null?A lot of "fixes" were done, relating to XML in 10g and the XML functionality of 9i was known to be buggy.
    I think you can safely assume that null and empty strings are treated the same by Oracle regardless. If you're using anything less than 10g, it's not supported any more anyway, so upgrade. Don't rely on any assumptions that may appear due to bugs.

  • "cacheHostInfo is null" and Add-SPDistributedCacheServiceInstance : Object reference not set to an instance of an object.

    I am working on a standalone install Sharepoint 2013 (no Active Directory). I found newsfeed feature is not available and checked Distributed Cache service is stopped. When start it “cacheHostInfo is null” is returned.
    I checked the Windows service “AppFabric caching service” is stopped because the default identity “Network Service” not work. Then I change the AppFabric service identity to use “.\administrator” (which is also the sp farm administrator) and the service can
    be started.
    However the “cacheHostInfo is null” when try to start Distributed Cache service in central admin.
    I searched on web and found this blog: http://rakatechblog.wordpress.com/2013/02/04/sharepoint-2013-spdistributedcacheserviceinstance-cachehostinfo-is-null/
    I tried to run the script but it return error:
    Add-SPDistributedCacheServiceInstance : Object reference not set to an
    instance of an object.
    At C:\root\ps\test.ps1:8 char:13
    + $whatever = Add-SPDistributedCacheServiceInstance
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidData: (Microsoft.Share…ServiceInstance:
    SPCmdletAddDist…ServiceInstance) [Add-SPDistributedCacheServiceInstance]
    , NullReferenceException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddDistr
    ibutedCacheServiceInstance
    I am not sure what went wrong. Please give me some idea? Thank you for any comment!

    Can you deploy Active Directory as installing without is not a supported installation scenario - http://support.microsoft.com/kb/2764086.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Open and Close Posting Periods According to G/L Account Assignment Objects

    Hi,
    Can anybody please explain me how configurations related to " Open and Close Posting Periods According to G/L Account Assignment Objects " works in SAP FICO? I am confused about this config.
    Regards,
    Mandeep

    Hi Mandeep ,
    First i would like to tell about fiscal year
    fiscal year is nothing but a financial year of company in sap . it contain 12 normal periods and 4 special periods.In genaral we will call like month but that is sap that is a period. so 12 period for 12 months ok next special period will use in all companies for audit and tax adjustment purpose of previous year.
    coming to the open and close periods.in sap for security purpose we have to open one period like this month july so i opened july period only we cant post the pervious month (june)and we cant post future month lik in (Auguest)ok
    You can close and open periods by transaction ob52.
    In transaction ob52 there are account types
    + Valid for all account types
    A Assets
    D Customers
    K Vendors
    M Materials
    S G/L accounts
    V Contract accounts
    + means all types. if you want to open vendor then enter period from and to according to your fiscal year.
    you cant adjust items in closed period. if you want to then you have to open the period
    For your information.....
    posting periods also open user level tc S_ALR_87003642.
    customization levael OB52.
    Regards
    Kumar

  • Two resultset objects

    IS it possible to define two resultset objects with two different queries inside the same DB class?java.sql.SQLException: Invalid state, the ResultSet object is closed.
         at net.sourceforge.jtds.jdbc.JtdsResultSet.checkOpen(JtdsResultSet.java:299)
         at net.sourceforge.jtds.jdbc.MSCursorResultSet.next(MSCursorResultSet.java:1123)
         at DB5.getDetails(Daily_Quote_Response_report.java:238)
         at Daily_Quote_Response_report.main(Daily_Quote_Response_report.java:74)
    java.util.List items = null;
            String query;
            String query2;
            try {
                query =
                       "select * from oqrep_except_resp_summary";
                query2 = "select * from oqrep_except_resp_detail";
                Statement state = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
                        ResultSet.CONCUR_READ_ONLY);
                ResultSet rs = state.executeQuery(query);
                ResultSet rs2 = state.executeQuery(query2);
              //cannot create two rs objects // ResultSet rs2 = state.executeQuery(query);
                items = new ArrayList();Edited by: bobz on 03-Dec-2009 11:16
    Edited by: bobz on 03-Dec-2009 11:16

    Note: This thread was originally posted in the [Java Programming|http://forums.sun.com/forum.jspa?forumID=31] forum, but moved to this forum for closer topic alignment.

  • Open field in object S_TCODE

    I've deleted a tcode from a role in menu tab. Now when I look at the object S_TCODE in the role it has an open(blank) field. I cannot delete this blank field from the object as S_TCODE shows up only in display mode though you enter the role in change mode. Further I do not see this blank field in the menu tab assuming that the blank field might got transfered from the menu. Please suggest how to remove the blank field from the object?
    Thank you,
    Partha.

    Hi,
    I had some similar issues already. The yellow status of S_TCODE came from a blank entry in the menu. If the menu is big, its hard to find that entry, which has to be removed from  the roles menu. As a workaround to identify that 'blank' entry check table agr_hier for that role. Select Reporttype=TR and Report=  (means leave the field empty and set as operator '='.
    In the field Parent_ID you can identify now the node under which this entry is located and with the OBJECT_ID you can find the text in table AGR_HIERT (with that text you can use the search function in pfcg to find that entry(ies).
    Then simpyl delete these entries from the menu and merge the authorizations. S_TCODE shall be 'green' afterwards.
    b.rgds, Bernhard

  • Can't print OLE objects when 9i report developed in 6i

    Hi,
    I am migrating my reports from 6i to 9i. I just open report in 9i which is already developed in 6i and run the report it don't print OLE objects. It shows when I run report in Designer Preview, but in printing it shows blank
    --Vijay                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hello,
    The answer is in the Migration FAQ :
    When I open an Oracle6i Reports Developer report in the Oracle Reports Builder 10g and run my Web layout, I get an empty Web page in my browser.
    http://www.oracle.com/technology/products/reports/htdocs/faq/faq_migration.htm#368
    Regards

  • Questions on ADF View Objects, Links and Iterators

    I have a number of questions regarding using ViewObjects in applications where there are alot of relationships between tables.
    First, lets say that I have ViewObject SomeView that was added to the App Module (AM) as VO1. And because it has a number of "detail" records that have to be iterated through in a "report like" view it has those other VO's added under it as "children" in the AM.
    So I have
    VO1 (an instance of SomeView)
    --> VO2 (an instance of some other view)
    --> VO3 (an instance of some other view)
    that is used on pages where only a single VO1 is shown at a time.
    Now because I had another page I wanted to make that had a listing of all SomeView objects. Some of the fields in SomeView are foreign keys to records in VO2 and VO3 and while I don't want to show all the fields from VO2 and VO3, I do want to show a name field from each rather than just the foreign key.
    My experience (though I've never read this anywhere) tells me that when doing a "table" that is a list of rows from a VO, you can't display info from the child VO's because the child VO's are on whatever record corresponds to the "currentRow" in the parent VO and just displaying the rows in a rangeSet doesn't make each the "currentRow" so even we display 10 records in a for loop, the "currentRow" is just one, and the child VO's iterators aren't moved as we go through the for loop. (Can someone confirm if I am correct on this conclusion????)
    So the only way I know of to show some field from a related table in each row is to make the VO have the entity objects from the related tables be part of the view as references. Is this the only way?
    If I do that on a view that didn't have other views as children defined in the AM I don't have any problem and it works like I want.
    But if I do it on a view that did have other views as children defined in the AM it makes the page(s) using that view with the children iterators behave badly. Half the information quits showing up, etc.
    For example, ... if I go to the "SomeView" which was defined with only one entity object association, and I add the entity objects (that are the basis of instances of VO2 and VO3 ) as referenceable only, it totally breaks the page where I display a single VO1 and use it's VO2 and VO3 children. IS THIS NORMAL OR AM I MISSING SOMETHING?
    So, is the solution that I have to have more view objects defined for different purposes ?
    Can anyone give any general guidelines for when/where to use different view objects vs. when to use different iterators. I'm not having much luck with using secondary RSI's and haven't found much info on them.
    Also, how about issues of naming iterators that are in various binding containers (ie. UI Model for a page). If I do and LOV it creates an iterator and gives it a default name like ViewNameIterator1. If I already have a different page that uses a regular (non LOV) iterator with that name, and the user goes back and forth between those pages, is that a clash?
    Finally, I've read a couple of Steve Muench's blogs on View Link consistency but I'm not sure what the rules are on when it applies and doesn't. How you turn it on or off, etc. One of his examples in http://radio.weblogs.com/0118231/2004/02/27.html talks about it in the context of two view objects that are NOT typically "linked" in a master/detail kind of way. Like an AllDepartments and a DepartmentsLessThan view. Do you have to create a View Link between them to have results of one be reflected in the other if they aren't used in the same page in a web app? Or does it happen automatically (with the caveat that you have to do the rowQualifies method). Just feels like I'm missing some pieces.
    Thanks in advance,
    Lynn

    Hi,
    I am also interested in a best-practice note from oracle.
    Currently we store history in seperate history tables for columns that changed. All this implemented in our BaseEoImpl overriding the EntityImpl.prepareForDML().
    Thanks

  • Questions on scripts, tables & transfer objects between clients.

    1. In script, how to use the same print program for two different layouts? with procedure.!
    2. Why cant sapscripts be client independent.?
    3. Want to maintain a table in dev server and if i update the data, it should simultanously update in Quality and Production servers. How? please explain in details.
    4. How to transfer object between clients.? explain.
    Points will be promptly rewarded for HELPFULL answers.!

    Hi!
    3. With SE01, you can create a transport request for all table entries.
    SE01 - Create button - Workbench request - Give description and save
    Select the created request and click on Display object list.
    Click on Display - Change button
    Insert line button
    ProgID: R3TR
    Object: TABU
    Object name: Z_YOUR_TABLE
    Double click on the table name
    Insert line
    Key: *
    Save everything
    Release the transport in SE10 transaction and transport with STMS transaction.
    Regards
    Tamá

  • Open as linked smart object

    Hello,
    iam looking for a solution to open files in a folder
    and copy then into a document.
    Its working good, but i need the files to be linked smart object.
    Anyone knows a solution ?
    Here my Code so far:
    See in line 33. Convert to smart object: ?
    var file = new File('C:/User_MY PATH.PSD'),
    docRef = open(file);
    // Use the path to the application and append the samples folder
    var samplesFolder = Folder('C:/USERS_MY FOLDER');
    //Get all the files in the folder
    var fileList = samplesFolder.getFiles()
      // open each file
      for (var i = 0; i < fileList.length; i++)
      // The fileList is folders and files so open only files
      if (fileList[i]instanceof File)
      open(fileList[i])
      // use the document name for the layer name in the merged document
      var activeDocName = app.activeDocument.name;
      var targetDocName = activeDocName.substring(0, activeDocName.lastIndexOf("."));
      // Copy the Document
      app.activeDocument.selection.selectAll()
      //convertToSmartObject(); THIS ISNT WORKING - CONVERT IT ?
      app.activeDocument.selection.copy()
      // don’t save anything we did
      app.activeDocument.close(SaveOptions.DONOTSAVECHANGES)
      //Select specific layer to paste the copy, this is to make sure the layers are in a specific position
      var doc = app.activeDocument;
      doc.activeLayer = doc.artLayers.getByName("bgr");
      //Paste Document
      app.activeDocument.paste()
      app.activeDocument.activeLayer.name = targetDocName

    Use scriptlistener:
    var idPlc = charIDToTypeID( "Plc " );
        var desc2 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
        desc2.putPath( idnull, new File( "C:\\Photos\\myPhoto.psd" ) );
        var idLnkd = charIDToTypeID( "Lnkd" );
        desc2.putBoolean( idLnkd, true );
        var idFTcs = charIDToTypeID( "FTcs" );
        var idQCSt = charIDToTypeID( "QCSt" );
        var idQcsa = charIDToTypeID( "Qcsa" );
        desc2.putEnumerated( idFTcs, idQCSt, idQcsa );
        var idOfst = charIDToTypeID( "Ofst" );
            var desc3 = new ActionDescriptor();
            var idHrzn = charIDToTypeID( "Hrzn" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc3.putUnitDouble( idHrzn, idPxl, 0.000000 );
            var idVrtc = charIDToTypeID( "Vrtc" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc3.putUnitDouble( idVrtc, idPxl, 0.000000 );
        var idOfst = charIDToTypeID( "Ofst" );
        desc2.putObject( idOfst, idOfst, desc3 );
    executeAction( idPlc, desc2, DialogModes.NO );

Maybe you are looking for

  • How can I use my iPod Touch as a remote for iTunes, while connected via USB?

    I was wondering if I could use my iPod touch as a remote/iTunes extension while it is connected to my computer via usb. It would be highly practical to control my music from there, since it is charging right by my side while I'm at my computer. Remot

  • Uninstalling Extension that won't go away

    I have Dreamweaver 8 and installed Indigo Help Publisher for Dreamweaver to try it out. After evaluating it, I uninstalled it, but it didn't completely uninstall. I've reinstalled and uninstalled it several times to no avail. When I start DW, I get t

  • Problem in saving values using transaction variant for IR02 transaction

    Hi All,               I need a help on creating the transaction variant. Please find the scenario below. In my Program, I had given a link to change the work center capacity (Intervals and Shifts) in IR02 transaction by BDC. 1.       Created a transa

  • How to Check for Default Applet Selection

    Hello all, I'm new to the Java Card world, so I'll warn you in advance my questions will be basic. I appreciate your willingness to help us newbies out. I've been given a smart card and applets to dissect an reverse engineer. Currently, Applet 1 is l

  • M.youtube.​com "Watch Video" link does nothing

    I have a 8310 on AT&T running 4.5.0.110 OS. I have the BB browser selected with BB emulation and all option checkboxes selected. This was working but now when I click a link in m.youtube.com I get nothing. Nada. No reaction to the link being selected