About Store Forum Documentation Contact



Post Reply 
Grid?
Author Message
smashthewindow Offline
Member

Post: #1
Grid?
Sorry to be asking so many questions, but can anyone tell me how to use Grid class?

I don't think there's anyway to set the individual cell's _data variable. Thank you.
04-28-2013 08:34 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Grid?
Hello,

Grid.funcCreate creates areas and their data

you can adjust the data to custom class using Grid.replaceClass
05-01-2013 12:18 PM
Find all posts by this user Quote this message in a reply
smashthewindow Offline
Member

Post: #3
RE: Grid?
(05-01-2013 12:18 PM)Esenthel Wrote:  Hello,

Grid.funcCreate creates areas and their data

you can adjust the data to custom class using Grid.replaceClass

From the tutorial,
Code:
// replacing class
   {
      Memc<Base> memc;
      memc.replaceClass<Ext>(); // replace the class of elements stored in 'memc' (this however removes all previous elements from container)
      int value=memc.New().func(); // 'value' will be 1
          value=0;
   }

"this however removes all previous elements from container"

I cannot think of a single situation where replaceClass would come in useful.
You lose all your data when you replace the class, so why not just create the container to the new class?
Could you give me an example?
05-24-2013 08:49 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Grid?
Because you can call that method for containers that are defined not in your codes but from some other library (for example from the engine).
You cannot change the headers of other libraries to change their Memc<TYPE1> to Memc<TYPE2>, but you can call replaceClass

Please check gui objects tutorials (those about changing default gui object class and loading gui objects from file)
05-24-2013 08:59 PM
Find all posts by this user Quote this message in a reply
Rubeus Offline
Member

Post: #5
RE: Grid?
When put that way, it's actually quite clever...
05-24-2013 10:44 PM
Find all posts by this user Quote this message in a reply
Post Reply