Solved

emul68kcommon.c, Line:1642, Index out of range

Posted on 2008-06-11
2
249 Views
Last Modified: 2013-12-27
Hi,

I'm getting the subject error when I have the lines uncommented:

FieldType *objectPtr;
objectPtr=FrmGetObjectPtr(activeForm, FormMainFieldTEST);

Help would be appreciated,
Thanks,
Uni.
/***********************************************************************
Handles all event associated for the main form.
***********************************************************************/
Boolean mainFormEventHandler(EventType* aEvent){
	
	//Check if we need to initialise the form.
	if(aEvent->eType==frmOpenEvent){
		FrmDrawForm(FrmGetActiveForm());
		initialiseMainForm();
		return true;
	}
 
	//Check if the event was a menu event.
	if(aEvent->eType==menuEvent)
		return mainFormMenuEventHandler(aEvent->data.menu.itemID);
		
	return false;
}
/**********************************************************************/
 
 
/***********************************************************************
Initialises anything on the main form.
***********************************************************************/
Boolean initialiseMainForm(){
 
	FormType *activeForm;
	//FieldType *objectPtr;
	
	activeForm=FrmGetActiveForm();
	//objectPtr=FrmGetObjectPtr(activeForm, FormMainFieldTEST);
		
	return true;
}
/**********************************************************************/

Open in new window

0
Comment
Question by:Unimatrix_001
2 Comments
 
LVL 24

Accepted Solution

by:
alexey_gusev earned 500 total points
ID: 21758944
well, FrmGetObjectPtr() takes object index, not ID, so you should call it like that:

objectPtr=FrmGetObjectPtr(activeForm, FrmGEtObjectIndex(activeForm,FormMainFieldTEST));
0
 
LVL 3

Author Comment

by:Unimatrix_001
ID: 21758962
:) Thank you...
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When I was a beginner in Windows Mobile programming, even for small test I used to create a single MFC dialog-based application with one button, and put my test code in the OnLButtonDown method. For Pocket PC it worked fine, on some Windows CE d…
Once again I push the limits of my phone.  An introduction to the Android Google Now Launcher.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question