Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Proposed change to U++ to allow owning children.
Re: Proposed change to U++ to allow owning children. [message #32058 is a reply to message #32053] Tue, 19 April 2011 18:05 Go to previous messageGo to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
now got you..

though it's nice the way you planned it, the way upp handles ownership in containers i.e. is a bit different.

there, the implicit rule of thumb is (asuming Array is used)
that a pointer denotes a freshly created element (see Add(T* x) function in Array) for which the container needs to take ownership. moreover, there is the Detach() function, returning the pointer indicating that ownership has been stopped and the user needs to take care of that element again.

sth like this should also be expected from the ownership interface for Ctrl (if anytime to come).

IMHO ownership is not usefull in a C++ only / static environment (where no controls are created and thus nothing needs to be deleted). they are defined in Layout and done.

for dynamic environment OTOH, where controlls with a reduced set of api (GetData,SetData,WhenAction Callback) are created and destroyed in a deliberate manner, ownership would improove codeability.. (especially thinking about scripting layouts, like my current intent: Python).

thus maybe mirek can help with some ideas. but it needs to be thought out well, since it touches the upp philosophy..

BTW: as soon as the last little fix from CtrlLib is online, i'll post here a current environment, for dynamic control handling, like promised.

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Get MAC addresses for windows and linux
Next Topic: Testing framework in U++.
Goto Forum:
  


Current Time: Sat Jun 08 16:47:17 CEST 2024

Total time taken to generate the page: 0.02244 seconds