RangeError: Index '-1' specified is out of bounds.
Hi ,
Whenever i try to deselect a checkbox i get this error
RangeError: Index '-1' specified is out of bounds
at mx.collections::ListCollectionView/removeItemAt()
Can anyone guide me in this ?
Thanks
HI tuliptaurus,
I think the problem is within the function below in the first line of code:
public function removeField(field:Object):void
var index:int = selectedFields.getItemIndex(field);
selectedFields.removeItemAt(index);
What does your function getItemIndex(field) include...I think the problem is in this function since in this function you are trying to getItemIndex based on the field Object...If there is no exact match in the function this function is returning index = -1 so in your removeField() function you are trying to remove the item at index at -1 which in real doesn't exist so it throws the error.
So you first needs to examine the code in getItemIndex() function that it is returning the correctIndex if not then write a check in removeField() function
public function removeField(field:Object):void
var index:int = selectedFields.getItemIndex(field);
if(index >= 0)
selectedFields.removeItemAt(index);
Try posting the getItemIndex() function...
Thanks,
Bhasker Chari
Similar Messages
-
Flex 3.0 beta TileList problem with effects
I have a problem with deleting item from a Flex 3.0 beta
TileList component. While a delete item effect is playing and I
delete another item (while the first effect is still playing) , I
get an ‘RangeError: Index ‘8′ specified is out of
bounds.’ error. How do you delay processing until the effects
are done? or is there another solution? do I use a callLater()? or
remove the eventListener and wait until the effect finishes?
To see the problem, hit the down error twice quickly.
To see the application ->
http://designwithflex.com/pics/fasterror.swf
Here is Thumbnail.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="
http://www.adobe.com/2006/mxml"
width="100" height="100">
<mx:Label text="{data.name}" />
<mx:Label text="{data.age}" />
</mx:VBox>
and here is main.mxml:luvgelato,
Can you please file a bug at
http://bugs.adobe.com/flex/
and attach all your MXML code.
Thanks,
Peter -
How to avoid specified is out of bounds error in flex 4 mxml web application
how to avoid specified is out of bounds error in flex 4 mxml web application
hi raghs,
i want to add records in cloud.bt while adding the records if we enter existing record details and try to save again na it wont allow to that record.
that time the alert box should show this msg "This record is already existing record in cloud database.
ex: one company name called mobile. i am adding a employee name called raja now i save this record,its data saved in cloud DTO
again try to add same employee name raja under the same compny means it should through error.
I am give my code here please if any suggession tel.
CODE:
private function saveRecord():void
refreshRecords();
model.employeeDetailsReq=new EMPLOYEEDETAILS_DTO();
var lengthindex:uint=model.employeeDetailsReqRecordsList.length;
var i:int;
for (i = 0; i < lengthindex; i++)
if((model.employeeDetailsReqRecordsList.getItemAt(lengthindex).employ ee name==customerdet.selectedItem.employeename)&&
(model.employeeDetailsReqRecordsList.getItemAt(lengthindex).employeeN umber==customerdet.selectedItem.employeeID)){
Alert.show("you cannot Add Same CustomerName and Invoiceno again");
(when this line come the error through like this: Index '8' specified is out of bounds.
else
var dp:Object=employeedet.dataProvider;
var cursor:IViewCursor=dp.createCursor();
var employeename:String = employeename.text;
model.employeeDetailsReq.employename = employeename;
model.employeeDetailsReq.employeeNumber=cursor.current.employeeID;
var sendRecordToLocID:QuickBaseEventStoreRecord = new
QuickBaseEventStoreRecord(model.employeeDetailsReq, new
KingussieEventCallBack(refreshList))
sendRecordToLocID.dispatch();
<mx:Button id="btnAdd" x="33" y="419" enabled="false" label="Add" width="65" fontFamily="Georgia" fontSize="12" click="saveRecord()"/>
employeename and employeeID are datafields of datagrid. datagrid id=customerdet
employeeDetailsReqRecordsList---recordlist of save records
Thanks,
B.venkatesanI do not know for sure as to how to do this, but I found this on Adobe Cookbook
http://cookbooks.adobe.com/post_Import_Export_data_in_out_of_a_Datagrid_in_Flex-17223.html
http://code.google.com/p/as3xls/
http://stackoverflow.com/questions/1660172/how-to-export-a-datagrid-to-excel-file-in-flex
http://wiredwizard.blogspot.com/2009/04/nice-flex-export-to-excel-actionscript.html
This has a demo that works
http://code.google.com/p/flexspreadsheet/ -
Hey everyone,
I'm buidling a multilingual webpage with Muse, i I have 5 masters, 53 pages and when I would like to add 2 extra page a get the "RangeError: Index '0' specified is out of bounds" error. Is there a limit to a website in Muse? how many final pages can it handle?
Thank you for answeringHi,
Please send your .muse file to [email protected] along with a link to this topic so we can check out your file. If your file is > 20MB, use a filesharing service like SendThisFile or Adobe SendNow.
Regards, -
Sir,
i am running a matlab code in mathscript of labview but getting an error
Error -90032 occurred at Error in function centref at line 5 column 8: The indexes are out of bounds for the variable you specified
this code running successfully in matlab
please help me in this regard
a .vi format file is attached named as mfcc_new.vi
Attachments:
mfcc2.vi 35 KB
mfcc_new.vi 111 KBMay I see you have 6 inputs to your Mathscript Node. When you test it in Matlab I suposse that you're using some values for this inputs and everything work as expected. Then, run it in Labview using highlight execution, retaining wire values and using single stepping. Check the values which are being inserted to your Mathscript Node and ensure that they are correct. You're having an "indexes out of bounds" mistake, so it probably means that there is something wrong with the inputs according to your expectations. You can also put the MathScript alone in another VI and insert the inputs you're expecting manually and check in the same way.
Good luck! -
RangeError: Error #2006: The supplied index is out of bounds.
Hi Guys
I am making an Auto-Arrange button and clicking on which
arranges all the children of the container( which are on the main
stage) in the tile format. Basically on clicking, I manually move
those child on the stage to particular coordinates as shown in my
code. I have pasted my code below. My problem is that as soon as i
click on the auto arrange button I am getting error "RangeError:
Error #2006: The supplied index is out of bounds.". Please let me
know what i am doing wrong and i will appreciate if you let me know
how would i fix this
Thanks a lot guys
Anuj
******************CODE**********************
var aa:Number=0;
var xcoord:Number=-300;
var ycoord:Number=-200;
var xcoord1:Number=450;
var xcoord2:Number=850;
var xcoord3:Number=1250;
var ycoord1:Number=350;
var ycoord2:Number=650;
//Button Listener
btn_AA.addEventListener(MouseEvent.CLICK,autoArrange);
function autoArrange(event:MouseEvent):void
if(container.getChildAt(aa)!=null)
container.getChildAt(aa).x=xcoord;
container.getChildAt(aa).y=ycoord;
//Arrange Second
container.getChildAt(aa+1).x=xcoord+xcoord1;
container.getChildAt(aa+1).y=ycoord;
//Arrange Third
container.getChildAt(aa+2).x=xcoord+ xcoord2;
container.getChildAt(aa+2).y=ycoord;
//Arrange Forth
container.getChildAt(aa+3).x=xcoord+xcoord3;
container.getChildAt(aa+3).y=ycoord;
//Arrange Fifth
container.getChildAt(aa+4).x=xcoord;
container.getChildAt(aa+4).y=ycoord+ycoord1;
//Arrange Sixth
container.getChildAt(aa+5).x=xcoord+xcoord1;
container.getChildAt(aa+5).y=ycoord+ycoord1;
//Arrange Seventh
container.getChildAt(aa+6).x=xcoord+ xcoord2;
container.getChildAt(aa+6).y=ycoord+ycoord1;
//Arrange Eight
container.getChildAt(aa+7).x=xcoord+xcoord3;
container.getChildAt(aa+7).y=ycoord+ycoord1;
//Arrange Ninth
container.getChildAt(aa+8).x=xcoord;
container.getChildAt(aa+8).y=ycoord+ycoord2;
//Arrange Tenth
container.getChildAt(aa+9).x=xcoord+xcoord1;
container.getChildAt(aa+9).y=ycoord+ycoord2;
//Arrange Eleventh
container.getChildAt(aa+10).x=xcoord+ xcoord2;
container.getChildAt(aa+10).y=ycoord+ycoord2;Hi Kglad
Thanks for reply. Can you please do me a big favor of
modifying the code so that it would not give that range error.
I am not sure which way to go because manually i put them at
specific coordinate and i assume if even i place 1 child on my main
stage it should work without giving me the error but everytime it's
checking that whether i place 1 childrens on the stage or not.
Please help me out.
Thank you very much for ur help
Regards, -
Hi All,
See First Method
Lov code in .jspx file
selectOneChoice
<af:selectOneChoice value="#{bindings.vwDmsApplMapDocType.inputValue}"
label="" showRequired="true"
binding="#{docDownload.selectOneChoice3}"
autoSubmit="true" immediate="true" id="selectOneChoice3"
valueChangeListener="#{docDownload.getApplMapDocType}"
partialTriggers="selectOneChoice2" inlineStyle="width:50%">
<f:selectItems value="#{bindings.vwDmsApplMapDocType.items}"/>
</af:selectOneChoice>
valu change listener
getApplMapDocType(ValueChangeEvent valueChangeEvent)
public void getApplMapDocType(ValueChangeEvent valueChangeEvent){
FacesContext fctx = FacesContext.getCurrentInstance();
setAppKey(JSFUtils.getProcessAttribute("appid").toString());
System.out.println("\n value of doc type == "+selectOneChoice3.getValue());
Integer rowKey = null;
String docAppId = null;
try
ValueBinding vbinding = fctx.getApplication().createValueBinding("#{bindings.vwrDMSDocTypeIterator}");
DCIteratorBinding doctypeIterBinding = (DCIteratorBinding)vbinding.getValue(fctx);
if (valueChangeEvent != null && valueChangeEvent.getNewValue() != null) {
System.out.println("\n valueChangeEvent is not null then value is == "+valueChangeEvent.getNewValue());
rowKey = ((Integer)valueChangeEvent.getNewValue()).intValue();
//rowKey = Integer.parseInt(valueChangeEvent.getNewValue().toString());
//rowKey = ((Integer)selectOneChoice3.getValue()).intValue();
//rowKey = Integer.parseInt(selectOneChoice3.getValue().toString());
System.out.println("\n Value of rowKey == "+rowKey);
if (appKey != null) {
Row[] rw = doctypeIterBinding.getAllRowsInRange();
System.out.println("\n Row Value == "+rw);
System.out.println("\n value of doc DocType == "+rw[rowKey].getAttribute("DocType"));
System.out.println("\n value of doc AppId == "+rw[rowKey].getAttribute("AppId"));
System.out.println("\n value of doc DocTypeDesc == "+rw[rowKey].getAttribute("DocTypeDesc"));
System.out.println("row key value means doc type: = "+rowKey);
docType = (String)rw[rowKey].getAttribute("DocType");
docAppId = (String)rw[rowKey].getAttribute("AppId");
docTypeDesc = (String)rw[rowKey].getAttribute("DocTypeDesc");
JSFUtils.putOnProcessScope("jsfdoctype", docType);
this.setDocType(docType);
this.setDocTypeDesc(docTypeDesc);
}else{
JSFUtils.addFacesWarningMessage("Document type is Required");
catch (Exception e)
e.printStackTrace();
FacesContext fc = FacesContext.getCurrentInstance();
FacesMessage fm = new FacesMessage(FacesMessage.SEVERITY_WARN, "Its in getMap Doc Type", null);
fc.addMessage(null, fm);
System.out.println("Error Occurs in " +
e.getMessage());
I am using JDeveloper10.3.2 Application is already developed and running on production, i am doing some changes in this application. I have a lov which is populated from from DB. After choosing these love when i am changing other fields then i am getting below error. Here i am used valuePass=true then also i its not working. Actually its working some time but most of the time is getting below error.
Console Error
13/10/24 11:11:24 [16901] Bind params for ViewObject: vwrShops
13/10/24 11:11:24 [16902] $$added root$$ id=-2
Oct 24, 2013 11:11:24 AM com.sun.faces.lifecycle.ApplyRequestValuesPhase execute
SEVERE: SelectOne submittedValue's index 4 is out of bounds. It should be between 0 and -1
java.lang.IndexOutOfBoundsException: SelectOne submittedValue's index 4 is out of bounds. It should be between 0 and -1
at oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer.__getIndex(SimpleSelectOneRenderer.java:347)
at oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer._convertIndexedSubmittedValue(SimpleSelectOneRenderer.java:189)
at oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer.getConvertedValue(SimpleSelectOneRenderer.java:157)
at oracle.adfinternal.view.faces.renderkit.core.xhtml.InputLabelAndMessageRenderer.getConvertedValue(InputLabelAndMessageRenderer.java:42)
at oracle.adf.view.faces.component.UIXEditableValue.getConvertedValue(UIXEditableValue.java:455)
13/10/24 11:11:24 [16903] Resolving VO:vwrDmsDocMandField for iterator binding:vwrDmsDocMandFieldIterator
13/10/24 11:11:24 [16904] Resolving VO:vwrDMSParamType for iterator binding:vwrDMSParamTypeIterator
13/10/24 11:11:24 [16905] *** DCDataControl.sync() called from :DCBindingContainer.refresh
13/10/24 11:11:24 [16906] *** DCDataControl.sync() called from :DCBindingContainer.refresh
at oracle.adf.view.faces.component.UIXEditableValue.validate(UIXEditableValue.java:198)
at oracle.adf.view.faces.component.UIXEditableValue._executeValidate(UIXEditableValue.java:522)
at oracle.adf.view.faces.component.UIXEditableValue.processDecodes(UIXEditableValue.java:272)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:673)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:673)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:673)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:673)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:673)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:673)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:673)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at oracle.adf.view.faces.component.UIXForm.processDecodes(UIXForm.java:53)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:673)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:900)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:326)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:99)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:171)
at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
at amgdms.view.utils.ApplicationSessionExpiryFilter.doFilter(ApplicationSessionExpiryFilter.java:70)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:620)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
13/10/24 11:11:24 javax.servlet.ServletException: SelectOne submittedValue's index 4 is out of bounds. It should be between 0 and -1
13/10/24 11:11:24 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:225)
13/10/24 11:11:24 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
13/10/24 11:11:24 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
13/10/24 11:11:24 Exception in ApplicationSessionExpiryFilter.doFilter:javax.servlet.ServletException: SelectOne submittedValue's index 4 is out of bounds. It should be between 0 and -1
13/10/24 11:11:24 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
13/10/24 11:11:24 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:171)
13/10/24 11:11:24 at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
13/10/24 11:11:24 at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
13/10/24 11:11:24 at amgdms.view.utils.ApplicationSessionExpiryFilter.doFilter(ApplicationSessionExpiryFilter.java:70)
13/10/24 11:11:24 at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
13/10/24 11:11:24 at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
13/10/24 11:11:24 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:620)
13/10/24 11:11:24 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)
13/10/24 11:11:24 at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865)
13/10/24 11:11:24 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447)
13/10/24 11:11:24 at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)
13/10/24 11:11:24 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
13/10/24 11:11:24 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
13/10/24 11:11:24 at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
13/10/24 11:11:24 at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
13/10/24 11:11:24 at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
13/10/24 11:11:24 at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
13/10/24 11:11:24 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
13/10/24 11:11:24 at java.lang.Thread.run(Thread.java:595)
Oct 24, 2013 11:11:24 AM oracle.jsp.logger.JspMessages infoCannotDispatchJspPage
INFO: Unable to dispatch JSP Page : Exception:java.io.FileNotFoundException: D:\c\Oracle\Middleware\JDeveloper10.1.3.2\jdevstudio10132\jdev\system\oracle.j2ee.10.1.3.40.66\embedded-oc4j\default-web-app\DMSTimeOut.jspx (The system cannot find the file specified)
13/10/24 11:11:40 [16907] ApplicationPoolImpl.resourceStateChanged wasn't release related. No notify invoked.
For Screen Please Click Here To See Screen Shot
Whats the wrong? How can i fix it,
MaroofAny Update?
-
the title is self-explanatory. i'm VERY new to flash so i don't understand a lot of the lingo. can anyone give me a simple answer or, better yet, fix the code for me? i'm reading that it usually comes up when there's a child error but i'm not sure how to fix it.
my code:
var navBtnGlow:GlowFilter = new GlowFilter(0x000000, 0.5, 0, 15, 1, 2, true, false);
navBAR_mc.addEventListener(MouseEvent.MOUSE_OVER, navOverF);
navBAR_mc.addEventListener(MouseEvent.MOUSE_OUT, navOutF);
function navOverF(event:MouseEvent):void{
event.target.filters = [navBtnGlow];
navBAR_mc.setChildIndex(event.target as MovieClip, 1);
dropMenus_mc.gotoAndStop(navBAR_mc.getChildAt(1).name);
trace("We are Rolled Over..." + navBAR_mc.getChildAt(1).name)
function navOutF(event:MouseEvent):void{
event.target.filters = [];
the error message:
RangeError: Error #2006: The supplied index is out of bounds.
at flash.display::DisplayObjectContainer/setChildIndex()
at bestPRIM_fla::MainTimeline/navOverF()
thanks in advance!I'm trying to get my head around this, but here's my shot at it... you have an event listener assigned to navBAR_mc for a mouse over. When the mouseover occurs, you have the following line:
navBAR_mc.setChildIndex(event.target as MovieClip, 1);
Since navBAR_mc is the event.target, it cannot be a child of itself, but I think that's what that line is trying (and failing) to process.
So can you describe what you are trying to do. I would expect that navBAR_mc holds buttons, but based on what I see, it is the button. -
Index out of Bounds Exception in for loop.
Occasionaly with the code below, i get an index out of bounds error, index 1, size 1, however the for loop should ensure that it never calls the getActorLocation method if the index is the same size as the arrayList size.
Im having one of those days, and i just cant see what error i have made.
Perhaps i need coffee? lol
Cheers
James
private void checkMemoryIntegrity(){
Actor actor = actorList.get(actorIndex);
ArrayList<Integer> inRangeList = getActorsInMemoryRange(actor, actor.getRange());
inRangeList.trimToSize();
for (int i = 0; i < inRangeList.size();i++){
if (inRangeList.size() != 0){
actor = brainState.getActorLocation(i); //<<<<<<<<< problem line
if (!actorList.contains(actor)){
brainState.actorLocations.remove(i);
public ArrayList <Integer> getActorsInMemoryRange(Actor actor, int range){
int i = 0;
int x = actor.getX();
int y = actor.getY();
ArrayList <Integer> inRangeList = new ArrayList <Integer> ();
Actor compActor;
while (i< brainState.actorLocations.size())
compActor = brainState.getActorLocation(i);
int xDist = x - compActor.getX();
if ( (xDist >= (-1) * range) && (xDist <= range) ){
int yDist = y - compActor.getY();
if ( (yDist >= (-1) * range) && (yDist <= range) ){
inRangeList.add(i);
i++;
return inRangeList;
}I was thinking it might be easier to do it this way:
Iterator<Actor> i = actorLocations.iterator();
while(i.hasNext())
if (!actorList.contains(i.next())) {
i.remove();
}It sounds like you have an equals() method which compares the x and y locations of the actor. If not then you will have to enclose the remove in an if block which compares the actor location. Does that make sense?
Edit: contains uses the equals method.
Returns true if this list contains the specified element. More formally, returns true if and only if this list contains at least one element e such that
(o==null ? e==null : o.equals(e)).Edited by: Edward_Kimber on May 23, 2008 11:43 AM -
Error #2006: The supplied index is out of bounds
hello,
i'm trying to addChild with an interval, using this piece of code, but I allways get an error saiyng the suplied index is out of bounds.
why?
what should I do to have mc1 added then wait lets say a second and add m2 2 and so on?
Thanks
var tempo_espera:Timer = new Timer(1000, 1);
tempo_espera.addEventListener("timer", inserir);
tempo_espera.start();
function inserir(evt:TimerEvent):void {
for (var nv1:int = 0; nv1<promocoes.length; nv1++) {
holder.addChildAt(mc, nv1);
var animacao:TransitionManager = new TransitionManager(mc);
animacao.startTransition({type:Zoom, direction:Transition.IN, easing :Elastic.easeOut, duration:3});
RangeError: Error #2006: The supplied index is out of bounds.
at flash.display::DisplayObjectContainer/addChildAt()
at MethodInfo-346()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()using your new code, I got this error
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChild()
at MethodInfo-343()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
I had to add mcArray = new Array(); to avoid another error
// this is array of movie clips
var mcArray:Array;
// it is better to declare variable once and then reinstantiate it
var mc:MovieClip;
// do your regular routine
for (var nv:uint = 0; nv<promocoes.length; nv++) {
var prm;
prm = promocoes[nv].split("|sep|");
mc = new MovieClip();
mc.name = "mc_"+nv;
// place this new mc into array
mcArray = new Array();
mcArray.push(mc);
// start timer - note that timer will fire as many times as there are movie clips
var tempo_espera:Timer = new Timer(1000, mcArray.length);
tempo_espera.addEventListener("timer", placeClip);
tempo_espera.start();
// the clip you will apply transition to
var currentClip:MovieClip;
// function that places clips
function placeClip(e:Event):void {
// get next clip by calling movie that corresponds with the timer counter
currentClip = MovieClip(mcArray[tempo_espera.currentCount]);
// just place next clip
holder.addChild(currentClip);
var animacao:TransitionManager = new TransitionManager(currentClip);
animacao.startTransition({type:Zoom, direction:Transition.IN, easing :Elastic.easeOut, duration:3}); -
Java Index Out Of Bounds Exception error
In the Query Designer when I choose access type for Result value as Master data, and execute, I get the following java Index Out Of Bounds Exception error:
com.sap.ip.bi.webapplications.runtime.controller.MessageException: Error while generating HTML
at com.sap.ip.bi.webapplications.runtime.impl.Page.processRequest(Page.java:2371)
at com.sap.ip.bi.webapplications.runtime.impl.Page.doServerRedirect(Page.java:2642)
at com.sap.ip.bi.webapplications.runtime.impl.Page.doProcessRequest(Page.java:2818)
at com.sap.ip.bi.webapplications.runtime.impl.Page.processRequest(Page.java:2293)
at com.sap.ip.bi.webapplications.runtime.controller.impl.Controller.doProcessRequest(Controller.java:841)
at com.sap.ip.bi.webapplications.runtime.controller.impl.Controller.processRequest(Controller.java:775)
at com.sap.ip.bi.webapplications.runtime.jsp.portal.services.BIRuntimeService.handleRequest(BIRuntimeService.java:412)
at com.sap.ip.bi.webapplications.runtime.jsp.portal.components.LauncherComponent.doContent(LauncherComponent.java:21)
at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:645)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
at java.security.AccessController.doPrivileged(Native Method)
at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: com.sap.ip.bi.base.exception.BIBaseRuntimeException: Error while generating HTML
at com.sap.ip.bi.webapplications.ui.items.UiItem.render(UiItem.java:380)
at com.sap.ip.bi.webapplications.runtime.rendering.impl.ContainerNode.render(ContainerNode.java:62)
at com.sap.ip.bi.webapplications.runtime.rendering.impl.PageAssemblerRenderingRoot.processRendering(PageAssemblerRenderingRoot.java:50)
at com.sap.ip.bi.webapplications.runtime.impl.Page.processRenderingRootNode(Page.java:3188)
at com.sap.ip.bi.webapplications.runtime.impl.Page.processRendering(Page.java:2923)
at com.sap.ip.bi.webapplications.runtime.impl.Page.doProcessRequest(Page.java:2877)
at com.sap.ip.bi.webapplications.runtime.impl.Page.processRequest(Page.java:2293)
... 39 more
Caused by: java.lang.IndexOutOfBoundsException: fromIndex = -7
at java.util.SubList.<init>(AbstractList.java:702)
at java.util.RandomAccessSubList.<init>(AbstractList.java:860)
at java.util.AbstractList.subList(AbstractList.java:569)
at com.sap.ip.bi.bics.dataaccess.base.impl.ModifiableList.remove(ModifiableList.java:630)
at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.resultset.RsDataCells.removeRows(RsDataCells.java:480)
at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.resultset.RsAxis.removeTuples(RsAxis.java:550)
at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.resultset.RsAxis.applyResultVisibility(RsAxis.java:1312)
at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.resultset.RsAxis.applyResultVisibility(RsAxis.java:1326)
at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.resultset.RsAxis.applyResultVisibility(RsAxis.java:1326)
at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.resultset.RsAxis.applyResultVisibility(RsAxis.java:1326)
at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.resultset.RsAxis.applyResultVisibility(RsAxis.java:1272)
at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.resultset.RsAxis.applyResultVisibility(RsAxis.java:1170)
at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.resultset.ResultSet.applyPostProcessing(ResultSet.java:282)
at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.resultset.ResultSet.refreshData(ResultSet.java:262)
at com.sap.ip.bi.bics.dataaccess.consumer.impl.queryview.QueryView.getResultSet(QueryView.java:267)
at com.sap.ip.bi.webapplications.ui.items.analysis.control.AcPivotTableInteractive.checkResultSetState(AcPivotTableInteractive.java:368)
at com.sap.ip.bi.webapplications.ui.items.analysis.control.AcPivotTableExport.validateDataset(AcPivotTableExport.java:249)
at com.sap.ip.bi.webapplications.ui.items.analysis.control.AcPivotTableInteractive.buildUrTree(AcPivotTableInteractive.java:282)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:33)
at com.sap.ip.bi.webapplications.ui.framework.base.composites.UiRootContainer.iterateOverChildren(UiRootContainer.java:40)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.advancedcontrols.bridge.AcItemBridge.iterateOverChildren(AcItemBridge.java:63)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.unifiedrendering.controls.FlowLayoutItem.iterateOverChildren(FlowLayoutItem.java:63)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.unifiedrendering.controls.FlowLayout.iterateOverChildren(FlowLayout.java:69)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.framework.base.composites.UiRootContainer.iterateOverChildren(UiRootContainer.java:40)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.advancedcontrols.bridge.AcItemBridge.iterateOverChildren(AcItemBridge.java:63)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.unifiedrendering.controls.MatrixLayoutCell.iterateOverChildren(MatrixLayoutCell.java:63)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.unifiedrendering.controls.MatrixLayoutRow.iterateOverChildren(MatrixLayoutRow.java:56)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.unifiedrendering.controls.MatrixLayout.iterateOverChildren(MatrixLayout.java:69)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.container.matrixlayout.control.AcMatrixControlGrid.iterateOverChildren(AcMatrixControlGrid.java:40)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.framework.base.composites.UiRootContainer.iterateOverChildren(UiRootContainer.java:40)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.advancedcontrols.bridge.AcItemBridge.iterateOverChildren(AcItemBridge.java:63)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.unifiedrendering.controls.Group.iterateOverChildren(Group.java:63)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.container.group.control.AcGroupControl.iterateOverChildren(AcGroupControl.java:259)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.framework.base.composites.UiRootContainer.iterateOverChildren(UiRootContainer.java:40)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.advancedcontrols.bridge.AcItemBridge.iterateOverChildren(AcItemBridge.java:63)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.unifiedrendering.controls.FlowLayoutItem.iterateOverChildren(FlowLayoutItem.java:63)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.unifiedrendering.controls.FlowLayout.iterateOverChildren(FlowLayout.java:69)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.framework.base.composites.UiRootContainer.iterateOverChildren(UiRootContainer.java:40)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.advancedcontrols.bridge.AcItemBridge.iterateOverChildren(AcItemBridge.java:63)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.unifiedrendering.controls.Group.iterateOverChildren(Group.java:63)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.container.group.control.AcGroupControl.iterateOverChildren(AcGroupControl.java:259)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.framework.base.composites.UiRootContainer.iterateOverChildren(UiRootContainer.java:40)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.process(CompositeBuildUrTreeTrigger.java:36)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.CompositeBuildUrTreeTrigger.start(CompositeBuildUrTreeTrigger.java:59)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.ExtendedRenderManager.triggerComposites(ExtendedRenderManager.java:69)
at com.sap.ip.bi.webapplications.ui.framework.base.impl.BICompositeManager.renderRoot(BICompositeManager.java:79)
at com.sap.ip.bi.webapplications.ui.items.UiItem.render(UiItem.java:376)
Any help in solving this error is highly appreciated. Points will be given
Best Regards,
Vidyut K SamantaHi.
Go to line 9 of your code.
You are trying to use an array there.
Suppose you have an array x[4] - this array has 4 elements indexed 0..3.
you are trying to access an element with an index higher than 3.
Nimo. -
Array Index out of bound exception
public Name[] getName() {
Name[] retVal = new Name[0];
retVal[0] = this.getNameInstance();
return retVal;
public void setName(Name[] theName) {
theName[0]=this.getNameInstance();
private Name myNameInstance = new Name();
public void setNameInstance(Name theNameInstance) {
if(isValidName(theNameInstance)){
myNameInstance = theNameInstance;
public Name getNameInstance() {
return myNameInstance;
}I am getting an array Index out of bound eception in the method setName, Can any one tell me where I am doing wrong?The array passed in must be empty. I suggest using the debugger for problems like these. If you don't know how to use the debugger, here's a start:
(Assuming you have a debugger, any IDE you'd be using will)
1. Set a breakpoint on or before your line of question. In this case, place it on the line of code in your setName() method. Set a breakpoint by either right clicking on that line and selecting "Add breakpoint," or simply click on the far left side of the editor window, right next to the line number. Either way, a little dot will appear to mark the breakpoint.
2. Execute your code in Debug mode rather than release mode. This might mean clicking on the little bug-looking icon "Debug" rather than "Run."
3. Your code will execute and you'll enter the debug perspective when that breakpoint is reached. There, in the variables window, you'll see your array and any information about it, particularly its size and contents. -
String index out of bounds?
hi, i am writing a java program which reads in a file and then error checks it, once its done this it will output it to another file.
It was working fine until i tried writing another method, now it keeps telling there is a string index out of bounds exception with the 'charAt' method. I have uploaded all the necessary files to compile and run the program.
I am unsure of what the problem is so id be grateful of you would be able to check it out. If it helps i programmed and compiled this problem in netbeans 3.6.
I uploaded it here: http://www.megaupload.com/?d=45QHZYN1
you have to wait 45 seconds, the timer is in the right hand corner before you can begin downloadtry
{ System.out.println("2");
Properties props = new Properties();
File file = new File(System.getProperty("user.home") + File.separator + configFileName);
BufferedInputStream bis = new BufferedInputStream(new FileInputStream (file));
props.load(bis);
if(bis != null)
bis.close();
// Load the information from the properties file.
String driver = (String)props.get("DB_DRIVER");
String user = (String)props.get("DB_USERNAME");
String passwd = (String)props.get("DB_PASSWORD");
String url = (String)props.get("DB_URL");
conManager = ConnectionManager.getInstance(driver, user, passwd, url);
logFilename = fileName.substring(0,fileName.lastIndexOf(".")) + ".log";
System.out.println("log file name :: " + logFilename);
fout = new FileOutputStream(new File(logFilename));
catch (Exception e)
e.printStackTrace();
public static void main(String[] args)
FormsRefresher formsRefresher = new FormsRefresher();
String filename = "D:\\FCC\\FMB\\CLDUDCMT.fmb";
String username ="BPELDEMO";
String pwd = "BPELDEMO";
String url = "jdbc:oracle:thin:@PLUTO:1521:seriousim";
String filename = args[8];
formsRefresher.initialize(filename);
formsRefresher.processForm(filename);
}I am getting the error in the lines quoted bold
This is the code and i am getting another error also along with that.
That is Unsatisfiedlink error
Message was edited by:
Feroz_CG -
Index out of bound array : calling bapi
Hi,
I am facing a problem while executing a BAPI using the SAP .net connector. The steps I performed are as follows:
Created a web project in Visual Studio .net using VB.net
Added the SAP Connector Proxy to the project
Dragged a Bapi_Customer_Getcontactlist onto the proxy
Created a page with a button on it
In the button_Click event of the web form I wrote the following code
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Maxrows As Integer = 10
Dim Return0 As BAPIRETURN1
Dim Contactaddressdata As BAPICONTACT_ADDRESSDATATable
Dim Customerrange As BAPICUSTOMER_IDRANGETable
SapProxy11.Bapi_Customer_Getcontactlist(Maxrows, Return0, Contactaddressdata, Customerrange)
End Sub
But when I execute the code the method the control goes into the SAPProxy1.vb file in which the code for the method Bapi_Customer_Getcontactlist contains a statement as follows
Dim results As Object()
results = SAPInvoke("Bapi_Customer_Getcontactlist", New Object() { _
Maxrows, Contactaddressdata, Customerrange})
When the SAPInvoke method is executed it gives an exception saying Index was outside the bounds of the array.
For any other bapi that I execute it gives the same error. Please someone help me to execute the BAPI and let me know if I have missed out something.
Regards,
sridharThanks a lot for your suggestion.
I got rid of the error by manually editing the code that the SAPProxy.vb contains in which the SAPInvoke method is called. This method expects the second parameter as the array of input parameters which it writes automatically but when executed the number of parameters is not the same as those in the actual method.
i.e. The code that is written automatically when I drag the method from the Server explorer contains the BAPI method which internally calls the SAPInvoke method. Now the BAPI that I want to make a call contains the output parameters which you said I need to initialize. But the code excludes this output parameters in the SAPInvoke method. Thats the reason why the index out of bound error was generated.
Now once I manually changed the code to include the output parameters too in the SAPInvoke method the error is gone but the call thus made does not return any value in the output parameters. Where as when executed from the SAP IDE it returns the values.
Please let me know whats wrong with it.
Regards,
Sridhar -
String index out of bounds... issue regarding checking for non-integers
okay. i have been racking my brain about this for the last couple of days. i looks like everything is alright, but i keep getting string index out of bounds exception: string index out of range 1.
heres the code.
for(int x=0; x<size; ++x)
count=x+1;
System.out.println("Please enter value #"+count+(":"));
numnum=console.nextLine();
if(Character.isDigit(numnum.charAt(x)))
goodInput=true;
if(!goodInput)
System.out.print("Please Enter Only Integers!");
else
values[x]=Integer.parseInt(numnum);
its probably something really stupid, but if someone can figure this out, id be most grateful.
-thanksBe sure values contains data.
Then make sure that size = values.length
Either you don't have any data to iterate through, or the size variable is too big. So it's trying to search in parts of the array that don't exist.
Maybe you are looking for
-
I chose this forum as opposed to the printing and pre-press forum because I have a very limited existing knowledge of color space and profile matching and I didn't want to be (1) shunned and (2) overwhelmed by the level of technical detail. When I at
-
There have been 195 failed login attempts in the last 30 minutes Oracle 11g
Hi guys, What could be causing this? My dbsnmp user in not locked. Thank you.
-
anyone know where i should look if i want to play an audio (5 min) fading in then out? thanks!
-
Sun Ray Server Software 4.2
Hi, I have the Sun Ray Server Software 4.2 setup on two servers but have noticed in our FOG that the failover group has stopped working in that only our primary server is been shown and not the secondary server. Due to this all user sessions are conn
-
Assertion failed: 0, file ../lnk/exthrow.cc
Hello, one of my programs aborts sometimes with a coredump and the following message "Assertion failed: 0, file ../lnk/exthrow.cc, line 338" I don't understand the message. Can anybody help me. thanks OS: SunOS xyz 5.8 Generic_108528-14 sun4u sparc S