About Store Forum Documentation Contact
Donations:
327$/mo



Post Reply 
Question on List
Author Message
Babulesnik Offline
Member

Post: #1
Question on List
group=ListGroup(DATA_STR16,0.3,L"Text"); -error

lobbi_list.getRegion("list_region")+=list.create(group,1).setData(data,1);

group=ListGroup( What here it is necessary to specify? ,0.3,L"Text");
01-30-2011 08:48 PM
Find all posts by this user Quote this message in a reply
llynx Offline
Member

Post: #2
RE: Question on List
Please check the API Reference.chm for the EE::ListGroup Struct Reference
01-30-2011 09:04 PM
Find all posts by this user Quote this message in a reply
Babulesnik Offline
Member

Post: #3
RE: Question on List
I can not understand. I do not know what there there should be a parametre.There is an error with DATA_STR16...

Error:

1> [
1> TYPE=EE::DATA_TYPE
1> ]
1> while trying to match the argument list '(EE::DATA_TYPE, double, const wchar_t [6])'
(This post was last modified: 01-30-2011 09:26 PM by Babulesnik.)
01-30-2011 09:24 PM
Find all posts by this user Quote this message in a reply
llynx Offline
Member

Post: #4
RE: Question on List
Quote:enum EE::DATA_TYPE

Data Type.


Enumerator:
DATA_NONE none
DATA_CHAR Char[] 16-bit character array forming a text.
DATA_CHAR_PTR Char* pointer to 16-bit character array forming a text.
DATA_CHAR8 Char8[] 8-bit character array forming a text.
DATA_CHAR8_PTR Char8* pointer to 8-bit character array forming a text.
DATA_STR Str String with 16-bit per character.
DATA_STR8 Str8 String with 8-bit per character.

DATA_BOOL Bool boolean.
DATA_INT Int integer.
DATA_UINT UInt unsigned integer.
DATA_REAL Real floating point.
DATA_PTR Ptr memory address.
DATA_VEC2 Vec2 vector2D floating point.
DATA_VEC Vec vector3D floating point.
DATA_VEC4 Vec4 vector4D floating point.
DATA_VECI2 VecI2 vector2D integer.
DATA_VECI VecI vector3D integer.
DATA_VECI4 VecI4 vector4D integer.
DATA_COLOR Color color.
DATA_IMAGE Image texture.
DATA_IMAGE_PTR Image* pointer to image object.
DATA_IMAGEPTR ImagePtr pointer to image object in cache.
DATA_DATE_TIME DateTime date and time.
DATA_KBSC KbSc keyboard shortcut.
(This post was last modified: 01-31-2011 01:31 AM by llynx.)
01-30-2011 09:42 PM
Find all posts by this user Quote this message in a reply
Babulesnik Offline
Member

Post: #5
RE: Question on List
(01-30-2011 09:42 PM)llynx Wrote:  
Quote:enum EE::DATA_TYPE

Data Type.


Enumerator:
DATA_NONE none
DATA_CHAR Char[] 16-bit character array forming a text.
DATA_CHAR_PTR Char* pointer to 16-bit character array forming a text.
DATA_CHAR8 Char8[] 8-bit character array forming a text.
DATA_CHAR8_PTR Char8* pointer to 8-bit character array forming a text.
DATA_STR Str String with 16-bit per character.
DATA_STR8 Str8 String with 8-bit per character.
DATA_BOOL Bool boolean.
DATA_INT Int integer.
DATA_UINT UInt unsigned integer.
DATA_REAL Real floating point.
DATA_PTR Ptr memory address.
DATA_VEC2 Vec2 vector2D floating point.
DATA_VEC Vec vector3D floating point.
DATA_VEC4 Vec4 vector4D floating point.
DATA_VECI2 VecI2 vector2D integer.
DATA_VECI VecI vector3D integer.
DATA_VECI4 VecI4 vector4D integer.
DATA_COLOR Color color.
DATA_IMAGE Image texture.
DATA_IMAGE_PTR Image* pointer to image object.
DATA_IMAGEPTR ImagePtr pointer to image object in cache.
DATA_DATE_TIME DateTime date and time.
DATA_KBSC KbSc keyboard shortcut.

I saw it. I therefrom took DATA_STR16.Because of what at me an error???
01-30-2011 09:51 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #6
RE: Question on List
Search for ListGroup in Header Browser tool.

Code:
ListGroup(DATA_TYPE type, Int offset, Int size, Flt width, CChar *name)

