Thanks Josh that was helpful.<br><br>Aside from getting used to C++ again, I'm making some progress. I started playing around with one of the other examples (TreeList), but I think I'm having another issue. If my understanding is correct, TreeList should print out the name of all the projects for a given username (or something close to that).<br>
<br>I currently have 1 project in my local OMERO server. There is one dataset containing one image in this project. However, when I run TreeList, nothing prints. Also, it thinks the vector resulting from <br><br>std::vector<omero::model::ProjectPtr> projects = AllProjects::getProjects(factory->getQueryService(), "nick");<br>
<br>has size 0. I would think with one project for the username I'm giving it ("nick") that the vector of pointers should have size 1... Makes me think that something is wrong in AllProjects.h, but nothing is popping out at me as wrong.<br>
<br>Do you have any idea what might be going on?<br><br>Also, are there are more examples for C++ or is the best way for me to figure out how to write clients by going through docs/slice definitions one by one to find the methods I need...?<br>
<br>Nick<br><br><br><div class="gmail_quote">On Wed, Sep 9, 2009 at 5:58 PM, <span dir="ltr"><<a href="mailto:josh.moore@gmx.de">josh.moore@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Nick Perry writes:<br>
> Hey Josh,<br>
<br>
Hey Nick,<br>
<div class="im"><br>
> Sorry to bug you with something so specific,<br>
<br>
</div>No worries. The C++ documentation is definitely lacking, but as more<br>
of you want to use it, we'll do everything we can to make it<br>
easier. So please ask away.<br>
<div class="im"><br>
> but if I'm trying to find out what methods / documentation are<br>
> available for IObjectList in the line<br>
><br>
> omero::api::IObjectList results =<br>
> q->findAllByQuery(query_string, p);<br>
><br>
> on <a href="http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/" target="_blank">http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/</a>, how<br>
> would i go about doing it? Probably just my inexperience with<br>
> C++/C, but I would go to the top left frame, click on api, then<br>
> look for IObjectList, since I imagine 'results' is an object of<br>
> type IObjectList, and look for methods there. But I can't find it<br>
> on that list. How do I actually look up IObjectList?<br>
<br>
</div>When you run up against something in the source code which you don't<br>
know how to handle, the first thing to do is to find it in the slice<br>
definition files. omero::api::IObjectList can be found here:<br>
<br>
<a href="https://trac.openmicroscopy.org.uk/omero/browser/trunk/components/blitz/resources/omero/Collections.ice#L102" target="_blank">https://trac.openmicroscopy.org.uk/omero/browser/trunk/components/blitz/resources/omero/Collections.ice#L102</a><br>
<br>
As you can see there's an annotation for mapping the list to a<br>
List<IObject> in Java, rather than IObject[]. This means that it won't<br>
show up in the Java docs since it's not a special type. You can read<br>
more about that in the Ice manual:<br>
<br>
<a href="http://zeroc.com/doc/Ice-3.3.1/manual/Java.11.16.html#95298" target="_blank">http://zeroc.com/doc/Ice-3.3.1/manual/Java.11.16.html#95298</a><br>
<br>
In C++, something similar happens. See:<br>
<br>
<a href="http://zeroc.com/doc/Ice-3.3.1/manual/Cpp.7.7.html" target="_blank">http://zeroc.com/doc/Ice-3.3.1/manual/Cpp.7.7.html</a><br>
<br>
"sequence<omero::model::IObject>" becomes:<br>
<br>
typedef std::vector<omero::model::IObject> IObjectList<br>
<br>
so, though there is a typedef in C++ unlike in Java, it's also not<br>
really a new type, but just a vector, therefore all the standard STL<br>
methods, rules, and documentation apply.<br>
<br>
Hope that helps,<br>
~Josh.<br>
<div><div></div><div class="h5"><br>
> On Wed, Sep 9, 2009 at 5:08 PM, Nick Perry <<a href="mailto:nperry@stanford.edu">nperry@stanford.edu</a>> wrote:<br>
><br>
> > it's in the README for Ice. I've attached my copy (Version 3.3.1)<br>
> ><br>
> ><br>
> > On Wed, Sep 9, 2009 at 5:00 PM, <<a href="mailto:josh.moore@gmx.de">josh.moore@gmx.de</a>> wrote:<br>
> ><br>
> >><br>
> >> Nick,<br>
> >><br>
> >> good to know. Do you remember where you saw that definition of<br>
> >> ICE_HOME? I've seen others with similar issues, and would like to put<br>
> >> a warning up.<br>
> >><br>
> >> Cheers,<br>
> >> ~Josh.<br>
> >><br>
> >> Nick Perry writes:<br>
> >> > you're right; I just figured that out too as i got this email.<br>
> >> ><br>
> >> > annoyingly, this is how i was told (wherever I read it, anyway) how to<br>
> >> make<br>
> >> > my .bash_profile and environmental variables:<br>
> >> ><br>
> >> > export CLICOLOR=1<br>
> >> > export LSCOLORS=ExFxCxDxBxegedabagacad<br>
> >> > export PS1="\n\[\e[1;40;32m\]\u@\h:\w> \[\e[0m\]"<br>
> >> > export PATH=/Library/Ice-3.3.1/bin:$PATH<br>
> >> > export DYLD_LIBRARY_PATH=/Library/Ice-3.3.1/lib:$DYLD_LIBRARY_PATH<br>
> >> > export PYTHONPATH=/Library/Ice-3.3.1/python:$PYTHONPATH<br>
> >> > export ICE_HOME=/Library/Ice-3.3.1:$ICE_HOME<br>
> >> ><br>
> >> > however, that makes colons after the first part. Most of this was<br>
> >> > from the ICE installation. So I monkey-saw-monkey-did and made<br>
> >> > ICE_HOME with a semi-colon too...<br>
> >> ><br>
> >> > /fail<br>
> >> ><br>
> >> > Thanks<br>
> >> > Nick<br>
> >> ><br>
> >> > On Wed, Sep 9, 2009 at 4:42 PM, <<a href="mailto:josh.moore@gmx.de">josh.moore@gmx.de</a>> wrote:<br>
> >> ><br>
> >> > ><br>
> >> > > Hi Nick,<br>
> >> > ><br>
> >> > > Nick Perry writes:<br>
> >> > > ...snip...<br>
> >> > > > > make api_test<br>
> >> > > > g++ -c -o api_test.o api_test.cpp<br>
> >> > > > -I/Users/nperry/Desktop/omero/dist/include<br>
> >> -I/Library/Ice-3.3.1:/include<br>
> >> > ><br>
> >> > > I don't think there's supposed to be a colon in:<br>
> >> > ><br>
> >> > > -I/Library/Ice-3.3.1:/include<br>
> >> > ><br>
> >> > > With it, g++ can't find all of the Ice header files. Is it possible<br>
> >> > > you have ICE_HOME set in your environment with a colon on the end?<br>
> >> > ><br>
> >> > > > *Should this all be working? I'm not asking that you figure out if<br>
> >> > > > I have directory issues or path name errors, but if you look at<br>
> >> the<br>
> >> > > > CPP code above (again, provided here:<br>
> >> > > > <a href="http://trac.openmicroscopy.org.uk/omero/wiki/OmeroClients?onlycpp" target="_blank">http://trac.openmicroscopy.org.uk/omero/wiki/OmeroClients?onlycpp</a><br>
> >> )<br>
> >> > > > and that makefile, should everything be working?<br>
> >> > ><br>
> >> > > Otherwise, at a quick glance, everything should be working. But if<br>
> >> you<br>
> >> > > have issues, feel free to send them in.<br>
> >> > ><br>
> >> > > Cheers,<br>
> >> > > ~josh<br>
> >> > ><br>
> >><br>
> ><br>
> ><br>
</div></div></blockquote></div><br>