About Store Forum Documentation Contact



Post Reply 
Array Conversion
Author Message
ronghester Offline
Member

Post: #1
Array Conversion
How to convert the memc<TextNode> array into array pointer of cchar.

This is what I am talking about.
cchar* elm[] = memc<TextNode>

I am actually trying to show the nodes (return by data after reading file) into a combobox.

Thanks
04-16-2017 05:43 PM
Find all posts by this user Quote this message in a reply
ronghester Offline
Member

Post: #2
RE: Array Conversion
Really Having a hard time to display nodes from file into combobox. I am reading the file got the node which return the array of TextNode now have to convert it to cchar*elm[] in order to show it in the combobox.

It should have been as simple as creating static array and inserting values but not working. Please let me know how to accomplish this.

Any help would be greatly appreciated.
04-17-2017 09:44 AM
Find all posts by this user Quote this message in a reply
Zervox Offline
Member

Post: #3
RE: Array Conversion
This is one way you can do it.
Code:
Str ComboBoxElmFunc(C TextNode &elm) // function which transforms TextNode into a string
{
   return S+elm.asText();
}

ListColumn lc[]= // list columns
      {
         ListColumn(ComboBoxElmFunc, 0.3, "Function"), // list column which uses custom function for data interpretation
      };
   b.setColumns(lc   , Elms(lc   ), true)  // set list columns
                .setData   (data/*put the memc here*/   ); // set list data

but to answer your regarding converting it to array information
you would use
Memc<object> object;
object *objs=object.data();
(This post was last modified: 04-18-2017 04:39 AM by Zervox.)
04-17-2017 10:29 PM
Find all posts by this user Quote this message in a reply
ronghester Offline
Member

Post: #4
RE: Array Conversion
(04-17-2017 10:29 PM)Zervox Wrote:  This is one way you can do it.
Code:
Str ComboBoxElmFunc(C TextNode &elm) // function which transforms TextNode into a string
{
   return S+elm.asText();
}

ListColumn lc[]= // list columns
      {
         ListColumn(ComboBoxElmFunc, 0.3, "Function"), // list column which uses custom function for data interpretation
      };
   b.setColumns(lc   , Elms(lc   ), true)  // set list columns
                .setData   (data/*put the memc here*/   ); // set list data

but to answer your regarding converting it to array information
you would use
Memc<object> object;
object *objs=object.data();

That worked! You are my Man.

Because of this kind of support on this community developers like me are getting very lazy, My apologies for that.
04-18-2017 09:09 AM
Find all posts by this user Quote this message in a reply
Zervox Offline
Member

Post: #5
RE: Array Conversion
I am glad it worked for you. smile

I've used the engine since 2010 and I still have not used everything available in Esenthel. wink
04-18-2017 11:16 AM
Find all posts by this user Quote this message in a reply
Post Reply