IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Profile: SRobert
About
User Name: SRobert
Forum Rank: Member
Real Name:
Location France
Occupation:
Interests:
Gender: None Specified
Statistics
Joined: Tuesday, July 17, 2007
Last Visit: Monday, March 10, 2008 11:41:24 AM
Number of Posts: 15
[0.08% of all post / 0.00 posts per day]
Avatar
Last 10 Posts
Topic: Bad result list when using CanPerformActionWith
Posted: Monday, March 10, 2008 11:16:51 AM
Hello,

having this structure :

Code:

<item>
  <picture>
    <title>Some title</title>
    <fileref>some image path</fileref>
  </picture>
  <text>some text</text>
</item>


Let's say that the text element is not present.
Let's say that the cursor is in the fileref element.

A rigth click gives :

Code:

Insert after->picture->text
            ->item->item


but if I use the CanPerformActionWith method, I obtain the list {picture, item}. How is it possible to get the second level of menu ?

Regards

Stéphane
Topic: Incomplete result list when using CanPerformActionWith
Posted: Friday, March 7, 2008 10:08:25 AM
Hello,

I try to implement my own action menu, using CanPerformActionWith [1].

When I call the method with nAction = k_ActionApply, I should obtain 5 answers, but I get only the first element, unless I have done a right-click before calling the method :

1 - select a text ;
2 - display my menu : only one item in the list ;
3 - right-click on Authentic : 5 items in the "apply" list ;
4 - display my menu : 5 items in the "apply" list (if I have opened the "apply" sub-menu on the built-in popup menu).

This append each time the selection change, and only on the apply action (InsertBefore ou Remove seem OK).

Is there a method to call prior to CanPerformActionWith to initialize correctly the list ?

Regards,

Stéphane

Delphi code :

Code:

function GetPossiblesItems(Action : integer) : TStringList;
var
    Elements    : OleVariant;
    HB            : integer;
    i            : integer;
    LB            : integer;
begin
  Result := TStringList.Create;
  Authentic.AuthenticView.Selection.CanPerformActionWith(Action, Elements);
  LB    := VarArrayLowBound(Elements, 1);
  HB    := VarArrayHighBound(Elements, 1);
  for i := LB to HB do
    Result.Add(Elements[i]);
end;



_____________________________________________________
[1] If I use GetAllowedElements, I have an error message (Unable to load all required resources (spd, xsd, xml)) when nAction = k_ActionRemove).
Topic: A/V when using NewCustomButton
Posted: Tuesday, March 4, 2008 12:48:51 PM
Hello,

in this code (Delphi 7) :

Code:
    
var
  BtnPath : string;
  Buttons : IAuthenticToolbarButtons2;
  Editor  : TAuthentic;
  N      : integer;
  TBRows  : IAuthenticToolbarRows;
  TBRow      : IAuthenticToolbarRow;
begin
  Editor                 := MyAuthenticEditor.Authentic;
  Editor.TextStateBmpURL := some_path;
  TBRows                 := Editor.ToolbarRows;
  N             := TBRows.Count + 1;
  TBRows.NewRow(N);
  TBRow             := TBRows.Item[N];
  TBRow.Alignment        := 2;
  Buttons                := TBRow.Buttons;
  Buttons.NewSeparator(1);
  Buttons.NewButton(1, 3);
  Buttons.NewCustomButton(3, 'caption', 'hint', 'btn01.bmp');
  Editor.ReloadToolbars;
end;

