Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Question for some OCL and Bold users...

11 views
Skip to first unread message

EPO

unread,
Jan 16, 2008, 7:49:00 AM1/16/08
to

Hi Bold users,

I want display the current value form BoldListHandle (= blhProjects) in the first
level of a BoldTreeView.
In the root BoldGenericListPart, I use the event OnGetElement to evaluate an expression
(EvaluateAndSubscribeToExpression) with an expression like this
'PrjProjects.allInstances->select(boldID=curPrj.boldID)' and use
a variable (in a VariableList)
[TBoldHandleBasedExternalVariable.Create('curPrj', blrCurrentPrj, False)];
blrCurrentPrj(type =TBoldReferenceHandle) contains the current element of the same list (blhProjects).
The reason to use this (OnGetElement) event is just to have the possibility to use
a external variable.

Work good, except that there is no refresh if the current element
of the list change.
On which element it is needed to add a subscribption in the OnGetElement method
to have a refresh of the first level (all the others follow)of the tree
when the current value from the blhProjects change.

Some ideas ??? Maybe a better solution to achieve the same result

Thanks a lot

Eddy


Efim Mett

unread,
Jan 17, 2008, 9:07:05 AM1/17/08
to
Hi,

I guess 'PrjProjects.allInstances->select(boldID=curPrj.boldID)' is the same
as 'curPrj' except for the first one has type collection (PrjProjects), and
the second PrjProjects. If you programmatically ensure setting
ReferenceHandle Element, all should function OK without OnGetElement,
provided you have properly configured the OCLs for the tree nodes. No
additional subscriptions are required.

/Efim


"EPO" <eNo.SpamT...@winSVP.be> schrieb im Newsbeitrag
news:478e0b4c$2...@newsgroups.borland.com...

EPO

unread,
Jan 17, 2008, 9:37:08 AM1/17/08
to

"Efim Mett" <Efim...@t-online.de> wrote:
Hi Efim,

> I guess 'PrjProjects.allInstances->select boldID=curPrj.boldID)' is the same


> as 'curPrj' except for the first one has type collection (PrjProjects), and the second PrjProjects.

Yes, correct.

> If you programmatically ensure setting referenceHandle Element, all should function OK


> without OnGetElement, provided you have properly configured the OCLs for the tree nodes.
> No additional subscriptions are required.

Yes, I agree except that the BoldGenericListPart has no property to define
an external variable (curPrj) . :-((

Thanks,

Eddy

EPO

unread,
Jan 17, 2008, 10:28:31 AM1/17/08
to

Hi Efim,

Solution found! I have used a TBoldExpressionHandle with the OCL expression (containing the variable externe).
With it, I have a list with one BoldElement and in the expression of TBoldGenericListPart (of the first level),
I set only "self".

And it works perfectly.

Thanks to set me on the way :-)

Eddy
Brussels

Efim Mett

unread,
Jan 18, 2008, 1:52:32 PM1/18/08
to
I was glad to help you and that you like Bold :-)

/Efim

"EPO" <eNo.SpamT...@winSVP.be> schrieb im Newsbeitrag

news:478f822f$1...@newsgroups.borland.com...

0 new messages