You're missing offset and size.
(This post was last modified: 01-31-2011 01:27 AM by Driklyn.)
01-31-2011 01:27 AM
Find all posts by this user Quote this message in a reply
Babulesnik Offline
Member

Post: #7
RE: Question on List
(01-31-2011 01:27 AM)Driklyn Wrote:  Search for ListGroup in Header Browser tool.

Code:
ListGroup(DATA_TYPE type, Int offset, Int size, Flt width, CChar *name)

You're missing offset and size.

group=ListGroup(DATA_STR16,1,1,0.3,L"Text"); -error (((
01-31-2011 09:20 AM
Find all posts by this user Quote this message in a reply
llynx Offline
Member

Post: #8
RE: Question on List
(01-30-2011 09:42 PM)llynx Wrote:  
Quote:enum EE::DATA_TYPE
DATA_STR Str String with 16-bit per character.
DATA_STR8 Str8 String with 8-bit per character.
01-31-2011 05:43 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #9
RE: Question on List
search for tutorials, there is ListGroup used in one of them I think, you should use MEMBER(Class,member) macro
ListGroup(MEMBER(class,member),0.3,L"Text");
01-31-2011 11:53 PM
Find all posts by this user Quote this message in a reply
Babulesnik Offline
Member

Post: #10
RE: Question on List
(01-31-2011 05:43 PM)llynx Wrote:  
(01-30-2011 09:42 PM)llynx Wrote:  
Quote:enum EE::DATA_TYPE
DATA_STR Str String with 16-bit per character.
DATA_STR8 Str8 String with 8-bit per character.

What for to write one and too? Really it is difficult to write an example where there was no error?

group=ListGroup (???, 1,1,0.3, L "Text");
02-01-2011 09:50 AM
Find all posts by this user Quote this message in a reply
NxShape Offline
Member

Post: #11
RE: Question on List
struct Struct
{
Int i;
Str s;
}data[4]=
{
{1, "one"},
{2, "two"},
{3, "three"},
{4, "four"},
};

ListGroup list_group[]=
{
ListGroup(MEMBER(Struct,i),0.3f,L"Integer"),
ListGroup(MEMBER(Struct,s),0.5f,L"String" ),
};

Window window;
Region region;
List<Struct> list;

Bool Init(void)
{
...
Gui +=window.create(Rect(-0.5f , -0.4f, 0.5f , 0.4f),"Window with list");
window+=region.create(Rect( 0.05f, -0.6f, 0.95f, -0.1f));
region+=list .create(list_group,ELMS(list_group)).setData(data,ELMS(data));
...
}
02-01-2011 05:01 PM
Find all posts by this user Quote this message in a reply
llynx Offline
Member

Post: #12
RE: Question on List
What's the reason for using MEMBER() over specifying the data type?
02-01-2011 06:19 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #13
RE: Question on List
My guess would be that it calculates the data type, offset, and size for you automatically. If you ever change the struct or the variable's type, you wouldn't have to manually update the ListGroup. It would be done for you.

Babulesnik, I'm not sure you're getting what llynx has been trying to point out. DATA_STR16, the problem lies in the bold text.
02-01-2011 06:40 PM
Find all posts by this user Quote this message in a reply
llynx Offline
Member

Post: #14
RE: Question on List
(02-01-2011 06:40 PM)Driklyn Wrote:  My guess would be that it calculates the data type, offset, and size for you automatically. If you ever change the struct or the variable's type, you wouldn't have to manually update the ListGroup. It would be done for you.

Babulesnik, I'm not sure you're getting what llynx has been trying to point out. DATA_STR16, the problem lies in the bold text.

Ah thanks driklyn

Yes, been trying to point that out without actually saying "use DATA_STR/DATA_STR8"!
02-01-2011 06:52 PM
Find all posts by this user Quote this message in a reply
Babulesnik Offline
Member

Post: #15
RE: Question on List
Many thanks to all who has answered me!

Probably you do not understand me, and I you. What it is necessary to write instead of "???".
group=ListGroup (??? ,1,1,0.3, L "Text");

If I change types all the same an error. A problem in other.

group=ListGroup (DATA_STR8,1,1,0.3, L "Text");-error

group=ListGroup (DATA_STR16,1,1,0.3, L "Text");-error

group=ListGroup (DATA_INT, 1,1,0.3, L "Text");-error

group=ListGroup (DATA_REAL, 1,1,0.3, L "Text");-error
(This post was last modified: 02-01-2011 07:26 PM by Babulesnik.)
02-01-2011 07:25 PM
Find all posts by this user Quote this message in a reply
Post Reply