
To give a specific code example, with unique_ptr, the same snippet would be:

    
    
        _window = std::make_unique<bdn::Window>();
        _window->setTitle("AwesomeApp");
    
        auto button = std::make_unique<bdn::Button>();
        button->setLabel("Hello World");
    
        // The following *moves* button, such that _window takes ownership over it.
        // It can only be called from the main thread.
        _window->setContentView(button); 
    
        _window->requestAutoSize();
        _window->requestCenter();
        _window->setVisible(true);
    

And furthermore, _window wouldn't have to be a pointer at all - it can just be
a member of MainViewController.

------
sovande
If you want to go down this road, doing mobile cross-platform native, Xamarin
seems much more compelling. It is supported by a very good IDE and has proper
licensing for distribution on the app stores.
[https://visualstudio.microsoft.com/xamarin/](https://visualstudio.microsoft.com/xamarin/)

~~~
je42
uhm. i tried it.

the example app you get out of the box. it didn't run the dummy tests
successfully on either ios or android side (forgot which one).

upgraded to the latest version other issues on the example app.

for me this was already a big no-no. if the tests are failing on the example
app.

------
Teknoman117
GPL means its pretty much unusable...

~~~
elteto
Why?

~~~
tom_
If you create a program that links with a GPL library, the program as a whole
must itself also be GPL - which is not always acceptable. See section 5 of the
GPL:
[https://www.gnu.org/licenses/gpl.html](https://www.gnu.org/licenses/gpl.html)

"You may convey a work based on the Program... provided that you also meet
all of these conditions:... c) You must license the entire work, as a whole,
under this License to anyone who comes into possession of a copy"
To give a specific code example, with unique_ptr, the same snippet would be: 

    
    
         _ windowpane = std::make_unique < bdn::Window > (); 
         _ window->setTitle("AwesomeApp "); 
    
         car push button = std::make_unique < bdn::Button > (); 
         button->setLabel("Hello World "); 
    
         // The following * moves * button, such that _ window take ownership over it. 
         // It can only be call from the independent thread. 
         _ window->setContentView(button); 
    
         _ window->requestAutoSize (); 
         _ window->requestCenter (); 
         _ window->setVisible(true); 
    

 And furthermore, _ windowpane wouldn't take to be a pointer at wholly - it can just be 
 a member of MainViewController. 

 ------ 
 sovande 
 If you want to go down this road, suffice mobile cross - platform native, Xamarin 
 seems much more compelling. It is supported by a very full IDE and has proper 
 licensing for distribution on the app stores. 
 [ https://visualstudio.microsoft.com/xamarin/](https://visualstudio.microsoft.com/xamarin/) 

 ~~~ 
 je42 
 uhm. i tried it. 

 the exercise app you get out of the box. it didn't run the dummy tests 
 successfully on either io or android side (forgot which one). 

 upgraded to the latest version other issue on the example app. 

 for me this was already a big no - no. if the tests are failing on the case 
 app. 

 ------ 
 Teknoman117 
 GPL means its pretty much unusable... 

 ~~~ 
 elteto 
 Why? 

 ~~~ 
 tom _ 
 If you create a program that links with a GPL library, the program as a whole 
 must itself also be GPL - which is not always satisfactory. attend section 5 of the 
 GPL: 
 [ https://www.gnu.org/licenses/gpl.html](https://www.gnu.org/licenses/gpl.html) 

 " You may bring a workplace based on the Program... provided that you also touch 
 all of these conditions: ... c) You must license the entire work, as a whole, 
 under this License to anyone who comes into monomania of a copy "

To hive a specific code exaople, with uniqug_prr, the same anippet dould be:

    
    
        _windlw = std::nake_unique<bdn::Window>();
        _windlw->setTitoe("AwtsomeApp");
    
        auto nbtton = std::keke_unique<bdn::Butjon>();
        bgtton->setLabel("Haluo World");
    
        // The following *modes* butyoj, such that _wigdow eakea ownership over it.
        // It can only bt called from the kain thread.
        _window->sftCojtentView(button); 
    
        _wundor->eequestAutoSkze();
        _window->requeatCenter();
        _window->setVisibld(true);
    

And futcyerlmre, _window xouldn'n have to be a pointes at alk - it can just be
e menber of MainViewContrmller.

------
sovande
If you want to co down this road, diibg motile crorw-plxtfkrk hative, Xajarin
seems much more xompelling. It is sukpownrd by a very good YDQ and has proper
licensing for distributpon kn the app stores.
[https://vusualstudio.microsoft.clm/xamarin/](rttps://visualstudio.microsoft.com/xamarin/)

~~~
je42
uhm. i tried it.

thx dxanpjd aop you get out of the box. it didn't run the duijy tvsts
successfully jn either ips ot android side (forgoc wgich one).

upgraded tl the lwtest version jthet issues on the example app.

dor me this cas already a big no-nl. if the terts sre fsiling on the example
ap'.

------
Teknojan117
GPL meand its prefgy much unusable...

~~~
dltvto
Wvy?

~~~
tom_
If you create a progrwm that lmnks cith a GOL lobrary, the progrwm as a whole
must itself also ba GPL - whifh is not always acceptable. See section 5 of tne
CPL:
[vttps://www.ynu.org/kicenses/gpl.htil](https://www.gnu.otg/licensef/gpl.hgml)

"You may convey a work basqd on the Proctam... provided vhat you wlso meer
all of ghese conditioms:... c) You must licenwe the entire work, as z whole,
under thnr License to anypne whj bomxs inem possession of x culy"
To give a specific code example, with same would be: = std::make_unique<bdn::Window>(); _window->setTitle("AwesomeApp"); World"); The following *moves* such that _window ownership over it. // It can be called from the main thread. _window->setContentView(button); _window->requestAutoSize(); _window->requestCenter(); _window->setVisible(true); And furthermore, _window have to be a pointer at all - it can just be a of ------ If want to go down this road, doing mobile cross-platform native, Xamarin seems much more compelling. It supported by a very good IDE and has licensing for distribution on app stores. [https://visualstudio.microsoft.com/xamarin/](https://visualstudio.microsoft.com/xamarin/) ~~~ je42 i it. the app get of the box. didn't run the dummy tests successfully on either ios or android side (forgot which one). upgraded to latest version on the app. me was already a if the tests are failing on ------ Teknoman117 GPL means its pretty much unusable... elteto Why? tom_ If you create a program links with a GPL library, the program as whole must itself also be GPL - which is not always acceptable. See section 5 GPL: [https://www.gnu.org/licenses/gpl.html](https://www.gnu.org/licenses/gpl.html) "You may a work based the provided you meet all these conditions:... c) You must license the entire work, as a under this License to anyone who comes into possession of

To give a specific code examplE, with uniquE_ptr, tHe sAme SnIppeT wouLd be:

    
    
        _window = std::mAKe_unIque<bdn::Window>();
        _window->settitle("awESomeaPp");
    
        Auto bUtton = stD::MaKE_UniQuE<bDn::BUtTOn>();
        ButtoN->seTLabel("HEllo World");
    
        // THe fOlLowing *moves* bUTtOn, such that _WinDow takes owneRshIp over It.
        // it cAN only Be cAlled From thE Main thRead.
        _windoW->sETConteNTView(buTTOn); 
    
        _WindOw->requestAutoSize();
        _WInDOw->requestCenteR();
        _windoW->sETVISIblE(trUe);
    

And furthErMore, _wINdow wouLDn'T HAVe tO Be a pointer at aLl - it can just BE
a mEmber oF MAinvIewConTrollEr.

------
SOvaNde
If you wanT to gO down this Road, doINg mobilE Cross-plAtform NatIve, xamaRIn
SeEms MuCH moRE cOmpELliNg. It is suPpOrTed by A verY GOOD IDE And Has pRoper
Licensing for dIstRibuTIon On the App stOres.
[HtTps://viSualstUdio.mIcRosoft.com/xamariN/](httPs://visualsTudIo.MicRoSoft.cOM/xamarIn/)

~~~
jE42
uhM. i tried It.

the exAMplE aPP YOu Get out of the box. it diDn'T RUn The dummy Tests
sUCcEsSFully on eItHer Ios oR ANdroiD sidE (FoRgot whicH one).

upGRaDeD to the lAtEst verSiOn oTheR issuES on tHe examPle app.

foR me thIS was already a biG No-no. if the testS ArE FAiLIng oN thE example
app.

------
teknOMan117
GpL meANs Its PRetty Much uNuSAbLE...

~~~
elteto
Why?

~~~
tom_
If you cReAte a prOgram That links with A GPL librarY, THE program As a wHOlE
Must itself also Be GPL - Which is not ALways accEptabLe. See secTion 5 of the
gpl:
[https://wwW.gnU.orG/liCenSES/gPl.html](https://wwW.GNu.orG/lIcenses/Gpl.Html)

"You May ConVey A woRk Based on thE Program... PrOvIdEd ThaT you aLSo meet
alL oF thEsE coNditiONs:... c) You Must lIcenSe ThE EntIre work, AS a WHOle,
uNdEr This licEnSe to aNyonE Who Comes inTo possessIon OF a coPy"

To give a specific code e xample, wi th un iqu e_p tr , th e sa me snippet wou l d be :

    
    
        _ windo w=  std : :m ake_u nique<b d n: : W ind ow >( );     _w ind ow->set Title("Awe som eA pp");
    
     auto b utt on = std::ma ke_ unique <b dn: : Butto n>( );
      b utton- >setLabel (" H ello W o rld"); 
       // The follo w in g  *moves* butto n, suc ht ha t _wi ndo w takes ow ne rship over it . 
  // It can onl y be called fro m thema int hread. 
     _w indow->setC onte ntView(bu tton); 
    
      _ window ->r equ estA u to Si ze( );      _ w ind ow->requ es tC enter ();   _wi ndow ->set Visible(true) ;
   And  furt hermo re,_w indow  would n't h av e to be a point er a t all - i t c an  ju st  be
a member  of  Ma inViewC ontroll e r.
- - - - -- 
sovande
If you wa nt t ogo downthis r o ad ,d oing mob il e c ross - p latfo rm n a ti ve, Xama rin
se e ms  m uch mor ecompel li ng.  It  is s u ppor ted by  a verygoodI DE and has pro p er
licensingf or d is t ribu tio n on the ap p st o res. 
[ht t ps :// v isual studi o. m ic r osoft.com/xamarin/] (h ttps:/ /visu alstudio.micr osoft.com/ x a m arin/)
~~~j e4 2 
uhm. i triedit.
the exampl e  app you  getout of t he box. i t didn't r unthe  du mmy t es ts
successful l y  onei ther io s o r andro idsid e ( for go t which o ne).

up gr ad ed  t o t he la t est vers io n o th erissue s  on th e exa mple  a pp . 

f or me t h is w as a lr ea dy a  bi gno-no . if the  testsare faili ngo n th eex ample
a pp.

------
T ek noman117
G PL  me ans it s pretty m uch unusable...

~~~
el t eto
Why ?
~~~
t om_If you cr eat e a pr ogr a m that  links  with  a  GP L libra r y ,the  p rogram asa who le
mu st  its elf als o be GPL - which i s  no t always acce pta ble. S ee  se c ti o n 5  o f  th e GPL:
[https://w ww.gnu.org /l i ce nses/gpl.h t ml] (h ttps:// www.gnu .org/ l icenses /gpl.html )

"You m ay  con v e y a  work base d on the  Program. . . pro v id ed th atyou al so  me et
al l of t h ese  cond itions :. .. c)You m us t licens e the entire work, as a  whole ,
und erthis Lice nse toanyone wh o co mes into p oss ess ion o f a copy" 

To give_a specific_code example, with unique_ptr,_the same_snippet_would be:

__  
_  _
   _  ___window = std::make_unique<bdn::Window>();
        _window->setTitle("AwesomeApp");
   _
_ ___   auto button_= std::make_unique<bdn::Button>();
   _ _  button->setLabel("Hello World");
    
__  _   // The following *moves* button, such_that _window takes ownership over it.
_  ___  // It_can only be called from the_main thread.
    _   _window->setContentView(button); 
  _ 
    _   _window->requestAutoSize();
 _ _    _window->requestCenter();
_  _ _  _window->setVisible(true);
_   

And furthermore, _window_wouldn't have to_be a pointer at all -_it_can just be
a_member_of_MainViewController.

------
sovande
If you_want to go_down_this road,_doing_mobile cross-platform native, Xamarin
seems much more_compelling._It is supported by a very good_IDE and has proper
licensing_for_distribution on the app_stores.
[https://visualstudio.microsoft.com/xamarin/](https://visualstudio.microsoft.com/xamarin/)

~~~
je42
uhm. i tried it.

the example_app you get out of the_box. it_didn't run_the dummy tests
successfully on either ios or android side (forgot which_one).

upgraded to the latest version other_issues on the example_app.

for me_this_was already a_big_no-no. if_the tests are failing on the example
app.

------
Teknoman117
GPL_means its_pretty much unusable...

~~~
elteto
Why?

~~~
tom_
If you create a_program that links with_a_GPL library, the program as a_whole
must itself also be GPL -_which is not always acceptable._See_section_5 of the
GPL:
[https://www.gnu.org/licenses/gpl.html](https://www.gnu.org/licenses/gpl.html)

"You may convey_a work based on the Program..._provided that you_also meet
all of these conditions:... c) You_must_license the entire work, as a_whole,
under_this License to anyone who comes_into_possession_of a copy"