LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   C++ for VB, Powerbuilder, Delphi programmers (https://www.linuxquestions.org/questions/programming-9/c-for-vb-powerbuilder-delphi-programmers-461207/)

cxl 08-01-2006 11:43 AM

Quote:

Originally Posted by alred
do you guys know how ultimate++ parse their layout files ?? i have download their source , but kind of stuck at their "InitLayout()" and some other parsing functions ... donno how to follow their files and dirstories ... or do they really parse their layout files at all ??


btw ... also downloaded the binaries , but some of their dialogs are bad for my 14" monitor ... arrrrrggg ... always the same problems ...



.

No, .lay files are directly compiled as C++ templates. There is no "parse phase" and files are compiled to binary (not to be shipped with app).

(Of course, layout designer has to parse and save them, but that is another issue I guess).

Mirek

graemef 08-01-2006 12:38 PM

Quote:

Originally Posted by cxl
LAYOUT, ITEM and END_LAYOUT are macros (temporary defined several ways during several include passes of .lay file).

So that means that there is some background code, in this case macros, which alter the source code during the preprocessor stage.

I'm not trying to knock Ultimate++, what I was saying is that it is not a fair comparison. Because it would be possible to achieve the same in Java, and I'm sure that libraries exist that achieve the same elegance in creating the front end.

cxl 08-01-2006 01:02 PM

Quote:

Originally Posted by graemef
So that means that there is some background code, in this case macros, which alter the source code during the preprocessor stage.

Then it just depends on whether you believe that macros are part of C++ or not ;)

And those macros are not generated...

Anyway, this detail is not very important. What IS important that widgets are directly represented by class members - that saves a lot of troubles.

Quote:

I'm not trying to knock Ultimate++, what I was saying is that it is not a fair comparison.
In Qt comparison, layout setup code for Qt example is separated exactly because of this (and there is still huge difference in the rest ;)

Anyway, comparisons can never be done in a way which everybody would consider fair. They can give just some clue...

Mirek

cxl 08-15-2006 05:51 AM

Quote:

Originally Posted by alred
do you guys know how ultimate++ parse their layout files ??
.

Good explanation is now here in section 16:

http://upp.sourceforge.net/srcdoc$CtrlLib$Tutorial$en-us.html

Mirek

xhi 08-15-2006 10:42 AM

Quote:

Originally Posted by graemef
I have a friend who would say that this is just like comparing apples and oranges.

i dont know why people have a problem comparing apples and oranges. they are both round, both a fruit, and both grow on trees. they are obviously derived from the same class..
there should be a comparison operators defined for them. ;)

alred 08-15-2006 11:17 AM

Quote:

Originally Posted by cxl
Good explanation is now here in section 16:

http://upp.sourceforge.net/srcdoc$CtrlLib$Tutorial$en-us.html

Mirek


thanks , seems that its a very good(kind of complete) short "have a first look at" tutorial ...


//appreciated ...


.

sundialsvcs 08-15-2006 11:51 AM

As a PowerBuilder programmer, ciaonnau, you're very much accustomed to working with a high-level toolset which is optimized for building the type of applications that are your bread and butter. The C++ programming language is very bare-bones by comparison.

Within the Linux environment, there are other application development frameworks, certainly on par with what you can get in the world that you are used to.

And to be fair, the C++ texts have to start somewhere, as all programming texts do. A very general-purpose language such as C++ is considerably more difficult to describe. The power of PB comes from zeroing in on a fairly restricted, although extremely useful, problem-domain.

graemef 08-16-2006 03:35 AM

Quote:

Originally Posted by xhi
i dont know why people have a problem comparing apples and oranges

Try making cider from oranges... ;)

xhi 08-16-2006 07:40 AM

Quote:

Originally Posted by graemef
Try making cider from oranges... ;)

touché....

ppanyam 08-17-2006 07:42 AM

I have come across a small program which can create simple GUIs for java using NULL layout.ie) when you resize a window, the widgets dont change size. If your worry is a simple way to get GUI done you can use it. But it does not have too many options.. not even JTree is there! I put a JPanel in it and later make adjustments in the code generated by the program.

Whats more.. I think it is developed in VB!!

ppanyam

kalleanka 08-17-2006 08:18 AM

Glade migth be something. Go for version 2. http://www.gtk.org/tutorial/

I read the GTK Tutorial and i thing its ok even if the generated c code is shit. http://glade.gnome.org/

simon ingle finch 08-17-2006 09:03 AM

can anyone show me a solution to this question.

Write a C function, int init_vector (v), which assigns all the elements of a vector v[] to 0, and returns the number of elements assigned. Assume the vector is ended with '/0' (first element found after the last element of v[]).

xhi 08-17-2006 09:06 AM

Quote:

Originally Posted by simon ingle finch
can anyone show me a solution to this question.

Write a C function, int init_vector (v), which assigns all the elements of a vector v[] to 0, and returns the number of elements assigned. Assume the vector is ended with '/0' (first element found after the last element of v[]).

no, but someone can assist you with what you have already written, go over here for help with this

(start a new thread for a new topic)

ppanyam 08-18-2006 01:49 AM

Quote:

i dont know why people have a problem comparing apples and oranges. they are both round, both a fruit, and both grow on trees. they are obviously derived from the same class..
In pure OO terms, we will have
Code:

Orange inherits Citrus inherits Fruit
SweetLime inherits Citrus inherits Fruit
Apple inherits Fruit


From the above Class diagram

Code:

(Orange)o.isA(Fruit); returns True
(SweetLime)o.isA(Fruit); returns True
(Orange)o.isA(SweetLime); returns False
(Apple)o.isA(Fruit); returns True
(Orange)o.isA(Apple); returns False


Now you know what graemf meant. You also said, they are fruits. Both are fruits doesnt mean Apple and Orange are same.Same for languages. Sure they( java & C++ & VB ) have some things in common. They are programming languages, they have synatax etc. Thats where the similarities end.

ppanyam


All times are GMT -5. The time now is 05:00 PM.