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 » U++ Library support » U++ Library : Other (not classified elsewhere) » Vector Error
Vector Error [message #17394] Wed, 13 August 2008 14:24 Go to next message
TeCNoYoTTa is currently offline  TeCNoYoTTa
Messages: 138
Registered: July 2008
Location: Egypt
Experienced Member

hello all

why this gives error
struct HiddenTag
{
String name;
String value;
}
Vector<HiddenTag> x;


Re: Vector Error [message #17395 is a reply to message #17394] Wed, 13 August 2008 14:31 Go to previous messageGo to next message
kodos is currently offline  kodos
Messages: 111
Registered: March 2008
Experienced Member
Vector is for moveable types. See: http://www.ultimatepp.org/srcdoc$Core$Moveable$en-us.html

Either mark your type as Moveable or use an Array.
Re: Vector Error [message #17396 is a reply to message #17395] Wed, 13 August 2008 14:42 Go to previous messageGo to next message
TeCNoYoTTa is currently offline  TeCNoYoTTa
Messages: 138
Registered: July 2008
Location: Egypt
Experienced Member

thanks for your respond

[Updated on: Wed, 13 August 2008 14:44]

Report message to a moderator

Re: Vector Error [message #17397 is a reply to message #17394] Wed, 13 August 2008 15:04 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
BTW, String is moveable itself, so if your struct is just as you posted it here, you can declare it moveable too by:
struct HiddenTag : Moveable<HiddenTag>
{
  String name;
  String value;
};


But keep thinking about the moveable property whenever you add new thing to that structure.

I did want to give you also some link with information which basic UPP types are (not) moveable, but I don't see anything like that in documentation, just generic moveable concept description, and from some examples it is obvious the "UPP::String" *is* moveable too, so kodos gave you pretty much all reasonable documentation which is available.

But I think this area should be expanded and improved in documentation. Some simple table with moveable yes/no of Core UPP classes may be helpful. (looking at Mirek Smile )
Re: Vector Error [message #17398 is a reply to message #17397] Wed, 13 August 2008 16:19 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Whats wrong with Ctrl-Q, type "String", hit return, Select ::String. You don't even have to open the file! Smile Looking at the source is almost always the easiest way to find something out (one of the reasons I like Upp so much actually).

And as far as I can tell, every class that you could conceivably need to be Moveable is, with the obvious exception of Ctrl derived classes.

And just for completeness: Only Vector requires Moveable, Array does not.
Re: Vector Error [message #17399 is a reply to message #17397] Wed, 13 August 2008 17:56 Go to previous messageGo to next message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
Quote:

But I think this area should be expanded and improved in documentation. Some simple table with moveable yes/no of Core UPP classes may be helpful. (looking at Mirek Smile )

Quote:

Looking at the source is almost always the easiest way to find something out (one of the reasons I like Upp so much actually).


Reading the source code is definitely the best; and for source code, it is very readable (props to the U++ developers). But since there are no comments in the source, the reasoning/purpose behind the code is not readily apparent. This is why I feel that the documentation is crucial for the advance of U++. Documentation needs to be pulled together centrally. How about we start a documentation team? Assign some tasking and take a more structured approach to it...
Re: Vector Error [message #17401 is a reply to message #17394] Wed, 13 August 2008 19:59 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
Well, some year ago I did start to try always look first at "Manual" web whenever I hit some problem, and quite often it *does* help.
Of course when Manual fails, I end up reading sources, but I think new "alien" (to somebody who moves from other toolkits... heck, even from other languages) concepts like "moveable" should be backed up very well by manual too, not just by comment-less source code.

I think there still can be done lot of work on structure, also a feedback from new U++ users would be invaluable too, as I think nobody who's using U++ over year can catch some obvious problems with documentation.

And if somebody really want to, he can work on docs too (like captainc work on SQL recently), there's also wiki for collaboration and the forum has category for both web issues and/or PR/documentation to discuss these things.

I mean, what can really move these things forward is the actual WORK on docs/discussion, the opportunities, while maybe not ideal, do exist. Smile (and so far I'm failing to deliver anything and I don't think I will improve in this anytime soon, I have always "more important" things to do :/.)
Re: Vector Error [message #17403 is a reply to message #17399] Wed, 13 August 2008 20:12 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
captainc wrote on Wed, 13 August 2008 11:56

This is why I feel that the documentation is crucial for the advance of U++. Documentation needs to be pulled together centrally. How about we start a documentation team? Assign some tasking and take a more structured approach to it...



I feel the same. Working on it.

Mirek
Re: Vector Error [message #17405 is a reply to message #17403] Wed, 13 August 2008 21:29 Go to previous messageGo to next message
TeCNoYoTTa is currently offline  TeCNoYoTTa
Messages: 138
Registered: July 2008
Location: Egypt
Experienced Member

i want to help in documentation but the problem is that i don't have good experience
Re: Vector Error [message #17413 is a reply to message #17405] Thu, 14 August 2008 09:19 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

I want to help with docs too.
Re: Vector Error [message #17414 is a reply to message #17405] Thu, 14 August 2008 09:32 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
TeCNoYoTTa wrote on Wed, 13 August 2008 21:29

i want to help in documentation but the problem is that i don't have good experience


Than you are the right man to point us in direction what is not documented well for inexperienced users. Wink
Re: Vector Error [message #17420 is a reply to message #17414] Thu, 14 August 2008 16:39 Go to previous messageGo to next message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
Seems like we have interest in documentation. All we need is a list of topic to write to act as a guide. Just a simple task list that we can check off one by one. Whoever is free to write documentation for an item would be able to do so. A short starter list would be great for now. We don't need too much organization, just a way to keep track of the docs. Maybe a documentation specific svn repo? Finalized documentation can be merged into packages when ready...
Re: Vector Error [message #17428 is a reply to message #17420] Thu, 14 August 2008 18:03 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
captainc wrote on Thu, 14 August 2008 10:39


We don't need too much organization, just a way to keep track of the docs. Maybe a documentation specific svn repo? Finalized documentation can be merged into packages when ready...


As I said, working on it.

I have considered various approaches (really many of them).

Anyway, for now the best concept seems to simply keep everything in single svn repo and roll out a system of user rights to allow write access to topic++ folders.

Also, I am afraid we will have to fix T++ format (and handling) to be more svn friendly - now it is zlib compressed ready for #inclusion into C++, we should make this optional IMO and keep it as QTF text.

Mirek
Previous Topic: CtrlLib PaletteLayout wrong size (Very Minor)
Next Topic: opening window in hidden mode
Goto Forum:
  


Current Time: Thu Mar 28 22:39:51 CET 2024

Total time taken to generate the page: 0.01516 seconds