Skip to main content



      Home
Home » Archived » EGL Development Tools » DataTable(Does EDT allow this?)
DataTable [message #897153] Sun, 22 July 2012 13:17 Go to next message
Eclipse UserFriend
Mac OSX 10.6.8
Eclipse Jumo
EGL 0.8.0
DataTable Part

Is a DataTable allowed in EDT? Do I need to make some changes?

I am trying to build a table I can use to look up values from a dedicated service program with a string/char input. I believe I was able to do this in RBD.

The following code tells me that it cannot resolve contents (with or without the BasicTable stereotype).

package common;

DataTable RoastYieldFactors 

	fieldOne int;
	fieldTwo int;
	
	{contents = [ 
				[11,22], 
				[44, 68] 
				]
				}
End // End part



This code cannot resolve contents and will not allow the char definition.

package common;

DataTable RoastYieldFactors 

	fieldOne char(2);
	fieldTwo int;
	
	{contents = [ 
				["AA",22], 
				["BB", 68] 
				]
				}
End // End part







Re: DataTable [message #897171 is a reply to message #897153] Sun, 22 July 2012 19:22 Go to previous messageGo to next message
Eclipse UserFriend
Nathan,

Data Tables are not supported in EDT at this time.

-Brian
Re: DataTable [message #897175 is a reply to message #897171] Sun, 22 July 2012 20:34 Go to previous messageGo to next message
Eclipse UserFriend
Brian or Someone:

Is there a typical method for looking up standard data in services?

It does not appear that the "in" opcode is supported. I am still trying to research alternatives to this. But even then I cannot put an array in a library. If I figure out how to search an array I guess I could put the array in a service and get to it from other services. Looks like I am just building a messy work around.

Do I have to build an sql table just to store some simple table lookup? For example I just want to look up a numeric value that is associated with a string. ("Factor", 32.45)

Thx,

Nathan Reed
Re: DataTable [message #897257 is a reply to message #897175] Mon, 23 July 2012 08:35 Go to previous messageGo to next message
Eclipse UserFriend
Brian:

The juno vs indigo issues was causing the "in" operator issue (probably).

It works fine now that I am on idigo.

Sorry for being a pain.

Thx,

Nathan Reed
Re: DataTable [message #897295 is a reply to message #897257] Mon, 23 July 2012 10:05 Go to previous messageGo to next message
Eclipse UserFriend
Perhaps I spoke too soon.

The code below does not give a syntax error so I thought it was going to work. But it will not generate. I get a

java.language.nullPointerException could not be found.

There is no sysvar to get the index so I am not sure this will work.

Does anyone know of a way to determine an index value from an array search?


package server;
service testService
	
	
	roastYieldDescription string[] = [ "7-Bone Roast", "Chuck Roast", "Chuck Eye Roast" ];		
	function calculateRoastYield()
	roastname string = "Chuck Roast";
	
	if((roastName in roastYieldDescription) == true) 
		stophere string = "";
	else
		orhere string = "";
	end		
	return;	
	end // End function	
end
Re: DataTable [message #897383 is a reply to message #897295] Mon, 23 July 2012 17:46 Go to previous messageGo to next message
Eclipse UserFriend
Check this:

http://wiki.eclipse.org/EDT:EGL_Language_Operators_and_Expressions

Seems to indicate that "in" is planned for 1.0 but not before.

My guess then is that for now you'll have to write your own "in" like function where you iterate over the array.

--Dan

[Updated on: Mon, 23 July 2012 17:48] by Moderator

Re: DataTable [message #897385 is a reply to message #897383] Mon, 23 July 2012 18:03 Go to previous message
Eclipse UserFriend
Dan

Thx. This is handy. Had not seen it.

Nathan Reed
Previous Topic:Debug environment
Next Topic:EGL Environment issues
Goto Forum:
  


Current Time: Tue May 20 22:32:53 EDT 2025

Powered by FUDForum. Page generated in 0.07423 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top