From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,591cf01fd1138c66 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g47g2000cwa.googlegroups.com!not-for-mail From: "Lucretia" Newsgroups: comp.lang.ada Subject: Re: Strange factory for wxAda Date: 24 Oct 2005 06:09:30 -0700 Organization: http://groups.google.com Message-ID: <1130159370.271992.266400@g47g2000cwa.googlegroups.com> References: <1129564741.462159.308620@g47g2000cwa.googlegroups.com> <1129652902.862979.44810@f14g2000cwb.googlegroups.com> NNTP-Posting-Host: 194.74.199.42 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1130159375 18454 127.0.0.1 (24 Oct 2005 13:09:35 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 24 Oct 2005 13:09:35 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) X-HTTP-Via: 1.0 Symantec_Web_Security (3.0.1.74), 1.0 C2100-0050414028 (NetCache NetApp/5.5R5) Complaints-To: groups-abuse@google.com Injection-Info: g47g2000cwa.googlegroups.com; posting-host=194.74.199.42; posting-account=G-J9fgwAAADgpzBiEyy5tO4f8MX5fbpw Xref: g2news1.google.com comp.lang.ada:5907 Date: 2005-10-24T06:09:30-07:00 List-Id: > > At the moment, I'm not even thinking about tasking, this will have to > > be thought about later, when I turn my event handler into some sort of > > protected object, which will be tricky considering that that is called > > from C++ :-/ > > Careful. You really need to think about tasking early on, because it is > extremely hard to graft it on afterwards. Now, you may decide that it simply > isn't worth it, and decide to restrict the uses to one task (as GWindows > does, for instance), but it's best to decide on the approach right away. Yeah, I know it would be difficult to stick in later, but seeing as wxAda is in very early stages at the moment, e.g. code rearranging, getting a very basic app working, etc. to find out what raelly needs to be done to make a usable library. Basically, at this moment in time, it would be easy to rearrange the code I do have to fit it around any major changes. I also do want to be able to use the tasking features of Ada, this way I don't need to wrap wxThread, wxMutex, etc. I haven't touched tasking for a long time (not since university!) so I'd need to get all that sorted inside my own head (again). I have a question about this, but I need to think about it some more with the code I have in wxAda for handling the events from the C++ side to the Ada side, so I'll sort that out and bring it over later or tomorrow. > That's what I meant. If you want to do the allocation yourself, you really > don't want any dangling references. So you might want to do whatever it > takes to avoid them (that means making the type limited and not using any > access types in your client interface). Yeah, I have a smart pointer type in my 3D engine code (I think), I can nab that ;-D Currently the wxAda type is derived from Limited_Controlled so yu cannot copy them, but you can grab the addresses, and after some of your advice, I changed the code so that the access types are grabbed inside wxAda. I suppose I could wrap these in my smart pointer type and store them, that might make sense. > In any case, this seems like a tough problem, which I'm glad I don't need to > solve. :-) Yeah, lucky you! ;-D Thanks, Luke.