everything is working well except the NewCustomButton who triggers an Acces Violation Exception (it doesn't depend on the value of the parameters).

I have seen that there is a IAuthenticToolbarButtons interface (without the NewCustomButton method), and a IAuthenticToolbarButtons2 (having it).

If I trace the value of TBRow.Buttons, I can see "Pointer as IAuthenticToolbarButtons2", so it should be good, but...

Any idea ?

Regards

Stéphane
Topic: Generate attribute entries automatically
Posted: Thursday, February 28, 2008 3:23:16 PM
Hello,

if you have the structure :

Code:

<element id="1">
  <name>name1</name>
</element>


and the user do a copy/paste :

Code:

<element id="1">
  <name>name1</name>
</element>
<element id="1">
  <name>name2</name>
</element>


you have 2 elements with the same ID. It's possible to detect this situation, but I cant't see a way to know who of "name1" or "name2" should keep the ID "1"...
Topic: Generate attribute entries automatically
Posted: Thursday, February 28, 2008 3:16:36 PM
Hello,

if you have the structure :

Code:

<element id="1">
  <name>name1</name>
</element>


and the user do a copy/paste :

Code:

<element id="1">
  <name>name1</name>
</element>
<element id="1">
  <name>name2</name>
</element>


you have 2 elements with the same ID. It's possible to detect this situation, but I cant't see a way to know who of "name1" or "name2" should keep the ID "1"...
Topic: Browsing for local file/Firing custom event from Authentic ActiveX
Posted: Thursday, February 21, 2008 10:07:08 AM
Hello,

I plan to use Authentic as an ActiveX embeded in a Delphi application.

This application manages images as image file reference (ie <picture path="xxx"/>).

In StyleVision, I can add an image and assign "@path" as source, and it's work.

But I would like to add a kind of "Browse..." button beside the path, to allow the user to display an openfile dialog box in order to select the image he wants.

1 - is there a "wired" solution in StyleVision that I have not seen ?
2 - could it be possible to add an object (as a picture looking like a button, for example) and assign it a custom event name, event who could be fired by Authentic and processed by the host application ? Something like attachCallback("myCustomEvent", myProc) ?
3 - any other solution ?

Regards

Stéphane
Topic: Browsing for local file/Firing custom event from Authentic ActiveX
Posted: Thursday, February 21, 2008 9:57:54 AM
Hello,

I plan to use Authentic as an ActiveX embeded in a Delphi application.

This application manages images as image file reference (ie <picture path="xxx"/>).

In StyleVision, I can add an image and assign "@path" as source, and it's work.

But I would like to add a kind of "Browse..." button beside the path, to allow the user to display an openfile dialog box in order to select the image he wants.

1 - is there a "wired" solution in StyleVision that I have not seen ?
2 - could it be possible to add an object (as a picture looking like a button, for example) and assign it a custom event name, event who could be fired by Authentic and processed by the host application ? Something like attachCallback("myCustomEvent", myProc) ?
3 - any other solution ?

Regards

Stéphane
Topic: Distinction between stored and displayed values in a XPath combo-box
Posted: Thursday, February 21, 2008 9:38:40 AM
Thank you.
Topic: Distinction between stored and displayed values in a XPath combo-box
Posted: Wednesday, February 20, 2008 5:21:37 PM
Hello,

when we use a combo-box to allow a user to change a value, we have the possibility to give a "visible entry" and an "XML Value".

Is there any possibility to do the same thing when using an XPath expression ? I would like to use an XML as :

<shared-items>
<shared-item key="key1">Display 1</shared-item>
<shared-item key="key2">Display 2</shared-item>
<shared-item key="key3">Display 3</shared-item>
...
</shared-items>

displaying "Display x" but storing "keyx".

Regards

Stéphane
Topic: Authentic ActiveX with Delphi (attachCallback problem)
Posted: Monday, July 30, 2007 2:14:39 PM
OK, I think I got it.

The idea is to get the IDispatch interface from the IUnknown, then to get the IAuthenticCommand interface from the IDispatch.

Something like :

procedure TAuthenticControler.AuthenticCallback_Callback;
const
-- // found this constant on the Internet
-- kIDispatch = '{00020400-0000-0000-C000-000000000046}';
var
-- Command : IAuthenticCommand;
-- Dispatch : IDispatch;
-- IID_IDispatch : TGUID;
-- SrcElement : IUnknown;

begin
-- // create a GUID for IDispatch interface
-- IID_IDispatch := StringToGUID(kIDispatch);
-- // cast Authentic.event.SrcElement to an IUnknown
-- SrcElement := Authentic.event.SrcElement;
-- // get the IDispatch from the IUnknown
-- if SrcElement.QueryInterface(IID_IDispatch, Dispatch) = S_OK then
-- begin
---- // get the IAuthenticCommand from the IDispatch
---- if Dispatch.QueryInterface(IID_IAuthenticCommand, Command) = S_OK then
---- begin
------ if Command.CommandID = x then
------ begin
-------- // Process command X
------ end;
---- end;
-- end;
end;

Hope this can help somebody someday,

and NOW I can be quietly in holidays

Regards,

Stéphane

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.