|
It is currently Tue Feb 07, 2012 8:46 pm
|
View unanswered posts | View active topics
| Welcome |
|
Welcome to RHAPSODY4YOU
You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, respond to polls, upload and download content, and access many other special features. Registration is fast, simple, and absolutely free, so please, register to join our community today. |
 |
|
 |
|
| Author |
Message |
|
DanD
|
Post subject: Anyone compiling with all warnings turned on -Wall Posted: Wed Oct 07, 2009 6:38 pm |
Joined: Wed Sep 16, 2009 1:26 pm Posts: 5 Location: Minneapolis
|
|
Couple questions.
I would like to know if anyone out there is compiling the Rhapsody Generated code with all warnings turned on? If so are you finding many of cases where rhapsody will not let you fix warnings?
As a rule I always compile with all warnings turned on. As soon as I see a warning I clean it up before moving on. However I am finding Rhapsody can make it difficult.
Here is a specific example....... When compiling with all warnings -Wall. If I want to name a Active Class (Thread Name) to anything other than the default and at the same time the Active Class has member variables. I run into an error with the order of which OMThread(Thread_Name) is initialized in the constructor.
Example AppService:AppService() : isInitialized(true), OMThread(Test_Thread_Name) { } I get the error that isInitialized will be initialized after base clase 'OMThread' when initilized here.
I was hoping there was a method for setting the thread name to get around this but there is not. For now I just choose not to name threads which eventually I need to do.
Does anyone know away around this?
Thanks, Dan
|
|
|
|
 |
|
Christian
|
Post subject: Re: Anyone compiling with all warnings turned on -Wall Posted: Thu Oct 08, 2009 7:43 am |
Joined: Tue Jul 14, 2009 9:21 am Posts: 22 Location: Germany
|
|
Hi DanD,
two days ago a came across the same problem -- not with OMThread but the problem was the same. But I couldn't find a work around for this neither.
Maybe anyone else has a solution?
Regards, Christian
|
|
|
|
 |
|
DanD
|
Post subject: Re: Anyone compiling with all warnings turned on -Wall Posted: Thu Oct 08, 2009 5:07 pm |
Joined: Wed Sep 16, 2009 1:26 pm Posts: 5 Location: Minneapolis
|
|
Hello Christian,
Do you have AttributesAutoArrange set to false. By setting AttributesAutoArrange to false I was able to get around allot of my ordering related warnings. Just not the one I described in my first post. I have OperationsAutoArrange set to False also. I think i did this cause I didn't like the order in which methods in rhapsody were generated.
If you look in the Documentation for CG::Class:AttributesAutoArrange is says... "The AttributesAutoArrange property is a Boolean UI helper property. You should not modify this property directly. (Default = Checked)"
I decided to ignore their warning. We have been using this setting (AttributesAutoArrange = false) for several months and it hasn't caused us any bad side effects.
We have this set along with our other settings in our site.prep file.
Subject CG Metaclass Class Property OperationsAutoArrange Bool "False" Property AttributesAutoArrange Bool "False" end
Thought I would mention this just in case this fixes any of your problems.
|
|
|
|
 |
|
Farquad
|
Post subject: Re: Anyone compiling with all warnings turned on -Wall Posted: Fri Oct 09, 2009 5:38 pm |
Joined: Thu Sep 13, 2007 7:34 pm Posts: 397 Location: London
|
|
I set ordering for everything in the site.prp.
Subject Browser Metaclass Settings Property ShowOrder Bool "True"
OK so the warning is saying that inherited classes should really be constructed prior to the class attributes. This is because in C++ we can make things really quite interesting by using inheritance. C++ is a language that lets us do too much perhaps? The OXF favours inheritance over aggregation because, it was written 12 years ago and has to stay backwards compatible.
We've learnt better OO concepts since then.
Ensuring that you use a combination of 'aggregation over inheritance' and interfaces makes for simple maintainable code and a more natural approach to modeling.
|
|
|
|
 |
|
|
 |
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|