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++ TheIDE » U++ TheIDE: CodeEditor, Assist++, Topic++ » how to create .tppi and .i files (and a working .tpp in a RichTextView)
how to create .tppi and .i files (and a working .tpp in a RichTextView) [message #25768] Thu, 11 March 2010 02:24 Go to next message
ricper is currently offline  ricper
Messages: 4
Registered: May 2008
Location: Italy
Junior Member
I'm going to tell you a little story, be patient read it from the beginning to the end, you will save a lot of time!
Suppose you aren't so new to upp.
Suppose you want to add in a previously created form (called AboutDlg) a RichTextView with some stuff inside to do a little About dialog.
What will you do?
IT'S OBVIOUS. You look at the example called HomeBudget!.
In Fact you happily add your .tpp file... How? Are you saying HOW?
IT'S OBVIOUS! Right click with the mouse on a blank portion of the list that is currently displaying your .cpp and .h files and click on the self explanatory voice "Insert Package Directory File(s)". ("Add File(s) to Package" was too simple)
When the window appears type the name of your file (for example TAbout.tpp) and press OK.
Wow! you DID IT!
And now? What! You can't write on the page? You can't click on those enabled-looking buttons?
ITS OBVIOUS! You aren't careful! You must rigth click on the void list on your left searching the "New Topic" menu! Now that you have selected your language you write the topic name, for example... "About"... Is displaiyng About$en-us? Why? Didn't you wrote it? Yes! You did it!
FINALLY! Now you add some text and links and you want to add an image to the... WHAT AGAIN! You don't find the toolbar button to add an image from a file to the page? IT'S OBVIOUS! THERE ISN'T! Why are you searching it there! There is an OBVIOUS menu voice "Insert Image From File" in the "polimorphic" Edit menu, yes after File...
So it's time to add the RichTextView control inside your form (you call it for example mtxtr_About) and a well done copy and paste from the HomeBudget sample


...

#define TOPICFILE <YOURPROJECTNAME/TAbout.tpp/all.i>
#include <Core/topic_group.h>

AboutDlg::AboutDlg()
{
	CtrlLayout(*this, "");
	Sizeable().Zoomable();
	
        mtxtr_About.NoSb();
	//Size sz = mtxtr_About.GetSize();
	mtxtr_About.SetQTF(GetTopic(String("YOURPROJECTNAME/TAbout/About$en-us")), Zoom(100, 600));
	mtxtr_About.SetZoom(Zoom(1, 1));		
}

...



Ok finally! YOU DID IT! WHAAAAT? WHAT! Compiler error? Can't find all.i? Why? ARE YOU ASKING ME WHY? Search on the upp forum. I'm tired.
After a couple of hours and dozen web pages visited...
AAAHHHH you start to learn! IT WAS OBVIOUS? Didn't you notice that small red sign just in the corner of your src.tpp (home budget sample) file?
I was sure! What is it? I'ts a small "I", yes the letter of the alphabet! It means "Includeable Topic Group".
Didn't you found it with your right button? I'm sorry...
Three hours to do a little about window?
It's OBVIOUS!

The end.

Rick



86d14362e245f101f9ffae6c952a7ced
Re: how to create .tppi and .i files (and a working .tpp in a RichTextView) [message #25775 is a reply to message #25768] Thu, 11 March 2010 13:59 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14052
Registered: November 2005
Ultimate Member
ricper wrote on Wed, 10 March 2010 20:24

I'm going to tell you a little story, be patient read it from the beginning to the end, you will save a lot of time!
Suppose you aren't so new to upp.
Suppose you want to add in a previously created form (called AboutDlg) a RichTextView with some stuff inside to do a little About dialog.
What will you do?
IT'S OBVIOUS. You look at the example called HomeBudget!.
In Fact you happily add your .tpp file... How? Are you saying HOW?
IT'S OBVIOUS! Right click with the mouse on a blank portion of the list that is currently displaying your .cpp and .h files and click on the self explanatory voice "Insert Package Directory File(s)". ("Add File(s) to Package" was too simple)
When the window appears type the name of your file (for example TAbout.tpp) and press OK.
Wow! you DID IT!
And now? What! You can't write on the page? You can't click on those enabled-looking buttons?
ITS OBVIOUS! You aren't careful! You must rigth click on the void list on your left searching the "New Topic" menu! Now that you have selected your language you write the topic name, for example... "About"... Is displaiyng About$en-us? Why? Didn't you wrote it? Yes! You did it!
FINALLY! Now you add some text and links and you want to add an image to the... WHAT AGAIN! You don't find the toolbar button to add an image from a file to the page? IT'S OBVIOUS! THERE ISN'T! Why are you searching it there! There is an OBVIOUS menu voice "Insert Image From File" in the "polimorphic" Edit menu, yes after File...
So it's time to add the RichTextView control inside your form (you call it for example mtxtr_About) and a well done copy and paste from the HomeBudget sample


...

#define TOPICFILE <YOURPROJECTNAME/TAbout.tpp/all.i>
#include <Core/topic_group.h>

AboutDlg::AboutDlg()
{
	CtrlLayout(*this, "");
	Sizeable().Zoomable();
	
        mtxtr_About.NoSb();
	//Size sz = mtxtr_About.GetSize();
	mtxtr_About.SetQTF(GetTopic(String("YOURPROJECTNAME/TAbout/About$en-us")), Zoom(100, 600));
	mtxtr_About.SetZoom(Zoom(1, 1));		
}

...



Ok finally! YOU DID IT! WHAAAAT? WHAT! Compiler error? Can't find all.i? Why? ARE YOU ASKING ME WHY? Search on the upp forum. I'm tired.
After a couple of hours and dozen web pages visited...
AAAHHHH you start to learn! IT WAS OBVIOUS? Didn't you notice that small red sign just in the corner of your src.tpp (home budget sample) file?
I was sure! What is it? I'ts a small "I", yes the letter of the alphabet! It means "Includeable Topic Group".
Didn't you found it with your right button? I'm sorry...
Three hours to do a little about window?
It's OBVIOUS!

The end.

Rick




Well, it is OBVIOUS that we should care about newbies much more.

Maybe "Add" submenu of Project menu with all various files types and alternatives listed?

Mirek

P.S.: Sorry for the troubles caused...
Re: how to create .tppi and .i files (and a working .tpp in a RichTextView) [message #25778 is a reply to message #25775] Thu, 11 March 2010 15:08 Go to previous messageGo to next message
ricper is currently offline  ricper
Messages: 4
Registered: May 2008
Location: Italy
Junior Member
Hallo Mirek,
thanks for the reply. I must say that the words "User Friendly" are not exactly upp's philosophy.
And it's a sin beacause upp are great IMHO. They are reliable, well organized, multiplatform, fast, and have all the necessary to build either a simple or a complex project. Last but not the least they are free and compile in a single and portable exe.
We haven't had a single installation problem of our products.

To return about the "obvious" argument, besides various Add voices in the project menus, that would be certainly appreciated, I suggest also to implement ALL functions in either toolbars and menus.
Another consideration, more difficult to change, I know, is about function names: for example

Java:
MsgDialog(java.lang.String message)


.net:
MessageBox.Show(string text)


vb6:
MsgBox(string text)


wxWidgets
int wxMessageBox(const wxString& message, const wxString& caption = "Message", int style = wxOK,
wxWindow *parent = NULL, int x = -1, int y = -1)


QT is sligthly different but on the same conceptual line
QMessageBox msgBox;
msgBox.setText("The document has been modified.");
msgBox.exec();


and Upp?
PromptOk(String text);


Why PromptOk? Why not MessageBox or MsgDlg or MessageOk? And that is only a little example.
That's the real problem. New users (especially c++) often larn the basic of programming in other languages, from school to work (with formation courses) or for years they used other languages or libraries. If you save them the pain and the stress to learn again from scratch, searching for hours or waiting a reply on the forum (that is a very good forum also), what they usually do in seconds, I'm sure that upp would grow exponentially. I would surely suggest them to all my programmer friends, that maybe can even contribute in the project.
In conlcusion adapting the editor copiyng something from others widely used editors (and also function/class names form widely used libraries) for me is a good starting point to help new users. And it saves you the stress to document your library in every detail, because a good programmer usually it's able to find the correct way once found the starting point.
Actually I have only this disappointment against upp, because the rest rocks.

Rick

P.S. I'm NOT a newbie! I found my way whitout asking! Razz


86d14362e245f101f9ffae6c952a7ced
Re: how to create .tppi and .i files (and a working .tpp in a RichTextView) [message #34631 is a reply to message #25768] Fri, 02 December 2011 15:29 Go to previous messageGo to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi,

+1 !

I totally agree with ricper : he says exactly what I feel with upp. Very good ! Very Happy And easy to use (it's obvious, as he says)... when you know how to do !

The problem is that :
- Not enough documentation
- Some very good documentation, clear and nice to read, but very difficult to find,
- Things strangely done, like PromptOk example...

All that is discouraging for people trying UPP. If someone doesn't have a strong will to learn it, if someone just "try to see", he will be discouraged.

In the contrary, if attention is given to do better about doc and usefull names for function/classes, someone trying UPP will like and adopt it, as it has really a lot of advantages compared to other products !

Re: how to create .tppi and .i files (and a working .tpp in a RichTextView) [message #34643 is a reply to message #34631] Fri, 02 December 2011 21:52 Go to previous messageGo to next message
BioBytes is currently offline  BioBytes
Messages: 307
Registered: October 2008
Location: France
Senior Member
Hi,

It is not necessay a lack of documentation that could impede new users coming to U++ but where to find the information in tpp or forum. However U++ is definitively a great IDE more innovative and faster than wxWidgets I used from 2008 to 2011 before returning to U++ which is now close to maturity.

So it is crucial that more experienced users still keep on helping newbies and also others (like me) through the forum. U++ community is a strength that should be preserved.

Documentation is on the way (see dolik and some other U++ "gurus" efforts) but it is a tough work.

I would say that PromptOK does not seem strange to me and comes rapidly familiar with time. Not more than the sizers in wxWidgets Confused indeed.

Have all a nice week-end

Biobytes
Re: how to create .tppi and .i files (and a working .tpp in a RichTextView) [message #34692 is a reply to message #34643] Tue, 06 December 2011 15:51 Go to previous messageGo to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi,

BioBytes wrote on Fri, 02 December 2011 21:52

It is not necessay a lack of documentation that could impede new users coming to U++ but where to find the information in tpp or forum.

Yes, it's what I said : there is already some good doc, but often not easy to find...

BioBytes wrote on Fri, 02 December 2011 21:52

However U++ is definitively a great IDE more innovative and faster than wxWidgets

I never used wxWidgets and cannot compare, but yes, U++ is a great, nice to use and innovative IDE Smile

BioBytes wrote on Fri, 02 December 2011 21:52

see dolik and some other U++ "gurus" efforts

Yes, thank to them, things are better and better. And they also help a lot on the forum, it's also very important for beginners Smile

But I think that, sometimes, they could make doc rather than explaining things in the forum several times. I know : it's a difficult choice, and often it seems faster to reply quickly in the forum than to make a doc. But it's often that you have to collect pieces of informations in several topics on the forum, and this is discouraging more especially for beginners !

Saying that, I I acknowledge my own responsibility too : even if I'm not an expert, when I gathered pieces of information about some badly or not documented class, I could take some time to make or enhance the doc Embarassed

BioBytes wrote on Fri, 02 December 2011 21:52

I would say that PromptOK does not seem strange to me and comes rapidly familiar with time.

Sure ! The problem is not that it seems strange by itself, but compared to others IDE/languages ! Yes, as soon as you know, it becomes familiar, but how much time did you spent to discover it ? For me, I cannot say exactly, but it was a lot, and finally I made my own, and some time later, I discovered it by chance in the forum ! With a more standard name like MsgBox, I should have found it a lot faster !

At least, the list of common dialog boxes should be listed in this index Wink (I'll try to do that ASAP, but have other docs to do that others cannot make easily).
Re: how to create .tppi and .i files (and a working .tpp in a RichTextView) [message #41602 is a reply to message #25768] Sat, 04 January 2014 15:00 Go to previous messageGo to next message
ManfredHerr is currently offline  ManfredHerr
Messages: 67
Registered: February 2013
Location: Germany
Member
Thank you very much for your little story!!! Imho it is a valuable resource of Topic++ documentation.

Let me add another hint for the avant-garde User Interface. If you need another language than en-us don't click on the arrow of the drop down box but click on the string itself. There you can choose a language that is available for selection afterwards.
Re: how to create .tppi and .i files (and a working .tpp in a RichTextView) [message #45704 is a reply to message #25768] Fri, 25 December 2015 11:18 Go to previous message
slashupp is currently offline  slashupp
Messages: 231
Registered: July 2009
Experienced Member
I've now tried to use Topic++ to add API documentation, and gave up - it sucks - the concept is brilliant, but the implementation needs serious attention...

Stuff I type in disappear or appear in the wrong place and wrong font.
I tried creating a .tpp file and use that, it got ignored.

unclear/incomplete documentation

In the existing Upp-sources where the stuff is in place, it works well but to get it in place seems much more trouble than just adding inline comments.


[Updated on: Sat, 26 December 2015 06:37]

Report message to a moderator

Previous Topic: [BUG] Or at least strange behavior, in Set active
Next Topic: [FEATURE] Alt+L shall do GoBack when the log file is opened (patch included)
Goto Forum:
  


Current Time: Sun Oct 06 22:17:59 CEST 2024

Total time taken to generate the page: 0.02612 seconds