Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » EGL Development Tools » DataTable(Does EDT allow this?)
DataTable [message #897153] Sun, 22 July 2012 17:17 Go to next message
Nathan Reed is currently offline Nathan ReedFriend
Messages: 74
Registered: June 2012
Member
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 23:22 Go to previous messageGo to next message
Brian Svihovec is currently offline Brian SvihovecFriend
Messages: 55
Registered: July 2009
Member
Nathan,

Data Tables are not supported in EDT at this time.

-Brian
Re: DataTable [message #897175 is a reply to message #897171] Mon, 23 July 2012 00:34 Go to previous messageGo to next message
Nathan Reed is currently offline Nathan ReedFriend
Messages: 74
Registered: June 2012
Member
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 12:35 Go to previous messageGo to next message
Nathan Reed is currently offline Nathan ReedFriend
Messages: 74
Registered: June 2012
Member
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 14:05 Go to previous messageGo to next message
Nathan Reed is currently offline Nathan ReedFriend
Messages: 74
Registered: June 2012
Member
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 21:46 Go to previous messageGo to next message
Dan Darnell is currently offline Dan DarnellFriend
Messages: 145
Registered: November 2011
Location: Arkansas
Senior Member
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 21:48]

Report message to a moderator

Re: DataTable [message #897385 is a reply to message #897383] Mon, 23 July 2012 22:03 Go to previous message
Nathan Reed is currently offline Nathan ReedFriend
Messages: 74
Registered: June 2012
Member
Dan

Thx. This is handy. Had not seen it.

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


Current Time: Mon Nov 04 21:16:34 GMT 2024

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

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

Back to the top