How object references work

Hi guys,
class A{ public void aM(int i) { 
System.out.println(this.toString()+" Iam a " + i);} }
class B extends A{ public void bM(int i) { 
System.out.println(this.toString()+" Iam b "+ i); } }
class MyClass{ public static void main(String arg[]){
A a = new A(); B b = new B();
a.aM(1); //calls the method in object 'a'
b.bM(2); //calls the method in object 'b'
a = b; // compiles properly
a.aM(3); //calls the method in object 'b'
a.bM(); // compilation error cannot resolve symbol
b = a; // compilation error incompatible types
b = (B)a; // compiles properly
b.aM(4); // calls the method in object 'b'
b.bM(5); // calls the method in object 'b'
How object references works
in the above class if i assign subclass reference to superclass reference variable it gets compiled, but superclass reference to subclass reference variable give compilation error without explicit casting;
why this behaviour?
what compiler checks at compilation time and what JVM checks at runtime?
In the method calls also it is calling methods on the object 'b', why?
Thanks.

Sorry, but I don't want to read that code. The
formatting makes it very hard to follow the flow.Sorry , please check this code
class A{
  public void aM(int i) {
   System.out.println(this.toString()+" Iam a " + i);
class B extends A{
  public void bM(int i) {
   System.out.println(this.toString()+" Iam b "+ i);
public class MyClass{
  public static void main(String arg[]){
     A a = new A();
        B b = new B();
     a.aM(1); //calls the method in object 'a'
     b.bM(2); //calls the method in object 'b'
     a = b; // compiles properly
     a.aM(3); //calls the method in object 'b'
     a.bM(); // compilation error cannot resolve symbol
     b = a; // compilation error incompatible types
     b = (B)a; // compiles properly
     b.aM(4); // calls the method in object 'b'
     b.bM(5); // calls the method in object 'b'
}

Similar Messages

  • How to get caller object reference from a method

    Hi,
    I am working a already existing Java Swing project, now I got a problem, in a method I need to get the caller object reference otherwise, I can't succeed this operation. So please tell me a way how to get the caller object reference from a method. that method would be static or regular method anything will do for me.
    Edited by: navaneeth.j on Jan 29, 2010 11:20 PM

    navaneeth.j wrote:
    Actually my doubt is, I have a method "addition" method, which is using by many classes so my requirement is in the addition method I want to write a code snippet which will identify and get the the caller object. Actually I tried Reflection.getcallerclass but there I am getting "CLASS" object not the actual object reference, but I want object reference.
    Actually we have a huge project which is writen plain JAVA, so in this project the authors written the Database connection package for single database transaction. so now we are using this project source code for JSF application in this web application the DB package has serve based on the dynamic db connection parameters, so if we want to change this package fully means need to solve the dependency problem in hundreds of classes, so my point is if I can access the caller object in the DB package when ever it gets called by any class from any where of the project. So actually I liked Reflection.getcallerclass, the way of implementation perfectly works for me but it is not giving caller object reference, if something gives the caller object then I can get the DB connection parameters then there is no need to pass the parameters in the hierarchy.You can add a parameter (of type Object) to your addition() method
    and everywhere you call the addition() method also pass this (which from the POW of the addition() method will be a reference to the calling class instance).
    There may be alternative solutions
    but none that require less effort.

  • WFA 3.1RC1 throws "Object reference not set to an instance of an object", worked in 3.0P1

    I am running a custom workflow to create volumes that has worked since WFA 2.x, and which works well in 3.0P1. With WFA 3.1RC1 it throws this error when attempting to apply a quota to the volume:   INFO  [Apply Quota Policy to Volume or Qtree] Started Quota resize on volume post_wfa31rc1_test2_w_mirror on vserver MySVM   ERROR [Apply Quota Policy to Volume or Qtree] Command failed for Workflow 'Create Volume (Schwab)' with error : Object reference not set to an instance of an object.  INFO  [Apply Quota Policy to Volume or Qtree] ***** Workflow Execution Failed ***** I have executed the PS commands from this code block in a PS shell with no errors. Has anyone else seen a similar issue with 3.1RC1?     Scott Lindley

    I have narrowed the problem down to a single command and can reproduce the problem very easily. However, I can't seem to fix it. But I believe importing this single custom command into both a WFA 3.0P1 and WFA 3.1RC1 system will easily show that it works in 3.0P1 and throws the odd 'Object reference not set to an insance of an object' error. I say that is an odd error because I'm only used to seeing that error at Preview time referring to an object reference in a Command Parameter field of a workflow. I know how to deal with that issue. However here, the error appears at the end a PowerShell command. Actually, the PowerShell command appears to me to execute entirely and correctly. It is just that at the end of running this exception error is thrown and that causes the command (and workflow if running within a workflow) to fail. But the comamnd correctly adds the 'default' quota policy to the volume and even enables quota resize as it should. So it works, but still blows up the workflow it is within. I'm going to attempt to attach these three things here:    1) screenshot showing the command running (with Command Test Button) fine under WFA-3.0P1,    2) a screenshot showing the command running but throwing the error on a WFA-3.1RC1 system    3) the ,dar file holding just the command: "Apply Quota Policy to Volume or Qtree" (I added .txt to the end of .dar file name) ------1) running OKay on 3.0P1  -------------------------- 2) running with the ERROR on WFA 3.1RC1  SOME NOTES: My lab environment where I re-created the problem:    The WFA 3.0P1 system is a Windows 2008R2 server that happens to have the original PowerShell 2.0 on it    The WFA 3.1RC1 system is a Windows 7 system that I have updated PowerShell to 4.0. The customer environment:    I'm less certain of details (maybe Scott can fill in)    The version of PowerShell is TBD (guessing 2.0) , but they are running the same PS version for both 3.0P1 and 3.1RC1 because they are upgrading/downgrading WFA on the same system  

  • How to convert from Finder Object reference to POSIX path

    I'm new to AppleScript. I'm super close to getting what I need done, but I've ran across a snag in the middle.
    The error I'm getting is Can’t make quoted form of POSIX path of item 1 of {«class docf» \"filename\" of «class cfol» \"foldername\" of «class cfol» \"Desktop\" of «class cfol» \"Username\" of «class cfol» \"Users\" of «class sdsk» of application \"Finder\"} into type Unicode text. the problem area is highlighted and notated below. I've looked all around online but can't find what I need.
    Thanks in advance for any and all help!
    set text item delimiters to "."
    tell application "Finder"
      set theFilestoChoose to every item of (choose file with prompt "Please select the file(s) you would like to move and rename" with multiple selections allowed) as list
      display dialog "Would you like to move these files to an existing folder and then rename them, or create a new folder and then rename them?" buttons {"Move to an existing folder and rename", "Create a new folder and rename"}
      if result = {button returned:"Move to an existing folder and rename"} then
      set firstnewname to "Aauuttoommaattoorr"
      repeat with index from 1 to the count of theFilestoChoose
      set theFilesChosenbeingrenamedfirsttime to item index of theFilestoChoose
      set filenamecount to text items of (get name of theFilesChosenbeingrenamedfirsttime)
      if number of filenamecount is 1 then
      set fileextension to ""
      else
      set fileextension to "." & item -1 of filenamecount
      end if
      set the name of theFilesChosenbeingrenamedfirsttime to firstnewname & index & fileextension as string
      end repeat
      log theFilesChosenbeingrenamedfirsttime
      set choosingtheplacetomove to choose folder with prompt "Select the folder to move to"
      set thechosenfoldersname to name of folder choosingtheplacetomove -- sets the folder name as text
      set AppleScript's text item delimiters to {"-"}
      set Numberofthemonthatthebeginningofthefoldername to text item 1 of thechosenfoldersname as string -- for later to append the number back on without having to ask again!
      set shortenedname to text item 2 of thechosenfoldersname as string
      set the name of choosingtheplacetomove to shortenedname as string
      set thefolderstemporarynameaslocation to choosingtheplacetomove as string
      move theFilestoChoose to folder thefolderstemporarynameaslocation
      log theFilestoChoose
      set allfilesindestinationfolder to every file in choosingtheplacetomove as alias list --
      set aInitials to the text returned of (display dialog "Whose camera were this/these pictures taken on?" default answer "")
      set filteredList to my filterList(allfilesindestinationfolder, aInitials) as list
      log filteredList
      -- everything above this is correct so far and works perfect
      --TROUBLE SECTION BELOW
      set theSortedfilterList to (sort filteredList by creation date) -- something happens here with the theSortedfilterList that makes it unintelligible to convert to POSIX later. but I need the files in the order that this line puts them.
      log theSortedfilterList
      set timetorenamelasttime to theSortedfilterList
      set newbasename to shortenedname
      repeat with index from 1 to the count of timetorenamelasttime
      set theonefile to item index of timetorenamelasttime
      set theonefilenamecount to text items of (get name of theonetwothreefile)
      if number of theonefilenamecount is 1 then
      set fileextensionone to ""
      else
      set fileextensionone to "." & item -1 of theonefilenamecount
      end if
      tell application "System Events" to set CreaDate to creation date of file theonefile
      set CreaDate2 to CreaDate as text -- need to trim down to the first 10 characters and eliminate the "-"
      set AppleScript's text item delimiters to {""}
      set shorteneddatename to text items 1 thru 10 of CreaDate2 as string
      set the name of theonefile to shorteneddatename & {"-"} & newbasename & {"-"} & aInitials & {"-"} & index & fileextensionone as string
      end repeat
      --Trouble section above
      set the name of choosingtheplacetomove to Numberofthemonthatthebeginningofthefoldername & "-" & shortenedname as string -- returns the month prefix to the foldername
      else if result = {button returned:"Create a new folder and rename"} then
      set repeatConfirmation to true --Boolean to decided if script should be repeated; default is to repeat
      repeat while (repeatConfirmation = true) --Repeat if Any Tests Are Failed
      set thefirstquestion to choose from list {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"} with title "Event Month Selection" with prompt "Select the month in which the event started. Select only one month:"
      set theMonthAnswer to result
      if theMonthAnswer = false then --"For historical reasons, choose from list is the only dialog command that returns a result (false) instead of signaling an error when the user presses the “Cancel” button."
      set repeatConfirmation to false
      set exitingeventmonth to display dialog ("You are exiting selecting the event month phase of the program. You will need to manually fix this decision") buttons {"OK"} with title "Exiting Event Month Selection"
      if button returned of exitingeventmonth = "OK" then
      set theMonthAnswer to ""
      end if
      else
      set confirmationanswer to display dialog "You selected " & theMonthAnswer & ", is this correct? " buttons {"Yes, that's correct.", "No, the picture(s) are from a different month."} with title "Confirm Event Month Selection"
      if button returned of confirmationanswer = "Yes, that's correct." then
      set repeatConfirmation to false
      else
      display dialog ("That's okay, you can select another again!") buttons {"OK"} with title "Return to Event Month Selection"
      end if
      end if
      end repeat
      log theMonthAnswer
      if theMonthAnswer = "" then
      set monthtonumber to "You have cancelled this action."
      log monthtonumber
      else if theMonthAnswer = {"January"} then
      set monthtonumber to "01"
      log monthtonumber
      else if theMonthAnswer = {"February"} then
      set monthtonumber to "02"
      log monthtonumber
      else if theMonthAnswer = {"March"} then
      set monthtonumber to "03"
      log monthtonumber
      else if theMonthAnswer = {"April"} then
      set monthtonumber to "04"
      log monthtonumber
      else if theMonthAnswer = {"May"} then
      set monthtonumber to "05"
      log monthtonumber
      else if theMonthAnswer = {"June"} then
      set monthtonumber to "06"
      log monthtonumber
      else if theMonthAnswer = {"July"} then
      set monthtonumber to "07"
      log monthtonumber
      else if theMonthAnswer = {"August"} then
      set monthtonumber to "08"
      log monthtonumber
      else if theMonthAnswer = {"September"} then
      set monthtonumber to "09"
      log monthtonumber
      else if theMonthAnswer = {"October"} then
      set monthtonumber to "10"
      log monthtonumber
      else if theMonthAnswer = {"November"} then
      set monthtonumber to "11"
      log monthtonumber
      else if theMonthAnswer = {"December"} then
      set monthtonumber to "12"
      log monthtonumber
      end if
      set theNameofFoldertoMake to text returned of (display dialog "Please enter the name of the new folder you are creating:" default answer "" with title "New Folder Name")
      set LocationOfNewFolder to choose folder with prompt "Choose the location of the new folder you are creating:"
      set theNewNameofFoldertoMake to monthtonumber & "-" & theNameofFoldertoMake
      set newfolderaction to make new folder at LocationOfNewFolder with properties {name:theNewNameofFoldertoMake}
      move theFilestoChoose to newfolderaction
      end if
    end tell
    --function
    on filterList(allfilesindestinationfolder, aInitials)
      set patterns to {aInitials as string, "Aauuttoommaattoorr"}
      set output to {}
      repeat with aFile in the allfilesindestinationfolder
      repeat with aPattern in patterns
      set filepath to aFile as string
      if filepath contains aPattern then
      set end of the output to aFile
      exit repeat
      end if
      end repeat
      end repeat
      return output
    end filterList

    Okay, so you wanted the debugging and error messages. Thank you for the coaching. Here is what I get from the following line:
    set theSortedfilterList to (sort filteredList by creation date)
    log theSortedfilterList
    Log returns:
    (*document file Aauuttoommaattoorr3.AVI of folder SnowDay of folder Desktop of folder Username of folder Users of startup disk, document file Aauuttoommaattoorr2.MOV of folder SnowDay of folder Desktop of folder Username of folder Users of startup disk, document file Aauuttoommaattoorr1.mov of folder SnowDay of folder Desktop of folder Username of folder Users of startup disk*)
    set pxFile to POSIX path of ((theSortedfilterList) as alias)
    Error: "Can’t make {«class docf» \"Aauuttoommaattoorr3.AVI\" of «class cfol» \"SnowDay\" of «class cfol» \"Desktop\" of «class cfol» \"Username\" of «class cfol» \"Users\" of «class sdsk» of application \"Finder\", «class docf» \"Aauuttoommaattoorr2.MOV\" of «class cfol» \"SnowDay\" of «class cfol» \"Desktop\" of «class cfol» \" Username \" of «class cfol» \"Users\" of «class sdsk» of application \"Finder\", «class docf» \"Aauuttoommaattoorr1.mov\" of «class cfol» \"SnowDay\" of «class cfol» \"Desktop\" of «class cfol» \" Username \" of «class cfol» \"Users\" of «class sdsk» of application \"Finder\"} into type alias." number -1700 from {«class docf» "Aauuttoommaattoorr3.AVI" of «class cfol» "SnowDay" of «class cfol» "Desktop" of «class cfol» "Username" of «class cfol» "Users" of «class sdsk», «class docf» "Aauuttoommaattoorr2.MOV" of «class cfol» "SnowDay" of «class cfol» "Desktop" of «class cfol» "Username" of «class cfol» "Users" of «class sdsk», «class docf» "Aauuttoommaattoorr1.mov" of «class cfol» "SnowDay" of «class cfol» "Desktop" of «class cfol» "Username" of «class cfol» "Users" of «class sdsk»} to alias
    That is why I labeled it with Finder Object reference won’t return POSIX path, because I tried what was suggested about using the POSIX path of line. I thought seeing the lines above and around it would help set the context.
    So I need those files, but I need them sorted by creation date so that they’re in that order for the next renaming step.

  • How to reference the Parent view Object attribute in Child View object

    Hi , I have the requirememt to generate Tree like struture to display Salary from joining date to retirement date in yearly form.I have writtent two Pl/SQL function to return parent node and child nodes(based on selected year).
    1.First function --> Input paramter (employee id, retirement date , joining date) --> return parent node row with start_date and end_date
    2. 2nd function --> input paarmter(employee id, startDate, end_date) --> return child node based on selected parent node i.e. start date and end date
    I have created two ADF view object based on two function return
    Parent Node --> select * from Table( EUPS.FN_GET_CONTR_SAL_BY_YR(employeeId,retirement Date, dateOf joining)) ;
    Child Node --> select * FROM TABLE( EUPS.FN_GET_CONTR_SAL_FOR_YEAR( employeId,startDate, endDate) ) based on selected parent node.
    I am giving binding variable as input for 2nd function (child node) . I don't know how to reference the binding variable value in child view from parent view.
    Like I have to refernce employeId,startDate, endDate values in 2nd function from parent view object. some thing like parentNode.selectedStart_date parentNode.employeeId.
    I know we can achive this writing the code in backing bean.But i want to know how can we refernce parent view object attribute values in child view object using Groovy or otherway?
    I will appreciate your help.
    Thanks

    I have two view com.ContractualSalaryByYearlyView for Parent Node and com.ContractualSalaryByYearlyView for child Node.
    I have created view link(ContractualSalYearlyByYearViewLink) betweem two view by giving common field empId, stDate , endDate.(below is the view link xml file).
    I tried give the binding attribute values using parent object reference like below in com.ContractualSalaryByYearlyView xml file but getting error
    Variable ContractualSalaryByYearlyView not recognized.I think i am using groovy expression.
    Thanks for quick response.
    com.ContractualSalaryByYearlyView xml
    <ViewObject
    <DesignTime>
    <Attr Name="_isExpertMode" Value="true"/>
    </DesignTime>
    <Variable
    Name="empId"
    Kind="where"
    Type="java.lang.Integer">
    <TransientExpression><![CDATA[adf.object.ContractualSalaryByYearlyView.EmpId]]></TransientExpression>
    </Variable>
    ContractualSalYearlyByYearViewLink.xml file
    <ViewLinkDefEnd
    Name="ContractualSalaryByYearlyView"
    Cardinality="1"
    Owner="com.ContractualSalaryByYearlyView"
    Source="true">
    <DesignTime>
    <Attr Name="_finderName" Value="ContractualSalaryByYearlyView"/>
    <Attr Name="_isUpdateable" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item
    Value="com.ContractualSalaryByYearlyView.EmpId"/>
    <Item
    Value="com.ContractualSalaryByYearlyView.StDate"/>
    <Item
    Value="com.ContractualSalaryByYearlyView.EndDate"/>
    </AttrArray>
    </ViewLinkDefEnd>
    <ViewLinkDefEnd
    Name="ContractualSalaryForYearView"
    Cardinality="-1"
    Owner="com.ContractualSalaryForYearView">
    <DesignTime>
    <Attr Name="_finderName" Value="ContractualSalaryForYearView"/>
    <Attr Name="_isUpdateable" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item
    Value="com.ContractualSalaryForYearView.EmpId"/>
    <Item
    Value="com.ContractualSalaryForYearView.StDate"/>
    <Item
    Value="com.ContractualSalaryForYearView.EndDate"/>
    </AttrArray>
    </ViewLinkDefEnd>

  • How do I get an activeX object reference from a LabVIEW ActiveXContainer ref?

    How do I get an activeX object reference from a LabVIEW ActiveXContainer ref?
    I'm trying to control an ActiveX object (a Web Browser) from another VI and need to get the object reference programmatically. I can get the LabVIEW ActiveXContainer reference, but am lost on how to get the reference for the object _inside_ the container.

    Hi Lee,
    The reference to the container is actually also accessing the object inside the container. Use the Property Node and Invoke Node to access properties and launch methods for the object. I've attached a small example that passes the reference to a SubVI and invokes a method inside the SubVI.
    - Philip Courtois, Thinkbot Solutions
    Attachments:
    WebContainer.zip ‏21 KB

  • Menu Object; MANUAL option. What is this, and how does it work?

    What is this... and, how does it work? Can't find documentation on this.

    My knee-jerk reaction is, "are f'n kidding me?"... but, of course, you're not.
    I must say, that is an incredibly useless option. How would that 'option" differ from simply making a text object (or text/rectangle/image combo or group) and creating a link?
    What got me looking at this option was the hope to find some way to insert a dynamic "field" that could be used on a master page to display the current page title (of a page based on that master). Something similar to Word (and other applications) that you can enter information into a document property and then insert that information anywhere within the document by using a field code for that info. I don't know if there is an HTML code that could be used to accomplish this, in this case. Something that would refer to the page title.
    Thanks for the info none-the-less.

  • Close reference needed for step object reference open? If so, how?

    Hello,
    We are using an activex method call to open an object reference to a step and programatically rename it.  This is done many many times during our test run, thousands.  We ran into an "out of memory" problem we had never seen before during a 72 hour test run, and in hunting down any possible memory leaks, I am wondering if a corresponding close is needed for the step reference open we are doing, and how.  I have hunted around the different methods/properties, and can't seem to find if there is a step reference close.  I have attached the specify module screen of the activex call which opens the step reference.
    Thanks for any replies
    David Jenkinson
    Message Edited by david_jenkinson on 06-11-2007 05:07 PM
    Attachments:
    step reference specify module.png ‏25 KB

    Hi David,
    Setting a reference to nothing in TestStand will close it. However, if you are assigning a new value to the local it also frees the memory associated with the original value, making it so you don't need to assign it to nothing. I don't believe the source of the leak is in this step.
    Test Engineer - CTA

  • How does Reference Field work?

    Hi All,
    I have short of problem knowing how reference field works. I have one field in ABAP query: MBEW-STPRS. The field type is CURR and it have reference field T001-WAERS.
    In query I made, the currency isn't occurs although I have set it to be display. I try to look how this reference field works in any source but can't find any answer. May be some of you can give me a little explanation.
    Thank you so much
    Regards
    Hadi

    Hi,   
          Reference fields work in the following way,
    When you say quantity is 100, what it refers to - 100 pc, 100 bundles or 100 kg or 100 metres??? The unit of qty defines whether it is PC, KG, M etc...
    In the database, SAP stores all amount values with 2 decimal places. But when SAP reads it, it interprets it based on the currency associated with the amount field.
    We require reference fields to Currency/Quantity fields as they are meaningless with out having the units.
    Ex: If we say, i paid 100. How can we figure out if he had paid 100 paise or 100 rupees.
    So, units are must.
    In case of quantity field QUAN, reference field will be always of type UNIT,
    currency field CURR, reference field will be always of type CUKY.
    It is mandatory to specify reference fields when we create fields of quantity/currency type in data base tables.
    Hope this will clear you.
    Thanks & Regards,
    Pavan.

  • Referenced objects : how does it work ?

    Hello
    I would like to design a table, with 2 rows.
    Within the first row, a combo modifies the content of the second colum regarding its value.
    I believe I should use referenced objects (under the Referenced Objects nod in hierarchie tab), because "A referenced object is an object that is added to a form only when it is required", but I do not understand how it works.
    I've added a subform to the tree "referenced objects" ; using javascript let me access this subform, but when previewing the code does not work
    would anybody point me a link/a doc out ?
    thanks a lot !

    You gotta throw use a bone here... How does what work? More info please.

  • Exchange Object Linkage - How does it work?

    Hi,
    I have a question regarding the following Standard Work Manager Delta Update behavior:
    A Work Order in the Work Manager is updated, when the description of the Work Order has been changed in SAP.
    However, a Work Order is not updated, when the description of the Functional Location of the Work Order has been changed in SAP.
    I did some reading and I found something called "Exchange Object Linkage Settings" that sounds like it should be used for the use case above. The problem is, that it does not seem to work as I would expect.
    Here is some description from the smp_agentry_sap_framework.pdf, page 78:
    Exchange Object - Linkage Settings The Linkage Settings tab allows the exchange objects that are linked together to communicate with each other. The communication is one-directional, with the exchange object sending information to the object(s) listed in the Linked Exchange Objects List. When there is a value change to the exchange object, that value change information is passed on to the linked exchange objects. The linked exchange objects then go through additional processes related to the value change.
    In the Config Panel, one can see that in the Standard Work Manager, there is a linkage between Functional Location and Workorder:
    According to the above description, I would expect that, when changing the Functional Locations description, that information is passed to all Workorders with that Functional Location.
    BUT HOW? It is not entirely clear to me how and what information is passed where. I would expect, that in the end, all related entries in the workorder exchange table will be updated with a new time stamp. (How else could the client get the information that the workorder is to be updated?)
    This is not what I can see! When changing the Functional Locations description in SAP, I see that the Functional Locations exchange table entry is updated, but the corresponding Work Orders exchange table entry is not changed.
    Does anybody have an idea how this feature is supposed to work? Maybe, there are some configuration steps necessary? Any input on the would be highly appreciated.
    Regards, Daniel
    This question came up in another discussion, I hope it will get a better visibility and hopefully some helpful answers in this seperate discussion.

    Hi Daniel,
       The high level process steps are as follows :
    Process main exchange object, in this case Functional Location, update exchange table with time-stamp.
    Check for linked Exchange Objects, in this case there is one object "SWM60_WORK_ORDER"
    Process linked exchange object 'SWM60_WORK_ORDER' using Synchronous Linkage process
    Identify all the Work Orders which is associated with above Functional Location
    Process each Work order by satisfying all filters from the Work Order Exchange Object
    Update Work Order Exchange table with the proper time-stamp
    Hope this will help.
    Regards
    Syam

  • Iam Running an Application it is running and working fine in Firefox where as Chrome pushing an error stating "Object reference not set to an instance of an object."

    Iam Running an Application it is running and working fine in Firefox where as Chrome pushing an error stating "Object reference not set to an instance of an object."

    This forum is for discussing technical documentations on Microsoft's web site.
    If you need help with an app, contact its author.
    Visual C++ MVP

  • SAP BW Universe OLAP @prompt LOV using object reference not working

    I have tried to follow Didier MAZOUÉ's "[OLAP universes best practices|https://boc.sdn.sap.com/node/20081]" document to create calculated measure in a OLAP universe built on top of a BW cube directly. The objective is to get the revenue figure from the same period of the previous year. I wanted to be able to have a LOV to specify a period when the object is used in a webi report.
    When I hard coded the LOV as a data set as displayed in the following example  (  {'[CD2007009]','[CD2007010]'}  ) The prompt worked as expected.
    (PARALLELPERIOD(.[LEVEL01],1,[0FISCPER].@Prompt('Period?',A,{'[CD2007009]','[CD2007010]'},mono,free)),[Measures].[0G_AERLOS])</EXPRESSION>
    When I build my expression using an object referece as ( 'TimeFiscal year period' ), I was given an error msg saying "invaid prompt definition". I verified my spellings and syntax and they were correct based on the examples provided by the best practice document.
    (PARALLELPERIOD(.[LEVEL01],1,[0FISCPER].@Prompt('Period?',A,'TimeFiscal year period',mono,free)),[Measures].[0G_AERLOS])</EXPRESSION>
    Is there anything obvious that I missed. Or there are some extra configuration I have to do on SAP BW or Universe side?

    Hi  Mr. MAZOUÉ,
    After a few days of struggling with this particular prompt issue, I finally figured out what was wrong with it. The object reference in the @prompt function is not able to process object references in a subclass correctly.
    For example:
    @Prompt('Period?','A','TimeFiscal year periodL01 Fiscal year period',mono,free)
    The 'Fiscal year period' is a subclass under the main class 'Time'. If you use this prompt function in a MDX expression, it parse correctly. But it generates a prompting failure when referencing the object with the embeded prompt function in a webi report.
    However, if I move the 'L01 Fiscal year  period' object underneath the 'Time' class and change the prompt as @Prompt('Period?','A','TimeL01 Fiscal year period',mono,free). I was able to get a list of values when I designed a webi report using the object.
    This seems to me is a limitation from the current OLAP Universe implementation.
    Looking forward to your feedbacks!
    thanks

  • ExternalInterface: pass object reference across interface - how?

    I want to invoke methods on specific Javascript or
    ActionScript objects through calls across the ExternalInterface
    barrier. I would like to be able to do this either AS -> JS or
    JS -> AS.
    So I would like to pass an object reference across the
    interface. I'm not sure exactly what *is* getting passed (is it the
    serialized value of the object?), but it doesn't seem to work as an
    object reference.
    Here's a notional code sample. I have two symmetric object
    definitions, one in Javascript, one in ActionScript. During
    initialization, one instance of each object will be created and
    given a pointer to the other. Then they should each be able to
    invoke a method on the other to "do stuff".
    //----------[ code ]---------------------------------
    //--- Javascript ---
    class JSobj {
    var _asObj;
    JSobj.prototype.setASObj = function(obj) { _asObj = obj; }
    JSobj.prototype.callASObj = function(foo) {
    callASObjectMethod(_asObj, foo); } // does: _asObj.asMethod(foo);
    JSobj.prototype.jsMethod = function(bar) { /* do stuff */ }
    function callJSObjectMethod(obj, args) { obj.jsMethod(args);
    //--- ActionScript ---
    class ASobj {
    var _jsObj;
    public function set jsObj (obj:Object):void { _jsObj = obj;
    public function callJSObj (foo:Number):void {
    ExternalInterface.call("callJSObjectMethod", _jsObj, foo); } //
    does: _jsObj.jsMethod(foo);
    public function asMethod (bar:Number):void { /* do stuff */
    function callASObjectMethod (obj:Object, args) {
    obj.asMethod(args); }
    ExternalInterface.addCallback("callASObjectMethod",
    callASObjectMethod);
    //----------[ /code ]---------------------------------
    My workaround is to pass a uint as an opaque handle for the
    object, then resolve it when it is passed back. I'd rather pass a
    real reference if possible. Is there a way to pass object
    references between JS and AS?
    Thanks,
    -e-

    It's an object of a class that extends Object. I guess the answer is no then.
    Thanks for your answer

  • 1009 error for null object reference-how to fix/workaround?

    Hi,
    A while ago, with help on the forum, worked out a script (AS3) for a tween animation to demonstrate breathing in and out for an eLearning lesson exercise. There are buttons to pause and unpause/resume the animation.
    These pause and unpause/resume functions throw a 1009 error if the pause button is clicked at the moment that the tween is changing from expanding to contracting. So, most of the time, no error. But every so often, if clicked at the turning point, the 1009 error displays in debugging.
    The error points to the line:  _paused == null ? pauseAnimation():unpauseAnimation(); which is part of one of the pause functions. And the error also points to a conditional in a second pause function which is probably the beginning attemp to execute the script in it: if (_tX.isPlaying) {
    I have tried different ways of changing the script but cannot prevent the error. Any help would be appreciated.
    I've included the full pause function script below:
    // pause/unpause
    function pauseButtonClick2(e:MouseEvent):void {
        _paused == null ? pauseAnimation():unpauseAnimation(); error 1009
    // pause
    function pauseAnimation():void {
        // if Tween _tX is running
        if (_inhale) { //error 1009
            // stop the Tween       
            _tX.stop();
            _soundChannel.stop(); //soundChannel playing inhale sound mp3
             _exitButton.visible = false
            indexBtn2.visible = false;
            // record what is paused
            _paused = "tween";
        } if (!_inhale) {       
            _tX.stop();
            _soundChannel.stop(); //soundChannel playing exhale sound mp3
            _exitButton.visible = false
            indexBtn2.visible = false;
            // record what is paused
            _paused = "tween2";       
            else{
            // timer is running
            // stop the timer
            _timer.stop();
            exitButton.visible = false
            indexBtn2.visible = false;
            // record what is stopped
            _paused = "timer";
        _pauseButton2.visible = false
        _exitButton.visible = true;
        _exitButton.alpha = .5;
        indexBtn2.visible = true;
        //indexBtn2.alpha = .5;
        _resumeButton2.visible = true;
        //_resumeButton2.alpha = .5;
    // unpause
    function unpauseAnimation():void {
        // unpause accordingly
        switch (_paused) {
            case "tween" :
                _tX.resume();
                _soundChannel = _inhaleSound.play()
                break;
            case "tween2" :
                _tX.resume();
                _soundChannel = _exhaleSound.play()
                break;
            case "timer" :
                _timer.start();
                break;
        // reset what was paused
        _paused = null;
        _pauseButton2.visible = true;
        //_pauseButton2.alpha = .5;
        _exitButton.visible = false;
        indexBtn2.visible = false;
        _resumeButton2.visible = false;
    Error 1009:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at FLNav9exp_fla::MainTimeline/pauseAnimation()[FLNav9exp_fla.MainTimeline::frame6:305]
        at FLNav9exp_fla::MainTimeline/pauseButtonClick2()[FLNav9exp_fla.MainTimeline::frame6:300]

    I've been trying to fix, still unsuccessfully, so hopefully I've restored script to above (simply cut and pasted it from above) before adding your script.
    Got the following, which differs from original error locations:
    Attempting to launch and connect to Player using URL C:/Users/Stephen/Desktop/bejeweled(1)/flashinglights/latestfiles/exp/FLNav9exp-app.xml
    [SWF] FLNav9exp.swf - 1687237 bytes after decompression
    10 10
    BPM input: 10
    Minute: 1, BPM: 10
    Inhale/exhale cycle: 1
    a
    false
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at FLNav9exp_fla::MainTimeline/pauseAnimation()[FLNav9exp_fla.MainTimeline::frame6:317]
        at FLNav9exp_fla::MainTimeline/pauseButtonClick2()[FLNav9exp_fla.MainTimeline::frame6:300]
    However, each time I run and get an error, there is a different error line. But, one error line remains consistent:
    function pauseButtonClick2(e:MouseEvent):void {
        _paused == null ? pauseAnimation():unpauseAnimation(); error 1009: this line

Maybe you are looking for

  • Account access to specific websites not working

    On my daughter's computer (iBook, limited rights account) she can no longer access Facebook and a few others. (these sites work fine with admin account on this machine) Heard that fixing permissions and/or repairing the Keychain would work... Nothing

  • IPad 2 HDMI output no longer works since iOS 6 was installed

    Hi everyone, I need some help here, I have a pretty old HD TV equipped with HDMI input ports, I was able to use my iPad 2 to do Video mirroring or anything else for that matter while the iPad 2 was operation with iOS 5.1.1, since I upgraded to the iO

  • Oracle 11g with OPTIMIZER_MODE=RULE go faster!!

    I recently migrated Oracle 9.2.0.8 to Oracle 11g but the querys doesn't work as I hope. The same query takes 3:20 min aprox using optimizer_mode=ALL_ROWS and 0:20 using optimizer_mode=RULE or using RULE hint. The query in CBO makes a cartesian produc

  • Launch Application Error in PC Suite in XP Laptop

    Hi I can download PC suite onto Windows XP laptop and use all its functionality with my 6230 phone But when I end my laptop session and logout I cannot use any of the functionality when log back into my laptop Get launch application error When I down

  • New HighRes Monitor = performance issues

    Hello, So I recently got a new Monitor (LG 34UM95) wich is great, but my MacBook lags and is not as responsive as without the Monitor. In Parallels and Inventor it's nearly unbearable, but it's even in Chrome or native OSX programs Is the higher reso