no clue where FXAPI belongs

View: New views
4 Messages — Rating Filter:   Alert me  

no clue where FXAPI belongs

by adaml2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Just some sanity greping turned into problem:

grep include/* -ne 'class.*FX.*FX' | grep -v FXAPI
 suggests 1..2 classes without FXAPI ( namely: FXObjectListOf, FXRulerView )
or even this:
grep include/* -ne 'class.*FX' | grep -v FXAPI

Maybe write some longer (2line) recommendation in fxdefs.h:95
class should have FXAPI if parentclass has FXAPI => that means all FXObject offsprings


enjoy the rest of the week, ada
 

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users

Re: no clue where FXAPI belongs

by Jeroen van der Zijp :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sunday 16 August 2009, adaml2@... wrote:

>
> Just some sanity greping turned into problem:
>
> grep include/* -ne 'class.*FX.*FX' | grep -v FXAPI
>  suggests 1..2 classes without FXAPI ( namely: FXObjectListOf, FXRulerView )
> or even this:
> grep include/* -ne 'class.*FX' | grep -v FXAPI
>
> Maybe write some longer (2line) recommendation in fxdefs.h:95
> class should have FXAPI if parentclass has FXAPI => that means all FXObject offsprings

FXRulerView should indeed have had FXAPI declaration [now fixed!].
FXObjectListOf is a template, no if its used its typically fleshed
out in your own code, not in a FOX.DLL.


        Regards,

                        - Jeroen



--
+----------------------------------------------------------------------------+
| Copyright (C) 20:10 08/16/2009 Jeroen van der Zijp.   All Rights Reserved. |
+----------------------------------------------------------------------------+

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users

Re: no clue where FXAPI belongs

by adaml2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> FXObjectListOf is a template, no if its used its typically fleshed
... you're right.

>> grep include/* -ne 'class.*FX' | grep -v FXAPI
My fault again. This grep of mine was stdouting so many lines,
because most of them are just forward declarations ( ==boilerplate).
eg:
class FXBitmap;
I originally thought, huh, no FXAPI again, but haven't noticed, that
there is elsewhere
include/FXBitmap.h:54:class FXAPI FXBitmap : public FXDrawable {
It took me to a wrong way of thinking: what is the distinguishing
feature to use FXAPI, when there are so many classes, that don't have that.

So If I understand it correctly, rule no1: FXAPI should be everywhere.

---------
And a bit of a other sanity (last one, I promise)

["FXScrollBar", "FXWindow", [:ID_AUTOSCROLL]]
["FXText", "FXWindow", [:ID_DELETE]]
["FXTextField", "FXWindow", [:ID_DELETE]]

ID_AUTOSCROLL ... easy
ID_DELETE is serving 2 different purposes,
so it might get renamed: ID_DELETE_CHAR or GLYPH ??
Code-migrating issue for sure.

ada

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users

Re: no clue where FXAPI belongs

by Jeroen van der Zijp :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tuesday 18 August 2009, adaml2@... wrote:

> > FXObjectListOf is a template, no if its used its typically fleshed
> ... you're right.
>
> >> grep include/* -ne 'class.*FX' | grep -v FXAPI
> My fault again. This grep of mine was stdouting so many lines,
> because most of them are just forward declarations ( ==boilerplate).
> eg:
> class FXBitmap;
> I originally thought, huh, no FXAPI again, but haven't noticed, that
> there is elsewhere
> include/FXBitmap.h:54:class FXAPI FXBitmap : public FXDrawable {
> It took me to a wrong way of thinking: what is the distinguishing
> feature to use FXAPI, when there are so many classes, that don't have that.
>
> So If I understand it correctly, rule no1: FXAPI should be everywhere.

Everywhere where DLL linkage-attributes could be important, yes.  Not for
templates since they're expanded in the application code, not the DLL.

> And a bit of a other sanity (last one, I promise)
>
> ["FXScrollBar", "FXWindow", [:ID_AUTOSCROLL]]
> ["FXText", "FXWindow", [:ID_DELETE]]
> ["FXTextField", "FXWindow", [:ID_DELETE]]
>
> ID_AUTOSCROLL ... easy
> ID_DELETE is serving 2 different purposes,
> so it might get renamed: ID_DELETE_CHAR or GLYPH ??
> Code-migrating issue for sure.

You're totally correct, this is confusing and unintended.

I fixed the problems as follows:

        o renamed ID_DELETE to ID_DELETE_CHAR in FXText and FXTextField.
       
        o removed ID_AUTOSCROLL from FXWindow.h, moved it into FXScrollBar, FXScrollArea,
          and FXTextField,
         
        o moved ID_HSCROLLED and ID_VSCROLLED from FXWindow.h to FXScrollArea since thats
          the only place they're used.

Thanks for the carefull scrutiny.


                - Jeroen

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users