j***@public.gmane.org
2005-04-17 19:55:49 UTC
Hi Hajo,
Could you explain the rules for making a RULE?
I haven't dug through the code too much here. I've just been puzzling over
the various examples.
The rule seems to consist of strings with a reference to a UI element on the
left hand side and some type of data on the right hand side. The left hand
expression consists of a XRC name followed by a .{Name} for which there
exists functions names Get{Name}() and Set{Name}(). There are some RapidUI
defined {Name}s like Current, Items, Column, Title and some others. Most of
the {Name}s seem defined within RapidUI but sometimes it seems like {Name}s
for which there exists a Get{Name} and Set{Name} in the wxWidgets class is
also acceptable.
The right-hand side seems to be a either a constant or a specific data
member. All of the examples use make_const or make_expr to construct the
data. The data type used for make_const or make_expr on the right hand side
must be equal to the parameter data type for the left-hand side's Set{Name}
function.
make_const() is used when no data conversion is required. The parameter is
an object instantiation. (?)
make_const<class>() is used when a new instance should be created with the
make_const parameter as the parameter for the new object.
make_expr<>() seems to expect a data member as a parameter. RapidUI searches
the Data structure that it received during initialization for the member
named. Aggregates can be accessed via the .operator, and collections can be
accessed via the special .Current member that RapidUI translates into the
data member that corresponds to the currently selected UI element or if none
is selected, then a new element. Perhaps this means that .Current is only a
right-hand expression name.
I have also observed that in addition to specific classes, make_expr can
cast to an accessor. Not being very familiar with stl, I'm not sure if
there are any restrictions on what can be cast as an accessor. (Are there
other special casts? Can one cast to an aggregate too?)
So for lists, it is necessary to know that the predefined 'Items' {Name}
exists and is an accessor. Then it follows that the
make_expr<accessor>("some_rapid_ui_data_member"), where
"some_rapid_ui_data_member" could be a collection or an aggregate depending
on what was expected.
Is this correct so far? There are suggestions that the syntax will be
extended further. For instance, the .Delete that I've seen on the left hand
side doesn't make sense expanding to GetDelete, SetDelete function calls.
Best regards,
Joel
---
[This E-mail scanned for viruses by Declude Virus]
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Could you explain the rules for making a RULE?
I haven't dug through the code too much here. I've just been puzzling over
the various examples.
The rule seems to consist of strings with a reference to a UI element on the
left hand side and some type of data on the right hand side. The left hand
expression consists of a XRC name followed by a .{Name} for which there
exists functions names Get{Name}() and Set{Name}(). There are some RapidUI
defined {Name}s like Current, Items, Column, Title and some others. Most of
the {Name}s seem defined within RapidUI but sometimes it seems like {Name}s
for which there exists a Get{Name} and Set{Name} in the wxWidgets class is
also acceptable.
The right-hand side seems to be a either a constant or a specific data
member. All of the examples use make_const or make_expr to construct the
data. The data type used for make_const or make_expr on the right hand side
must be equal to the parameter data type for the left-hand side's Set{Name}
function.
make_const() is used when no data conversion is required. The parameter is
an object instantiation. (?)
make_const<class>() is used when a new instance should be created with the
make_const parameter as the parameter for the new object.
make_expr<>() seems to expect a data member as a parameter. RapidUI searches
the Data structure that it received during initialization for the member
named. Aggregates can be accessed via the .operator, and collections can be
accessed via the special .Current member that RapidUI translates into the
data member that corresponds to the currently selected UI element or if none
is selected, then a new element. Perhaps this means that .Current is only a
right-hand expression name.
I have also observed that in addition to specific classes, make_expr can
cast to an accessor. Not being very familiar with stl, I'm not sure if
there are any restrictions on what can be cast as an accessor. (Are there
other special casts? Can one cast to an aggregate too?)
So for lists, it is necessary to know that the predefined 'Items' {Name}
exists and is an accessor. Then it follows that the
make_expr<accessor>("some_rapid_ui_data_member"), where
"some_rapid_ui_data_member" could be a collection or an aggregate depending
on what was expected.
Is this correct so far? There are suggestions that the syntax will be
extended further. For instance, the .Delete that I've seen on the left hand
side doesn't make sense expanding to GetDelete, SetDelete function calls.
Best regards,
Joel
---
[This E-mail scanned for viruses by Declude Virus]
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click