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 » Developing U++ » UppHub » My Simple U++ Application
My Simple U++ Application [message #6013] Sat, 28 October 2006 09:21 Go to next message
yeohhs
Messages: 75
Registered: November 2005
Location: Malaysia
Member
This is a U++ program (version 0.0.1 alpha) released for testing and comments.

Features implemented
1. Splash screen
2. About dialog
3. Menu and popup menu
4 Toolbar
5. Status bar
6. Options dialog
7. Help (using Topic++)
8. Editors dialog (only shows DocEdit and LineEdit)
9. use of .rc file to embed program icon and version info.

This program is meant as a simple template program which I will use to explore the various aspects of U++.

I'm still new to U++ so I would appreciate any ideas or suggestions on this simple template. I want to get it right so that later I will write an article that explains how this program works.

Thanks in advance
Yeoh
--
This version is obsolete so I have deleted it. The latest version is in a later posting below.

[Updated on: Tue, 31 October 2006 14:53]

Report message to a moderator

Re: My Simple U++ Application [message #6017 is a reply to message #6013] Sat, 28 October 2006 18:55 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
yeohhs wrote on Sat, 28 October 2006 09:21

This is a U++ program (version 0.0.1 alpha) released for testing and comments.

Features implemented
1. Splash screen
2. About dialog
3. Menu and popup menu
4 Toolbar
5. Status bar
6. Options dialog
7. Help (using Topic++)
8. Editors dialog (only shows DocEdit and LineEdit)
9. use of .rc file to embed program icon and version info.

This program is meant as a simple template program which I will use to explore the various aspects of U++.

I'm still new to U++ so I would appreciate any ideas or suggestions on this simple template. I want to get it right so that later I will write an article that explains how this program works.

Thanks in advance
Yeoh




Hi Yeoh,

very nice work! It was helpful for me. I was still unaware of Topic and how to use it. U++ is a continue surprise for me. But now I filled the gap.
Please continue on this line, with very simple interaction among widgets... sorry, controls. When all normal controls are covered perhaps a simple application about sqlite would be greatly appreciated by our forum.
Many thanks,

Luigi
Re: My Simple U++ Application [message #6029 is a reply to message #6017] Sun, 29 October 2006 03:54 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Comments:

I feel a little bit uneasy calling exploreEditors in constructor. In my book, that is not a very good practice, I would rather make it a separate call...

I would rather used TimeCallback for Splash - direct use of "timer ID" comes with danger of ID clash - there is even some "protocol" about enumerating these IDs to avoid this (see e.g. ToolBar). TimeCallback wastes a little space, but is easy to use.

"Ini" configuration format is OK, but least important. Usually, we use binary serialization for .cfg files (Serialize method, operator%) or CParser or Xml(ize).

MIrek
Re: My Simple U++ Application [message #6032 is a reply to message #6029] Sun, 29 October 2006 04:12 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
P.S.:

I usually place more than single layout in .lay file, but this one is rather matter of personal preferences...
Re: My Simple U++ Application [message #6038 is a reply to message #6017] Sun, 29 October 2006 05:53 Go to previous messageGo to next message
yeohhs
Messages: 75
Registered: November 2005
Location: Malaysia
Member
Hi Luigi,

Thanks for testing it. I'm glad it helps.
Yes, I will do one for SQLite.

Best Regards,
Yeoh

[Updated on: Sun, 29 October 2006 06:03]

Report message to a moderator

Re: My Simple U++ Application [message #6039 is a reply to message #6029] Sun, 29 October 2006 06:02 Go to previous messageGo to next message
yeohhs
Messages: 75
Registered: November 2005
Location: Malaysia
Member
Hi Mirek,

Thank you very much for your comments. You're absolutely right about calling member function in constructors. I will put a "load" button in the lay file to call the function. Smile

Thanks. I will learn how to use TimeCallback.

U++ is great. It provides several ways for handling cfg files. I dislike registry. In future U++ apps, I will use the several methods you mentioned.

Best Regards,
Yeoh
--
P.S. Yes, I prefer to use one lay file for each class. My idea is to have 4 files in each class: cpp, h, lay and iml. If the class needs more than one layout, it will be in the lay file for that class. I suppose there is a U++ coding style somewhere in the documentation. I will search for it. Smile


Re: My Simple U++ Application [message #6046 is a reply to message #6039] Sun, 29 October 2006 08:28 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
to help you some with TimeCallback:
http://www.arilect.com/upp/forum/index.php?t=msg&goto=38 80&#msg_3882
It is about letting a Label bling by using a TimeCallback

Bas
Re: My Simple U++ Application [message #6052 is a reply to message #6013] Sun, 29 October 2006 10:52 Go to previous messageGo to next message
yeohhs
Messages: 75
Registered: November 2005
Location: Malaysia
Member
Hi Bas, Smile

Thanks. This forum has tons of useful information.

Best Regards,
Yeoh
Re: My Simple U++ Application [message #6056 is a reply to message #6013] Sun, 29 October 2006 11:42 Go to previous messageGo to next message
yeohhs
Messages: 75
Registered: November 2005
Location: Malaysia
Member
Here is the revised version. Smile

Changes
1. it now has load buttons to load text into DocEdit and LineEdit controls.
2. splash screen now uses TimeCallback object
3. bug fix: popup menu

Thanks and best regards,
Yeoh
--
File attachment deleted.
This version is obsolete so I have deleted it. Please see posting below for the latest version. Thanks. Smile


[Updated on: Fri, 10 November 2006 14:44]

Report message to a moderator

Re: My Simple U++ Application [message #6397 is a reply to message #6013] Fri, 10 November 2006 14:42 Go to previous messageGo to next message
yeohhs
Messages: 75
Registered: November 2005
Location: Malaysia
Member
Hi,

This is the latest version of my simple U++ program.

It now covers all of the "most frequently used" controls as shown in the layout editor. This version only shows how to create the control and set, get values from the control. No fancy or complicated C++ code. Smile

Also, there is a custom USC file for UPX compression and file deletion.

Thanks and best regards,
Yeoh
--
P.S. This program was built using U++ 611-dev1 version and tested on Win2000 with MSC8 Optimal Build.

Obsolete attachment removed. Please see corrected version below.

[Updated on: Sat, 11 November 2006 17:39]

Report message to a moderator

Re: My Simple U++ Application [message #6399 is a reply to message #6397] Fri, 10 November 2006 16:30 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
Cool , thanks !

I got two errors where you explicitely give the class qualifier in the class declarations.

Matthias
Re: My Simple U++ Application [message #6400 is a reply to message #6399] Fri, 10 November 2006 18:16 Go to previous messageGo to next message
yeohhs
Messages: 75
Registered: November 2005
Location: Malaysia
Member
Hi Matthias,

Thanks for reporting the errors.
They were in LineEditor.h and DocEditor.h.
Fixed! Smile

Best Regards,
Yeoh
--
Re: My Simple U++ Application [message #6402 is a reply to message #6400] Fri, 10 November 2006 20:17 Go to previous messageGo to next message
gprentice is currently offline  gprentice
Messages: 260
Registered: November 2005
Location: New Zealand
Experienced Member

Yeoh

Nice work. On my system the window was positioned off screen at startup and I had to use the system menu to move it back on screen - i.e. Alt Space -> M -> use left arrow key to bring the window in view. Using Windows cascade or tile wouldn't bring the window in view for some reason. (Win XP).

I have a 20 inch widescreen LCD - 1680 by 1050 or something.

Graeme
Re: My Simple U++ Application [message #6407 is a reply to message #6402] Sat, 11 November 2006 10:56 Go to previous messageGo to next message
yeohhs
Messages: 75
Registered: November 2005
Location: Malaysia
Member
Hi Graeme,

Thanks for reporting. This is strange as I assumed the main window automatically centers itself on the screen with the correct Z order. You're right about this too. I noticed that sometimes when I run it from theIDE, it is "hidden". There must be a Z order problem somewhere.

I'll have to look into the U++ source to see what is really happening. Smile

Will post a revised version soon.

Best Regards,
Yeoh

[Updated on: Sat, 11 November 2006 10:59]

Report message to a moderator

Re: My Simple U++ Application [message #6408 is a reply to message #6407] Sat, 11 November 2006 11:47 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
What about simply looking at TopWindow docs? Smile

(OK, I know - it is unusual to have things documented in U++ Smile

(OTOH, right now, only undocumented basic widgets those in Static.h and ScrollBar.h).

Mirek
Re: My Simple U++ Application [message #6409 is a reply to message #6407] Sat, 11 November 2006 11:58 Go to previous messageGo to next message
gprentice is currently offline  gprentice
Messages: 260
Registered: November 2005
Location: New Zealand
Experienced Member

I should have been more helpful and said it's only off-screen the first time or if I delete the config (.cfg) file. If the config file is present the app comes up in centre screen. Also the splash window is always centre screen.

Splash=0
SaveWinPos=0
PosX=0
PosY=0

I'll see what else I can find.

Graeme
Re: My Simple U++ Application [message #6410 is a reply to message #6409] Sat, 11 November 2006 12:05 Go to previous messageGo to next message
gprentice is currently offline  gprentice
Messages: 260
Registered: November 2005
Location: New Zealand
Experienced Member

Looks like it's just that you don't initialize class members mainwposx_ posy if there's no config file.

Graeme
Re: My Simple U++ Application [message #6418 is a reply to message #6410] Sat, 11 November 2006 14:40 Go to previous messageGo to next message
yeohhs
Messages: 75
Registered: November 2005
Location: Malaysia
Member
Yes, that's it. Thanks, Graeme.

Fixed version now uploaded! Smile


Obsolete attachment deleted.

[Updated on: Mon, 13 November 2006 17:52]

Report message to a moderator

Re: My Simple U++ Application [message #6432 is a reply to message #6418] Sun, 12 November 2006 19:47 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
Hi Yeoh,

I had tested your application under FreeBSD (it was winXP before) and I got an error, but I don't know what the reason is.

/home/masu/projects/upp/MyUppApp/MyUppApp.iml:4: error: expected unqualified-id before numeric constant


So I commented the affected line and it seems that it is not needed at all.

Matthias


931b81e7ea53320dccc37375b34b38c3
Re: My Simple U++ Application [message #6441 is a reply to message #6432] Mon, 13 November 2006 04:24 Go to previous messageGo to previous message
yeohhs
Messages: 75
Registered: November 2005
Location: Malaysia
Member
masu wrote on Mon, 13 November 2006 02:47


So I commented the affected line and it seems that it is not needed at all.
Matthias


Hi Matthias,

Thanks for testing it under FreeBSD. Smile
Yes, you're right. The "Complex" image in MyUppApp.iml is now not used. MSC8 did not detect this! I must look at the compiler options again.

Fixed! Smile Corrected version now uploaded.

Best Regards,
Yeoh
--
P.S. File attachment deleted. Please see latest upload below.


[Updated on: Tue, 19 December 2006 15:27]

Report message to a moderator

Previous Topic: Shared object with auto locking strategy
Next Topic: Bazaar - Call of duty
Goto Forum:
  


Current Time: Sat Apr 20 01:28:33 CEST 2024

Total time taken to generate the page: 0.86932 seconds